Changes between Version 7 and Version 8 of Building/MacOSX/Installer


Ignore:
Timestamp:
Jul 14, 2011 12:39:24 PM (4 years ago)
Author:
igloo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Building/MacOSX/Installer

    v7 v8  
    22
    33= Mac OS X Installer Packages =
    4 
    5 == Roll your own ==
    6 
    7 In a GHC build tree, after having run `./configure` (if the tree came straight out of darcs, also `sh boot`), issue
    8 {{{
    9 make framework-pkg
    10 }}}
    11 The result will be a file `GHC-<version>-<arch>.pkg`, where `<version>` is the full version string and `<arch>` is `i386` or `ppc`.  The build process uses `xcodebuild` and `packagemaker` and has only been tested with Xcode 3.0.
    12 
    13 The command `make framework-pkg` runs `./configure` again to ensure that GHC is compiled for installation under `/Library/Frameworks`.  If you need to specify extra arguments to `./configure` (e.g., to use a version of the readline library installed in a non-standard location), set the environment variable `XCODE_EXTRA_CONFIGURE_ARGS`.
    14 
    15 To create a package that links against readline statically, you can use the following trick.  Create a private library directory, say `/Users/chak/lib`, from which you symbolically link the static readline and ncurses libraries.  For example, if the latter were installed (e.g., via !MacPorts) under `/opt/local/lib` execute
    16 {{{
    17 cd /Users/chak
    18 mkdir lib
    19 cd lib
    20 ln -s /opt/local/lib/readline.a .
    21 ln -s /opt/local/lib/ncurses.a .
    22 }}}
    23 
    24 Now, build the package with
    25 {{{
    26 cd <LOCATION_OF_MY_GHC_TREE>
    27 env CFLAGS=-Wl,-search_paths_first\
    28     XCODE_EXTRA_CONFIGURE_ARGS="--with-readline-includes=/opt/local/include --with-readline-libraries=/Users/chak/lib"\
    29     make framework-pkg
    30 }}}
    31 (Don't forget to replace `/Users/chak/lib` by your private library directory.)  Note that simply removing (or renaming) the dynamic libraries of readline will not work, as this will lead the configure script of the readline package to assume that readline isn't installed at all.  As a result, you will get a GHC without readline support.
    324
    335== What's inside? ==