source: trunk/dports/lang/ghc/Portfile @ 4812

Last change on this file since 4812 was 4812, checked in by toby, 15 years ago

more master_sites opendarwin foobage.

Bug:
Submitted by:
Reviewed by:
Approved by:
Obtained from:

  • Property svn:eol-style set to native
File size: 3.0 KB
Line 
1# $Id: Portfile,v 1.7 2004/01/18 03:44:38 toby Exp $
2
3PortSystem 1.0
4name            ghc
5version         6.2
6categories      lang
7maintainers     gwright@comcast.net
8platforms       darwin
9description     The Glorious Glasgow Haskell Compilation System
10long_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
23homepage        http://www.haskell.org/ghc/
24master_sites    ${homepage}/dist/${version}/:source \
25                ${homepage}/dist/6.0.1/MacOSX/:bootstrap \
26                opendarwin::bootstrap
27
28use_bzip2       yes
29
30distfiles       ${name}-${version}-src.tar.bz2:source \
31                ${name}-6.0.1-darwin-bootstrap.tar.bz2:bootstrap
32
33checksums       ghc-${version}-src.tar.bz2 md5 cc495e263f4384e1d6b38e851bf6eca0 \
34                ghc-6.0.1-darwin-bootstrap.tar.bz2 md5 280afe385405fa437ae274bfab2c3250
35
36patchfiles      patch-configure.ac
37
38depends_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
46pre-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
62use_autoconf    yes
63
64configure.env   LDFLAGS="-L${prefix}/lib" CPPFLAGS="-I${prefix}/include" \
65                CFLAGS="-I${prefix}/include"
66
67configure.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
72variant opengl  { configure.args-append --enable-hopengl }
73
74post-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
Note: See TracBrowser for help on using the repository browser.