1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
--- 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
|