[34723] trunk/dports/lang/ghc

gwright at macports.org gwright at macports.org
Mon Mar 3 13:36:04 PST 2008


Revision: 34723
          http://trac.macosforge.org/projects/macports/changeset/34723
Author:   gwright at macports.org
Date:     2008-03-03 13:36:03 -0800 (Mon, 03 Mar 2008)

Log Message:
-----------
Version bump to 6.8.2.

Modified Paths:
--------------
    trunk/dports/lang/ghc/Portfile
    trunk/dports/lang/ghc/files/patch-configure.ac

Added Paths:
-----------
    trunk/dports/lang/ghc/files/patch-libraries-Cabal-Distribution-Simple-Configure.hs
    trunk/dports/lang/ghc/files/patch-libraries-Makefile
    trunk/dports/lang/ghc/files/patch-libraries-base-aclocal.m4
    trunk/dports/lang/ghc/files/patch-libraries-base-base.buildinfo.in
    trunk/dports/lang/ghc/files/patch-libraries-base-base.cabal
    trunk/dports/lang/ghc/files/patch-libraries-base-configure.ac
    trunk/dports/lang/ghc/files/patch-libraries-hpc-Setup.hs
    trunk/dports/lang/ghc/files/patch-libraries-hpc-aclocal.m4
    trunk/dports/lang/ghc/files/patch-libraries-hpc-configure.ac
    trunk/dports/lang/ghc/files/patch-libraries-hpc-hpc.buildinfo.in
    trunk/dports/lang/ghc/files/patch-libraries-hpc-hpc.cabal
    trunk/dports/lang/ghc/files/patch-rts-posix-FileLock.c

Removed Paths:
-------------
    trunk/dports/lang/ghc/files/patch-GHC.hs
    trunk/dports/lang/ghc/files/patch-package.conf.in

Modified: trunk/dports/lang/ghc/Portfile
===================================================================
--- trunk/dports/lang/ghc/Portfile	2008-03-03 20:47:12 UTC (rev 34722)
+++ trunk/dports/lang/ghc/Portfile	2008-03-03 21:36:03 UTC (rev 34723)
@@ -2,7 +2,7 @@
 
 PortSystem 1.0
 name		ghc
-version		6.6.1
+version		6.8.2
 categories	lang
 maintainers	gwright at macports.org
 platforms	darwin
@@ -20,20 +20,30 @@
 		GHC comes with a generational garbage collector,	\
 		and a space and time profiler. 
 
-homepage	http://www.haskell.org/ghc
-master_sites	${homepage}/dist/${version}/
+homepage	http://haskell.org/
+master_sites	${homepage}${name}/dist/${version}/
 
 use_bzip2	yes
 
-distfiles	${name}-${version}-src.tar.bz2		\
+distfiles	${name}-${version}-src.tar.bz2			\
 		${name}-${version}-src-extralibs.tar.bz2
 
-checksums	${name}-${version}-src.tar.bz2			md5 ba9f4aec2fde5ff1e1548ae69b78aeb0 \
-		${name}-${version}-src-extralibs.tar.bz2	md5 43a26b81608b206c056adc3032f7da2a
+checksums	${name}-${version}-src.tar.bz2			md5 43108417594be7eba0918c459e871e40 \
+		${name}-${version}-src-extralibs.tar.bz2	md5 d199c50814188fb77355d41058b8613c \
 
-patchfiles	patch-configure.ac	\
-		patch-GHC.hs		\
-		patch-package.conf.in
+patchfiles	patch-configure.ac				\
+		patch-libraries-Makefile			\
+		patch-libraries-base-base.cabal			\
+		patch-libraries-base-base.buildinfo.in		\
+		patch-libraries-base-configure.ac		\
+		patch-libraries-base-aclocal.m4			\
+		patch-libraries-hpc-Setup.hs			\
+		patch-libraries-hpc-hpc.cabal			\
+		patch-libraries-hpc-hpc.buildinfo.in		\
+		patch-libraries-hpc-configure.ac		\
+		patch-libraries-hpc-aclocal.m4			\
+		patch-rts-posix-FileLock.c			\
+                patch-libraries-Cabal-Distribution-Simple-Configure.hs
 
 depends_lib	port:readline \
 		port:gmp
@@ -50,160 +60,112 @@
 	}
 
 
