pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/ghc910



Module Name:    pkgsrc
Committed By:   pho
Date:           Wed Aug 13 10:56:53 UTC 2025

Modified Files:
        pkgsrc/lang/ghc910: Makefile buildlink3.mk distinfo
Added Files:
        pkgsrc/lang/ghc910/patches:
            patch-libraries_Cabal_Cabal_src_Distribution_Simple_LocalBuildInfo.hs

Log Message:
lang/ghc910: Fix a long-standing bug in Cabal regarding rpaths


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/ghc910/Makefile \
    pkgsrc/lang/ghc910/buildlink3.mk
cvs rdiff -u -r1.9 -r1.10 pkgsrc/lang/ghc910/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/ghc910/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_LocalBuildInfo.hs

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

Modified files:

Index: pkgsrc/lang/ghc910/Makefile
diff -u pkgsrc/lang/ghc910/Makefile:1.4 pkgsrc/lang/ghc910/Makefile:1.5
--- pkgsrc/lang/ghc910/Makefile:1.4     Wed Mar  5 03:33:59 2025
+++ pkgsrc/lang/ghc910/Makefile Wed Aug 13 10:56:52 2025
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.4 2025/03/05 03:33:59 pho Exp $
+# $NetBSD: Makefile,v 1.5 2025/08/13 10:56:52 pho Exp $
 # -----------------------------------------------------------------------------
 # Package metadata
 #
 DISTNAME=      ghc-9.10.1-src
 PKGNAME=       ${DISTNAME:S/-src$//}
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    lang
 MASTER_SITES=  https://downloads.haskell.org/~ghc/${PKGVERSION_NOREV}/
 EXTRACT_SUFX=  .tar.xz
Index: pkgsrc/lang/ghc910/buildlink3.mk
diff -u pkgsrc/lang/ghc910/buildlink3.mk:1.4 pkgsrc/lang/ghc910/buildlink3.mk:1.5
--- pkgsrc/lang/ghc910/buildlink3.mk:1.4        Wed Mar  5 03:33:59 2025
+++ pkgsrc/lang/ghc910/buildlink3.mk    Wed Aug 13 10:56:52 2025
@@ -1,12 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.4 2025/03/05 03:33:59 pho Exp $
+# $NetBSD: buildlink3.mk,v 1.5 2025/08/13 10:56:52 pho Exp $
 
 BUILDLINK_TREE+=       ghc
 
 .if !defined(GHC_BUILDLINK3_MK)
 GHC_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.ghc+=    ghc>=9.10.1nb3
-BUILDLINK_ABI_DEPENDS.ghc+=    ghc>=9.10.1nb3
+BUILDLINK_API_DEPENDS.ghc+=    ghc>=9.10.1nb4
+BUILDLINK_ABI_DEPENDS.ghc+=    ghc>=9.10.1nb4
 BUILDLINK_PKGSRCDIR.ghc?=      ../../lang/ghc910
 
 .include "../../converters/libiconv/buildlink3.mk"

Index: pkgsrc/lang/ghc910/distinfo
diff -u pkgsrc/lang/ghc910/distinfo:1.9 pkgsrc/lang/ghc910/distinfo:1.10
--- pkgsrc/lang/ghc910/distinfo:1.9     Thu Jul 10 14:07:33 2025
+++ pkgsrc/lang/ghc910/distinfo Wed Aug 13 10:56:52 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2025/07/10 14:07:33 jperkin Exp $
+$NetBSD: distinfo,v 1.10 2025/08/13 10:56:52 pho Exp $
 
 BLAKE2s (ghc-9.10.1-src.tar.xz) = 7e4433ead6349bd073d31803b63e6c39fb3833ad691e985e25bc5b027da7fb85
 SHA512 (ghc-9.10.1-src.tar.xz) = 46d47e7811a19dcce501002ab674d84ab2fcb842309b5094af52dc5ad26bf5b309b160c1b689f3342666013bf4b0587425c60fbd6c637e739839d41a6a96d990
@@ -43,6 +43,7 @@ SHA1 (patch-hadrian_src_Settings_Package
 SHA1 (patch-libraries_Cabal_Cabal-syntax_Cabal-syntax.cabal) = 239bfa58283d1ccea78afa7853cc4b12f66da86d
 SHA1 (patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs) = 365abd84b9a2ac9ab3e325ffa769823b28d20696
 SHA1 (patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC_Build_Link.hs) = 1a25bd801ad3984b0e86dae5dcd30f0b36ab28f7
+SHA1 (patch-libraries_Cabal_Cabal_src_Distribution_Simple_LocalBuildInfo.hs) = a6c0a2934e0e2371635919b591d35b75da7f105a
 SHA1 (patch-libraries_Cabal_Cabal_src_Distribution_Simple_Register.hs) = 7630d0170d7dc9b17f15b5eacc2c783e07adbd7f
 SHA1 (patch-libraries_base_src_System_CPUTime.hsc) = ec358676996072b18125c01f18d8c01a9934f726
 SHA1 (patch-libraries_base_src_System_CPUTime_Posix_Times.hsc) = 4c43abbdcfc35e35257acede8bbe47324f23ebcb

Added files:

Index: pkgsrc/lang/ghc910/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_LocalBuildInfo.hs
diff -u /dev/null pkgsrc/lang/ghc910/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_LocalBuildInfo.hs:1.1
--- /dev/null   Wed Aug 13 10:56:53 2025
+++ pkgsrc/lang/ghc910/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_LocalBuildInfo.hs    Wed Aug 13 10:56:53 2025
@@ -0,0 +1,39 @@
+$NetBSD: patch-libraries_Cabal_Cabal_src_Distribution_Simple_LocalBuildInfo.hs,v 1.1 2025/08/13 10:56:53 pho Exp $
+
+Fix a bug in the rpath handling in Cabal. The upstream has once attempted
+to fix it (https://github.com/haskell/cabal/pull/4033) but the fix turned
+out to be incomplete.
+
+Suppose a package has internal libraries A and B. B depends on A but
+nothing else does. In this case depLibraryPaths erroneously returns the
+build directory of A for any components that depend on B. This is because
+internalDeps is a list of *direct* internal dependencies while
+(installedPkgs lbi) includes indirect ones, so is_external returns False
+for indirect dependencies, including A in this case.
+
+The consequence of the bug is that resulting dynamic libraries will contain
+rpaths to build directories if they have indirect internal dependencies. In
+pkgsrc the bug only rises up to the surface when WRKOBJDIR is set to
+somewhere under /tmp, which is why we hadn't noticed its existence for
+years. See
+https://mail-index.netbsd.org/pkgsrc-users/2025/08/12/msg041867.html
+
+TODO: Upstream this patch. The fix is not pkgsrc-specific at all.
+
+--- libraries/Cabal/Cabal/src/Distribution/Simple/LocalBuildInfo.hs.orig       2025-08-12 18:10:37.229516684 +0000
++++ libraries/Cabal/Cabal/src/Distribution/Simple/LocalBuildInfo.hs
+@@ -247,11 +247,9 @@ depLibraryPaths
+     let
+       -- TODO: this is kind of inefficient
+       internalDeps =
+-        [ uid
+-        | (uid, _) <- componentPackageDeps clbi
+-        , -- Test that it's internal
+-        sub_target <- allTargetsInBuildOrder' pkgDescr lbi
+-        , componentUnitId (targetCLBI (sub_target)) == uid
++        [ installedUnitId ipkg
++        | ipkg <- allPackages installed
++        , Installed.sourcePackageId ipkg == localPackage lbi
+         ]
+       internalLibs =
+         [ getLibDir (targetCLBI sub_target)



Home | Main Index | Thread Index | Old Index