git: 90e26bb3b3be - main - lang/ghc: Update to 9.2.4

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Mon, 01 Aug 2022 09:39:30 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=90e26bb3b3be48b9c513200776ddaffec8683560

commit 90e26bb3b3be48b9c513200776ddaffec8683560
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2022-07-31 19:28:06 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2022-08-01 09:38:54 +0000

    lang/ghc: Update to 9.2.4
    
    Deal with Haskell ports fallout caused by the update.
    
    While there, re-add patches necessary for lang/ghc810 that were somehow lost.
---
 devel/hs-cabal-install/Makefile                      |  1 +
 .../files/patch-bootstrap_linux-8.10.7.json          |  4 ++--
 devel/hs-haskell-language-server/Makefile            |  2 ++
 lang/ghc/Makefile                                    |  4 ++--
 lang/ghc/distinfo                                    |  4 ++--
 ...h => extra-utils_llvm-targets_gen-data-layout.sh} |  0
 lang/ghc810/Makefile                                 |  3 +++
 lang/ghc810/files/patch-aclocal.m4                   | 20 ++++++++++++++++++++
 8 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/devel/hs-cabal-install/Makefile b/devel/hs-cabal-install/Makefile
index aa1ed7e47bdf..53ec3ffcd5a3 100644
--- a/devel/hs-cabal-install/Makefile
+++ b/devel/hs-cabal-install/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	cabal-install
 PORTVERSION=	3.6.2.0
+PORTREVISION=	1
 CATEGORIES=	devel haskell
 EXTRACT_ONLY=	${DISTNAME_DEFAULT}${_GITHUB_EXTRACT_SUFX}
 
