summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2014-05-21 16:07:59 +0000
committerjperkin <jperkin@pkgsrc.org>2014-05-21 16:07:59 +0000
commit0b644701a3562b22603c438296616d9f225ff5a6 (patch)
tree2a286ae3c5cfa3634707c9bd4d57fbdd965ef79d /lang
parent76906679c5fdf630f8dc6ea4df7cd58f47c31016 (diff)
downloadpkgsrc-0b644701a3562b22603c438296616d9f225ff5a6.tar.gz
Apply a number of fixes:
* Install the libffi libtool archive. Whilst it is unused, it allows us to automatically determine the shared library suffix. * Switch the i386 SunOS bootstrap to .xz. * Use PKG_CC to build lndir to help environments where the compiler is not in $PATH. * Apply patch from Alain O'Dea to fix issues with files residing on read-only file systems. * Support shared libraries on 64-bit SunOS. * Fix typo in patches/patch-rts_Linker.c. Fixes build on SunOS. Bump PKGREVISION.
Diffstat (limited to 'lang')
-rw-r--r--lang/ghc7/Makefile6
-rw-r--r--lang/ghc7/PLIST6
-rw-r--r--lang/ghc7/bootstrap.mk8
-rw-r--r--lang/ghc7/distinfo8
-rw-r--r--lang/ghc7/patches/patch-libraries_unix_System_Posix_Files.hsc15
-rw-r--r--lang/ghc7/patches/patch-mk_config.mk.in14
-rw-r--r--lang/ghc7/patches/patch-rts_Linker.c4
-rw-r--r--lang/ghc7/patches/patch-rts_ghc.mk23
8 files changed, 65 insertions, 19 deletions
diff --git a/lang/ghc7/Makefile b/lang/ghc7/Makefile
index 1be9b231be7..9c66a808e61 100644
--- a/lang/ghc7/Makefile
+++ b/lang/ghc7/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.9 2014/02/08 12:42:25 obache Exp $
+# $NetBSD: Makefile,v 1.10 2014/05/21 16:07:59 jperkin Exp $
# -----------------------------------------------------------------------------
# Package metadata
#
DISTNAME= ghc-7.6.3-src
PKGNAME= ${DISTNAME:S/-src$//}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= lang
MASTER_SITES= http://www.haskell.org/ghc/dist/${PKGVERSION_NOREV}/
EXTRACT_SUFX= .tar.bz2
@@ -39,7 +39,7 @@ DISTFILES= ${DEFAULT_DISTFILES}
#DISTFILES+= ${PKGNAME_NOREV}-boot-powerpc-apple-darwin.tar.xz
#DISTFILES+= ${PKGNAME_NOREV}-boot-x86_64-unknown-linux.tar.xz
#DISTFILES+= ${PKGNAME_NOREV}-boot-x86_64-unknown-netbsd.tar.xz
-#DISTFILES+= ${PKGNAME_NOREV}-boot-i386-unknown-solaris2.tar.gz
+#DISTFILES+= ${PKGNAME_NOREV}-boot-i386-unknown-solaris2.tar.xz
#DISTFILES+= ${PKGNAME_NOREV}-boot-x86_64-unknown-solaris2.tar.xz
#.else
#DISTFILES+= ${BOOT_ARCHIVE}
diff --git a/lang/ghc7/PLIST b/lang/ghc7/PLIST
index 58dc68a5add..a23a71ab66a 100644
--- a/lang/ghc7/PLIST
+++ b/lang/ghc7/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2013/12/12 12:47:17 obache Exp $
+@comment $NetBSD: PLIST,v 1.2 2014/05/21 16:07:59 jperkin Exp $
bin/ghc
bin/${PKGNAME}
bin/ghc-pkg
@@ -2689,9 +2689,7 @@ lib/${PKGNAME}/libHSrts_thr_debug-ghc${PKGVERSION}.so
lib/${PKGNAME}/libHSrts_thr_debug.a
lib/${PKGNAME}/libHSrts_thr_l.a
lib/${PKGNAME}/libHSrts_thr_p.a
-lib/${PKGNAME}/libffi.so
-lib/${PKGNAME}/libffi.so.6
-lib/${PKGNAME}/libffi.so.6.0
+lib/${PKGNAME}/libffi.la
lib/${PKGNAME}/old-locale-1.0.0.5/HSold-locale-1.0.0.5.o
lib/${PKGNAME}/old-locale-1.0.0.5/System/Locale.dyn_hi
lib/${PKGNAME}/old-locale-1.0.0.5/System/Locale.hi
diff --git a/lang/ghc7/bootstrap.mk b/lang/ghc7/bootstrap.mk
index 3796216b737..928dde40921 100644
--- a/lang/ghc7/bootstrap.mk
+++ b/lang/ghc7/bootstrap.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bootstrap.mk,v 1.9 2014/02/05 06:38:05 obache Exp $
+# $NetBSD: bootstrap.mk,v 1.10 2014/05/21 16:07:59 jperkin Exp $
# -----------------------------------------------------------------------------
# Select a bindist of bootstrapping compiler based on a per-platform
# basis.
@@ -31,7 +31,7 @@ BOOT_ARCHIVE:= ${PKGNAME}-boot-x86_64-unknown-linux.tar.xz
BOOT_ARCHIVE:= ${PKGNAME}-boot-x86_64-unknown-netbsd.tar.xz
.elif !empty(MACHINE_PLATFORM:MSunOS-5.11-i386)
-BOOT_ARCHIVE:= ${PKGNAME}-boot-i386-unknown-solaris2.tar.gz
+BOOT_ARCHIVE:= ${PKGNAME}-boot-i386-unknown-solaris2.tar.xz
.elif !empty(MACHINE_PLATFORM:MSunOS-5.11-x86_64)
BOOT_ARCHIVE:= ${PKGNAME}-boot-x86_64-unknown-solaris2.tar.xz
@@ -40,7 +40,7 @@ BOOT_ARCHIVE:= ${PKGNAME}-boot-x86_64-unknown-solaris2.tar.xz
PKG_FAIL_REASON+= "internal error: unsupported platform"
.endif
-BOOT_TARBALL= ${BOOT_ARCHIVE:C/\.xz$//:C/\.gz$//}
+BOOT_TARBALL= ${BOOT_ARCHIVE:C/\.xz$//}
@@ -98,7 +98,7 @@ pre-bootstrap:
${WRKDIR}/lndir:
@${PHASE_MSG} "Building lndir(1) to duplicate the source tree."
cd ${WRKSRC:Q}/utils/lndir && \
- ${CC:Q} lndir.c -o ${.TARGET}
+ ${PKG_CC:Q} lndir.c -o ${.TARGET}
${WRKDIR}/stamp-lndir-boot: ${WRKDIR}/lndir
@${PHASE_MSG} "Duplicating the source tree for bootstrapping ${PKGNAME_NOREV}"
diff --git a/lang/ghc7/distinfo b/lang/ghc7/distinfo
index c628e3cea36..889fc566dcb 100644
--- a/lang/ghc7/distinfo
+++ b/lang/ghc7/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2013/12/16 06:23:09 obache Exp $
+$NetBSD: distinfo,v 1.3 2014/05/21 16:07:59 jperkin Exp $
SHA1 (ghc-7.6.3-src.tar.bz2) = 8938e1ef08b37a4caa071fa169e79a3001d065ff
RMD160 (ghc-7.6.3-src.tar.bz2) = 82a673ed38b7cf9a59afeb01057625fc761a822b
@@ -8,6 +8,8 @@ SHA1 (patch-ghc.mk) = c4210aaa3e2b4a319b0b70da375ac89fddde5cb7
SHA1 (patch-libraries_integer-gmp_configure.ac) = bc5ce3a6c39d681c413eb08b66e7287e39406fe0
SHA1 (patch-libraries_integer-simple_GHC_Integer.hs) = f079285bc489c194959b9bee2aa5c977ec77ae1e
SHA1 (patch-libraries_integer-simple_GHC_Integer_Type.hs) = b3140e169726f78f6d3b4edcd4cc119b6f767bfa
-SHA1 (patch-rts_Linker.c) = 86c080636fd9b983baeb05f26a90282ffa6eec34
+SHA1 (patch-libraries_unix_System_Posix_Files.hsc) = f2e0892f9ebb9d82ddaf71b014d9af33967848dc
+SHA1 (patch-mk_config.mk.in) = 90a156f6c455d4b2c5d10fdf65b3a170dcfc4892
+SHA1 (patch-rts_Linker.c) = 39d1ca7a856a3ec25e493e97832ef255562c0719
SHA1 (patch-rts_StgCRun.c) = dcbc883cb4826aeccac0be09647b7889c7809271
-SHA1 (patch-rts_ghc.mk) = 4dd33c5ac593736a9fa0fdbdd65df90549fac771
+SHA1 (patch-rts_ghc.mk) = 437e64cb7a52784b344b7e0ec7027fc8f63938b3
diff --git a/lang/ghc7/patches/patch-libraries_unix_System_Posix_Files.hsc b/lang/ghc7/patches/patch-libraries_unix_System_Posix_Files.hsc
new file mode 100644
index 00000000000..525740bf293
--- /dev/null
+++ b/lang/ghc7/patches/patch-libraries_unix_System_Posix_Files.hsc
@@ -0,0 +1,15 @@
+$NetBSD: patch-libraries_unix_System_Posix_Files.hsc,v 1.1 2014/05/21 16:07:59 jperkin Exp $
+
+Add more errnos.
+
+--- libraries/unix/System/Posix/Files.hsc.orig 2013-04-18 21:36:40.000000000 +0000
++++ libraries/unix/System/Posix/Files.hsc
+@@ -171,7 +171,7 @@ access name flags =
+ if (r == 0)
+ then return True
+ else do err <- getErrno
+- if (err == eACCES)
++ if (err == eACCES || err == eROFS || err == eTXTBSY)
+ then return False
+ else throwErrnoPath "fileAccess" name
+
diff --git a/lang/ghc7/patches/patch-mk_config.mk.in b/lang/ghc7/patches/patch-mk_config.mk.in
new file mode 100644
index 00000000000..3010e28c3bd
--- /dev/null
+++ b/lang/ghc7/patches/patch-mk_config.mk.in
@@ -0,0 +1,14 @@
+$NetBSD: patch-mk_config.mk.in,v 1.1 2014/05/21 16:07:59 jperkin Exp $
+
+Support shared libraries on 64-bit SunOS.
+
+--- mk/config.mk.in.orig 2013-04-18 21:22:46.000000000 +0000
++++ mk/config.mk.in
+@@ -124,6 +124,7 @@ SharedLibsPlatformList =
+
+ ifeq "$(SOLARIS_BROKEN_SHLD)" "NO"
+ SharedLibsPlatformList += i386-unknown-solaris2
++SharedLibsPlatformList += x86_64-unknown-solaris2
+ endif
+
+ PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),\
diff --git a/lang/ghc7/patches/patch-rts_Linker.c b/lang/ghc7/patches/patch-rts_Linker.c
index d8551d8f5af..4c3cea74fa9 100644
--- a/lang/ghc7/patches/patch-rts_Linker.c
+++ b/lang/ghc7/patches/patch-rts_Linker.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-rts_Linker.c,v 1.1 2013/12/12 12:47:17 obache Exp $
+$NetBSD: patch-rts_Linker.c,v 1.2 2014/05/21 16:07:59 jperkin Exp $
Support 64-bit x86 SunOS.
@@ -10,7 +10,7 @@ Support 64-bit x86 SunOS.
defined(openbsd_HOST_OS ) || defined(darwin_HOST_OS ) || \
- defined(kfreebsdgnu_HOST_OS) || defined(gnu_HOST_OS)))
+ defined(kfreebsdgnu_HOST_OS) || defined(gnu_HOST_OS) || \
-+ defined(solari2_HOST_OS)))
++ defined(solaris2_HOST_OS)))
/* Don't use mmap on powerpc_HOST_ARCH as mmap doesn't support
* reallocating but we need to allocate jump islands just after each
* object images. Otherwise relative branches to jump islands can fail
diff --git a/lang/ghc7/patches/patch-rts_ghc.mk b/lang/ghc7/patches/patch-rts_ghc.mk
index 674058840ed..d8d509dda63 100644
--- a/lang/ghc7/patches/patch-rts_ghc.mk
+++ b/lang/ghc7/patches/patch-rts_ghc.mk
@@ -1,4 +1,4 @@
-$NetBSD: patch-rts_ghc.mk,v 1.1 2013/12/12 12:47:17 obache Exp $
+$NetBSD: patch-rts_ghc.mk,v 1.2 2014/05/21 16:07:59 jperkin Exp $
This is pkgsrc specific: dtrace(1) gets confused when we have gcc
wrappers in the PATH so we have to hide them:
@@ -8,10 +8,19 @@ wrappers in the PATH so we have to hide them:
dtrace: failed to compile script rts/RtsProbes.d: Preprocessor failed to pr
ocess input program
+Also install libffi.{a,la} so we can expand to figure out .so extensions.
---- rts/ghc.mk.orig 2013-01-27 13:21:52.000000000 +0000
+--- rts/ghc.mk.orig 2013-04-18 21:22:47.000000000 +0000
+++ rts/ghc.mk
-@@ -484,7 +484,7 @@ endif
+@@ -114,6 +114,7 @@ $(rts_ffi_objs_stamp): $(libffi_STATIC_L
+ # depend on libffi.so, but copy libffi.so*
+ rts/dist/build/libffi$(soext): libffi/build/inst/lib/libffi$(soext)
+ cp libffi/build/inst/lib/libffi$(soext)* rts/dist/build
++ cp libffi/build/inst/lib/libffi.{a,la} rts/dist/build
+
+ rts/dist/build/$(LIBFFI_DLL): libffi/build/inst/bin/$(LIBFFI_DLL)
+ cp $< $@
+@@ -484,7 +485,7 @@ endif
DTRACEPROBES_SRC = rts/RtsProbes.d
$(DTRACEPROBES_H): $(DTRACEPROBES_SRC) includes/ghcplatform.h | $$(dir $$@)/.
@@ -20,3 +29,11 @@ wrappers in the PATH so we have to hide them:
endif
# -----------------------------------------------------------------------------
+@@ -510,6 +511,7 @@ endif
+
+ INSTALL_LIBS += $(ALL_RTS_LIBS)
+ INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
++INSTALL_LIBS += $(wildcard rts/dist/build/libffi.*a)
+ INSTALL_LIBS += $(wildcard rts/dist/build/$(LIBFFI_DLL))
+
+ install: install_libffi_headers