Received: by mail.netbsd.org (Postfix, from userid 605) id D49C084D55; Thu, 29 Apr 2021 07:02:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 1B0D584D45 for ; Thu, 29 Apr 2021 07:02:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 8lFal_Ujj4q9 for ; Thu, 29 Apr 2021 07:02:43 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 21E9184D33 for ; Thu, 29 Apr 2021 07:02:43 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 1B50EFA95; Thu, 29 Apr 2021 07:02:43 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_161967976324490" MIME-Version: 1.0 Date: Thu, 29 Apr 2021 07:02:43 +0000 From: "Masatake Daimon" Subject: CVS commit: pkgsrc/lang/ghc90 To: pkgsrc-changes@NetBSD.org Reply-To: pho@netbsd.org X-Mailer: log_accum Message-Id: <20210429070243.1B50EFA95@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_161967976324490 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: pho Date: Thu Apr 29 07:02:43 UTC 2021 Modified Files: pkgsrc/lang/ghc90: Makefile bootstrap.mk distinfo Added Files: pkgsrc/lang/ghc90/patches: patch-ghc.mk patch-rts_ghc.mk patch-rules_build-package-way.mk patch-rules_distdir-way-opts.mk Log Message: Apply jperkin@'s $ORIGIN removal patch To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 pkgsrc/lang/ghc90/Makefile cvs rdiff -u -r1.7 -r1.8 pkgsrc/lang/ghc90/bootstrap.mk cvs rdiff -u -r1.6 -r1.7 pkgsrc/lang/ghc90/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/lang/ghc90/patches/patch-ghc.mk \ pkgsrc/lang/ghc90/patches/patch-rts_ghc.mk \ pkgsrc/lang/ghc90/patches/patch-rules_build-package-way.mk \ pkgsrc/lang/ghc90/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. --_----------=_161967976324490 Content-Disposition: inline Content-Length: 9542 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/lang/ghc90/Makefile diff -u pkgsrc/lang/ghc90/Makefile:1.9 pkgsrc/lang/ghc90/Makefile:1.10 --- pkgsrc/lang/ghc90/Makefile:1.9 Tue Apr 27 13:55:25 2021 +++ pkgsrc/lang/ghc90/Makefile Thu Apr 29 07:02:42 2021 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.9 2021/04/27 13:55:25 pho Exp $ +# $NetBSD: Makefile,v 1.10 2021/04/29 07:02:42 pho Exp $ # ----------------------------------------------------------------------------- # Package metadata # DISTNAME= ghc-9.0.1-src -PKGREVISION= 2 +PKGREVISION= 3 PKGNAME= ${DISTNAME:S/-src$//} CATEGORIES= lang MASTER_SITES= https://downloads.haskell.org/~ghc/${PKGVERSION_NOREV}/ @@ -184,22 +184,6 @@ GENERATE_PLIST+= \ # Sanity checks # -# 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 # XXX: On which platform? Is it still an issue? CTF_FILES_SKIP+= */libHS*-ghc${PKGVERSION_NOREV}.* @@ -226,7 +210,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/ghc90/bootstrap.mk diff -u pkgsrc/lang/ghc90/bootstrap.mk:1.7 pkgsrc/lang/ghc90/bootstrap.mk:1.8 --- pkgsrc/lang/ghc90/bootstrap.mk:1.7 Tue Apr 27 11:59:42 2021 +++ pkgsrc/lang/ghc90/bootstrap.mk Thu Apr 29 07:02:42 2021 @@ -1,4 +1,4 @@ -# $NetBSD: bootstrap.mk,v 1.7 2021/04/27 11:59:42 pho Exp $ +# $NetBSD: bootstrap.mk,v 1.8 2021/04/29 07:02:42 pho Exp $ # ----------------------------------------------------------------------------- # Select a bindist of bootstrapping compiler on a per-platform basis. # @@ -42,8 +42,8 @@ BOOT_VERSION:= 8.10.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) -# XXX: What is this used for? Does extracting libterminfo.so in -# ${WRKSRC} do anything useful? +# 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 . endif Index: pkgsrc/lang/ghc90/distinfo diff -u pkgsrc/lang/ghc90/distinfo:1.6 pkgsrc/lang/ghc90/distinfo:1.7 --- pkgsrc/lang/ghc90/distinfo:1.6 Tue Apr 27 11:59:42 2021 +++ pkgsrc/lang/ghc90/distinfo Thu Apr 29 07:02:42 2021 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.6 2021/04/27 11:59:42 pho Exp $ +$NetBSD: distinfo,v 1.7 2021/04/29 07:02:42 pho Exp $ SHA1 (ghc-8.10.4-boot-x86_64-unknown-netbsd.tar.xz) = 3ff01d768393b3866e7a7543f9f55646aaffce7a RMD160 (ghc-8.10.4-boot-x86_64-unknown-netbsd.tar.xz) = 39bf10b13054a6316c8477609fb98abe4277fa6c @@ -26,6 +26,7 @@ SHA512 (netbsd-9.0-amd64-libterminfo.tar Size (netbsd-9.0-amd64-libterminfo.tar.gz) = 27744 bytes SHA1 (patch-aclocal.m4) = 66d27cc50de048beeebee31302107501d5802388 SHA1 (patch-configure.ac) = 0905a0e5358d8c3f3f8366b597a59dd824f294d8 +SHA1 (patch-ghc.mk) = 9bfa82ee29c2786e7bae800279823bee72e4fab1 SHA1 (patch-libraries_Cabal_Cabal_Distribution_Simple_GHC.hs) = a4c82b1282c0580a7945be8c3b9d38bc760db99f SHA1 (patch-libraries_base_GHC_Event_KQueue.hsc) = 8ee5da667a241a05fde3c580d3dc9bdc05aa5f00 SHA1 (patch-libraries_base_System_CPUTime_Posix_Times.hsc) = 2bfb779d534d12073287274ce5e90b99e457a860 @@ -39,5 +40,8 @@ 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_ProfHeap.c) = 38b0623effbe46e04b98fb221591b4ec329a1b37 +SHA1 (patch-rts_ghc.mk) = 6e3daf71fb7e656131aa2aeeb0346c651520216a SHA1 (patch-rts_posix_OSThreads.c) = d5873aad8836067b5f29b37250666e37db67a4be +SHA1 (patch-rules_build-package-way.mk) = ec73df0bbc85e962f76a9068683879a1a1ba1815 +SHA1 (patch-rules_distdir-way-opts.mk) = a058c6428faf02ef94aab3336d2d2874f2726f4e SHA1 (patch-utils_haddock_driver_Main.hs) = 26b015d3aef9fdff66e66c8e3d9a370a2dbd7067 Added files: Index: pkgsrc/lang/ghc90/patches/patch-ghc.mk diff -u /dev/null pkgsrc/lang/ghc90/patches/patch-ghc.mk:1.1 --- /dev/null Thu Apr 29 07:02:43 2021 +++ pkgsrc/lang/ghc90/patches/patch-ghc.mk Thu Apr 29 07:02:42 2021 @@ -0,0 +1,16 @@ +$NetBSD: patch-ghc.mk,v 1.1 2021/04/29 07:02:42 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/ghc90/patches/patch-rts_ghc.mk diff -u /dev/null pkgsrc/lang/ghc90/patches/patch-rts_ghc.mk:1.1 --- /dev/null Thu Apr 29 07:02:43 2021 +++ pkgsrc/lang/ghc90/patches/patch-rts_ghc.mk Thu Apr 29 07:02:42 2021 @@ -0,0 +1,14 @@ +$NetBSD: patch-rts_ghc.mk,v 1.1 2021/04/29 07:02:42 pho Exp $ + +This is for Darwin. See the patch to rules/distdir-way-opts.mk. + +--- rts/ghc.mk.orig 2021-04-29 03:14:20.000000000 +0000 ++++ rts/ghc.mk +@@ -251,6 +251,7 @@ endif + $$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/dist/libs.depend $$(rts_dist_FFI_SO) + "$$(RM)" $$(RM_OPTS) $$@ + "$$(rts_dist_HC)" -this-unit-id rts -shared -dynamic -dynload deploy \ ++ -dylib-install-name $$(ghclibdir)/rts/$$(rts_$1_LIB_FILE) \ + -no-auto-link-packages $$(LIBFFI_LIBS) `cat rts/dist/libs.depend` $$(rts_$1_OBJS) \ + $$(rts_dist_$1_GHC_LD_OPTS) \ + $$(rts_$1_DTRACE_OBJS) -o $$@ Index: pkgsrc/lang/ghc90/patches/patch-rules_build-package-way.mk diff -u /dev/null pkgsrc/lang/ghc90/patches/patch-rules_build-package-way.mk:1.1 --- /dev/null Thu Apr 29 07:02:43 2021 +++ pkgsrc/lang/ghc90/patches/patch-rules_build-package-way.mk Thu Apr 29 07:02:42 2021 @@ -0,0 +1,14 @@ +$NetBSD: patch-rules_build-package-way.mk,v 1.1 2021/04/29 07:02:42 pho Exp $ + +This is for Darwin. See the patch to rules/distdir-way-opts.mk. + +--- rules/build-package-way.mk.orig 2021-04-28 17:51:42.000000000 +0000 ++++ rules/build-package-way.mk +@@ -64,6 +64,7 @@ else # ifneq "$$(TargetOS_CPP)" "mingw32 + $$($1_$2_$3_LIB) : $$($1_$2_$3_ALL_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS) + $$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) $$($1_$2_$3_GHC_LD_OPTS) $$($1_$2_$3_ALL_OBJS) \ + -shared -dynamic -dynload deploy \ ++ -dylib-install-name $$(ghclibdir)/$$($1_$2_COMPONENT_ID)/$$($1_$2_$3_LIB_FILE) \ + $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES)) $$(addprefix -L,$$($1_$2_EXTRA_LIBDIRS)) \ + -no-auto-link-packages \ + -o $$@ Index: pkgsrc/lang/ghc90/patches/patch-rules_distdir-way-opts.mk diff -u /dev/null pkgsrc/lang/ghc90/patches/patch-rules_distdir-way-opts.mk:1.1 --- /dev/null Thu Apr 29 07:02:43 2021 +++ pkgsrc/lang/ghc90/patches/patch-rules_distdir-way-opts.mk Thu Apr 29 07:02:42 2021 @@ -0,0 +1,27 @@ +$NetBSD: patch-rules_distdir-way-opts.mk,v 1.1 2021/04/29 07:02:42 pho Exp $ + +Use correct RPATHs. On ELF we replace "$ORIGIN/../{PACKAGE_ID}" with +the final installation path. + +On Darwin library paths work differently. If an executable (or a +library) A depends on a library B, the installation path of B is first +embedded in B, and then the path propagates to A at the time when A is +linked. So we remove -rpath to libraries here, and do the other half +in rules/build-package-way.mk and rts/ghc.mk. + +--- rules/distdir-way-opts.mk.orig 2020-07-08 16:43:04.000000000 +0000 ++++ rules/distdir-way-opts.mk +@@ -209,11 +209,10 @@ 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 \ +- $$(foreach d,$$($1_$2_TRANSITIVE_DEP_COMPONENT_IDS),-optl-Wl$$(comma)-rpath -optl-Wl$$(comma)'@loader_path/../$$d') ++ -fno-use-rpaths + endif + endif + endif --_----------=_161967976324490--