1 | # $Id: Portfile,v 1.6 2004/01/06 07:18:01 jkh Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | name ghc |
---|
5 | version 6.2 |
---|
6 | categories lang |
---|
7 | maintainers gwright@comcast.net |
---|
8 | platforms darwin |
---|
9 | description The Glorious Glasgow Haskell Compilation System |
---|
10 | long_description \ |
---|
11 | The Glasgow Haskell Compiler is a robust, \ |
---|
12 | fully-featured, optimising compiler and interactive \ |
---|
13 | environment for Haskell 98, GHC compiles Haskell to \ |
---|
14 | either native code or C. It implements numerous \ |
---|
15 | experimental language extensions to Haskell 98, \ |
---|
16 | for example: concurrency, a foreign language interface, \ |
---|
17 | multi-parameter type classes, scoped type variables, \ |
---|
18 | existential and universal quantification, unboxed \ |
---|
19 | types, exceptions, weak pointers, and so on. \ |
---|
20 | GHC comes with a generational garbage collector, \ |
---|
21 | and a space and time profiler. |
---|
22 | |
---|
23 | homepage http://www.haskell.org/ghc/ |
---|
24 | master_sites ${homepage}/dist/${version}/:source \ |
---|
25 | ${homepage}/dist/6.0.1/MacOSX/:bootstrap \ |
---|
26 | http://distfiles.opendarwin.org/:bootstrap |
---|
27 | |
---|
28 | use_bzip2 yes |
---|
29 | |
---|
30 | distfiles ${name}-${version}-src.tar.bz2:source \ |
---|
31 | ${name}-6.0.1-darwin-bootstrap.tar.bz2:bootstrap |
---|
32 | |
---|
33 | checksums ghc-${version}-src.tar.bz2 md5 cc495e263f4384e1d6b38e851bf6eca0 \ |
---|
34 | ghc-6.0.1-darwin-bootstrap.tar.bz2 md5 280afe385405fa437ae274bfab2c3250 |
---|
35 | |
---|
36 | patchfiles patch-configure.ac |
---|
37 | |
---|
38 | depends_lib lib:libreadline.4:readline lib:libgmp.3:gmp \ |
---|
39 | lib:libdl:dlcompat |
---|
40 | |
---|
41 | #bugs GHC does not support DESTDIR. Instead, we install \ |
---|
42 | # everything into ${destroot}/${prefix}, and then fix up \ |
---|
43 | # the five scripts which actually have the installation \ |
---|
44 | # path hard coded. |
---|
45 | |
---|
46 | pre-configure { set cfg [open "${worksrcpath}/mk/build.mk" w] |
---|
47 | puts $cfg "#" |
---|
48 | puts $cfg "# Local configuration overrides for DarwinPorts" |
---|
49 | puts $cfg "#" |
---|
50 | puts $cfg "ReadlineIncludePath=${prefix}/include" |
---|
51 | puts $cfg "SRC_CC_OPTS += -I${prefix}/include" |
---|
52 | puts $cfg "SRC_HC_OPTS += -I${prefix}/include -L${prefix}/lib" |
---|
53 | puts $cfg "SRC_HC_OPTS += -pgmP \"gcc3 -E -traditional\"" |
---|
54 | puts $cfg "EXTRA_HSC2HS_OPTS += -I${prefix}/include" |
---|
55 | puts $cfg "EXTRA_LD_OPTS += -L${prefix}/lib" |
---|
56 | close $cfg |
---|
57 | |
---|
58 | cd ${workpath}/${name}-bootstrap/bin |
---|
59 | reinplace "s|/usr/local|${workpath}/${name}-bootstrap|" ghc |
---|
60 | } |
---|
61 | |
---|
62 | use_autoconf yes |
---|
63 | |
---|
64 | configure.env LDFLAGS="-L${prefix}/lib" CPPFLAGS="-I${prefix}/include" \ |
---|
65 | CFLAGS="-I${prefix}/include" |
---|
66 | |
---|
67 | configure.args --prefix=${destroot}/${prefix} \ |
---|
68 | --mandir=${destroot}/${prefix}/share/man/ \ |
---|
69 | --with-ghc='${workpath}/${name}-bootstrap/bin/ghc -pgmP \"gcc3 -E -traditional\"' \ |
---|
70 | --with-gcc=gcc3 \ |
---|
71 | |
---|
72 | variant opengl { configure.args-append --enable-hopengl } |
---|
73 | |
---|
74 | post-destroot { reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/ghc |
---|
75 | reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/ghci |
---|
76 | reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/ghc-pkg |
---|
77 | reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/ghcprof |
---|
78 | reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/hsc2hs |
---|
79 | |
---|
80 | reinplace "s|\\\$@\"\}|\\\$@\"\} -L${prefix}/lib|" ${destroot}/${prefix}/bin/ghc |
---|
81 | } |
---|
82 | |
---|