# $Id: Portfile,v 1.8 2005/05/04 13:29:12 gwright Exp $ PortSystem 1.0 name ghc-devel version 6.5 revision 1 categories lang maintainers gwright@opendarwin.org platforms darwin description The Glorious Glasgow Haskell Compilation System (development version) long_description \ The Glasgow Haskell Compiler is a robust, \ fully-featured, optimising compiler and interactive \ environment for Haskell 98, GHC compiles Haskell to \ either native code or C. It implements numerous \ experimental language extensions to Haskell 98, \ for example: concurrency, a foreign language interface, \ multi-parameter type classes, scoped type variables, \ existential and universal quantification, unboxed \ types, exceptions, weak pointers, and so on. \ GHC comes with a generational garbage collector, \ and a space and time profiler. homepage http://www.haskell.org/ghc/ fetch.type cvs cvs.password cvs cvs.root :pserver:anoncvs@glass.cse.ogi.edu:/cvs cvs.module fpconfig set worksrcdir fptools post-fetch { cd ${worksrcpath} system "cvs -d ${cvs.root} co ghc" system "cvs -d ${cvs.root} co hslibs" system "cvs -d ${cvs.root} co libraries" } patchfiles patch-configure.ac depends_build bin:ghc:ghc \ bin:alex:alex \ bin:happy:happy depends_lib lib:libreadline.5:readline \ lib:libgmp.3:gmp #user_notes All of the executables have the version as a suffix, \ # so you must invoke ghc-6.5 or ghci-6.5 or hsc2hs-6.5... \ # Not all of the files in /bin are different from the \ # production version, but it seems safer not to overwrite \ # the versions that are officially supported. #bugs GHC does not support DESTDIR. Instead, we install \ # everything into ${destroot}/${prefix}, and then fix up \ # the five scripts which actually have the installation \ # path hard coded. platform darwin 6 { ui_msg "ghc-devel is not supported on Jaguar (OS X 10.2.x)" exit 1 } platform darwin 7 { depends_build-append path:${prefix}/bin/gmake:gmake pre-configure { set cfg [open "${worksrcpath}/mk/build.mk" w] puts $cfg "#" puts $cfg "# Local configuration overrides for DarwinPorts" puts $cfg "#" puts $cfg "ReadlineIncludePath=${prefix}/include" puts $cfg "SRC_CC_OPTS += -I${prefix}/include" puts $cfg "SRC_HC_OPTS += -I${prefix}/include -L/usr/lib -L${prefix}/lib" puts $cfg "EXTRA_HSC2HS_OPTS += -I${prefix}/include" puts $cfg "EXTRA_LD_OPTS += -L/usr/lib" puts $cfg "EXTRA_LD_OPTS += -L${prefix}/lib" close $cfg cd ${worksrcpath} system "autoreconf" } build.cmd gmake } platform darwin 8 { patchfiles-append patch-GC.c pre-configure { set cfg [open "${worksrcpath}/mk/build.mk" w] puts $cfg "#" puts $cfg "# Local configuration overrides for DarwinPorts" puts $cfg "#" puts $cfg "ReadlineIncludePath=${prefix}/include" puts $cfg "SRC_CC_OPTS += -I${prefix}/include" puts $cfg "SRC_HC_OPTS += -I${prefix}/include -L/usr/lib -L${prefix}/lib" puts $cfg "EXTRA_HSC2HS_OPTS += -I${prefix}/include" puts $cfg "EXTRA_LD_OPTS += -L/usr/lib" puts $cfg "EXTRA_LD_OPTS += -L${prefix}/lib" close $cfg cd ${worksrcpath} system "autoreconf" } configure.args-append --with-gcc=gcc-3.3 } configure.env LDFLAGS="-L${prefix}/lib" \ CPPFLAGS="-I${prefix}/include" \ CFLAGS="-I${prefix}/include" configure.args --prefix=${destroot}/${prefix} \ --mandir=${destroot}/${prefix}/share/man/ variant noopengl { configure.args-append --disable-hopengl } post-destroot { reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/ghc-${version} reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/ghci-${version} reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/ghc-pkg-${version} reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/ghcprof reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/hsc2hs reinplace "s|\\\$@\"\}|\\\$@\"\} -L${prefix}/lib -I${prefix}/include |" ${destroot}/${prefix}/bin/ghc reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/lib/ghc-${version}/package.conf file delete ${destroot}/${prefix}/bin/ghc file delete ${destroot}/${prefix}/bin/ghci file delete ${destroot}/${prefix}/bin/ghc-pkg file rename ${destroot}/${prefix}/bin/ghcprof ${destroot}/${prefix}/bin/ghcprof-${version} file rename ${destroot}/${prefix}/bin/hasktags ${destroot}/${prefix}/bin/hasktags-${version} file rename ${destroot}/${prefix}/bin/hp2ps ${destroot}/${prefix}/bin/hp2ps-${version} file rename ${destroot}/${prefix}/bin/hsc2hs ${destroot}/${prefix}/bin/hsc2hs-${version} file rename ${destroot}/${prefix}/bin/runghc ${destroot}/${prefix}/bin/runghc-${version} file rename ${destroot}/${prefix}/bin/runhaskell ${destroot}/${prefix}/bin/runhaskell-${version} file rename ${destroot}/${prefix}/bin/stat2resid ${destroot}/${prefix}/bin/stat2resid-${version} cd ${destroot}/${prefix}/lib/ghc-${version} system "ranlib *.a" }