-platform darwin 7 powerpc {
-		global	ghc_bootversion
-		set ghc_bootversion	6.4
+platform darwin 7 {
+		return -code error "${name} is not supported on Mac OS X 10.3.x (Panther)"
+}
 
-		master_sites-append	${homepage}/dist/${ghc_bootversion}/MacOSX/:bootstrap
 
-		distfiles-append	${name}-${ghc_bootversion}-darwin-bootstrap-v01.tar.bz2:bootstrap
+platform darwin 8 powerpc {
+		global ghc_bootversion
+		set ghc_bootversion	6.6.1
 
-		checksums-append	${name}-${ghc_bootversion}-darwin-bootstrap-v01.tar.bz2 md5 3a0a79ed656cb619dd69a24cab32ba97
+		master_sites-append	${homepage}${name}/dist/${ghc_bootversion}/:bootstrap
 
+		distfiles-append	${name}-${ghc_bootversion}-darwin-ppc-tiger-bootstrap.tar.bz2:bootstrap
+
+		checksums-append	${name}-${ghc_bootversion}-darwin-ppc-tiger-bootstrap.tar.bz2 md5 0842380935d4ce3a2150976eff0f09a0
+
 		extract.only		${name}-${version}-src.tar.bz2 \
 					${name}-${version}-src-extralibs.tar.bz2 \
-					${name}-${ghc_bootversion}-darwin-bootstrap-v01.tar.bz2
+					${name}-${ghc_bootversion}-darwin-ppc-tiger-bootstrap.tar.bz2
+}
 
-# The following is required because ghc triggers a long-standing bug
-# in make 3.79 and earlier. (3.79 is standard on Panther.) The bug causes
-# make to fall into an infinite loop. (Not required on Tiger.)
 
-		depends_build		port:gmake
-
-# The bootstrap compiler requires version 5.0 of readline. Ugh.
-
-		depends_lib-append	port:readline-5
-
-		pre-configure	{
-			system "cd ${worksrcpath} && 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'
-		build.cmd	gmake
-	}
-
-
-platform darwin 8 powerpc {
+platform darwin 8 i386 {
 		global ghc_bootversion
-		set ghc_bootversion	6.4
+		set ghc_bootversion	6.6
 
-		master_sites-append	${homepage}/dist/${ghc_bootversion}/MacOSX/:bootstrap
+		master_sites-append	${homepage}${name}/dist/${ghc_bootversion}/:bootstrap
 
-		distfiles-append	${name}-${ghc_bootversion}-darwin-bootstrap-tiger.tar.bz2:bootstrap
+		distfiles-append	${name}-${ghc_bootversion}-darwin-i386-tiger-bootstrap.tar.bz2:bootstrap
 
-		checksums-append	${name}-${ghc_bootversion}-darwin-bootstrap-tiger.tar.bz2 md5 1665720d4d35cf89b9efa7865d0228f6
+		checksums-append	${name}-${ghc_bootversion}-darwin-i386-tiger-bootstrap.tar.bz2 md5 f86c72775f1b1d07867c1e7be46af680
 
 		extract.only		${name}-${version}-src.tar.bz2 \
 					${name}-${version}-src-extralibs.tar.bz2 \
-					${name}-${ghc_bootversion}-darwin-bootstrap-tiger.tar.bz2
+					${name}-${ghc_bootversion}-darwin-i386-tiger-bootstrap.tar.bz2
+}
 
-		pre-configure	{
-			system "cd ${worksrcpath} && 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
+platform darwin 9 powerpc {
+		global ghc_bootversion
+		set ghc_bootversion	6.8.2
 
-			reinplace "s|/opt/local|${workpath}/ghc-bootstrap|g" ${workpath}/ghc-bootstrap/lib/ghc-${ghc_bootversion}/package.conf
+		return -code error "${name} is not yet supported on Mac OS X 10.5.x PowerPC"
+#		master_sites-append	${homepage}${name}/dist/${ghc_bootversion}/:bootstrap
 
-			reinplace "s|GHCBIN=\"/opt/local|GHCBIN=\"${workpath}/${name}-bootstrap|" ${workpath}/${name}-bootstrap/bin/ghc
+#		distfiles-append	${name}-${ghc_bootversion}-darwin-ppc-leopard-bootstrap.tar.bz2:bootstrap
 
-			reinplace "s|TOPDIROPT=\"-B/opt/local|TOPDIROPT=\"-B${workpath}/${name}-bootstrap|" ${workpath}/${name}-bootstrap/bin/ghc
+#		checksums-append	${name}-${ghc_bootversion}-darwin-ppc-leopard-bootstrap.tar.bz2 md5 735a6dca41f36044199784d5bd1ece69
 
-			reinplace "s|-L/opt/local|-L${prefix}|" ${workpath}/${name}-bootstrap/bin/ghc
+#		extract.only		${name}-${version}-src.tar.bz2 \
+#					${name}-${version}-src-extralibs.tar.bz2 \
+#					${name}-${ghc_bootversion}-darwin-ppc-leopard-bootstrap.tar.bz2
+}
 
-			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'
-	}
-
-
-platform darwin 8 i386 {
+platform darwin 9 i386 {
 		global ghc_bootversion
-		set ghc_bootversion	6.6
+		set ghc_bootversion	6.8.2
 
-		master_sites-append	${homepage}/dist/${ghc_bootversion}/:bootstrap
+		master_sites-append	${homepage}${name}/dist/${ghc_bootversion}/:bootstrap
 
-		distfiles-append	${name}-${ghc_bootversion}-i386-apple-darwin-bootstrap.tar.bz2:bootstrap
+		distfiles-append	${name}-${ghc_bootversion}-darwin-i386-leopard-bootstrap.tar.bz2:bootstrap
 
-		checksums-append	${name}-${ghc_bootversion}-i386-apple-darwin-bootstrap.tar.bz2 md5 0cb6d89efb0694a28b34bec0f04d8c62
+		checksums-append	${name}-${ghc_bootversion}-darwin-i386-leopard-bootstrap.tar.bz2 md5 f263cedef8bcbaa7e9014b3e06923583
 
 		extract.only		${name}-${version}-src.tar.bz2 \
 					${name}-${version}-src-extralibs.tar.bz2 \
-					${name}-${ghc_bootversion}-i386-apple-darwin-bootstrap.tar.bz2
+					${name}-${ghc_bootversion}-darwin-i386-leopard-bootstrap.tar.bz2
+}
 
-		pre-configure	{
-			system "cd ${worksrcpath} && 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
+post-patch	{
+		reinplace "s|/opt/local|${workpath}/ghc-bootstrap|g" ${workpath}/ghc-bootstrap/lib/ghc-${ghc_bootversion}/package.conf
 
-			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|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|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|-L/opt/local|-L${prefix}|" ${workpath}/${name}-bootstrap/bin/ghc
+		reinplace "s|-I/opt/local|-I${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-asm
+		reinplace "s|/opt/local|${prefix}|" ${workpath}/${name}-bootstrap/lib/ghc-${ghc_bootversion}/ghc-split
 
-		  	reinplace "s|/opt/local|${prefix}|" ${workpath}/${name}-bootstrap/lib/ghc-${ghc_bootversion}/ghc-split
-		}
+}
 
-		configure.args-append --with-ghc='${workpath}/${name}-bootstrap/bin/ghc'
-	}
 
+pre-configure	{
+		system "autoreconf ${worksrcpath}"
+		system "autoreconf ${worksrcpath}/libraries/base"
+		system "autoreconf ${worksrcpath}/libraries/hpc"
 
+		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 -L${prefix}/lib"
+	  	puts $cfg "EXTRA_HSC2HS_OPTS += -I${prefix}/include"
+	  	puts $cfg "EXTRA_LD_OPTS += -L${prefix}/lib"
+	  	close $cfg
+}
+
 #bugs		GHC does not support DESTDIR. Instead, we install	\
-#		everything into ${destroot}/${prefix}, and then fix up	\
+#		everything into ${destroot}${prefix}, and then fix up	\
 #		the five scripts which actually have the installation	\
 #		path hard coded.
 
@@ -211,35 +173,40 @@
 configure.cflags-append		"-I${prefix}/include"
 configure.env		DYLD_FALLBACK_LIBRARY_PATH=${prefix}/lib
 
-configure.args	--prefix=${destroot}/${prefix}			\
-		--mandir=${destroot}/${prefix}/share/man/	\
+configure.args	--prefix=${destroot}${prefix}			\
+		--mandir=${destroot}${prefix}/share/man/	\
+		--with-gmp-includes=${prefix}/include		\
+		--with-gmp-libraries=${prefix}/lib		\
 		--with-readline-includes=${prefix}/include	\
 		--with-readline-libraries=${prefix}/lib		\
-		--disable-openal				\
-		--disable-alut
+		--with-ghc='${workpath}/${name}-bootstrap/bin/ghc'
 
-variant noopengl	{ configure.args-append --disable-hopengl }
+variant no_opengl	{ configure.args-append --disable-opengl
+			  configure.args-append --disable-glut
+}
 
+# The OpenAL variant does not work yet (see http://hackage.haskell.org/trac/ghc/ticket/2067)
+#variant openal		{ configure.args-append --enable-openal
+#			  configure.args-append --enable-alut
+#}
+
 build	{
-	system "env DYLD_FALLBACK_LIBRARY_PATH=${prefix}/lib ${build.cmd} ${build.target}"
+	system "env DYLD_FALLBACK_LIBRARY_PATH=${prefix}/lib ${build.cmd}"
 }
 
+destroot	{
+	system "${destroot.cmd} ${destroot.target}"
+}
 
-
-# Note the middle "/" in the ${destroot}/${prefix} pattern. It is required,
-# because the actual text we are trying to match has a "//" between the
-# destroot and the prefix pieces.
-
 post-destroot	{
-	reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/ghc
-	reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/ghci
-	reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/ghc-pkg
-	reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/ghcprof
-	reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}/${prefix}/bin/hsc2hs
+	reinplace s|${destroot}${prefix}|${prefix}|g ${destroot}${prefix}/bin/ghc
+	reinplace s|${destroot}${prefix}|${prefix}|g ${destroot}${prefix}/bin/ghci
+	reinplace s|${destroot}${prefix}|${prefix}|g ${destroot}${prefix}/bin/ghc-pkg
+	reinplace s|${destroot}${prefix}|${prefix}|g ${destroot}${prefix}/bin/ghcprof
+	reinplace s|${destroot}${prefix}|${prefix}|g ${destroot}${prefix}/bin/hsc2hs
 
-	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/${name}-${version}/package.conf
 
-	reinplace s|${destroot}/${prefix}|${prefix}|g ${destroot}${prefix}/lib/${name}-${version}/package.conf
-
-	system "cd ${destroot}${prefix}/lib/ghc-${version} && ranlib *.a"
+        system "ranlib ${destroot}${prefix}/lib/ghc-${version}/*.a"
 }

Deleted: trunk/dports/lang/ghc/files/patch-GHC.hs
===================================================================
--- trunk/dports/lang/ghc/files/patch-GHC.hs	2008-03-03 20:47:12 UTC (rev 34722)
+++ trunk/dports/lang/ghc/files/patch-GHC.hs	2008-03-03 21:36:03 UTC (rev 34723)
@@ -1,14 +0,0 @@
---- libraries/Cabal/Distribution/Simple/GHC.hs.sav	2006-11-01 11:27:49.000000000 -0500
-+++ libraries/Cabal/Distribution/Simple/GHC.hs	2006-11-01 11:38:09.000000000 -0500
-@@ -414,6 +414,11 @@
- installIncludeFiles verbose pkg_descr at PackageDescription{library=Just l} libdir
-  = do
-    createDirectoryIfMissing True incdir
-+
-+   -- Hack to make cabal work with packaging systems
-+   -- that expect to be able to delete empty directories:
-+   writeFile (incdir `joinFileName` ".cabalTurd") ""
-+
-    incs <- mapM (findInc relincdirs) (installIncludes lbi)
-    sequence_ [ copyFileVerbose verbose path (incdir `joinFileName` f)
- 	     | (f,path) <- incs ]

Modified: trunk/dports/lang/ghc/files/patch-configure.ac
===================================================================
--- trunk/dports/lang/ghc/files/patch-configure.ac	2008-03-03 20:47:12 UTC (rev 34722)
+++ trunk/dports/lang/ghc/files/patch-configure.ac	2008-03-03 21:36:03 UTC (rev 34723)
@@ -1,7 +1,74 @@
---- configure.ac.orig	2007-04-25 13:10:41.000000000 -0400
-+++ configure.ac	2007-04-26 17:06:28.000000000 -0400
-@@ -1113,19 +1113,19 @@
+--- configure.ac.sav	2007-12-17 16:23:37.000000000 -0500
++++ configure.ac	2007-12-17 16:30:28.000000000 -0500
+@@ -792,6 +792,66 @@
+ dnl  AC_DEFINE(HAVE_WIN32_DLL_SUPPORT)
+ dnl fi
  
++dnl ** Enable the building of OpenGL?
++dnl --------------------------------------------------------------
++AC_ARG_ENABLE(opengl,
++[AC_HELP_STRING([--enable-opengl],
++[Build the OpenGL bindings. [default=yes]])],
++[ if test x"$enableval" = x"yes"; then
++        GhcLibsWithOpenGL=YES
++  else
++        GhcLibsWithOpenGL=NO
++  fi
++],
++[GhcLibsWithOpenGL=YES]
++)
++AC_SUBST(GhcLibsWithOpenGL)
++
++dnl ** Enable the building of GLUT?
++dnl --------------------------------------------------------------
++AC_ARG_ENABLE(glut,
++[AC_HELP_STRING([--enable-glut],
++[Build the GLUT bindings. [default=yes]])],
++[ if test x"$enableval" = x"yes"; then
++        GhcLibsWithGLUT=YES
++  else
++        GhcLibsWithGLUT=NO
++  fi
++],
++[GhcLibsWithGLUT=YES]
++)
++AC_SUBST(GhcLibsWithGLUT)
++
++dnl ** Enable the building of OpenAL?
++dnl --------------------------------------------------------------
++AC_ARG_ENABLE(openal,
++[AC_HELP_STRING([--enable-openal],
++[Build the OpenAL binding. [default=no]])],
++[ if test x"$enableval" = x"yes"; then
++        GhcLibsWithOpenAL=YES
++  else
++        GhcLibsWithOpenAL=NO
++  fi
++],
++[GhcLibsWithOpenAL=NO]
++)
++AC_SUBST(GhcLibsWithOpenAL)
++
++dnl ** Enable the building of ALUT?
++dnl --------------------------------------------------------------
++AC_ARG_ENABLE(alut,
++[AC_HELP_STRING([--enable-alut],
++[Build OpenAL Utility Toolkit (ALUT). [default=no]])],
++[ if test x"$enableval" = x"yes"; then
++        GhcLibsWithALUT=YES
++  else
++        GhcLibsWithALUT=NO
++  fi
++],
++[GhcLibsWithALUT=NO]
++)
++AC_SUBST(GhcLibsWithALUT)
++
+ dnl ** Enable the building of the ObjectIO?
+ dnl --------------------------------------------------------------
+ AC_ARG_ENABLE(objectio,
+@@ -1100,19 +1160,19 @@
+ 
  dnl ** (Mac OS X only: check for GMP.framework)
  HaveFrameworkGMP=NO
 -case $HostPlatform in
@@ -19,16 +86,16 @@
 -esac
 +dnl case $HostPlatform in
 +dnl *-apple-darwin)
-+dnl     AC_MSG_CHECKING([for GMP.framework])
-+dnl     save_libs="$LIBS"
++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    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)
  