diff --git a/devel/hs-cabal-install/files/patch-bootstrap_linux-8.10.7.json b/devel/hs-cabal-install/files/patch-bootstrap_linux-8.10.7.json
index 74f99dd26bbe..194b14e5bc9d 100644
--- a/devel/hs-cabal-install/files/patch-bootstrap_linux-8.10.7.json
+++ b/devel/hs-cabal-install/files/patch-bootstrap_linux-8.10.7.json
@@ -140,7 +140,7 @@
          {
              "package": "base",
 -            "version": "4.14.3.0"
-+            "version": "4.16.2.0"
++            "version": "4.16.3.0"
          },
          {
              "package": "array",
@@ -191,7 +191,7 @@
          {
              "package": "ghc-boot-th",
 -            "version": "8.10.7"
-+            "version": "9.2.3"
++            "version": "9.2.4"
          },
          {
              "package": "pretty",
diff --git a/devel/hs-haskell-language-server/Makefile b/devel/hs-haskell-language-server/Makefile
index 21b129c03950..5ed57b112881 100644
--- a/devel/hs-haskell-language-server/Makefile
+++ b/devel/hs-haskell-language-server/Makefile
@@ -292,5 +292,7 @@ NOT_FOR_ARCHS=		i386
 
 post-patch:
 	${MV} ${WRKSRC}/cabal-ghc92.project ${WRKSRC}/cabal.project.${PORTNAME}
+	@${REINPLACE_CMD} -e '/with-compiler: ghc-9.2.3/d' \
+		${WRKSRC}/cabal.project.${PORTNAME} || ${TRUE}
 
 .include <bsd.port.mk>
diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile
index 99f6013cc382..5939c5a318d7 100644
--- a/lang/ghc/Makefile
+++ b/lang/ghc/Makefile
@@ -60,13 +60,13 @@ GMP_LIB_DEPENDS=	libgmp.so:math/gmp
 PROFILE_VARS=		enable_profile=YES
 PROFILE_VARS_OFF=	enable_profile=NO
 
-GHC_VERSION?=		9.2.3
+GHC_VERSION?=		9.2.4
 LLVM_VERSION?=		12
 BOOT_GHC_VERSION=	8.10.7
 # LLVM version that bootstrap compiler uses
 BOOT_LLVM_VERSION=	10
 
-BASE_PACKAGES?=		Cabal-3.6.3.0 array-0.5.4.0 base-4.16.2.0 binary-0.8.9.0 \
+BASE_PACKAGES?=		Cabal-3.6.3.0 array-0.5.4.0 base-4.16.3.0 binary-0.8.9.0 \
 			bytestring-0.11.3.1 containers-0.6.5.1 deepseq-1.4.6.1 \
 			directory-1.3.6.2 exceptions-0.10.4 filepath-1.4.2.2 \
 			ghc-${GHC_VERSION} ghc-bignum-1.2 ghc-compact-0.1.0.0 \
diff --git a/lang/ghc/distinfo b/lang/ghc/distinfo
index afa0b3285460..9d56962394b0 100644
--- a/lang/ghc/distinfo
+++ b/lang/ghc/distinfo
@@ -1,6 +1,6 @@
 TIMESTAMP = 1653682073
-SHA256 (ghc-9.2.3-src.tar.xz) = 50ecdc2bef013e518f9a62a15245d7db0e4409d737c43b1cea7306fd82e1669e
-SIZE (ghc-9.2.3-src.tar.xz) = 27525456
+SHA256 (ghc-9.2.4-src.tar.xz) = 15213888064a0ec4e7723d075f31b87a678ce0851773d58b44ef7aa3de996458
+SIZE (ghc-9.2.4-src.tar.xz) = 24632968
 SHA256 (ghc-8.10.7-src.tar.xz) = e3eef6229ce9908dfe1ea41436befb0455fefb1932559e860ad4c606b0d03c9d
 SIZE (ghc-8.10.7-src.tar.xz) = 19932668
 SHA256 (ghc-8.10.7-boot-amd64-freebsd.tar.xz) = 5adfeceee2c3aa1208da174390cbb8e8c1d0a333b7c4a3a676a63f93beaf3126
diff --git a/lang/ghc/files/patch-utils_llvm-targets_gen-data-layout.sh b/lang/ghc/files/extra-utils_llvm-targets_gen-data-layout.sh
similarity index 100%
rename from lang/ghc/files/patch-utils_llvm-targets_gen-data-layout.sh
rename to lang/ghc/files/extra-utils_llvm-targets_gen-data-layout.sh
diff --git a/lang/ghc810/Makefile b/lang/ghc810/Makefile
index 85c5eed65b0d..0105166c8178 100644
--- a/lang/ghc810/Makefile
+++ b/lang/ghc810/Makefile
@@ -20,6 +20,9 @@ BASE_PACKAGES=		Cabal-3.2.1.0 array-0.5.4.0 base-4.14.3.0 binary-0.8.8.0 \
 			terminfo-0.4.1.4 text-1.2.4.1 time-1.9.3 \
 			transformers-0.5.6.2 unix-2.7.2.2 xhtml-3000.2.2.1
 
+EXTRA_PATCHES=	${MASTERDIR}/files/extra-utils_llvm-targets_gen-data-layout.sh \
+		${MASTERDIR}/files/patch-llvm-targets
+
 MASTERDIR=	${.CURDIR}/../ghc
 PATCHDIR=	${.CURDIR}/files
 PLIST=		${.CURDIR}/pkg-plist
diff --git a/lang/ghc810/files/patch-aclocal.m4 b/lang/ghc810/files/patch-aclocal.m4
new file mode 100644
index 000000000000..96ba0a2b81cb
--- /dev/null
+++ b/lang/ghc810/files/patch-aclocal.m4
@@ -0,0 +1,20 @@
+--- aclocal.m4.orig	2021-06-29 07:24:51 UTC
++++ aclocal.m4
+@@ -2221,7 +2221,7 @@ AC_DEFUN([XCODE_VERSION],[
+ # FIND_LLVM_PROG()
+ # --------------------------------
+ # Find where the llvm tools are. We have a special function to handle when they
+-# are installed with a version suffix (e.g., llc-7, llc-7.0) and without (e.g.
++# are installed with a version suffix (e.g., llc-7, llc-7.0, llc70) and without (e.g.
+ # llc).
+ #
+ # $1 = the variable to set
+@@ -2231,7 +2231,7 @@ AC_DEFUN([FIND_LLVM_PROG],[
+ #
+ AC_DEFUN([FIND_LLVM_PROG],[
+     # Test for program with and without version name.
+-    PROG_VERSION_CANDIDATES=$(for llvmVersion in `seq $4 -1 $3`; do echo "$2-$llvmVersion $2-$llvmVersion.0"; done)
++    PROG_VERSION_CANDIDATES=$(for llvmVersion in `seq $4 -1 $3`; do echo "$2-$llvmVersion $2-$llvmVersion.0 $2$llvmVersion $2${llvmVersion}0"; done)
+     AC_CHECK_TOOLS([$1], [$PROG_VERSION_CANDIDATES $2], [])
+     AS_IF([test x"$$1" != x],[
+         PROG_VERSION=`$$1 --version | awk '/.*version [[0-9\.]]+/{for(i=1;i<=NF;i++){ if(\$i ~ /^[[0-9\.]]+$/){print \$i}}}'`