summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/pandoc/files/pandoc-1.9.3-ghc-7.5.patch')
-rw-r--r--app-text/pandoc/files/pandoc-1.9.3-ghc-7.5.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/app-text/pandoc/files/pandoc-1.9.3-ghc-7.5.patch b/app-text/pandoc/files/pandoc-1.9.3-ghc-7.5.patch
new file mode 100644
index 000000000000..4a8b013b57a4
--- /dev/null
+++ b/app-text/pandoc/files/pandoc-1.9.3-ghc-7.5.patch
@@ -0,0 +1,75 @@
+--- pandoc-1.9.3-orig/pandoc.cabal 2012-05-13 13:04:40.000000000 +1000
++++ pandoc-1.9.3/pandoc.cabal 2012-05-19 16:39:31.005923639 +1000
+@@ -193,7 +193,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,
+@@ -298,7 +298,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,
+@@ -362,7 +362,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.3-orig/Setup.hs 2012-05-13 13:04:40.000000000 +1000
++++ pandoc-1.9.3/Setup.hs 2012-05-19 17:03:57.948263601 +1000
+@@ -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
+