aboutsummaryrefslogtreecommitdiffstats
path: root/lang/ghc
diff options
context:
space:
mode:
authorobraun <obraun@FreeBSD.org>2007-12-31 18:57:54 +0800
committerobraun <obraun@FreeBSD.org>2007-12-31 18:57:54 +0800
commitbf50335fef3a2421dbbebabb7fca9611a6fb74bc (patch)
tree3455466ec5cf134d7bb78ef7267c284208f0bd4e /lang/ghc
parent010bedfaa0e702f0d6e89680aa29d09cac5b35d0 (diff)
downloadfreebsd-ports-gnome-bf50335fef3a2421dbbebabb7fca9611a6fb74bc.tar.gz
freebsd-ports-gnome-bf50335fef3a2421dbbebabb7fca9611a6fb74bc.tar.zst
freebsd-ports-gnome-bf50335fef3a2421dbbebabb7fca9611a6fb74bc.zip
Reactivate dependency on libgmp-port
Diffstat (limited to 'lang/ghc')
-rw-r--r--lang/ghc/Makefile9
-rw-r--r--lang/ghc/files/patch-ghc-rts-package.conf.in22
-rw-r--r--lang/ghc/files/patch-utils-hsc2hs-Makefile20
-rw-r--r--lang/ghc/pkg-plist4
4 files changed, 40 insertions, 15 deletions
diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile
index 58379faee10b..f0c8a7fe3d28 100644
--- a/lang/ghc/Makefile
+++ b/lang/ghc/Makefile
@@ -22,7 +22,7 @@ BOOT_DIST= ghc-${PORTVERSION}-i386-unknown-freebsd6-boot${EXTRACT_SUFX}:boot
USE_AUTOTOOLS= autoconf:261:env
USE_BZIP2= yes
-#LIB_DEPENDS+= gmp.7:${PORTSDIR}/math/libgmp4
+LIB_DEPENDS+= gmp.7:${PORTSDIR}/math/libgmp4
USE_PERL5= yes
USE_GMAKE= yes
@@ -53,13 +53,12 @@ PLIST_SUB+= PROFILE=""
BOOT_DIR= ${WRKDIR}/ghc-${PORTVERSION}-boot
BOOT_GHC= ${BOOT_DIR}/bin/ghc-${PORTVERSION}
-CONFIGURE_ARGS+= --with-ghc=${BOOT_GHC} --with-gcc=${CC}# \
-# --with-gmp-includes=${LOCALBASE}/include --with-gmp-libraries=${LOCALBASE}/lib
+CONFIGURE_ARGS+= --with-ghc=${BOOT_GHC} --with-gcc=${CC} \
+ --with-gmp-includes=${LOCALBASE}/include --with-gmp-libraries=${LOCALBASE}/lib
# specifying CONFIGURE_TARGET doesn't work for some reason.
CONFIGURE_TARGET=
# libgmp:
-#CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
-CONFIGURE_ENV+= CFLAGS= #empty
+CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
# override TMPDIR because /tmp often doesn't have enough space
# to build some of the larger libraries.
diff --git a/lang/ghc/files/patch-ghc-rts-package.conf.in b/lang/ghc/files/patch-ghc-rts-package.conf.in
index bd05c0e611d1..0a67acf915c4 100644
--- a/lang/ghc/files/patch-ghc-rts-package.conf.in
+++ b/lang/ghc/files/patch-ghc-rts-package.conf.in
@@ -1,10 +1,18 @@
---- rts/package.conf.in.orig Sun Mar 20 18:40:33 2005
-+++ rts/package.conf.in Sun Mar 20 18:41:47 2005
-@@ -135,6 +135,7 @@
- , "-u", "GHCziWeak_runFinalizzerBatch_closure"
- , "-u", "__stginit_Prelude"
+--- rts/package.conf.in.orig 2007-12-10 19:11:32.000000000 +0100
++++ rts/package.conf.in 2007-12-31 08:32:19.000000000 +0100
+@@ -66,6 +66,7 @@
+ include-dirs: FPTOOLS_TOP_ABS"/includes"
+ FPTOOLS_TOP_ABS"/rts"
+ FPTOOLS_TOP_ABS"/gmp/gmpbuild"
++ GMP_INCLUDE_DIRS
#endif
-+ , "-L%%LOCALBASE%%/lib"
- framework-dirs:
+ includes: Stg.h
+@@ -143,6 +144,7 @@
+ , "-u", "base_GHCziIOBase_NestedAtomically_closure"
+ , "-u", "base_GHCziWeak_runFinalizzerBatch_closure"
+ #endif
++ , "-L/usr/local/lib"
+ #ifdef LEADING_UNDERSCORE
+ , "-u", "_base_GHCziConc_ensureIOManagerIsRunning_closure"
diff --git a/lang/ghc/files/patch-utils-hsc2hs-Makefile b/lang/ghc/files/patch-utils-hsc2hs-Makefile
new file mode 100644
index 000000000000..a9cfdf7a5879
--- /dev/null
+++ b/lang/ghc/files/patch-utils-hsc2hs-Makefile
@@ -0,0 +1,20 @@
+diff -rNup ./utils/hsc2hs/Makefile.orig ./utils/hsc2hs/Makefile
+--- ./utils/hsc2hs/Makefile.orig Mon Dec 10 19:11:32 2007
++++ ./utils/hsc2hs/Makefile Sun Dec 30 21:53:09 2007
+@@ -39,9 +39,15 @@ else
+ extra_flags=
+ endif
+
++ifneq "$(GMP_INCLUDE_DIRS)" ""
++gmp_includes=-I$(GMP_INCLUDE_DIRS)
++else
++gmp_includes=
++endif
++
+ $(INPLACE_HS): Makefile $(FPTOOLS_TOP)/mk/config.mk
+ echo "import System.Cmd; import System.Environment; import System.Exit" > $@
+- echo "main = do args <- getArgs; rawSystem \"$(FPTOOLS_TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/$(HS_PROG)\" (\"--template=$(FPTOOLS_TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/template-hsc.h\":\"--cc=$(CC)\":\"--ld=$(CC)\"$(patsubst %,:\"%\",$(extra_flags)):\"--cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt)\":\"-I$(FPTOOLS_TOP_ABS)/$(GHC_INCLUDE_DIR_REL)\":\"-I$(FPTOOLS_TOP_ABS)/gmp/gmpbuild\":args) >>= exitWith" >> $@
++ echo "main = do args <- getArgs; rawSystem \"$(FPTOOLS_TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/$(HS_PROG)\" (\"--template=$(FPTOOLS_TOP_ABS)/$(GHC_HSC2HS_DIR_REL)/template-hsc.h\":\"--cc=$(CC)\":\"--ld=$(CC)\"$(patsubst %,:\"%\",$(extra_flags)):\"--cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt)\":\"-I$(FPTOOLS_TOP_ABS)/$(GHC_INCLUDE_DIR_REL)\":\"-I$(FPTOOLS_TOP_ABS)/gmp/gmpbuild\":\"$(gmp_includes)\":args) >>= exitWith" >> $@
+
+ $(INPLACE_PROG): $(INPLACE_HS)
+ $(HC) --make $< -o $@
diff --git a/lang/ghc/pkg-plist b/lang/ghc/pkg-plist
index 49be8fe3dbdc..8e92016fc9eb 100644
--- a/lang/ghc/pkg-plist
+++ b/lang/ghc/pkg-plist
@@ -388,7 +388,6 @@ lib/ghc-%%GHC_VERSION%%/include/config.h
lib/ghc-%%GHC_VERSION%%/include/ghcautoconf.h
lib/ghc-%%GHC_VERSION%%/include/ghcconfig.h
lib/ghc-%%GHC_VERSION%%/include/ghcplatform.h
-lib/ghc-%%GHC_VERSION%%/include/gmp.h
lib/ghc-%%GHC_VERSION%%/include/ieee-flpt.h
lib/ghc-%%GHC_VERSION%%/lib/Cabal-1.2.3.0/Distribution/Compat/Directory.hi
%%PROFILE%%lib/ghc-%%GHC_VERSION%%/lib/Cabal-1.2.3.0/Distribution/Compat/Directory.p_hi
@@ -1350,8 +1349,7 @@ lib/ghc-%%GHC_VERSION%%/libHSrts_debug.a
%%PROFILE%%lib/ghc-%%GHC_VERSION%%/libHSrts_p.a
lib/ghc-%%GHC_VERSION%%/libHSrts_thr.a
lib/ghc-%%GHC_VERSION%%/libHSrts_thr_debug.a
-%%PROFILE%%lib/ghc-%%GHC_VERSION%%/libHSrts_thr_p.a
-lib/ghc-%%GHC_VERSION%%/libgmp.a
+lib/ghc-%%GHC_VERSION%%/libHSrts_thr_p.a
lib/ghc-%%GHC_VERSION%%/package.conf
lib/ghc-%%GHC_VERSION%%/package.conf.old
lib/ghc-%%GHC_VERSION%%/template-hsc.h