[96571] users/cal/ports/devel

cal at macports.org cal at macports.org
Tue Aug 14 13:41:38 PDT 2012


Revision: 96571
          https://trac.macports.org/changeset/96571
Author:   cal at macports.org
Date:     2012-08-14 13:41:38 -0700 (Tue, 14 Aug 2012)
Log Message:
-----------
hs-platform-ghc: new port to build whatever GHC is current on the platform

Added Paths:
-----------
    users/cal/ports/devel/hs-platform-ghc/
    users/cal/ports/devel/hs-platform-ghc/Portfile
    users/cal/ports/devel/hs-platform-ghc/files/
    users/cal/ports/devel/hs-platform-ghc/files/patch-configure-disable-docbook-ps-and-pdf.diff

Added: users/cal/ports/devel/hs-platform-ghc/Portfile
===================================================================
--- users/cal/ports/devel/hs-platform-ghc/Portfile	                        (rev 0)
+++ users/cal/ports/devel/hs-platform-ghc/Portfile	2012-08-14 20:41:38 UTC (rev 96571)
@@ -0,0 +1,115 @@
+# -*- 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                    hs-platform-ghc
+set canonicalname       ghc
+version                 7.4.1
+conflicts               ghc
+categories              lang haskell
+maintainers             cal openmaintainer
+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.1-src.tar.bz2 \
+                        rmd160  00c6a4df54e55559812b0e289dbc6fe8523d18da \
+                        sha256  721c09a49e519b7459b67b451b5103252ba3833906a7a24c3a3679ff94669a79 \
+                        ghc-7.4.1-testsuite.tar.bz2 \
+                        rmd160  001edff72071e8dcab319a13510c913869f11e0c \
+                        sha256  eea89fb679fd199c75358e6bebd754f6ef89c1e3cdb33c6a66dd919de6e3687c
+
+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 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
+    configure.args-append --with-gcc=${configure.cc}
+}
+
+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 +gcc47
+}
+
+# -- END gcc variants
+
+set bootstraproot ${prefix}/share/ghc-bootstrap
+configure.args          --with-ghc=${bootstraproot}/bin/ghc \
+                        --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.library_path   /usr/lib
+
+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"
+    }
+}


Property changes on: users/cal/ports/devel/hs-platform-ghc/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: users/cal/ports/devel/hs-platform-ghc/files/patch-configure-disable-docbook-ps-and-pdf.diff
===================================================================
--- users/cal/ports/devel/hs-platform-ghc/files/patch-configure-disable-docbook-ps-and-pdf.diff	                        (rev 0)
+++ users/cal/ports/devel/hs-platform-ghc/files/patch-configure-disable-docbook-ps-and-pdf.diff	2012-08-14 20:41:38 UTC (rev 96571)
@@ -0,0 +1,11 @@
+--- configure.orig	2012-06-30 00:18:22.000000000 +0200
++++ configure	2012-06-30 00:19:19.000000000 +0200
+@@ -10401,6 +10401,8 @@
+     BUILD_DOCBOOK_PS=YES
+     BUILD_DOCBOOK_PDF=YES
+ fi
++BUILD_DOCBOOK_PS=NO
++BUILD_DOCBOOK_PDF=NO
+ 
+ 
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120814/e768e99c/attachment.html>


More information about the macports-changes mailing list