Add base4 support
authorIan Lynagh <igloo@earth.li>
Mon, 25 Aug 2008 12:10:16 +0000 (12:10 +0000)
committerIan Lynagh <igloo@earth.li>
Mon, 25 Aug 2008 12:10:16 +0000 (12:10 +0000)
hsc2hs.cabal

index 4d8e0a6..8cab9e4 100644 (file)
@@ -23,19 +23,29 @@ Data-Files: template-hsc.h
 build-type: Simple
 cabal-version: >=1.2
 
+Flag base4
+    Description: Choose the even newer, even smaller, split-up base package.
+
 Flag base3
-  Description: Choose the new smaller, split-up base package.
+    Description: Choose the new smaller, split-up base package.
 
 Executable hsc2hs
     Main-Is: Main.hs
     -- needed for ReadP (used by Data.Version)
     Hugs-Options: -98
     Extensions: CPP, ForeignFunctionInterface
+
+    if flag(base4)
+        Build-Depends: base       >= 4   && < 5
     if flag(base3)
-        Build-Depends: base       >= 3   && < 4,
-                       directory  >= 1   && < 1.1,
+        Build-Depends: base       >= 3   && < 4
+    if !flag(base3) && !flag(base4)
+        Build-Depends: base       < 3
+
+    if flag(base4)
+        Build-Depends: getopt     >= 0.1 && < 0.2
+    if flag(base3) || flag(base4)
+        Build-Depends: directory  >= 1   && < 1.1,
                        process    >= 1   && < 1.1
-    else
-        Build-Depends: base < 3
     Build-Depends: haskell98