[commit: packages/time] master: Hack due to time needing Win32 on Windows (dbd2265)
git at git.haskell.org
git at git.haskell.org
Sun Dec 20 07:51:15 UTC 2015
Repository : ssh://git@git.haskell.org/time
On branch : master
Link : http://git.haskell.org/packages/time.git/commitdiff/dbd22650b674227dff9c45c53e921367441fdc99
>---------------------------------------------------------------
commit dbd22650b674227dff9c45c53e921367441fdc99
Author: Ian Lynagh <igloo at earth.li>
Date: Sun Apr 15 14:52:27 2007 -0700
Hack due to time needing Win32 on Windows
darcs-hash:20070415215227-3fd76-ee66b60c836f81fa879ba9e80220fac57f47e261
>---------------------------------------------------------------
dbd22650b674227dff9c45c53e921367441fdc99
Setup.hs | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/Setup.hs b/Setup.hs
index 3c31867..f078742 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -10,12 +10,15 @@ import System.Cmd
import System.Directory
import System.Environment
import System.Exit
+import System.Info
main :: IO ()
main = do args <- getArgs
let (ghcArgs, args') = extractGhcArgs args
(_, args'') = extractConfigureArgs args'
hooks = defaultUserHooks {
+ confHook = add_Win32_dep
+ $ confHook defaultUserHooks,
buildHook = add_ghc_options ghcArgs
$ buildHook defaultUserHooks,
runTests = runTestScript }
@@ -72,3 +75,14 @@ add_ghc_options args f pd lbi muhs x
pd' = pd { library = Just lib' }
f pd' lbi muhs x
+type ConfHook = PackageDescription -> ConfigFlags -> IO LocalBuildInfo
+
+-- XXX Hideous hack
+add_Win32_dep :: ConfHook -> ConfHook
+add_Win32_dep f pd cf
+ = do let pd' = if os == "mingw32"
+ then pd { buildDepends = Dependency "Win32" AnyVersion
+ : buildDepends pd }
+ else pd
+ f pd' cf
+
More information about the ghc-commits
mailing list