diff --git a/packagelibs.sh b/packagelibs.sh index 9531fdcc..9129ab6a 100755 --- a/packagelibs.sh +++ b/packagelibs.sh @@ -3,5 +3,5 @@ if [[ $1 == "" ]] ; then echo "Usage: ./packagelibs.sh version" else - tar -cjf haste-libs-$1.tar.bz2 --exclude-backups '--exclude=*.hi' '--exclude=*.o' include libraries/rts.pkg libraries/haste-lib/{haste-lib.cabal,src/{Haste.hs,Haste},LICENSE} libraries/time libraries/ghc-7.8/{array/{array.cabal,Data,include,LICENSE,Setup.hs},base/{base.cabal,Control,Data,Debug,Foreign,Foreign.hs,GHC,Haste,include,LICENSE,Numeric.hs,Prelude.hs,Setup.hs,System,Text,Unsafe},ghc-prim/{ghc-prim.cabal,GHC,LICENSE,packageconfig},integer-gmp/{integer-gmp.cabal,GHC,LICENSE,Setup.hs}} + tar -cjf haste-libs-$1.tar.bz2 --exclude-backups '--exclude=*.hi' '--exclude=*.o' include popcache/{configure,LICENSE,haste-populate-configure.cabal,Setup.hs} libraries/rts.pkg libraries/haste-lib/{haste-lib.cabal,src/{Haste.hs,Haste},LICENSE} libraries/time libraries/ghc-7.8/{array/{array.cabal,Data,include,LICENSE,Setup.hs},base/{base.cabal,Control,Data,Debug,Foreign,Foreign.hs,GHC,Haste,include,LICENSE,Numeric.hs,Prelude.hs,Setup.hs,System,Text,Unsafe},ghc-prim/{ghc-prim.cabal,GHC,LICENSE,packageconfig},integer-gmp/{integer-gmp.cabal,GHC,LICENSE,Setup.hs}} fi diff --git a/popcache/LICENSE b/popcache/LICENSE new file mode 100644 index 00000000..e69de29b diff --git a/popcache/Setup.hs b/popcache/Setup.hs new file mode 100644 index 00000000..9a994af6 --- /dev/null +++ b/popcache/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/popcache/configure b/popcache/configure new file mode 100755 index 00000000..e69de29b diff --git a/popcache/haste-populate-configure.cabal b/popcache/haste-populate-configure.cabal new file mode 100644 index 00000000..b38aa34b --- /dev/null +++ b/popcache/haste-populate-configure.cabal @@ -0,0 +1,24 @@ +-- Initial haste-populate-configure.cabal generated by cabal init. For +-- further documentation, see http://haskell.org/cabal/users-guide/ + +name: haste-populate-configure +version: 0.1.0.0 +synopsis: Dummy package with build type configure for populating setup-exe-cache. +-- description: +license: PublicDomain +license-file: LICENSE +author: Anton Ekblad +maintainer: anton@ekblad.cc +-- copyright: +-- category: +build-type: Simple +-- extra-source-files: +cabal-version: >=1.10 + +library + -- exposed-modules: + -- other-modules: + -- other-extensions: + build-depends: base >=4.7 && <4.8 + -- hs-source-dirs: + default-language: Haskell2010 \ No newline at end of file diff --git a/src/haste-boot.hs b/src/haste-boot.hs index 4d03b6a1..17013e27 100644 --- a/src/haste-boot.hs +++ b/src/haste-boot.hs @@ -131,6 +131,8 @@ bootHaste cfg tmpdir = inDirectory tmpdir $ do when (populateSetupExeCache cfg) $ do void $ run "cabal" ["update"] "" void $ run "cabal" ["install", "-j", "populate-setup-exe-cache"] "" + inDirectory "popcache" . void $ run "cabal" ["install", "-j"] "" + void $ run "ghc-pkg" ["unregister", "haste-populate-configure"] "" void $ run "ghc-pkg" ["unregister", "populate-setup-exe-cache"] "" when (not $ useLocalLibs cfg) $ do fetchLibs tmpdir @@ -224,6 +226,7 @@ buildLibs cfg = do -- Install time inDirectory "time" $ do run_ "autoreconf" [] "" + run_ "cabal" ["configure"] "" hasteCabal ("install" : ghcOpts) -- Export monads-tf; it seems to be hidden by default