[83397] trunk/dports/lang/ghc/Portfile

easieste at macports.org easieste at macports.org
Wed Aug 31 03:34:31 PDT 2011


Revision: 83397
          http://trac.macports.org/changeset/83397
Author:   easieste at macports.org
Date:     2011-08-31 03:34:28 -0700 (Wed, 31 Aug 2011)
Log Message:
-----------
Fix #30364 (maintainer timeout): build ghc under Lion OS X.

In a better world, one would refactor the now duplicated clauses for
darwin 10 and darwin 11 platforms.

Modified Paths:
--------------
    trunk/dports/lang/ghc/Portfile

Modified: trunk/dports/lang/ghc/Portfile
===================================================================
--- trunk/dports/lang/ghc/Portfile	2011-08-31 08:21:04 UTC (rev 83396)
+++ trunk/dports/lang/ghc/Portfile	2011-08-31 10:34:28 UTC (rev 83397)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
 # $Id$
 
 PortSystem	1.0
@@ -281,7 +282,81 @@
 
 }
 
+platform darwin 11 {
+		global ghc_bootversion
+		set ghc_bootversion	6.10.4
 
+		master_sites-append	${homepage}/dist/${ghc_bootversion}/:bootstrap
+
+		if { ${configure.build_arch} == "x86_64" } {
+			distfiles-append	${canonicalname}-${ghc_bootversion}-darwin-x86_64-snowleopard-macports-bootstrap.tar.bz2:bootstrap
+
+			checksums-append	${canonicalname}-${ghc_bootversion}-darwin-x86_64-snowleopard-macports-bootstrap.tar.bz2 \
+						md5     70c8743dc4d606904426146e0e6d7cdf \
+						sha1    bd6830318c522527b2c35a84724832d983054416 \
+						rmd160  bc67c499417e009428fe6bf90b86fda4f1ec3e9e
+
+			extract.only		${canonicalname}-${version}-src.tar.bz2 \
+						${canonicalname}-${version}-src-extralibs.tar.bz2 \
+						${canonicalname}-${ghc_bootversion}-darwin-x86_64-snowleopard-macports-bootstrap.tar.bz2
+
+		} elseif { ${configure.build_arch} == "i386" } {
+			distfiles-append	${canonicalname}-${ghc_bootversion}-darwin-i386-snowleopard-bootstrap.tar.bz2:bootstrap
+
+			checksums-append	${canonicalname}-${ghc_bootversion}-darwin-i386-snowleopard-bootstrap.tar.bz2 \
+						md5     fba9493ef1a1cb3f54274ab59f007725 \
+						sha1    cd30029d0c32b8e97ef31c81f0a9613586628c0f \
+						rmd160  d32bc2006ff9d56da1dfecce0eb8be780e81b8b9
+
+			patchfiles-delete	patch-compiler-Makefile.local.diff		\
+						patch-libraries-cabal-bin.hs.diff		\
+						patch-mk-target.mk.diff
+
+			patchfiles-append	patch-snowleopard-i386-includes-Makefile.diff           	\
+						patch-snowleopard-i386-compiler-Makefile.local.diff             \
+						patch-snowleopard-i386-compiler-main-DriverPipeline.hs.diff     \
+						patch-snowleopard-i386-ghc-ghc.wrapper.diff                     \
+						patch-snowleopard-i386-libraries-cabal-bin.hs.diff              \
+						patch-snowleopard-i386-libraries-haskeline-haskeline.cabal.diff \
+						patch-snowleopard-i386-libffi-Makefile.diff                     \
+						patch-snowleopard-i386-mk-target.mk.diff                        \
+						patch-snowleopard-i386-utils-genapply-Makefile.diff             \
+						patch-snowleopard-i386-utils-genprimopcode-Makefile.diff        \
+						patch-snowleopard-i386-utils-hsc2hs-hsc2hs.wrapper.diff
+
+			if { !([variant_isset maintainer_debug] || [variant_isset cabal_configure_debug]) } {
+				patchfiles-delete	patch-compiler-Makefile.diff	\
+							patch-ghc-Makefile.diff		\
+							patch-libraries-Makefile.diff	\
+							patch-mk-cabal.mk.diff
+
+				patchfiles-append	patch-snowleopard-i386-compiler-Makefile.diff	\
+							patch-snowleopard-i386-ghc-Makefile.diff	\
+							patch-snowleopard-i386-libraries-Makefile.diff	\
+							patch-snowleopard-i386-mk-cabal.mk.diff
+			}
+
+			extract.only		${canonicalname}-${version}-src.tar.bz2 \
+						${canonicalname}-${version}-src-extralibs.tar.bz2 \
+						${canonicalname}-${ghc_bootversion}-darwin-i386-snowleopard-bootstrap.tar.bz2
+
+		} else {
+			# belt and braces approach:
+			return -code error "Unrecognized build architecture on Snow Leopard"
+		}
+
+                configure.compiler      gcc-4.2
+
+		patchfiles-append	patch-snowleopard-compiler-cmm-CLabel.hs.diff		\
+					patch-snowleopard-compiler-main-DynFlags.hs.diff	\
+					patch-snowleopard-ghc-ghc-bin.cabal.in.diff		\
+					patch-snowleopard-rts-Linker.c.diff			\
+					patch-snowleopard-rts-Makefile.diff			\
+					patch-snowleopard-rts-package.conf.in.diff
+
+}
+
+
 post-extract {
      system "tar jxf ${distpath}/testsuite-${version}.tar.bz2 -C ${worksrcpath}" 
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110831/bd321db4/attachment.html>


More information about the macports-changes mailing list