Added: trunk/dports/lang/ghc/files/patch-libraries-Cabal-Distribution-Simple-Configure.hs
===================================================================
--- trunk/dports/lang/ghc/files/patch-libraries-Cabal-Distribution-Simple-Configure.hs	                        (rev 0)
+++ trunk/dports/lang/ghc/files/patch-libraries-Cabal-Distribution-Simple-Configure.hs	2008-03-03 21:36:03 UTC (rev 34723)
@@ -0,0 +1,22 @@
+--- libraries/Cabal/Distribution/Simple/Configure.hs.sav	2008-03-01 17:01:39.000000000 -0500
++++ libraries/Cabal/Distribution/Simple/Configure.hs	2008-03-01 17:04:25.000000000 -0500
+@@ -130,7 +130,7 @@
+ import qualified System.Info
+     ( os, arch )
+ import System.IO
+-    ( hPutStrLn, stderr )
++    ( hPutStrLn, stderr, openFile, IOMode(..), hGetContents, hClose )
+ import Text.PrettyPrint.HughesPJ
+     ( comma, punctuate, render, nest, sep )
+     
+@@ -146,7 +146,9 @@
+   let dieMsg = "error reading " ++ filename ++ 
+                "; run \"setup configure\" command?\n"
+   if (not e) then return $ Left dieMsg else do 
+-    str <- readFile filename
++    hdl <- openFile filename ReadMode
++    str <- hGetContents hdl >>= \s -> last s `seq` return s
++    hClose hdl
+     case reads str of
+       [(bi,_)] -> return $ Right bi
+       _        -> return $ Left  dieMsg

