You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-text/pandoc/files/pandoc-1.9.4.1-ghc-7.5.patch

76 lines
3.0 KiB

--- pandoc-1.9.4.1-orig/pandoc.cabal 2012-06-09 00:53:31.000000000 +0400
+++ pandoc-1.9.4.1/pandoc.cabal 2012-06-22 10:05:19.423632114 +0400
@@ -197,7 +197,7 @@
-- Note: the following is duplicated in all stanzas.
-- It needs to be duplicated because of the library & executable flags.
-- BEGIN DUPLICATED SECTION
- Build-Depends: containers >= 0.1 && < 0.5,
+ Build-Depends: containers >= 0.1 && < 0.6,
parsec >= 3.1 && < 3.2,
mtl >= 1.1 && < 2.2,
network >= 2 && < 2.4,
@@ -302,7 +302,7 @@
-- Note: the following is duplicated in all stanzas.
-- It needs to be duplicated because of the library & executable flags.
-- BEGIN DUPLICATED SECTION
- Build-Depends: containers >= 0.1 && < 0.5,
+ Build-Depends: containers >= 0.1 && < 0.6,
parsec >= 3.1 && < 3.2,
mtl >= 1.1 && < 2.2,
network >= 2 && < 2.4,
@@ -366,7 +366,7 @@
-- Note: the following is duplicated in all stanzas.
-- It needs to be duplicated because of the library & executable flags.
-- BEGIN DUPLICATED SECTION
- Build-Depends: containers >= 0.1 && < 0.5,
+ Build-Depends: containers >= 0.1 && < 0.6,
parsec >= 3.1 && < 3.2,
mtl >= 1.1 && < 2.2,
network >= 2 && < 2.4,
--- pandoc-1.9.4.1-orig/Setup.hs 2012-06-09 00:53:31.000000000 +0400
+++ pandoc-1.9.4.1/Setup.hs 2012-06-22 10:09:55.570160482 +0400
@@ -1,3 +1,5 @@
+{-# LANGUAGE CPP #-}
+
import Distribution.Simple
import Distribution.Simple.Setup
(copyDest, copyVerbosity, fromFlag, installVerbosity, BuildFlags(..))
@@ -20,6 +22,10 @@
import Data.Maybe ( catMaybes )
import Data.List ( (\\) )
+#if (__GLASGOW_HASKELL__>=705)
+import Data.Time.Clock.POSIX ( utcTimeToPOSIXSeconds )
+#endif
+
main :: IO ()
main = do
defaultMainWithHooks $ simpleUserHooks {
@@ -89,14 +95,24 @@
installOrdinaryFiles verbosity (mandir (absoluteInstallDirs pkg lbi copy))
(zip (repeat manDir) manpages)
+getModificationTime' :: FilePath -> IO ClockTime
+getModificationTime' file =
+#if (__GLASGOW_HASKELL__>=705)
+ do utcTime <- getModificationTime file
+ let s = (toEnum . fromEnum . utcTimeToPOSIXSeconds) utcTime
+ return (TOD s 0)
+#else
+ getModificationTime file
+#endif
+
-- | Returns a list of 'dependencies' that have been modified after 'file'.
modifiedDependencies :: FilePath -> [FilePath] -> IO [FilePath]
modifiedDependencies file dependencies = do
- fileModTime <- catch (getModificationTime file) $
+ fileModTime <- catch (getModificationTime' file) $
\e -> if isDoesNotExistError e
then return (TOD 0 0) -- the minimum ClockTime
else ioError e
- depModTimes <- mapM getModificationTime dependencies
+ depModTimes <- mapM getModificationTime' dependencies
let modified = zipWith (\dep time -> if time > fileModTime then Just dep else Nothing) dependencies depModTimes
return $ catMaybes modified