pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/ghc88



Module Name:    pkgsrc
Committed By:   pho
Date:           Wed Apr 28 15:39:24 UTC 2021

Modified Files:
        pkgsrc/lang/ghc88: Makefile bootstrap.mk distinfo
Added Files:
        pkgsrc/lang/ghc88/patches: patch-ghc.mk patch-rules_distdir-way-opts.mk

Log Message:
Apply jperkin@'s patch to remove $ORIGIN use

On Darwin it still uses @loader_path though. I'm going to handle it later.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 pkgsrc/lang/ghc88/Makefile
cvs rdiff -u -r1.7 -r1.8 pkgsrc/lang/ghc88/bootstrap.mk
cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/ghc88/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/ghc88/patches/patch-ghc.mk
cvs rdiff -u -r0 -r1.3 \
    pkgsrc/lang/ghc88/patches/patch-rules_distdir-way-opts.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/ghc88/Makefile
diff -u pkgsrc/lang/ghc88/Makefile:1.17 pkgsrc/lang/ghc88/Makefile:1.18
--- pkgsrc/lang/ghc88/Makefile:1.17     Tue Apr 27 13:55:25 2021
+++ pkgsrc/lang/ghc88/Makefile  Wed Apr 28 15:39:23 2021
@@ -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]*:../../em
 # 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"

Index: pkgsrc/lang/ghc88/bootstrap.mk
diff -u pkgsrc/lang/ghc88/bootstrap.mk:1.7 pkgsrc/lang/ghc88/bootstrap.mk:1.8
--- pkgsrc/lang/ghc88/bootstrap.mk:1.7  Tue Feb 16 21:13:52 2021
+++ pkgsrc/lang/ghc88/bootstrap.mk      Wed Apr 28 15:39:23 2021
@@ -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}
 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
 

Index: pkgsrc/lang/ghc88/distinfo
diff -u pkgsrc/lang/ghc88/distinfo:1.15 pkgsrc/lang/ghc88/distinfo:1.16
--- pkgsrc/lang/ghc88/distinfo:1.15     Tue Feb 16 21:13:52 2021
+++ pkgsrc/lang/ghc88/distinfo  Wed Apr 28 15:39:23 2021
@@ -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.g
 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_
 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

Added files:

Index: pkgsrc/lang/ghc88/patches/patch-ghc.mk
diff -u /dev/null pkgsrc/lang/ghc88/patches/patch-ghc.mk:1.1
--- /dev/null   Wed Apr 28 15:39:24 2021
+++ pkgsrc/lang/ghc88/patches/patch-ghc.mk      Wed Apr 28 15:39:23 2021
@@ -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

Index: pkgsrc/lang/ghc88/patches/patch-rules_distdir-way-opts.mk
diff -u /dev/null pkgsrc/lang/ghc88/patches/patch-rules_distdir-way-opts.mk:1.3
--- /dev/null   Wed Apr 28 15:39:24 2021
+++ pkgsrc/lang/ghc88/patches/patch-rules_distdir-way-opts.mk   Wed Apr 28 15:39:23 2021
@@ -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 \



Home | Main Index | Thread Index | Old Index