# -*- 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 # $Id$ PortSystem 1.0 name ghc set canonicalname ghc version 7.4.2 categories lang haskell maintainers FIXME license BSD platforms darwin description The Glorious Glasgow Haskell Compilation System 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://haskell.org/${canonicalname} master_sites ${homepage}/dist/${version}/ distname ${canonicalname}-${version}-src worksrcdir ${canonicalname}-${version} use_bzip2 yes distfiles ${canonicalname}-${version}-src${extract.suffix} \ ${canonicalname}-${version}-testsuite${extract.suffix} checksums ghc-7.4.2-src.tar.bz2 \ rmd160 c1caf17de353d3f805966ea64235a8341a8e071e \ sha256 f2ee1289a33cc70539287129841acc7eaf16112bb60c59b5a6ee91887bfd836d \ ghc-7.4.2-testsuite.tar.bz2 \ rmd160 6ff2a50d2165baa540da8a486d30fab47dfdbd0d \ sha256 227fee370e84892e4316f611c8cae0ad24d58d594d0b49f7960caf05b4f85332 depends_build port:ghc-bootstrap \ port:libxslt depends_lib port:gmp \ port:ncurses \ port:libiconv patchfiles patch-configure-disable-docbook-ps-and-pdf.diff use_parallel_build no test.run yes # -- BEGIN gcc variants variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 description {Compile with gcc 4.3} { configure.compiler macports-gcc-4.3 depends_lib-append port:gcc43 } variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 description {Compile with gcc 4.4} { configure.compiler macports-gcc-4.4 depends_lib-append port:gcc44 } variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 description {Compile with gcc 4.5} { configure.compiler macports-gcc-4.5 depends_lib-append port:gcc45 } variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 description {Compile with gcc 4.6} { configure.compiler macports-gcc-4.6 depends_lib-append port:gcc46 } variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 description {Compile with gcc 4.7} { configure.compiler macports-gcc-4.7 depends_lib-append port:gcc47 } if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47]} { default_variants +gcc45 } # -- END gcc variants set bootstraproot ${prefix}/share/ghc-bootstrap configure.args --with-ghc=${bootstraproot}/bin/ghc \ --with-gcc=${configure.cc} \ --with-iconv-includes=${prefix}/include \ --with-iconv-libraries=${prefix}/lib \ --with-gmp-includes=${prefix}/include \ --with-gmp-libraries=${prefix}/lib # OK so because the bootstrap binary has been prebuilt for libraries # in /usr/lib we search these before macports stuff to prevent # link errors, ghc _should_ actually compile itself in stage2 # using paths from the command line arguments compiler.cpath /usr/include:${compiler.cpath} compiler.library_path /usr/lib:${compiler.library_path} post-destroot { set prefixlib ${prefix}/lib/${worksrcdir} set destlib ${destroot}/${prefixlib} set libver ${canonicalname}${version} variable libs [ list \ libHSrts-${libver}.dylib \ libHSrts_debug-${libver}.dylib \ libHSrts_thr-${libver}.dylib \ libHSrts_thr_debug-${libver}.dylib ] system "install_name_tool -id ${prefixlib}/libffi.dylib ${destlib}/libffi.dylib" foreach lib $libs { regexp -line {[^[:space:]]*/libffi.*\.dylib} [exec otool -L ${destlib}/${lib}] oldlib system "install_name_tool -change ${oldlib} ${prefixlib}/libffi.dylib ${destlib}/$lib" } }