Gentoo Archives: gentoo-commits

From: "Mark Wright (gienah)" <gienah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-text/pandoc/files: pandoc-1.9.3-ghc-7.5.patch
Date: Sat, 02 Jun 2012 09:49:55
Message-Id: 20120602094945.965192004C@flycatcher.gentoo.org
1 gienah 12/06/02 09:49:45
2
3 Added: pandoc-1.9.3-ghc-7.5.patch
4 Log:
5 Bump pandoc to 1.9.3
6
7 (Portage version: 2.1.10.64/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 app-text/pandoc/files/pandoc-1.9.3-ghc-7.5.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/pandoc/files/pandoc-1.9.3-ghc-7.5.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-text/pandoc/files/pandoc-1.9.3-ghc-7.5.patch?rev=1.1&content-type=text/plain
14
15 Index: pandoc-1.9.3-ghc-7.5.patch
16 ===================================================================
17 --- pandoc-1.9.3-orig/pandoc.cabal 2012-05-13 13:04:40.000000000 +1000
18 +++ pandoc-1.9.3/pandoc.cabal 2012-05-19 16:39:31.005923639 +1000
19 @@ -193,7 +193,7 @@
20 -- Note: the following is duplicated in all stanzas.
21 -- It needs to be duplicated because of the library & executable flags.
22 -- BEGIN DUPLICATED SECTION
23 - Build-Depends: containers >= 0.1 && < 0.5,
24 + Build-Depends: containers >= 0.1 && < 0.6,
25 parsec >= 3.1 && < 3.2,
26 mtl >= 1.1 && < 2.2,
27 network >= 2 && < 2.4,
28 @@ -298,7 +298,7 @@
29 -- Note: the following is duplicated in all stanzas.
30 -- It needs to be duplicated because of the library & executable flags.
31 -- BEGIN DUPLICATED SECTION
32 - Build-Depends: containers >= 0.1 && < 0.5,
33 + Build-Depends: containers >= 0.1 && < 0.6,
34 parsec >= 3.1 && < 3.2,
35 mtl >= 1.1 && < 2.2,
36 network >= 2 && < 2.4,
37 @@ -362,7 +362,7 @@
38 -- Note: the following is duplicated in all stanzas.
39 -- It needs to be duplicated because of the library & executable flags.
40 -- BEGIN DUPLICATED SECTION
41 - Build-Depends: containers >= 0.1 && < 0.5,
42 + Build-Depends: containers >= 0.1 && < 0.6,
43 parsec >= 3.1 && < 3.2,
44 mtl >= 1.1 && < 2.2,
45 network >= 2 && < 2.4,
46 --- pandoc-1.9.3-orig/Setup.hs 2012-05-13 13:04:40.000000000 +1000
47 +++ pandoc-1.9.3/Setup.hs 2012-05-19 17:03:57.948263601 +1000
48 @@ -1,3 +1,5 @@
49 +{-# LANGUAGE CPP #-}
50 +
51 import Distribution.Simple
52 import Distribution.Simple.Setup
53 (copyDest, copyVerbosity, fromFlag, installVerbosity, BuildFlags(..))
54 @@ -20,6 +22,10 @@
55 import Data.Maybe ( catMaybes )
56 import Data.List ( (\\) )
57
58 +#if (__GLASGOW_HASKELL__>=705)
59 +import Data.Time.Clock.POSIX ( utcTimeToPOSIXSeconds )
60 +#endif
61 +
62 main :: IO ()
63 main = do
64 defaultMainWithHooks $ simpleUserHooks {
65 @@ -89,14 +95,24 @@
66 installOrdinaryFiles verbosity (mandir (absoluteInstallDirs pkg lbi copy))
67 (zip (repeat manDir) manpages)
68
69 +getModificationTime' :: FilePath -> IO ClockTime
70 +getModificationTime' file =
71 +#if (__GLASGOW_HASKELL__>=705)
72 + do utcTime <- getModificationTime file
73 + let s = (toEnum . fromEnum . utcTimeToPOSIXSeconds) utcTime
74 + return (TOD s 0)
75 +#else
76 + getModificationTime file
77 +#endif
78 +
79 -- | Returns a list of 'dependencies' that have been modified after 'file'.
80 modifiedDependencies :: FilePath -> [FilePath] -> IO [FilePath]
81 modifiedDependencies file dependencies = do
82 - fileModTime <- catch (getModificationTime file) $
83 + fileModTime <- catch (getModificationTime' file) $
84 \e -> if isDoesNotExistError e
85 then return (TOD 0 0) -- the minimum ClockTime
86 else ioError e
87 - depModTimes <- mapM getModificationTime dependencies
88 + depModTimes <- mapM getModificationTime' dependencies
89 let modified = zipWith (\dep time -> if time > fileModTime then Just dep else Nothing) dependencies depModTimes
90 return $ catMaybes modified