summaryrefslogtreecommitdiff
path: root/lang/ghc/files
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ghc/files')
-rw-r--r--lang/ghc/files/patch-configure83
-rw-r--r--lang/ghc/files/patch-ghc.mk14
-rw-r--r--lang/ghc/files/patch-libraries_Makefile11
-rw-r--r--lang/ghc/files/patch-libraries_bin-package-db_LICENSE8
-rw-r--r--lang/ghc/files/patch-rts_package.conf.in26
-rw-r--r--lang/ghc/files/testsuite.sh.in9
6 files changed, 124 insertions, 27 deletions
diff --git a/lang/ghc/files/patch-configure b/lang/ghc/files/patch-configure
new file mode 100644
index 000000000000..18cd7e9742bc
--- /dev/null
+++ b/lang/ghc/files/patch-configure
@@ -0,0 +1,83 @@
+
+$FreeBSD$
+
+--- configure.orig
++++ configure
+@@ -3312,6 +3312,9 @@
+ vax)
+ BuildArch="vax"
+ ;;
++ amd64)
++ BuildArch="x86_64"
++ ;;
+ x86_64)
+ BuildArch="x86_64"
+ ;;
+@@ -3330,7 +3333,7 @@
+ BuildOS="linux"
+ ;;
+ # As far as I'm aware, none of these have relevant variants
+- freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku)
++ freebsd*|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku)
+ BuildOS="$build_os"
+ ;;
+ *)
+@@ -3560,7 +3563,7 @@
+
+ checkArch() {
+ case $1 in
+- alpha|arm|hppa|hppa1_1|i386|ia64|m68k|mips|mipseb|mipsel|powerpc|powerpc64|rs6000|s390|sparc|sparc64|vax|x86_64)
++ alpha|arm|hppa|hppa1_1|i386|ia64|m68k|mips|mipseb|mipsel|powerpc|powerpc64|rs6000|s390|sparc|sparc64|vax|x86_64|amd64)
+ ;;
+ *)
+ echo "Unknown arch $1"
+@@ -3571,7 +3574,7 @@
+
+ checkVendor() {
+ case $1 in
+- dec|unknown|hp|apple|next|sun|sgi|ibm)
++ dec|unknown|hp|apple|next|sun|sgi|ibm|portbld)
+ ;;
+ *)
+ echo "Unknown vendor $1"
+@@ -3582,7 +3585,7 @@
+
+ checkOS() {
+ case $1 in
+- linux|freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku)
++ linux|freebsd*|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku)
+ ;;
+ *)
+ echo "Unknown OS '$1'"
+@@ -3621,6 +3624,9 @@
+ checkVendor "$TargetVendor"
+ checkOS "$TargetOS"
+
++bootstrap_target=`echo "$bootstrap_target" |sed -e 's/-unknown-/-portbld-/g' -e 's/x86_64/amd64/g'`
++build=`echo "$build" |sed -e 's/\(freebsd\)[[:digit:].]*$/\1/g'`
++
+ # Verify that the installed (bootstrap) GHC is capable of generating
+ # code for the requested build platform.
+ if test "$build" != "$bootstrap_target"
+@@ -9533,7 +9539,7 @@
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lrt $LIBS"
++LIBS="$LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -9564,11 +9570,7 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
+ $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
+ if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then :
+- cat >>confdefs.h <<_ACEOF
+-#define HAVE_LIBRT 1
+-_ACEOF
+-
+- LIBS="-lrt $LIBS"
++ LIBS="$LIBS"
+
+ fi
+
diff --git a/lang/ghc/files/patch-ghc.mk b/lang/ghc/files/patch-ghc.mk
new file mode 100644
index 000000000000..892e2fdfdbcc
--- /dev/null
+++ b/lang/ghc/files/patch-ghc.mk
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- ghc.mk.orig
++++ ghc.mk
+@@ -293,6 +293,8 @@
+ # -----------------------------------------------------------------------------
+ # Building libraries
+
++PACKAGES =
++
+ define addPackage # args: $1 = package, $2 = condition
+ ifneq "$2" ""
+ ifeq "$$(CLEANING)" "YES"
diff --git a/lang/ghc/files/patch-libraries_Makefile b/lang/ghc/files/patch-libraries_Makefile
deleted file mode 100644
index 5d5e84747f92..000000000000
--- a/lang/ghc/files/patch-libraries_Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- libraries/Makefile.orig 2009-07-14 19:10:53.000000000 +0200
-+++ libraries/Makefile 2009-08-14 02:48:44.000000000 +0200
-@@ -153,7 +153,7 @@
- cd Cabal && $(CABAL) build --distpref=dist-bootstrapping
- cd Cabal && $(CABAL) install --distpref=dist-bootstrapping --inplace
- -cd hpc && $(CABAL) clean --distpref=dist-bootstrapping
-- cd hpc && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG) --package-db=$(HERE_ABS)/$@.tmp
-+ cd hpc && $(CABAL) configure --distpref=dist-bootstrapping --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG) --with-hsc2hs=${BSD_PATH_TO_HSC2HS} --package-db=$(HERE_ABS)/$@.tmp --extra-include-dirs=%%LOCALBASE%%/include --extra-lib-dirs=%%LOCALBASE%%/lib
- cd hpc && $(CABAL) build --distpref=dist-bootstrapping
- cd hpc && $(CABAL) install --distpref=dist-bootstrapping --inplace
- mv $@.tmp $@
diff --git a/lang/ghc/files/patch-libraries_bin-package-db_LICENSE b/lang/ghc/files/patch-libraries_bin-package-db_LICENSE
new file mode 100644
index 000000000000..698da4c221ea
--- /dev/null
+++ b/lang/ghc/files/patch-libraries_bin-package-db_LICENSE
@@ -0,0 +1,8 @@
+
+$FreeBSD$
+
+--- /dev/null
++++ libraries/bin-package-db/LICENSE
+@@ -0,0 +1,2 @@
++
++
diff --git a/lang/ghc/files/patch-rts_package.conf.in b/lang/ghc/files/patch-rts_package.conf.in
index 464064005f54..4732ffc6ebe9 100644
--- a/lang/ghc/files/patch-rts_package.conf.in
+++ b/lang/ghc/files/patch-rts_package.conf.in
@@ -1,11 +1,23 @@
---- rts/package.conf.in.orig 2009-07-14 19:10:52.000000000 +0200
-+++ rts/package.conf.in 2009-08-13 22:09:10.000000000 +0200
-@@ -156,6 +156,8 @@
- , "-u", "base_GHCziConc_ensureIOManagerIsRunning_closure"
+
+$FreeBSD$
+
+--- rts/package.conf.in.orig
++++ rts/package.conf.in
+@@ -31,9 +31,6 @@
+ #ifdef HAVE_LIBM
+ "m" /* for ldexp() */
#endif
+-#ifdef HAVE_LIBRT
+- , "rt"
+-#endif
+ #ifdef HAVE_LIBDL
+ , "dl"
+ #endif
+@@ -141,6 +138,7 @@
+ , "-u", "base_GHCziConc_runSparks_closure"
+ , "-u", "base_GHCziConc_runHandlers_closure"
+ #endif
++ , "-L/usr/local/lib"
-+ , "-L%%LOCALBASE%%/lib"
-+
/* Pick up static libraries in preference over dynamic if in earlier search
* path. This is important to use the static gmp in preference on Mac OS.
- * The used option is specific to the Darwin linker.
diff --git a/lang/ghc/files/testsuite.sh.in b/lang/ghc/files/testsuite.sh.in
deleted file mode 100644
index 5c221e5e1b67..000000000000
--- a/lang/ghc/files/testsuite.sh.in
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# Candy exit with Ctrl+C
-trap 'echo -e "\a"; echo -e "WoW! Bye.\n"; exit 2' 2
-
-sumtest="%%WRKDIR%%/sumtest.txt"
-testdir="%%WRKDIR%%/testsuite-%%GHC_VERSION%%/tests/ghc-regress"
-
-%%GMAKE%% -C ${testdir} EXTRA_RUNTEST_OPTS="--output-summary=${sumtest}" TEST_HC="%%PREFIX%%/bin/ghc" fast || echo -e "\aThe testsuite failed"