[23476] trunk/dports/lang/ghc-devel
source_changes at macosforge.org
source_changes at macosforge.org
Sun Apr 1 19:07:32 PDT 2007
Revision: 23476
http://trac.macosforge.org/projects/macports/changeset/23476
Author: gwright at macports.org
Date: 2007-04-01 19:07:32 -0700 (Sun, 01 Apr 2007)
Log Message:
-----------
Build ghc from the head of the 6.7 branch.
Modified Paths:
--------------
trunk/dports/lang/ghc-devel/Portfile
Removed Paths:
-------------
trunk/dports/lang/ghc-devel/files/
Modified: trunk/dports/lang/ghc-devel/Portfile
===================================================================
--- trunk/dports/lang/ghc-devel/Portfile 2007-04-02 01:51:49 UTC (rev 23475)
+++ trunk/dports/lang/ghc-devel/Portfile 2007-04-02 02:07:32 UTC (rev 23476)
@@ -2,10 +2,9 @@
PortSystem 1.0
name ghc-devel
-version 6.5
-revision 3
+version 6.7
categories lang
-maintainers nomaintainer at macports.org
+maintainers gwright at macports.org
platforms darwin
description The Glorious Glasgow Haskell Compilation System (development version)
long_description \
@@ -26,12 +25,8 @@
set worksrcdir ghc
-platform darwin i386 {}
platform darwin 6 {}
pre-fetch {
- if {[variant_isset darwin_i386]} {
- return -code error "ghc-devel is not supported on OS X i386 yet"
- }
if {[variant_isset darwin_6]} {
return -code error "ghc-devel is not supported on Jaguar (OS X 10.2.x)"
}
@@ -68,7 +63,7 @@
port:gmp
#user_notes All of the executables have the version as a suffix, \
-# so you must invoke ghc-6.5 or ghci-6.5 or hsc2hs-6.5... \
+# so you must invoke ghc-6.7 or ghci-6.7 or hsc2hs-6.7... \
# Not all of the files in /bin are different from the \
# production version, but it seems safer not to overwrite \
# the versions that are officially supported.
@@ -86,12 +81,11 @@
puts $cfg "#"
puts $cfg "# Local configuration overrides for DarwinPorts"
puts $cfg "#"
- puts $cfg "ReadlineIncludePath=${prefix}/include"
- puts $cfg "SRC_CC_OPTS += -I${prefix}/include"
- puts $cfg "SRC_HC_OPTS += -I${prefix}/include -L/usr/lib -L${prefix}/lib"
- puts $cfg "EXTRA_HSC2HS_OPTS += -I${prefix}/include"
- puts $cfg "EXTRA_LD_OPTS += -L/usr/lib"
- puts $cfg "EXTRA_LD_OPTS += -L${prefix}/lib"
+ puts $cfg "SRC_CC_OPTS += -I${prefix}/include"
+ puts $cfg "SRC_HC_OPTS += -I${prefix}/include -I/usr/include -L${prefix}/lib -L/usr/lib"
+ puts $cfg "EXTRA_HSC2HS_OPTS += -I${prefix}/include"
+ puts $cfg "EXTRA_LD_OPTS += -L${prefix}/lib"
+ puts $cfg "EXTRA_LD_OPTS += -L/usr/lib"
close $cfg
cd ${worksrcpath}
@@ -103,19 +97,16 @@
platform darwin 8 {
- patchfiles-append patch-GC.c
-
pre-configure {
set cfg [open "${worksrcpath}/mk/build.mk" w]
puts $cfg "#"
puts $cfg "# Local configuration overrides for DarwinPorts"
puts $cfg "#"
- puts $cfg "ReadlineIncludePath=${prefix}/include"
- puts $cfg "SRC_CC_OPTS += -I${prefix}/include"
- puts $cfg "SRC_HC_OPTS += -I${prefix}/include -L/usr/lib -L${prefix}/lib"
- puts $cfg "EXTRA_HSC2HS_OPTS += -I${prefix}/include"
- puts $cfg "EXTRA_LD_OPTS += -L/usr/lib"
- puts $cfg "EXTRA_LD_OPTS += -L${prefix}/lib"
+ puts $cfg "SRC_CC_OPTS += -I${prefix}/include"
+ puts $cfg "SRC_HC_OPTS += -I${prefix}/include -I/usr/include -L${prefix}/lib -L/usr/lib"
+ puts $cfg "EXTRA_HSC2HS_OPTS += -I${prefix}/include"
+ puts $cfg "EXTRA_LD_OPTS += -L${prefix}/lib"
+ puts $cfg "EXTRA_LD_OPTS += -L/usr/lib"
close $cfg
cd ${worksrcpath}
@@ -125,34 +116,54 @@
configure.env LDFLAGS="-L${prefix}/lib" \
CPPFLAGS="-I${prefix}/include" \
- CFLAGS="-I${prefix}/include"
+ CFLAGS="-I${prefix}/include" \
+ DYLD_FALLBACK_LIBRARY_PATH=${prefix}/lib
configure.args --prefix=${destroot}/${prefix} \
- --mandir=${destroot}/${prefix}/share/man/
+ --mandir=${destroot}/${prefix}/share/man/ \
+ --with-readline-includes=${prefix}/include \
+ --with-readline-libraries=${prefix}/lib \
+ --with-gmp-includes=${prefix}/include \
+ --with-gmp-libraries=${prefix}/lib \
+ --disable-openal \
+ --disable-alut
variant noopengl { configure.args-append --disable-hopengl }
-post-destroot { foreach script_name { ghc ghci ghc-pkg } {
- reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/${script_name}-${version}
+build {
+ system "env DYLD_FALLBACK_LIBRARY_PATH=${prefix}/lib ${build.cmd} ${build.target}"
+}
+
+post-destroot { cd ${destroot}${prefix}/bin
+ set ghc_script [ glob ghc-${version}.* ]
+ set ghci_script [ glob ghci-${version}.* ]
+ set ghc-pkg_script [ glob ghc-pkg-${version}.* ]
+
+ foreach script_name [concat ${ghc_script} ${ghci_script} ${ghc-pkg_script} ] {
+ reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}${prefix}/bin/${script_name}
}
- foreach script_name { ghcprof hsc2hs stat2resid } {
- reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/${script_name}
+ foreach script_name { ghcprof hsc2hs-ghc } {
+ reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}${prefix}/bin/${script_name}
}
- reinplace "s|\\\$@\"\}|\\\$@\"\} -L${prefix}/lib -I${prefix}/include |" ${destroot}/${prefix}/bin/ghc
+ reinplace "s|\\\$@\"\}|\\\$@\"\} -L${prefix}/lib -I${prefix}/include |" ${destroot}${prefix}/bin/ghc
- reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/lib/ghc-${version}/package.conf
+ cd ${destroot}${prefix}/lib
+ set ghc_libdir [ glob ghc-${version}.* ]
+ reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}${prefix}/lib/${ghc_libdir}/package.conf
file delete ${destroot}/${prefix}/bin/ghc
file delete ${destroot}/${prefix}/bin/ghci
file delete ${destroot}/${prefix}/bin/ghc-pkg
- foreach bin_name {ghcprof hasktags hp2ps hsc2hs runghc runhaskell stat2resid} {
- file rename ${destroot}/${prefix}/bin/${bin_name} ${destroot}/${prefix}/bin/${bin_name}-${version}
+ set ghc_date [ lindex [ split ${ghc_libdir} "." ] 2 ]
+
+ foreach bin_name { ghcprof hasktags hp2ps hsc2hs-ghc runghc } {
+ file rename ${destroot}/${prefix}/bin/${bin_name} ${destroot}${prefix}/bin/${bin_name}-${version}.${ghc_date}
}
- cd ${destroot}/${prefix}/lib/ghc-${version}
+ cd ${destroot}${prefix}/lib/${ghc_libdir}
system "ranlib *.a"
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070401/ce0a221b/attachment.html
More information about the macports-changes
mailing list