git: 2c0ada23f8da - main - devel/hs-cabal-install: Fix producing foreign-libraries on FreeBSD

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Sun, 06 Apr 2025 08:00:06 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2c0ada23f8da5950ebfcdb70ddbd716b14b40719

commit 2c0ada23f8da5950ebfcdb70ddbd716b14b40719
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2025-04-06 07:50:12 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-04-06 08:00:03 +0000

    devel/hs-cabal-install: Fix producing foreign-libraries on FreeBSD
---
 devel/hs-cabal-install/Makefile                                |  2 +-
 .../files/patch-Cabal_src_Distribution_Simple_Configure.hs     | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/devel/hs-cabal-install/Makefile b/devel/hs-cabal-install/Makefile
index 080e52cf5a8c..f82da9aaede9 100644
--- a/devel/hs-cabal-install/Makefile
+++ b/devel/hs-cabal-install/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	cabal-install
 PORTVERSION=	3.12.1.0
 DISTVERSIONPREFIX=	${PORTNAME}-v
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel haskell
 EXTRACT_ONLY=	${DISTNAME_DEFAULT}${_GITHUB_EXTRACT_SUFX}
 
diff --git a/devel/hs-cabal-install/files/patch-Cabal_src_Distribution_Simple_Configure.hs b/devel/hs-cabal-install/files/patch-Cabal_src_Distribution_Simple_Configure.hs
new file mode 100644
index 000000000000..65a60d22f937
--- /dev/null
+++ b/devel/hs-cabal-install/files/patch-Cabal_src_Distribution_Simple_Configure.hs
@@ -0,0 +1,10 @@
+--- Cabal/src/Distribution/Simple/Configure.hs.orig	2024-06-24 23:58:58 UTC
++++ Cabal/src/Distribution/Simple/Configure.hs
+@@ -2631,6 +2631,7 @@ checkForeignLibSupported comp platform flib = go (comp
+     goGhcPlatform :: Platform -> Maybe String
+     goGhcPlatform (Platform _ OSX) = goGhcOsx (foreignLibType flib)
+     goGhcPlatform (Platform _ Linux) = goGhcLinux (foreignLibType flib)
++    goGhcPlatform (Platform _ FreeBSD) = goGhcLinux (foreignLibType flib)
+     goGhcPlatform (Platform I386 Windows) = goGhcWindows (foreignLibType flib)
+     goGhcPlatform (Platform X86_64 Windows) = goGhcWindows (foreignLibType flib)
+     goGhcPlatform _ =