summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorpho <pho@pkgsrc.org>2021-04-28 15:39:23 +0000
committerpho <pho@pkgsrc.org>2021-04-28 15:39:23 +0000
commit27ddde7ccaf380e894a01a995daca06a904999e6 (patch)
tree738f600094a0f6103d338aa1034a1c428ab09fcb /lang
parentbe4ecf50084696967a19c12d22dd46a658437863 (diff)
downloadpkgsrc-27ddde7ccaf380e894a01a995daca06a904999e6.tar.gz
Apply jperkin@'s patch to remove $ORIGIN use
On Darwin it still uses @loader_path though. I'm going to handle it later.
Diffstat (limited to 'lang')
-rw-r--r--lang/ghc88/Makefile24
-rw-r--r--lang/ghc88/bootstrap.mk7
-rw-r--r--lang/ghc88/distinfo4
-rw-r--r--lang/ghc88/patches/patch-ghc.mk16
-rw-r--r--lang/ghc88/patches/patch-rules_distdir-way-opts.mk15
5 files changed, 44 insertions, 22 deletions
diff --git a/lang/ghc88/Makefile b/lang/ghc88/Makefile
index 16f41a0b115..d04242e9350 100644
--- a/lang/ghc88/Makefile
+++ b/lang/ghc88/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.17 2021/04/27 13:55:25 pho Exp $
+# $NetBSD: Makefile,v 1.18 2021/04/28 15:39:23 pho Exp $
# -----------------------------------------------------------------------------
# Package metadata
#
DISTNAME= ghc-8.8.4-src
PKGNAME= ${DISTNAME:S/-src$//}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= lang
MASTER_SITES= https://downloads.haskell.org/~ghc/${PKGVERSION_NOREV}/
EXTRACT_SUFX= .tar.xz
@@ -202,22 +202,6 @@ GENERATE_PLIST+= \
# There is an unused script which don't pass the portability test.
CHECK_PORTABILITY_SKIP+= distrib/prep-bin-dist-mingw
-# Dynamically linked Haskell executables and libraries have rpaths to
-# dependent Haskell libraries, but the problem is that they are
-# specified with $ORIGIN, which isn't currently supported by
-# ../../mk/check/check-shlibs-elf.awk nor
-# mk/pkgformat/pkg/metadata.mk.
-#
-# This means we need to disable the entire CHECK_SHLIBS machinery
-# because otherwise the resulting binary package would contain
-# REQUIRES lines with $ORIGIN wrongly expanded by ldd(1).
-#
-# Note that arguments like "-Wl,-rpath,$ORIGIN/.." are usually dropped
-# by the "cleanup" phase of wrappers. This is not the case in GHC
-# because GHC uses @file syntax while linking objects, and our
-# wrappers does nothing about it.
-CHECK_SHLIBS_SUPPORTED= no
-
# ghc57207_0.s: failed to add inputs for merge: Resource temporarily unavailable
CTF_FILES_SKIP+= */libHS*-ghc${PKGVERSION_NOREV}.*
@@ -242,7 +226,9 @@ BUILD_DEPENDS+= compat80-[0-9]*:../../emulators/compat80
# In a sandboxed build environment, we have to reach over to the
# installed libraries themselves, since the symlinks compat80 adds
# to the /usr tree can't be applied.
-ALL_ENV+= LD_LIBRARY_PATH=${PREFIX}/emul/netbsd/usr/lib:${WRKDIR}/lib:${FILESDIR}
+ALL_ENV+= LD_LIBRARY_PATH=${PREFIX}/emul/netbsd/usr/lib:${WRKDIR}/lib
+# XXX: ${WRKDIR}/lib is a temporary workaround for compat80 not having
+# libterminfo.so.1. See ./bootstrap.mk
.endif
.include "../../converters/libiconv/buildlink3.mk"
diff --git a/lang/ghc88/bootstrap.mk b/lang/ghc88/bootstrap.mk
index f133f0968fe..f3555ec4a18 100644
--- a/lang/ghc88/bootstrap.mk
+++ b/lang/ghc88/bootstrap.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bootstrap.mk,v 1.7 2021/02/16 21:13:52 wiz Exp $
+# $NetBSD: bootstrap.mk,v 1.8 2021/04/28 15:39:23 pho Exp $
# -----------------------------------------------------------------------------
# Select a bindist of bootstrapping compiler on a per-platform basis.
#
@@ -54,9 +54,12 @@ DISTFILES:= ${DISTFILES} ${BOOT_ARCHIVE} # Available in LOCAL_PORTS
BOOT_VERSION:= 8.4.4
BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-x86_64-unknown-netbsd.tar.xz
DISTFILES:= ${DISTFILES} ${BOOT_ARCHIVE} # Available in LOCAL_PORTS
-. if !empty(MACHINE_PLATFORM:MNetBSD-9.99*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
+. if !empty(MACHINE_PLATFORM:MNetBSD-9.99.*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
+# XXX: emulators/compat80 appears to lack libterminfo.so.1 used by
+# this bootkit.
DISTFILES+= netbsd-9.0-amd64-libterminfo.tar.gz
EXTRACT_ONLY+= netbsd-9.0-amd64-libterminfo.tar.gz
+SITES.netbsd-9.0-amd64-libterminfo.tar.gz?= ${MASTER_SITE_LOCAL}
. endif
.endif
diff --git a/lang/ghc88/distinfo b/lang/ghc88/distinfo
index 1556b88d7b1..67fcca068eb 100644
--- a/lang/ghc88/distinfo
+++ b/lang/ghc88/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2021/02/16 21:13:52 wiz Exp $
+$NetBSD: distinfo,v 1.16 2021/04/28 15:39:23 pho Exp $
SHA1 (ghc-8.4.4-boot-i386-unknown-freebsd.tar.xz) = 04981802730423aa12999e59679be198d540222a
RMD160 (ghc-8.4.4-boot-i386-unknown-freebsd.tar.xz) = f617e67f2c2f07c7211cb391a4bc2e7b304045e2
@@ -31,6 +31,7 @@ Size (netbsd-9.0-amd64-libterminfo.tar.gz) = 27744 bytes
SHA1 (patch-aclocal.m4) = 16ac8899a7d87cf93a6139edba9e5222eb4c5c66
SHA1 (patch-compiler_main_DynFlags.hs) = 07bb2a5afdd087f4d2da5c035feecc13273aec70
SHA1 (patch-configure.ac) = 6e5cec26e440ccd71343a1981b415459813f88be
+SHA1 (patch-ghc.mk) = 9bfa82ee29c2786e7bae800279823bee72e4fab1
SHA1 (patch-ghc_ghc.mk) = 9c639cc95cb79e4ffbd9b5fce311edba54939b5e
SHA1 (patch-libraries_Cabal_Cabal_Distribution_Simple_GHC.hs) = a4c82b1282c0580a7945be8c3b9d38bc760db99f
SHA1 (patch-libraries_base_GHC_Event_KQueue.hsc) = 8ee5da667a241a05fde3c580d3dc9bdc05aa5f00
@@ -45,3 +46,4 @@ SHA1 (patch-libraries_unix_System_Posix_Files_Common.hsc) = 6efef280832d376915a8
SHA1 (patch-libraries_unix_System_Posix_Signals.hsc) = 49215dce493a6bbc440f91a3959e592f86fc779b
SHA1 (patch-libraries_unix_include_execvpe.h) = 67dd9720a71a6a55bbe2b50e61621ca60187ef00
SHA1 (patch-rts_StgCRun.c) = 121c7bd714725d5b14a3cbb03d81b1c769848824
+SHA1 (patch-rules_distdir-way-opts.mk) = 1430f03c2dfc3462a68002c76bfefcf38622429b
diff --git a/lang/ghc88/patches/patch-ghc.mk b/lang/ghc88/patches/patch-ghc.mk
new file mode 100644
index 00000000000..6be0d33bc4b
--- /dev/null
+++ b/lang/ghc88/patches/patch-ghc.mk
@@ -0,0 +1,16 @@
+$NetBSD: patch-ghc.mk,v 1.1 2021/04/28 15:39:23 pho Exp $
+
+Use the wrapper scripts for ghc as we can't use the ones from the DESTDIR
+as the libraries are not in the right place yet.
+
+--- ghc.mk.orig 2020-07-08 16:43:03.000000000 +0000
++++ ghc.mk
+@@ -959,7 +959,7 @@ endif
+
+ INSTALLED_PACKAGE_CONF=$(DESTDIR)$(topdir)/package.conf.d
+
+-ifeq "$(BINDIST) $(CrossCompiling)" "NO YES"
++ifeq "UseWrappers" "UseWrappers"
+ # when installing ghc-stage2 we can't run target's
+ # 'ghc-pkg' and 'ghc-stage2' but those are needed for registration.
+ INSTALLED_GHC_REAL=$(TOP)/inplace/bin/ghc-stage1
diff --git a/lang/ghc88/patches/patch-rules_distdir-way-opts.mk b/lang/ghc88/patches/patch-rules_distdir-way-opts.mk
new file mode 100644
index 00000000000..e928c3e9971
--- /dev/null
+++ b/lang/ghc88/patches/patch-rules_distdir-way-opts.mk
@@ -0,0 +1,15 @@
+$NetBSD: patch-rules_distdir-way-opts.mk,v 1.3 2021/04/28 15:39:23 pho Exp $
+
+Use correct RPATHs.
+
+--- rules/distdir-way-opts.mk.orig 2020-07-08 16:43:04.000000000 +0000
++++ rules/distdir-way-opts.mk
+@@ -209,7 +209,7 @@ ifneq "$4" "0"
+ ifeq "$$(TargetElf)" "YES"
+ $1_$2_$3_GHC_LD_OPTS += \
+ -fno-use-rpaths \
+- $$(foreach d,$$($1_$2_TRANSITIVE_DEP_COMPONENT_IDS),-optl-Wl$$(comma)-rpath -optl-Wl$$(comma)'$$$$ORIGIN/../$$d') -optl-Wl,-zorigin
++ $$(foreach d,$$($1_$2_TRANSITIVE_DEP_COMPONENT_IDS),-optl-Wl$$(comma)-rpath -optl-Wl$$(comma)$$(ghclibdir)/$$d)
+ else ifeq "$$(TargetOS_CPP)" "darwin"
+ $1_$2_$3_GHC_LD_OPTS += \
+ -fno-use-rpaths \