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 Jan 29 15:28:29 UTC 2025

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

Log Message:
lang/ghc910: Work around a Cabal bug that installs packages in a wrong directory


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/ghc910/Makefile \
    pkgsrc/lang/ghc910/buildlink3.mk pkgsrc/lang/ghc910/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/ghc910/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.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.1 pkgsrc/lang/ghc910/Makefile:1.2
--- pkgsrc/lang/ghc910/Makefile:1.1     Wed Jan 29 13:21:52 2025
+++ pkgsrc/lang/ghc910/Makefile Wed Jan 29 15:28:29 2025
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.1 2025/01/29 13:21:52 pho Exp $
+# $NetBSD: Makefile,v 1.2 2025/01/29 15:28:29 pho Exp $
 # -----------------------------------------------------------------------------
 # Package metadata
 #
 DISTNAME=      ghc-9.10.1-src
 PKGNAME=       ${DISTNAME:S/-src$//}
+PKGREVISION=   1
 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.1 pkgsrc/lang/ghc910/buildlink3.mk:1.2
--- pkgsrc/lang/ghc910/buildlink3.mk:1.1        Wed Jan 29 13:21:52 2025
+++ pkgsrc/lang/ghc910/buildlink3.mk    Wed Jan 29 15:28:29 2025
@@ -1,12 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.1 2025/01/29 13:21:52 pho Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2025/01/29 15:28:29 pho Exp $
 
 BUILDLINK_TREE+=       ghc
 
 .if !defined(GHC_BUILDLINK3_MK)
 GHC_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.ghc+=    ghc>=9.10.1
-BUILDLINK_ABI_DEPENDS.ghc+=    ghc>=9.10.1
+BUILDLINK_API_DEPENDS.ghc+=    ghc>=9.10.1nb1
+BUILDLINK_ABI_DEPENDS.ghc+=    ghc>=9.10.1nb1
 BUILDLINK_PKGSRCDIR.ghc?=      ../../lang/ghc910
 
 .include "../../converters/libiconv/buildlink3.mk"
Index: pkgsrc/lang/ghc910/distinfo
diff -u pkgsrc/lang/ghc910/distinfo:1.1 pkgsrc/lang/ghc910/distinfo:1.2
--- pkgsrc/lang/ghc910/distinfo:1.1     Wed Jan 29 13:21:52 2025
+++ pkgsrc/lang/ghc910/distinfo Wed Jan 29 15:28:29 2025
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2025/01/29 13:21:52 pho Exp $
+$NetBSD: distinfo,v 1.2 2025/01/29 15:28:29 pho Exp $
 
 BLAKE2s (ghc-9.10.1-src.tar.xz) = 7e4433ead6349bd073d31803b63e6c39fb3833ad691e985e25bc5b027da7fb85
 SHA512 (ghc-9.10.1-src.tar.xz) = 46d47e7811a19dcce501002ab674d84ab2fcb842309b5094af52dc5ad26bf5b309b160c1b689f3342666013bf4b0587425c60fbd6c637e739839d41a6a96d990
@@ -39,6 +39,7 @@ SHA1 (patch-hadrian_src_Settings_Builder
 SHA1 (patch-hadrian_src_Settings_Builders_Ghc.hs) = e2913e9f83bb36bb0b432a24518c9b6ca2990c6a
 SHA1 (patch-hadrian_src_Settings_Packages.hs) = e23eb2cf7fc96065a60a9d12bb5f419559b193c3
 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_Register.hs) = 7630d0170d7dc9b17f15b5eacc2c783e07adbd7f
 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_GHC.hs
diff -u /dev/null pkgsrc/lang/ghc910/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs:1.1
--- /dev/null   Wed Jan 29 15:28:29 2025
+++ pkgsrc/lang/ghc910/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs       Wed Jan 29 15:28:29 2025
@@ -0,0 +1,30 @@
+$NetBSD: patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs,v 1.1 2025/01/29 15:28:29 pho Exp $
+
+Install Cabal packages built with ./Setup into
+"$PREFIX/lib/{arch}-ghc-{version}" but not
+"$PREFIX/lib/{arch}-ghc-{version}-inplace". The suffix "-inplace" stems
+from "Project Unit Id" found in the result of "ghc --info", which comes
+from generateConfigHs in "${WRKSRC}/hadrian/src/Rules/Generate.hs".
+
+It isn't fundamentally bad, that is, Cabal packages would have no problem
+having the suffix in the installation path. However, it's very bad in our
+case because it breaks every single PLIST file of pkgsrc Haskell
+packages. pho@ believes this is an upstream bug: Cabal should have no
+fundamental reason to inherit the ABI tag of the ghc-as-a-library
+package. Or at least it shouldn't treat "inplace" as a genuine ABI tag that
+needs inheriting. "inplace" is a dummy tag after all.
+
+TODO: Report this to Cabal folks. pho@ doesn't know how to fix this
+properly. This is only a workaround that potentially has downsides.
+
+--- libraries/Cabal/Cabal/src/Distribution/Simple/GHC.hs.orig  2025-01-29 14:28:52.172116521 +0000
++++ libraries/Cabal/Cabal/src/Distribution/Simple/GHC.hs
+@@ -240,7 +240,7 @@ configure verbosity hcPath hcPkgPath con
+       compilerId = CompilerId GHC ghcVersion
+ 
+       compilerAbiTag :: AbiTag
+-      compilerAbiTag = maybe NoAbiTag AbiTag (Map.lookup "Project Unit Id" ghcInfoMap >>= stripPrefix (prettyShow compilerId <> "-"))
++      compilerAbiTag = NoAbiTag
+ 
+   let comp =
+         Compiler



Home | Main Index | Thread Index | Old Index