In my release, I include the cabal command-line utility (which GHC doesn't normally include). These are the scripts to build that. --- ghc-6.10.2.orig/cabal-install/make-package.mk 1970-01-01 12:00:00.000000000 +1200 +++ ghc-6.10.2/cabal-install/make-package.mk 2009-06-18 15:54:37.000000000 +1200 @@ -0,0 +1,27 @@ +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/cabal-flags.mk +include $(TOP)/mk/bindist.mk + +ENABLE_SHELL_WRAPPERS=YES + +CLEAN_ALL=rm -fr `find . -depth 1 | grep -v Makefile | grep -v '[.]patch$$' | grep -v '[.]sh$$'` + +.PHONY: default all with-bootstrapping-compiler with-stage-2 clean distclean + +default all: with-bootstrapping-compiler + +$(PKG2MK_BASE).cabal: ../../$(PKG2MK_NAME).tar.gz + $(CLEAN_ALL) + tar xzf $< + mv $(PKG2MK_NAME)/* . + rmdir $(PKG2MK_NAME) + ls *.patch 2>/dev/null | while read patch ; do cat "$$patch" | patch -p1 ; done + +with-bootstrapping-compiler: $(PKG2MK_BASE).cabal + $(CABAL_BOOT) configure --distpref=install-inplace $(DISABLE_TOOLCHAIN) + $(CABAL_BOOT) build --distpref=install-inplace + $(CABAL_BOOT) install --distpref=install-inplace --inplace + +clean: + $(CLEAN_ALL) + --- ghc-6.10.2.orig/cabal-install/zlib/Makefile 1970-01-01 12:00:00.000000000 +1200 +++ ghc-6.10.2/cabal-install/zlib/Makefile 2009-06-18 15:54:37.000000000 +1200 @@ -0,0 +1,5 @@ +TOP=../.. + +PKG2MK_BASE=zlib +PKG2MK_NAME=zlib-0.5.0.0 +include ../make-package.mk --- ghc-6.10.2.orig/cabal-install/HTTP/Makefile 1970-01-01 12:00:00.000000000 +1200 +++ ghc-6.10.2/cabal-install/HTTP/Makefile 2009-06-18 15:54:37.000000000 +1200 @@ -0,0 +1,5 @@ +TOP=../.. + +PKG2MK_BASE=HTTP +PKG2MK_NAME=HTTP-4000.0.5 +include ../make-package.mk --- ghc-6.10.2.orig/cabal-install/cabal-install/Makefile 1970-01-01 12:00:00.000000000 +1200 +++ ghc-6.10.2/cabal-install/cabal-install/Makefile 2009-06-18 15:54:37.000000000 +1200 @@ -0,0 +1,27 @@ +TOP=../.. + +PKG2MK_BASE=cabal-install +PKG2MK_NAME=cabal-install-0.6.2 +include ../make-package.mk + + +SCRIPT_DIR = $(DESTDIR)$(bindir) +SCRIPT_BASE = cabal +SCRIPT_VERSIONED_BASE = $(SCRIPT_BASE)-$(ProjectVersion) +SCRIPT = $(SCRIPT_DIR)/$(SCRIPT_BASE) +SCRIPT_TAGGED = $(SCRIPT_DIR)/$(TOOLCHAIN_EXE_PREFIX)$(SCRIPT_BASE) +SCRIPT_VERSIONED = $(SCRIPT_DIR)/$(SCRIPT_VERSIONED_BASE) + +install:: + $(INSTALL_PACKAGE) install UNUSED UNUSED '$(DESTDIR)' '$(prefix)' \ + '$(prefix)' '$(bindir)' '$(libdir)' \ + '$(libexecdir)' '$(dynlibdir)' '$(datadir)' \ + '$(docdir)' '$(htmldir)' '$(haddockdir)' \ + --distpref install-inplace \ + $(INSTALL_FLAGS) + mv $(SCRIPT) $(SCRIPT_VERSIONED) + rm -f $(SCRIPT_TAGGED) + ln -s $(SCRIPT_VERSIONED_BASE) $(SCRIPT_TAGGED) + cp build-iphone-haskell.sh $(SCRIPT_DIR) + chmod +x $(SCRIPT_DIR)/build-iphone-haskell.sh + --- ghc-6.10.2.orig/cabal-install/cabal-install/iphone.patch 1970-01-01 12:00:00.000000000 +1200 +++ ghc-6.10.2/cabal-install/cabal-install/iphone.patch 2009-06-18 15:54:37.000000000 +1200 @@ -0,0 +1,19 @@ +diff -urN cabal-install-0.6.2.orig/Distribution/Client/SetupWrapper.hs cabal-install-0.6.2/Distribution/Client/SetupWrapper.hs +--- cabal-install-0.6.2.orig/Distribution/Client/SetupWrapper.hs 2009-02-20 02:07:52.000000000 +1300 ++++ cabal-install-0.6.2/Distribution/Client/SetupWrapper.hs 2009-04-17 12:06:05.000000000 +1200 +@@ -49,6 +49,7 @@ + ( ghcVerbosityOptions ) + import qualified Distribution.Simple.PackageIndex as PackageIndex + import Distribution.Simple.PackageIndex (PackageIndex) ++import Distribution.Simple.ToolChain + import Distribution.Simple.Utils + ( die, debug, info, cabalVersion, findPackageDesc, comparing + , createDirectoryIfMissingVerbose ) +@@ -232,6 +233,7 @@ + (comp, conf) <- case useCompiler options' of + Just comp -> return (comp, useProgramConfig options') + Nothing -> configCompiler (Just GHC) Nothing Nothing ++ defaultToolChain + (useProgramConfig options') verbosity + return (comp, conf, options' { useCompiler = Just comp, + useProgramConfig = conf })