Added: trunk/dports/lang/ghc/files/patch-libraries-Makefile
===================================================================
--- trunk/dports/lang/ghc/files/patch-libraries-Makefile	                        (rev 0)
+++ trunk/dports/lang/ghc/files/patch-libraries-Makefile	2008-03-03 21:36:03 UTC (rev 34723)
@@ -0,0 +1,21 @@
+--- libraries/Makefile.sav	2007-12-17 16:55:27.000000000 -0500
++++ libraries/Makefile	2007-12-17 16:55:39.000000000 -0500
+@@ -63,10 +63,18 @@
+ SUBDIRS += $(wildcard mtl)
+ SUBDIRS += $(wildcard fgl)
+ SUBDIRS += $(wildcard time)
++ifeq "$(GhcLibsWithOpenGL)" "YES"
+ SUBDIRS += $(wildcard OpenGL)
++endif
++ifeq "$(GhcLibsWithGLUT)" "YES"
+ SUBDIRS += $(wildcard GLUT)
++endif
++ifeq "$(GhcLibsWithOpenAL)" "YES"
+ SUBDIRS += $(wildcard OpenAL)
++endif
++ifeq "$(GhcLibsWithALUT)" "YES"
+ SUBDIRS += $(wildcard ALUT)
++endif
+ SUBDIRS += $(wildcard stm)
+ SUBDIRS += $(wildcard xhtml)
+ SUBDIRS += $(wildcard cgi)

