[20177] trunk/dports/lang/ghc
source_changes at macosforge.org
source_changes at macosforge.org
Fri Oct 27 06:34:33 PDT 2006
Revision: 20177
http://trac.macosforge.org/projects/macports/changeset/20177
Author: gwright at macports.org
Date: 2006-10-27 06:34:32 -0700 (Fri, 27 Oct 2006)
Log Message:
-----------
Version bump to 6.6; add support for x86.
Modified Paths:
--------------
trunk/dports/lang/ghc/Portfile
trunk/dports/lang/ghc/files/patch-configure.ac
Modified: trunk/dports/lang/ghc/Portfile
===================================================================
--- trunk/dports/lang/ghc/Portfile 2006-10-27 07:37:48 UTC (rev 20176)
+++ trunk/dports/lang/ghc/Portfile 2006-10-27 13:34:32 UTC (rev 20177)
@@ -2,8 +2,7 @@
PortSystem 1.0
name ghc
-version 6.4.2
-revision 2
+version 6.6
categories lang
maintainers gwright at opendarwin.org
platforms darwin
@@ -21,39 +20,19 @@
GHC comes with a generational garbage collector, \
and a space and time profiler.
-#
-# The compiler build requires happy version 1.15.
-#
-set happy_version 1.15
+homepage http://www.haskell.org/ghc
+master_sites ${homepage}/dist/${version}/
-homepage http://www.haskell.org/ghc/
-master_sites ${homepage}/dist/${version}/:source \
- http://www.haskell.org/happy/dist/${happy_version}:happy
-
use_bzip2 yes
-distfiles ${name}-${version}-src.tar.bz2:source \
- happy-${happy_version}-src.tar.gz:happy
+distfiles ${name}-${version}-src.tar.bz2 \
+ ${name}-${version}-src-extralibs.tar.bz2
-checksums ${name}-${version}-src.tar.bz2 md5 a394bf14e94c3bca5507d568fcc03375 \
- happy-${happy_version}-src.tar.gz md5 02ceb122b904fa4a4290e6ea1072d59e
+checksums ${name}-${version}-src.tar.bz2 md5 2427a8d7d14f86e0878df6b54938acf7 \
+ ${name}-${version}-src-extralibs.tar.bz2 md5 14b22fce36caffa509046361724bc119
-#
-# After it extracting the happy parser generator, copy it into the
-# main ghc tree. The configure argument --enable-src-tree-happy
-# directs the ghc build to make happy from the freshly downloaded
-# source before building the compiler.
-#
-post-extract {
- cd ${workpath}
- system "gzip ${extract.pre_args} ${distpath}/happy-${happy_version}-src.tar.gz ${extract.post_args}"
+patchfiles patch-configure.ac
- file copy ${workpath}/happy-${happy_version}/happy ${worksrcpath}/happy
- }
-
-patchfiles patch-configure.ac \
- patch-ghc-compiler-Makefile
-
depends_lib port:readline \
port:gmp
@@ -63,10 +42,6 @@
#
depends_run port:perl5.8
-platform darwin i386 {
- ui_msg "GHC is not supported on OS X i386 yet"
- exit 1
- }
platform darwin 6 {
ui_msg "GHC is not supported on Jaguar (OS X 10.2.x)"
@@ -74,7 +49,7 @@
}
-platform darwin 7 {
+platform darwin 7 powerpc {
global ghc_bootversion
set ghc_bootversion 6.4
@@ -85,6 +60,7 @@
checksums-append ${name}-${ghc_bootversion}-darwin-bootstrap-v01.tar.bz2 md5 3a0a79ed656cb619dd69a24cab32ba97
extract.only ${name}-${version}-src.tar.bz2 \
+ ${name}-${version}-src-extralibs.tag.bz2 \
${name}-${ghc_bootversion}-darwin-bootstrap-v01.tar.bz2
# The following is required because ghc triggers a long-standing bug
@@ -103,9 +79,8 @@
set cfg [open "${worksrcpath}/mk/build.mk" w]
puts $cfg "#"
- puts $cfg "# Local configuration overrides for DarwinPorts"
+ puts $cfg "# Local configuration overrides for MacPorts"
puts $cfg "#"
- puts $cfg "ReadlineIncludePath=${prefix}/include"
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"
@@ -134,7 +109,7 @@
}
-platform darwin 8 {
+platform darwin 8 powerpc {
global ghc_bootversion
set ghc_bootversion 6.4
@@ -145,6 +120,7 @@
checksums-append ${name}-${ghc_bootversion}-darwin-bootstrap-tiger.tar.bz2 md5 1665720d4d35cf89b9efa7865d0228f6
extract.only ${name}-${version}-src.tar.bz2 \
+ ${name}-${version}-src-extralibs.tar.bz2 \
${name}-${ghc_bootversion}-darwin-bootstrap-tiger.tar.bz2
pre-configure {
@@ -153,9 +129,8 @@
set cfg [open "${worksrcpath}/mk/build.mk" w]
puts $cfg "#"
- puts $cfg "# Local configuration overrides for DarwinPorts"
+ puts $cfg "# Local configuration overrides for MacPorts"
puts $cfg "#"
- puts $cfg "ReadlineIncludePath=${prefix}/include"
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"
@@ -181,6 +156,55 @@
configure.args-append --with-ghc='${workpath}/${name}-bootstrap/bin/ghc'
}
+
+platform darwin 8 i386 {
+ global ghc_bootversion
+ set ghc_bootversion 6.6
+
+ master_sites-append ${homepage}/dist/${ghc_bootversion}/:bootstrap
+
+ distfiles-append ${name}-${ghc_bootversion}-i386-apple-darwin-bootstrap.tar.bz2:bootstrap
+
+ checksums-append ${name}-${ghc_bootversion}-i386-apple-darwin-bootstrap.tar.bz2 md5 0cb6d89efb0694a28b34bec0f04d8c62
+
+ extract.only ${name}-${version}-src.tar.bz2 \
+ ${name}-${version}-src-extralibs.tar.bz2 \
+ ${name}-${ghc_bootversion}-i386-apple-darwin-bootstrap.tar.bz2
+
+ pre-configure {
+ cd ${worksrcpath}
+ system "autoreconf"
+
+ set cfg [open "${worksrcpath}/mk/build.mk" w]
+ puts $cfg "#"
+ puts $cfg "# Local configuration overrides for MacPorts"
+ puts $cfg "#"
+ 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
+
+ reinplace "s|/opt/local|${workpath}/ghc-bootstrap|g" ${workpath}/ghc-bootstrap/lib/ghc-${ghc_bootversion}/package.conf
+
+ reinplace "s|GHCBIN=\"/opt/local|GHCBIN=\"${workpath}/${name}-bootstrap|" ${workpath}/${name}-bootstrap/bin/ghc
+
+ reinplace "s|TOPDIROPT=\"-B/opt/local|TOPDIROPT=\"-B${workpath}/${name}-bootstrap|" ${workpath}/${name}-bootstrap/bin/ghc
+
+ reinplace "s|-L/opt/local|-L${prefix}|" ${workpath}/${name}-bootstrap/bin/ghc
+
+ reinplace "s|-I/opt/local|-I${prefix}|" ${workpath}/${name}-bootstrap/bin/ghc
+
+ reinplace "s|/opt/local|${prefix}|" ${workpath}/${name}-bootstrap/lib/ghc-${ghc_bootversion}/ghc-asm
+
+ reinplace "s|/opt/local|${prefix}|" ${workpath}/${name}-bootstrap/lib/ghc-${ghc_bootversion}/ghc-split
+ }
+
+ configure.args-append --with-ghc='${workpath}/${name}-bootstrap/bin/ghc'
+ }
+
+
#bugs GHC does not support DESTDIR. Instead, we install \
# everything into ${destroot}/${prefix}, and then fix up \
# the five scripts which actually have the installation \
@@ -193,7 +217,8 @@
configure.args --prefix=${destroot}/${prefix} \
--mandir=${destroot}/${prefix}/share/man/ \
- --enable-src-tree-happy \
+ --with-readline-includes=${prefix}/include \
+ --with-readline-libraries=${prefix}/lib \
--disable-openal \
--disable-alut
@@ -222,8 +247,4 @@
cd ${destroot}${prefix}/lib/ghc-${version}
system "ranlib *.a"
-
- file delete ${destroot}${prefix}/bin/happy
- file delete ${destroot}${prefix}/bin/happy-${happy_version}
- file delete -force ${destroot}${prefix}/lib/happy-${happy_version}
}
Modified: trunk/dports/lang/ghc/files/patch-configure.ac
===================================================================
--- trunk/dports/lang/ghc/files/patch-configure.ac 2006-10-27 07:37:48 UTC (rev 20176)
+++ trunk/dports/lang/ghc/files/patch-configure.ac 2006-10-27 13:34:32 UTC (rev 20177)
@@ -1,59 +1,35 @@
---- configure.ac.sav 2005-08-23 17:17:47.000000000 -0400
-+++ configure.ac 2005-08-23 17:20:05.000000000 -0400
-@@ -1046,17 +1046,17 @@
+--- configure.ac.sav 2006-10-13 13:00:14.000000000 -0400
++++ configure.ac 2006-10-13 13:01:02.000000000 -0400
+@@ -1062,19 +1062,19 @@
dnl ** (Mac OS X only: check for GMP.framework)
HaveFrameworkGMP=NO
--if test $HostPlatform = "powerpc-apple-darwin"; then
-- AC_MSG_CHECKING([for GMP.framework])
-- save_libs="$LIBS"
-- LIBS="-framework GMP"
-- AC_TRY_LINK_FUNC(__gmpz_fdiv_qr, HaveFrameworkGMP=YES,)
-- if test $HaveFrameworkGMP = YES; then
-- AC_DEFINE([HAVE_FRAMEWORK_GMP], [1], [Define to 1 if GMP.framework is installed (Mac OS X only).])
-- fi;
-- LIBS="$save_libs"
-- AC_MSG_RESULT([$HaveFrameworkGMP])
--fi;
-+dnl if test $HostPlatform = "powerpc-apple-darwin"; then
-+dnl AC_MSG_CHECKING([for GMP.framework])
-+dnl save_libs="$LIBS"
-+dnl LIBS="-framework GMP"
-+dnl AC_TRY_LINK_FUNC(__gmpz_fdiv_qr, HaveFrameworkGMP=YES,)
-+dnl if test $HaveFrameworkGMP = YES; then
-+dnl AC_DEFINE([HAVE_FRAMEWORK_GMP], [1], [Define to 1 if GMP.framework is installed (Mac OS X only).])
-+dnl fi;
-+dnl LIBS="$save_libs"
-+dnl AC_MSG_RESULT([$HaveFrameworkGMP])
-+dnl fi;
+-case $HostPlatform in
+-*-apple-darwin)
+- AC_MSG_CHECKING([for GMP.framework])
+- save_libs="$LIBS"
+- LIBS="-framework GMP"
+- AC_TRY_LINK_FUNC(__gmpz_fdiv_qr, HaveFrameworkGMP=YES,)
+- if test $HaveFrameworkGMP = YES; then
+- AC_DEFINE([HAVE_FRAMEWORK_GMP], [1], [Define to 1 if GMP.framework is installed (Mac OS X only).])
+- fi;
+- LIBS="$save_libs"
+- AC_MSG_RESULT([$HaveFrameworkGMP])
+- ;;
+-esac
++dnl case $HostPlatform in
++dnl *-apple-darwin)
++dnl AC_MSG_CHECKING([for GMP.framework])
++dnl save_libs="$LIBS"
++dnl LIBS="-framework GMP"
++dnl AC_TRY_LINK_FUNC(__gmpz_fdiv_qr, HaveFrameworkGMP=YES,)
++dnl if test $HaveFrameworkGMP = YES; then
++dnl AC_DEFINE([HAVE_FRAMEWORK_GMP], [1], [Define to 1 if GMP.framework is installed (Mac OS X only).])
++dnl fi;
++dnl LIBS="$save_libs"
++dnl AC_MSG_RESULT([$HaveFrameworkGMP])
++dnl ;;
++dnl esac
AC_SUBST(HaveFrameworkGMP)
dnl ** check for mingwex library
-@@ -1088,12 +1088,12 @@
-
- if test $HaveLibTermcap = YES ; then
- LIBS="-l$LibTermcap $LIBS"
-- AC_CHECK_LIB(readline, readline, HaveLibReadline=YES, HaveLibReadline=NO)
-+ AC_CHECK_LIB(readline.5, readline, HaveLibReadline=YES, HaveLibReadline=NO)
- fi
-
- if test $HaveLibTermcap = YES && test x"$HaveLibReadline" = xYES ; then
- AC_DEFINE([HAVE_READLINE_LIBS], [1], [Define to 1 if readline plus any additional libs needed for it exist.])
-- LibsReadline="readline $LibTermcap"
-+ LibsReadline="readline.5 $LibTermcap"
- else
- AC_DEFINE([HAVE_READLINE_LIBS], [0], [Define to 1 if readline plus any additional libs needed for it exist.])
- LibsReadline=
-@@ -1101,10 +1101,10 @@
- AC_SUBST(LibsReadline)
-
- if test "$HaveLibReadline"; then
-- AC_CHECK_LIB(readline, rl_erase_empty_line,
-+ AC_CHECK_LIB(readline.5, rl_erase_empty_line,
- [AC_DEFINE([HAVE_READLINE_4], [1], [Define to 1 if readline has version >= 4.0.])],
- [AC_DEFINE([HAVE_READLINE_4], [0], [Define to 1 if readline has version >= 4.0.])])
-- AC_CHECK_LIB(readline, rl_free_undo_list,
-+ AC_CHECK_LIB(readline.5, rl_free_undo_list,
- [AC_DEFINE([HAVE_READLINE_4_2], [1], [Define to 1 if readline has version >= 4.2.])],
- [AC_DEFINE([HAVE_READLINE_4_2], [0], [Define to 1 if readline has version >= 4.2.])])
- else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20061027/0596c2a8/attachment.html
More information about the macports-changes
mailing list