pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/ghc96



Module Name:    pkgsrc
Committed By:   pho
Date:           Wed Nov  1 17:53:53 UTC 2023

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

Log Message:
lang/ghc96: Fix Cabal on Darwin trying to install shared libraries having '@rpath' and fail

Sorry, Darwin users. It's likely that I've been shipping broken GHC on this
platform for so long. I should have done more tests on the platform.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/ghc96/Makefile \
    pkgsrc/lang/ghc96/buildlink3.mk pkgsrc/lang/ghc96/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/lang/ghc96/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/ghc96/Makefile
diff -u pkgsrc/lang/ghc96/Makefile:1.3 pkgsrc/lang/ghc96/Makefile:1.4
--- pkgsrc/lang/ghc96/Makefile:1.3      Tue Oct 24 06:38:45 2023
+++ pkgsrc/lang/ghc96/Makefile  Wed Nov  1 17:53:53 2023
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.3 2023/10/24 06:38:45 pho Exp $
+# $NetBSD: Makefile,v 1.4 2023/11/01 17:53:53 pho Exp $
 # -----------------------------------------------------------------------------
 # Package metadata
 #
 DISTNAME=      ghc-9.6.3-src
 PKGNAME=       ${DISTNAME:S/-src$//}
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    lang
 MASTER_SITES=  https://downloads.haskell.org/~ghc/${PKGVERSION_NOREV}/
 EXTRACT_SUFX=  .tar.xz
Index: pkgsrc/lang/ghc96/buildlink3.mk
diff -u pkgsrc/lang/ghc96/buildlink3.mk:1.3 pkgsrc/lang/ghc96/buildlink3.mk:1.4
--- pkgsrc/lang/ghc96/buildlink3.mk:1.3 Tue Oct 24 06:38:45 2023
+++ pkgsrc/lang/ghc96/buildlink3.mk     Wed Nov  1 17:53:53 2023
@@ -1,12 +1,12 @@
-# $NetBSD: buildlink3.mk,v 1.3 2023/10/24 06:38:45 pho Exp $
+# $NetBSD: buildlink3.mk,v 1.4 2023/11/01 17:53:53 pho Exp $
 
 BUILDLINK_TREE+=       ghc
 
 .if !defined(GHC_BUILDLINK3_MK)
 GHC_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.ghc+=    ghc>=9.6.3nb2
-BUILDLINK_ABI_DEPENDS.ghc+=    ghc>=9.6.3nb2
+BUILDLINK_API_DEPENDS.ghc+=    ghc>=9.6.3nb3
+BUILDLINK_ABI_DEPENDS.ghc+=    ghc>=9.6.3nb3
 BUILDLINK_PKGSRCDIR.ghc?=      ../../lang/ghc96
 
 .include "../../converters/libiconv/buildlink3.mk"
Index: pkgsrc/lang/ghc96/distinfo
diff -u pkgsrc/lang/ghc96/distinfo:1.3 pkgsrc/lang/ghc96/distinfo:1.4
--- pkgsrc/lang/ghc96/distinfo:1.3      Tue Oct 24 06:38:45 2023
+++ pkgsrc/lang/ghc96/distinfo  Wed Nov  1 17:53:53 2023
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2023/10/24 06:38:45 pho Exp $
+$NetBSD: distinfo,v 1.4 2023/11/01 17:53:53 pho Exp $
 
 BLAKE2s (ghc-9.2.1-boot-hadrian.tar.gz) = 363fea08f46524eab654b3225650be4938bd0404e8c44145381f97a0c4489dca
 SHA512 (ghc-9.2.1-boot-hadrian.tar.gz) = a006ab38df77bc22e51ee75808065ad75781f85eb52cae54ed8995942ba16e70f4d68d4097f2597bca09e8b7890858d0a28a0f66216e6a4b21a3c68bb8082c59
@@ -39,7 +39,7 @@ SHA1 (patch-hadrian_src_Rules_BinaryDist
 SHA1 (patch-hadrian_src_Settings_Builders_Ghc.hs) = e2913e9f83bb36bb0b432a24518c9b6ca2990c6a
 SHA1 (patch-hadrian_src_Settings_Default.hs) = 0e0278308ca4decac3fabd89831195b2a20c6eab
 SHA1 (patch-hadrian_src_Settings_Packages.hs) = 1db5c293a9f5691a5009b1a6d4ae9bf0a7109c2c
-SHA1 (patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs) = a8b2eeec9a469b43e611f79fbf5b080c1e05aa50
+SHA1 (patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs) = 9e6028dd6ffc2d3c71493fbb7336adcec9f08f78
 SHA1 (patch-libraries_base_GHC_Event_KQueue.hsc) = 8ee5da667a241a05fde3c580d3dc9bdc05aa5f00
 SHA1 (patch-libraries_base_System_CPUTime_Posix_Times.hsc) = 2bfb779d534d12073287274ce5e90b99e457a860
 SHA1 (patch-libraries_base_System_Environment.hs) = 7d79a91f295915b4408d5f41d5405739d7189215

Index: pkgsrc/lang/ghc96/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs
diff -u pkgsrc/lang/ghc96/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs:1.1 pkgsrc/lang/ghc96/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs:1.2
--- pkgsrc/lang/ghc96/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs:1.1    Mon Oct 23 08:06:49 2023
+++ pkgsrc/lang/ghc96/patches/patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs        Wed Nov  1 17:53:53 2023
@@ -1,22 +1,54 @@
-$NetBSD: patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs,v 1.1 2023/10/23 08:06:49 pho Exp $
+$NetBSD: patch-libraries_Cabal_Cabal_src_Distribution_Simple_GHC.hs,v 1.2 2023/11/01 17:53:53 pho Exp $
 
-Enable Cabal's rpath overriding functionality on all the platforms
-known to use ELF.
+Hunk #0, #1, #2:
+  Revert the change introduced in https://github.com/haskell/cabal/issues/1660
 
-When a Cabal package which defines both a library and an executable
-to be built, GHC by default embeds an rpath to the *build* directory
-into the executable. This may sound like a bug in GHC but is actually
-not, because GHC doesn't know the fact that the said library is going
-to be installed elsewhere. To overcome this issue, Cabal has a
-functionality to disable the default rpath handling of GHC and
-construct the correct set of rpaths... but only on certain platforms
-for some reason.
+  Do not use @rpath on Darwin, instead use the final destination path as a
+  library install name. This is pkgsrc-specific.
 
-Pull request: https://github.com/haskell/cabal/pull/7382
+  See also https://github.com/haskell/cabal/pull/7076
+  And https://github.com/haskell/cabal/issues/7339
 
---- libraries/Cabal/Cabal/src/Distribution/Simple/GHC.hs.orig  2022-01-21 02:23:32.884988700 +0000
+Hunk #2:
+  Enable Cabal's rpath overriding functionality on all the platforms known
+  to use ELF.
+
+  When a Cabal package which defines both a library and an executable to be
+  built, GHC by default embeds an rpath to the *build* directory into the
+  executable. This may sound like a bug in GHC but is actually not, because
+  GHC doesn't know the fact that the said library is going to be installed
+  elsewhere. To overcome this issue, Cabal has a functionality to disable
+  the default rpath handling of GHC and construct the correct set of
+  rpaths... but only on certain platforms for some reason.
+
+  Pull request: https://github.com/haskell/cabal/pull/7382
+
+--- libraries/Cabal/Cabal/src/Distribution/Simple/GHC.hs.orig  2023-09-21 11:31:40.000000000 +0000
 +++ libraries/Cabal/Cabal/src/Distribution/Simple/GHC.hs
-@@ -1734,10 +1734,10 @@ getRPaths lbi clbi | supportRPaths hostO
+@@ -836,7 +836,7 @@ buildOrReplLib mReplFlags verbosity numJ
+                                mkStaticLibName (hostPlatform lbi) compiler_id uid
+         ghciLibFilePath      = relLibTargetDir </> Internal.mkGHCiLibName uid
+         ghciProfLibFilePath  = relLibTargetDir </> Internal.mkGHCiProfLibName uid
+-        libInstallPath       = libdir $
++        libInstallPath       = dynlibdir $
+                                absoluteComponentInstallDirs
+                                pkg_descr lbi uid NoCopyDest
+         sharedLibInstallPath = libInstallPath </>
+@@ -900,7 +900,6 @@ buildOrReplLib mReplFlags verbosity numJ
+                 -- at build time. This only applies to GHC < 7.8 - see the
+                 -- discussion in #1660.
+                 ghcOptDylibName          = if hostOS == OSX
+-                                              && ghcVersion < mkVersion [7,8]
+                                             then toFlag sharedLibInstallPath
+                                             else mempty,
+                 ghcOptHideAllPackages    = toFlag True,
+@@ -1813,15 +1812,15 @@ getRPaths lbi clbi | supportRPaths hostO
+     -- 'False', while those operating systems themselves do support RPATH.
+     supportRPaths Linux       = True
+     supportRPaths Windows     = False
+-    supportRPaths OSX         = True
++    supportRPaths OSX         = False
+     supportRPaths FreeBSD     =
        case compid of
          CompilerId GHC ver | ver >= mkVersion [7,10,2] -> True
          _                                              -> False



Home | Main Index | Thread Index | Old Index