Added: trunk/dports/lang/ghc/files/patch-libraries-base-aclocal.m4
===================================================================
--- trunk/dports/lang/ghc/files/patch-libraries-base-aclocal.m4	                        (rev 0)
+++ trunk/dports/lang/ghc/files/patch-libraries-base-aclocal.m4	2008-03-03 21:36:03 UTC (rev 34723)
@@ -0,0 +1,24 @@
+--- libraries/base/aclocal.m4.sav	2007-12-17 16:35:32.000000000 -0500
++++ libraries/base/aclocal.m4	2007-12-17 16:36:23.000000000 -0500
+@@ -1,3 +1,21 @@
++# FP_ARG_GMP
++# -------------
++AC_DEFUN([FP_ARG_GMP],
++[
++AC_ARG_WITH([gmp-includes],
++  [AC_HELP_STRING([--with-gmp-includes],
++    [directory containing gmp.h])],
++    [gmp_includes=$withval],
++    [gmp_includes=NONE])
++
++AC_ARG_WITH([gmp-libraries],
++  [AC_HELP_STRING([--with-gmp-libraries],
++    [directory containing gmp library])],
++    [gmp_libraries=$withval],
++    [gmp_libraries=NONE])
++])# FP_ARG_GMP
++
++
+ # FP_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
+ # --------------------------------------------------------
+ # Assign VARIABLE the value of the compile-time EXPRESSION using INCLUDES for

