[commit: packages/ghc-prim] master: Modernize `ghc-prim.cabal` to `cabal-version>=1.10` (e3687f7)

git at git.haskell.org git at git.haskell.org
Sun Oct 27 09:48:25 UTC 2013


Repository : ssh://git@git.haskell.org/ghc-prim

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e3687f79e0f7e06af24be1e819aff08fe62f1158/ghc-prim

>---------------------------------------------------------------

commit e3687f79e0f7e06af24be1e819aff08fe62f1158
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Oct 27 09:37:22 2013 +0100

    Modernize `ghc-prim.cabal` to `cabal-version>=1.10`
    
    This also removes the use of `makefileHook` in `Setup.hs` which was
    dropped from the `Cabal` API
    
    Note: This cleanups make `ghc-prim` almost a proper Cabal package;
    `cabal sdist` still needs to be tweaked to change `build-type` to
    `Simple`, to make the resulting ghc-prim source distribution package
    self-contained.


>---------------------------------------------------------------

e3687f79e0f7e06af24be1e819aff08fe62f1158
 Setup.hs       |    2 --
 ghc-prim.cabal |   47 ++++++++++++++++++++++++++++++++---------------
 2 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/Setup.hs b/Setup.hs
index 5e736ab..5bb17e2 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -23,8 +23,6 @@ main = do let hooks = simpleUserHooks {
                           $ regHook simpleUserHooks,
                   buildHook = build_primitive_sources
                             $ buildHook simpleUserHooks,
-                  makefileHook = build_primitive_sources
-                               $ makefileHook simpleUserHooks,
                   haddockHook = addPrimModuleForHaddock
                               $ build_primitive_sources
                               $ haddockHook simpleUserHooks }
diff --git a/ghc-prim.cabal b/ghc-prim.cabal
index 6793adb..ffb32af 100644
--- a/ghc-prim.cabal
+++ b/ghc-prim.cabal
@@ -3,48 +3,65 @@ version:        0.3.1.0
 -- GHC 7.6.1 released with 0.3.0.0
 license:        BSD3
 license-file:   LICENSE
+category:       GHC
 maintainer:     libraries at haskell.org
-bug-reports: http://hackage.haskell.org/trac/ghc/newticket?component=libraries%20%28other%29
+bug-reports:    http://ghc.haskell.org/trac/ghc/newticket?component=libraries%20%28other%29&keywords=ghc-prim
 synopsis:       GHC primitives
+cabal-version:  >=1.10
+build-type:     Custom
 description:
     GHC primitives.
-cabal-version:  >=1.6
-build-type: Custom
 
 source-repository head
     type:     git
     location: http://git.haskell.org/packages/ghc-prim.git
 
-flag include-ghc-prim {
+source-repository this
+    type:     git
+    location: http://git.haskell.org/packages/ghc-prim.git
+    tag:      ghc-prim-0.3.1.0-release
+
+flag include-ghc-prim
     Description: Include GHC.Prim in exposed-modules
     default: False
-}
 
-Library {
-    build-depends: rts
+Library
+    default-language: Haskell2010
+    other-extensions:
+        BangPatterns
+        CPP
+        DeriveGeneric
+        MagicHash
+        MultiParamTypeClasses
+        NoImplicitPrelude
+        StandaloneDeriving
+        Trustworthy
+        TypeFamilies
+        UnboxedTuples
+        UnliftedFFITypes
+
+    build-depends: rts == 1.0.*
+
     exposed-modules:
-        GHC.Classes
         GHC.CString
+        GHC.Classes
         GHC.Debug
+        GHC.IntWord64
         GHC.Magic
         GHC.PrimopWrappers
-        GHC.IntWord64
         GHC.Tuple
         GHC.Types
 
-    if flag(include-ghc-prim) {
+    if flag(include-ghc-prim)
         exposed-modules: GHC.Prim
-    }
 
     c-sources:
+        cbits/bswap.c
         cbits/debug.c
         cbits/longlong.c
         cbits/popcnt.c
-        cbits/bswap.c
         cbits/word2float.c
-    extensions: CPP, MagicHash, ForeignFunctionInterface, UnliftedFFITypes,
-                UnboxedTuples, EmptyDataDecls, NoImplicitPrelude
+
     -- We need to set the package name to ghc-prim (without a version number)
     -- as it's magic.
     ghc-options: -package-name ghc-prim
-}



More information about the ghc-commits mailing list