]> gitweb @ CieloNegro.org - pkgsrc-ghc.git/blobdiff - TODO
Merge branch 'ghc-7.4.1'
[pkgsrc-ghc.git] / TODO
diff --git a/TODO b/TODO
index 5ee5ead1993df8c97eaec2fbdda9d260bb68ecc6..8669d3f42ee2785d7daabde854d8907174b139f3 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,16 +1,47 @@
 .. -*- rst -*-
 
-============
 wip/ghc TODO
 ============
 
+* Send hunks #3 and #4 of patch-aclocal.m4 to the upstream.
+* Send patch-configure.ac to the upstream.
+* Send patch-libraries-integer-gmp_configure.ac to the upstream.
+* Send patch-rules_hs-suffix-rules-srcdir.mk to the upstream.
+* Modify configure.ac and rules/build-package-data.mk to allow
+  ``--with-curses-{includes,libraries}`` to be passed to the top-level
+  ``configure``, and send a patch to the upstream.
+* Explain about files/bootstrap-main.c and files/capi-wrappers-*.c
+  in this guide, and fix the upstream to throw them away.
 * Build more bootstrapping HC archives to support more platforms.
 
 
---------------------------
 How to build an HC archive
 --------------------------
 
+A preferred, automated way
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+I've written an automation tool to build one: `build-hc-pkg
+<http://git.cielonegro.org/gitweb.cgi?p=build-hc-pkg.git>`_
+
+To use it, clone the repository, run ``./build-hc-pkg``, and then
+follow the instruction it shows::
+
+    $ git clone git://git.cielonegro.org/build-hc-pkg.git
+    ...
+    $ cd build-hc-pkg
+    $ ./build-hc-pkg
+    ...
+    This is build-hc-pkg, running on powerpc-apple-darwin9.8.0 with 2 processors.
+    Enter the file path to ghc-x.y.z-src.tar.bz2: _
+
+Note that you need Bash, Automake, GNU make, GNU sed, and GNU tar to
+use it.
+
+
+A manual way
+^^^^^^^^^^^^
+
 It's basically the same as the `Porting Guide
 <http://hackage.haskell.org/trac/ghc/wiki/Building/Porting>`_, plus
 some minor tweaks.
@@ -25,7 +56,6 @@ Extract the source archive and duplicate the source tree, one for
 Build some configuration files::
 
     $ cd ghc-{VERSION}-target
-    $ ln -s /bin/pwd utils/ghc-pwd/ghc-pwd
     $ ./configure --enable-hc-boot
     $ echo "INTEGER_LIBRARY = integer-simple" > mk/build.mk
     $ gmake bootstrapping-files
@@ -34,7 +64,9 @@ Build some configuration files::
 Run ``./configure`` on the host tree::
 
     $ cd ghc-{VERSION}-host
-    $ ./configure
+    $ ./configure \
+          --with-iconv-includes=/usr/pkg/include \
+          --with-iconv-libraries=/usr/pkg/lib
 
 Then create ``ghc-{VERSION}-host/mk/build.mk`` with the following
 contents::
@@ -55,10 +87,14 @@ contents::
     utils/ghc-pkg_dist-install_v_HC_OPTS += -keep-hc-files
     
     INTEGER_LIBRARY = integer-simple
+    libraries/terminfo_CONFIGURE_OPTS += \
+        --configure-option=--with-curses-includes=/usr/pkg/include \
+        --configure-option=--with-curses-libraries=/usr/pkg/lib
 
 Copy some configuration files from the ``-target`` tree::
 
-    $ cp ../ghc-{VERSION}-target/includes/{ghcautoconf.h,DerivedConstants.h,GHCConstants.h} includes/
+    $ cp -r ../ghc-{VERSION}-target/includes/dist-{ghcconstants,derivedconstants} includes/
+    $ cp ../ghc-{VERSION}-target/includes/ghcautoconf.h includes/
 
 Build it::
 
@@ -91,11 +127,15 @@ Then extract it again, in a different directory::
 Modify hard-coded paths in inplace ``.conf`` files, and then
 re-archive the HC tree::
 
-    $ sed -i.bak -e 's#'`dirname \`pwd\``'#[[GHC_SOURCE_PATH]]#g' \
+    $ gsed -i \
+          -e 's#/usr/pkg#[[PREFIX]]#g' \
+          -e 's#'`dirname \`pwd\``'#[[GHC_SOURCE_PATH]]#g' \
           inplace/lib/package.conf.d/*.conf \
+          */package.conf.inplace \
           */*/package-data.mk \
-          */*/*/package-data.mk
+          */*/*/package-data.mk \
+          */*/*/*/package-data.mk
     $ cd ..
-    $ tar jcf ghc-{VERSION}-boot-{PLATFORM}.tar.bz2 ghc-{VERSION}
+    $ tar jcvf ghc-{VERSION}-boot-{PLATFORM}.tar.bz2 ghc-{VERSION}
 
 Done. Upload the archive to some host and add it to the ``Makefile``.