[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

Duncan Coutts duncan at haskell.org
Fri Apr 23 15:21:56 UTC 2010


The following commit has been merged in the master branch:
commit b7ffe166901d1730dfe54b5df267f6d2a68e45ad
Author: Duncan Coutts <duncan at haskell.org>
Date:   Tue Dec 11 22:52:13 2007 +0100

    Make it build with ghc-6.6 and 6.8 using configurations
    
    requires one slightly less than pleasent hack because Patternsignatures
    is not recognised by ghc-6.6 or the cabal that comes with 6.8.1, only
    by the latest cabal that comes with 6.8.2.
    Drop GHC-Options: -O2 as Cabal adds optimizations by default but also
    lets the user configure with --disable-optimization, so there is no longer
    any need to force optimisations on all the time and it prevents users
    configuring without optimisations for quick builds.

diff --git a/MissingH.cabal b/MissingH.cabal
index 38b63da..b164955 100644
--- a/MissingH.cabal
+++ b/MissingH.cabal
@@ -14,8 +14,16 @@ Description:  MissingH is a library of all sorts of utility functions for
  Haskell programmers.  It is written in pure Haskell and thus should
  be extremely portable and easy to use.
 Stability: Beta
-Hs-Source-Dirs: src
-Exposed-Modules: Data.String, System.IO.Utils, System.IO.Binary, Data.List.Utils,
+Build-Type: Simple
+Cabal-Version: >=1.2
+
+Flag splitBase
+  description: Choose the new smaller, split-up base package.
+
+Library
+ Hs-Source-Dirs: src
+ Exposed-Modules:
+  Data.String, System.IO.Utils, System.IO.Binary, Data.List.Utils,
   System.Daemon,
   Text.ParserCombinators.Parsec.Utils,
   Test.HUnit.Utils,
@@ -49,17 +57,31 @@ Exposed-Modules: Data.String, System.IO.Utils, System.IO.Binary, Data.List.Utils
   System.Debian, System.Debian.ControlParser,
   Data.MIME.Types,
   System.Console.GetOpt.Utils
-Extensions: ExistentialQuantification, OverlappingInstances, 
-   UndecidableInstances, CPP
-Build-Depends: network, parsec, base,
+
+ Extensions: ExistentialQuantification, OverlappingInstances,
+   UndecidableInstances, CPP, Rank2Types,
+   MultiParamTypeClasses, FlexibleInstances, FlexibleContexts
+ -- Hack because ghc-6.6 and the Cabal the comes with ghc-6.8.1
+ -- does not understand the PatternSignatures extension.
+ -- The Cabal that comes with ghc-6.8.2 does understand it, so
+ -- this hack can be dropped if we require Cabal-Version: >=1.2.3
+ If impl(ghc >= 6.8)
+   GHC-Options: -XPatternSignatures
+
+ Build-Depends: network, parsec, base,
                haskell98, mtl, HUnit, regex-compat, QuickCheck, filepath,
                hslogger
--- Cabal will automatically add unix here on non-Windows platforms
-GHC-Options: -O2
+ If flag(splitBase)
+   Build-Depends: base >= 3, directory, random, process, old-time,
+                             containers, old-locale, array
+ Else
+   Build-Depends: base < 3
+ If ! os(windows)
+   Build-Depends: unix
 
-Executable: runtests
-Buildable: False
-Main-Is: runtests.hs
-HS-Source-Dirs: testsrc, .
-Extensions: ExistentialQuantification, OverlappingInstances,
+Executable runtests
+  Buildable: False
+  Main-Is: runtests.hs
+  HS-Source-Dirs: testsrc, .
+  Extensions: ExistentialQuantification, OverlappingInstances,
     UndecidableInstances, CPP
diff --git a/Setup.hs b/Setup.hs
index 538369f..613e622 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,22 +1,5 @@
 #!/usr/bin/env runhugs
 
 import Distribution.Simple
-import Distribution.PackageDescription
-import Distribution.Simple.LocalBuildInfo
-import Distribution.Version
-import System.Info
-import Data.Maybe
-import System.Cmd
-
-missingHooks = defaultUserHooks {confHook = customConfHook}
-
-customConfHook descrip flags =
-    let mydescrip = case System.Info.os of
-                      "mingw32" -> descrip
-                      _ -> descrip {buildDepends = 
-                                        (Dependency "unix" AnyVersion) :
-                                        buildDepends descrip}
-    in (confHook defaultUserHooks) mydescrip flags
-
-main = defaultMainWithHooks missingHooks
 
+main = defaultMain

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list