Added: trunk/dports/lang/ghc/files/patch-libraries-base-base.buildinfo.in
===================================================================
--- trunk/dports/lang/ghc/files/patch-libraries-base-base.buildinfo.in	                        (rev 0)
+++ trunk/dports/lang/ghc/files/patch-libraries-base-base.buildinfo.in	2008-03-03 21:36:03 UTC (rev 34723)
@@ -0,0 +1,5 @@
+--- libraries/base/base.buildinfo.in.sav	1969-12-31 19:00:00.000000000 -0500
++++ libraries/base/base.buildinfo.in	2007-12-17 16:34:51.000000000 -0500
+@@ -0,0 +1,2 @@
++include-dirs: @GMP_INCLUDE_DIRS@
++

Added: trunk/dports/lang/ghc/files/patch-libraries-base-base.cabal
===================================================================
--- trunk/dports/lang/ghc/files/patch-libraries-base-base.cabal	                        (rev 0)
+++ trunk/dports/lang/ghc/files/patch-libraries-base-base.cabal	2008-03-03 21:36:03 UTC (rev 34723)
@@ -0,0 +1,15 @@
+--- libraries/base/base.cabal.sav	2007-12-17 16:35:22.000000000 -0500
++++ libraries/base/base.cabal	2007-12-17 16:36:18.000000000 -0500
+@@ -10,9 +10,11 @@
+     structures to parsing combinators and debugging utilities.
+ cabal-version:  >=1.2
+ build-type: Custom
++extra-source-files:
++		base.buildinfo.in
+ extra-tmp-files:
+                 config.log config.status autom4te.cache
+-                include/HsBaseConfig.h
++                include/HsBaseConfig.h base.buildinfo
+ 
+ 
+ Library {

Added: trunk/dports/lang/ghc/files/patch-libraries-base-configure.ac
===================================================================
--- trunk/dports/lang/ghc/files/patch-libraries-base-configure.ac	                        (rev 0)
+++ trunk/dports/lang/ghc/files/patch-libraries-base-configure.ac	2008-03-03 21:36:03 UTC (rev 34723)
@@ -0,0 +1,30 @@
+--- libraries/base/configure.ac.sav	2007-12-17 16:35:12.000000000 -0500
++++ libraries/base/configure.ac	2007-12-17 16:36:07.000000000 -0500
+@@ -5,6 +5,27 @@
+ 
+ AC_CONFIG_HEADERS([include/HsBaseConfig.h])
+ 
++dnl--------------------------------------------------------------------
++dnl * Deal with arguments telling us gmp is somewhere odd
++dnl--------------------------------------------------------------------
++
++FP_ARG_GMP
++
++GMP_INCLUDE_DIRS=
++GMP_LIB_DIRS=
++if test "x$gmp_libraries" != "xNONE"; then
++  LDFLAGS="-L$gmp_libraries $LDFLAGS"
++  GMP_LIB_DIRS=$gmp_libraries
++fi
++if test "x$gmp_includes" != "xNONE"; then
++  CPPFLAGS="-I$gmp_includes $CPPFLAGS"
++  GMP_INCLUDE_DIRS=$gmp_includes
++fi
++AC_SUBST(GMP_INCLUDE_DIRS)
++AC_SUBST(GMP_LIB_DIRS)
++AC_CONFIG_FILES(base.buildinfo)
++dnl--------------------------------------------------------------------
++
+ AC_ARG_WITH([cc],
+             [C compiler],
+             [CC=$withval])

Added: trunk/dports/lang/ghc/files/patch-libraries-hpc-Setup.hs
===================================================================
--- trunk/dports/lang/ghc/files/patch-libraries-hpc-Setup.hs	                        (rev 0)
+++ trunk/dports/lang/ghc/files/patch-libraries-hpc-Setup.hs	2008-03-03 21:36:03 UTC (rev 34723)
@@ -0,0 +1,8 @@
+--- libraries/hpc/Setup.hs.sav	2007-12-17 16:43:33.000000000 -0500
++++ libraries/hpc/Setup.hs	2007-12-17 16:43:56.000000000 -0500
+@@ -3,4 +3,4 @@
+ import Distribution.Simple
+ 
+ main :: IO ()
+-main = defaultMain
++main = defaultMainWithHooks defaultUserHooks

Added: trunk/dports/lang/ghc/files/patch-libraries-hpc-aclocal.m4
===================================================================
--- trunk/dports/lang/ghc/files/patch-libraries-hpc-aclocal.m4	                        (rev 0)
+++ trunk/dports/lang/ghc/files/patch-libraries-hpc-aclocal.m4	2008-03-03 21:36:03 UTC (rev 34723)
@@ -0,0 +1,20 @@
+--- libraries/hpc/aclocal.m4.sav	1969-12-31 19:00:00.000000000 -0500
++++ libraries/hpc/aclocal.m4	2007-12-17 16:44:44.000000000 -0500
+@@ -0,0 +1,17 @@
++# FP_ARG_GMP
++# -------------
++AC_DEFUN([FP_ARG_GMP],
++[
++AC_ARG_WITH([gmp-includes],
++  [AC_HELP_STRING([--with-gmp-includes],
++    [directory containing gmp.h])],
++    [gmp_includes=$withval],
++    [gmp_includes=NONE])
++
++AC_ARG_WITH([gmp-libraries],
++  [AC_HELP_STRING([--with-gmp-libraries],
++    [directory containing gmp library])],
++    [gmp_libraries=$withval],
++    [gmp_libraries=NONE])
++])# FP_ARG_GMP
++

Added: trunk/dports/lang/ghc/files/patch-libraries-hpc-configure.ac
===================================================================
--- trunk/dports/lang/ghc/files/patch-libraries-hpc-configure.ac	                        (rev 0)
+++ trunk/dports/lang/ghc/files/patch-libraries-hpc-configure.ac	2008-03-03 21:36:03 UTC (rev 34723)
@@ -0,0 +1,31 @@
+--- libraries/hpc/configure.ac.sav	1969-12-31 19:00:00.000000000 -0500
++++ libraries/hpc/configure.ac	2007-12-17 16:44:40.000000000 -0500
+@@ -0,0 +1,28 @@
++AC_INIT([Haskell hpc package], [1.0], [libraries at haskell.org], [hpc])
++
++# Safety check: Ensure that we are in the correct source directory.
++AC_CONFIG_SRCDIR([hpc.cabal])
++
++dnl--------------------------------------------------------------------
++dnl * Deal with arguments telling us gmp is somewhere odd
++dnl--------------------------------------------------------------------
++
++FP_ARG_GMP
++
++GMP_INCLUDE_DIRS=
++GMP_LIB_DIRS=
++if test "x$gmp_libraries" != "xNONE"; then
++  LDFLAGS="-L$gmp_libraries $LDFLAGS"
++  GMP_LIB_DIRS=$gmp_libraries
++fi
++if test "x$gmp_includes" != "xNONE"; then
++  CPPFLAGS="-I$gmp_includes $CPPFLAGS"
++  GMP_INCLUDE_DIRS=$gmp_includes
++fi
++AC_SUBST(GMP_INCLUDE_DIRS)
++AC_SUBST(GMP_LIB_DIRS)
++AC_CONFIG_FILES(hpc.buildinfo)
++dnl--------------------------------------------------------------------
++
++AC_OUTPUT
++

Added: trunk/dports/lang/ghc/files/patch-libraries-hpc-hpc.buildinfo.in
===================================================================
--- trunk/dports/lang/ghc/files/patch-libraries-hpc-hpc.buildinfo.in	                        (rev 0)
+++ trunk/dports/lang/ghc/files/patch-libraries-hpc-hpc.buildinfo.in	2008-03-03 21:36:03 UTC (rev 34723)
@@ -0,0 +1,5 @@
+--- libraries/hpc/hpc.buildinfo.in.sav	1969-12-31 19:00:00.000000000 -0500
++++ libraries/hpc/hpc.buildinfo.in	2007-12-17 16:44:09.000000000 -0500
+@@ -0,0 +1,2 @@
++include-dirs: @GMP_INCLUDE_DIRS@
++

Added: trunk/dports/lang/ghc/files/patch-libraries-hpc-hpc.cabal
===================================================================
--- trunk/dports/lang/ghc/files/patch-libraries-hpc-hpc.cabal	                        (rev 0)
+++ trunk/dports/lang/ghc/files/patch-libraries-hpc-hpc.cabal	2008-03-03 21:36:03 UTC (rev 34723)
@@ -0,0 +1,12 @@
+--- libraries/hpc/hpc.cabal.sav	2007-12-17 16:43:39.000000000 -0500
++++ libraries/hpc/hpc.cabal	2007-12-17 16:44:01.000000000 -0500
+@@ -15,3 +15,9 @@
+ 		 Trace.Hpc.Reflect
+ build-depends: base, directory, old-time, containers
+ extensions: CPP
++extra-source-files:
++		hpc.buildinfo.in
++extra-tmp-files:
++		config.log config.status autom4te.cache
++		hpc.buildinfo
++

Deleted: trunk/dports/lang/ghc/files/patch-package.conf.in
===================================================================
--- trunk/dports/lang/ghc/files/patch-package.conf.in	2008-03-03 20:47:12 UTC (rev 34722)
+++ trunk/dports/lang/ghc/files/patch-package.conf.in	2008-03-03 21:36:03 UTC (rev 34723)
@@ -1,11 +0,0 @@
---- libraries/X11/package.conf.in.sav	2007-04-26 17:36:23.000000000 -0400
-+++ libraries/X11/package.conf.in	2007-04-26 17:37:27.000000000 -0400
-@@ -25,7 +25,7 @@
- hidden-modules:
- 
- import-dirs:	IMPORT_DIR
--library-dirs:	LIB_DIR
-+library-dirs:	LIB_DIR, /usr/X11R6/lib
- #ifndef INSTALLING
- 		, LIB_DIR"/cbits"
- #endif

Added: trunk/dports/lang/ghc/files/patch-rts-posix-FileLock.c
===================================================================
--- trunk/dports/lang/ghc/files/patch-rts-posix-FileLock.c	                        (rev 0)
+++ trunk/dports/lang/ghc/files/patch-rts-posix-FileLock.c	2008-03-03 21:36:03 UTC (rev 34723)
@@ -0,0 +1,20 @@
+--- rts/posix/FileLock.c.sav	2008-03-03 11:40:14.000000000 -0500
++++ rts/posix/FileLock.c	2008-03-03 11:43:40.000000000 -0500
+@@ -88,6 +88,17 @@
+         if (for_writing || lock->readers < 0) {
+             return -1;
+         }
++
++	// have we seen this fd before?
++	if (lookupHashTable(fd_hash, fd) == NULL) {
++		insertHashTable(fd_hash, fd, lock);
++	}
++	else
++	{
++		errorBelch("fd %d tries to lock the same file twice", fd);
++		return -1;
++	}
++
+         lock->readers++;
+         return 0;
+     }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080303/5a8aad40/attachment-0001.html 


More information about the macports-changes mailing list