Thanks for all the feedback.  My current plan is to attempt this:

1) Start with a binary GHC distribution[*]
2) Use a variant of the build script from Haskell Platform's repo to build the 
HP packages:
        - using the distribution (not the build system's installed GHC)
        - into the distribution (rather than where the build system's .cabal 
file wants)
        - registered into the distribution (rather than the build system's 
package database)
3) Generate an installer package for this "enhanced" GHC distribution tree

Outstanding question is what should this framework be called? I would like to 
continue to call it GHC.framework, but change the version to something like 
7.0.1+HP-i386, but I'm not sure that the built binary GHC can handle that. (I'm 
unclear on the extent of it's internal awareness of its final install 
location.) It is possible that it will have to be left named the same as the 
GHC distribution, but that means potential confusion in the field ("Which GHC 
7.01 do you have? with or without the platform?")

Another minor point is that I'm pretty sure that versioning the GHC.framework 
can be achieved (so a system can have multiple installed), but it will require 
some scripting in the installer. I will research this, but I don't think it is 
crucial.

  - Mark

[*] The binary GHC distribution could be
        - built on the packaging system (I've verified I can do this)
        - built by the GHC team, and asking them for a tarball (as Duncan 
suggested)
        - built by the GHC team, and extracted from the Mac OS X package they 
already produce

I'm thinking the later is easiest.

On Nov 24, 2010, at 8:28 AM, Duncan Coutts wrote:
> Trying to unpack or merge an existing GHC OSX package seems like madness 
> (especially given that the OSX tools for manipulating packages appear to be 
> non-existent or useless).

I'm not sure where the perception comes from. Unpacking the GHC OSX installer 
package is easy:

  pkgutil --expand GHC-7.0.1-i386.pkg /tmp/GHC.pkg-exp
  cd /tmp/GHC.pkg-exp/ghc.pkg
  gunzip < Payload | cpio -i

You can then verify, assuming you just built that package, that you've got 
exactly what was put in:

  diff -r /tmp/GHC.dst/Library/Frameworks/GHC.framework 
/tmp/GHC.pkg-exp/ghc.pkg/GHC.framework
  diff -r <ghc-tree>/distrib/MacOS/installer-scripts/ 
/tmp/GHC.pkg-exp/ghc.pkg/Scripts/

The only oddness is that the license and background image end up in the 
expanded package w/o extensions. But, that is not a major stumbling block.



Mark Lentczner
http://www.ozonehouse.com/mark/
IRC: mtnviewmark




_______________________________________________
Haskell-platform mailing list
Haskell-platform@projects.haskell.org
http://projects.haskell.org/cgi-bin/mailman/listinfo/haskell-platform

Reply via email to