1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name ghc |
---|
7 | set canonicalname ghc |
---|
8 | version 7.4.2 |
---|
9 | categories lang haskell |
---|
10 | maintainers FIXME |
---|
11 | license BSD |
---|
12 | platforms darwin |
---|
13 | |
---|
14 | description The Glorious Glasgow Haskell Compilation System |
---|
15 | long_description \ |
---|
16 | The Glasgow Haskell Compiler is a robust, \ |
---|
17 | fully-featured, optimising compiler and interactive \ |
---|
18 | environment for Haskell 98, GHC compiles Haskell to \ |
---|
19 | either native code or C. It implements numerous \ |
---|
20 | experimental language extensions to Haskell 98, \ |
---|
21 | for example: concurrency, a foreign language interface, \ |
---|
22 | multi-parameter type classes, scoped type variables, \ |
---|
23 | existential and universal quantification, unboxed \ |
---|
24 | types, exceptions, weak pointers, and so on. \ |
---|
25 | GHC comes with a generational garbage collector, \ |
---|
26 | and a space and time profiler. |
---|
27 | |
---|
28 | homepage http://haskell.org/${canonicalname} |
---|
29 | master_sites ${homepage}/dist/${version}/ |
---|
30 | distname ${canonicalname}-${version}-src |
---|
31 | worksrcdir ${canonicalname}-${version} |
---|
32 | |
---|
33 | use_bzip2 yes |
---|
34 | |
---|
35 | distfiles ${canonicalname}-${version}-src${extract.suffix} \ |
---|
36 | ${canonicalname}-${version}-testsuite${extract.suffix} |
---|
37 | |
---|
38 | checksums ghc-7.4.2-src.tar.bz2 \ |
---|
39 | rmd160 c1caf17de353d3f805966ea64235a8341a8e071e \ |
---|
40 | sha256 f2ee1289a33cc70539287129841acc7eaf16112bb60c59b5a6ee91887bfd836d \ |
---|
41 | ghc-7.4.2-testsuite.tar.bz2 \ |
---|
42 | rmd160 6ff2a50d2165baa540da8a486d30fab47dfdbd0d \ |
---|
43 | sha256 227fee370e84892e4316f611c8cae0ad24d58d594d0b49f7960caf05b4f85332 |
---|
44 | |
---|
45 | depends_build port:ghc-bootstrap \ |
---|
46 | port:libxslt |
---|
47 | |
---|
48 | depends_lib port:gmp \ |
---|
49 | port:ncurses \ |
---|
50 | port:libiconv |
---|
51 | |
---|
52 | patchfiles patch-configure-disable-docbook-ps-and-pdf.diff |
---|
53 | |
---|
54 | use_parallel_build no |
---|
55 | test.run yes |
---|
56 | |
---|
57 | # -- BEGIN gcc variants |
---|
58 | |
---|
59 | variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description {Compile with gcc 4.3} { |
---|
60 | configure.compiler macports-gcc-4.3 |
---|
61 | depends_lib-append port:gcc43 |
---|
62 | } |
---|
63 | |
---|
64 | variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description {Compile with gcc 4.4} { |
---|
65 | configure.compiler macports-gcc-4.4 |
---|
66 | depends_lib-append port:gcc44 |
---|
67 | } |
---|
68 | |
---|
69 | variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 description {Compile with gcc 4.5} { |
---|
70 | configure.compiler macports-gcc-4.5 |
---|
71 | depends_lib-append port:gcc45 |
---|
72 | configure.args-append --with-gcc=${configure.cc} |
---|
73 | } |
---|
74 | |
---|
75 | variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description {Compile with gcc 4.6} { |
---|
76 | configure.compiler macports-gcc-4.6 |
---|
77 | depends_lib-append port:gcc46 |
---|
78 | } |
---|
79 | |
---|
80 | variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {Compile with gcc 4.7} { |
---|
81 | configure.compiler macports-gcc-4.7 |
---|
82 | depends_lib-append port:gcc47 |
---|
83 | } |
---|
84 | |
---|
85 | if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47]} { |
---|
86 | default_variants +gcc45 |
---|
87 | } |
---|
88 | |
---|
89 | # -- END gcc variants |
---|
90 | |
---|
91 | set bootstraproot ${prefix}/share/ghc-bootstrap |
---|
92 | configure.args --with-ghc=${bootstraproot}/bin/ghc \ |
---|
93 | --with-iconv-includes=${prefix}/include \ |
---|
94 | --with-iconv-libraries=${prefix}/lib \ |
---|
95 | --with-gmp-includes=${prefix}/include \ |
---|
96 | --with-gmp-libraries=${prefix}/lib |
---|
97 | |
---|
98 | # OK so because the bootstrap binary has been prebuilt for libraries |
---|
99 | # in /usr/lib we search these before macports stuff to prevent |
---|
100 | # link errors, ghc _should_ actually compile itself in stage2 |
---|
101 | # using paths from the command line arguments |
---|
102 | compiler.cpath /usr/include |
---|
103 | compiler.library_path /usr/lib |
---|
104 | |
---|
105 | |
---|
106 | post-destroot { |
---|
107 | set prefixlib ${prefix}/lib/${worksrcdir} |
---|
108 | set destlib ${destroot}/${prefixlib} |
---|
109 | set libver ${canonicalname}${version} |
---|
110 | |
---|
111 | variable libs [ list \ |
---|
112 | libHSrts-${libver}.dylib \ |
---|
113 | libHSrts_debug-${libver}.dylib \ |
---|
114 | libHSrts_thr-${libver}.dylib \ |
---|
115 | libHSrts_thr_debug-${libver}.dylib ] |
---|
116 | |
---|
117 | system "install_name_tool -id ${prefixlib}/libffi.dylib ${destlib}/libffi.dylib" |
---|
118 | |
---|
119 | foreach lib $libs { |
---|
120 | regexp -line {[^[:space:]]*/libffi.*\.dylib} [exec otool -L ${destlib}/${lib}] oldlib |
---|
121 | system "install_name_tool -change ${oldlib} ${prefixlib}/libffi.dylib ${destlib}/$lib" |
---|
122 | } |
---|
123 | } |
---|