From 6d71f6da0e7c23f0ff522bd12a079774016981c1 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 9 Jul 2026 11:02:01 -0400 Subject: [PATCH] dev-lang/ghc: add a patch to fix the build There's a shell test with == in the bundled terminfo's ./configure. Closes: https://bugs.gentoo.org/978912 Signed-off-by: Michael Orlitzky --- .../ghc/files/ghc-9.8.4-fix-terminfo-build.patch | 13 +++++++++++++ dev-lang/ghc/ghc-9.8.4-r1.ebuild | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 dev-lang/ghc/files/ghc-9.8.4-fix-terminfo-build.patch diff --git a/dev-lang/ghc/files/ghc-9.8.4-fix-terminfo-build.patch b/dev-lang/ghc/files/ghc-9.8.4-fix-terminfo-build.patch new file mode 100644 index 0000000000000..70fd4fe22b996 --- /dev/null +++ b/dev-lang/ghc/files/ghc-9.8.4-fix-terminfo-build.patch @@ -0,0 +1,13 @@ +diff --git a/libraries/terminfo/configure b/libraries/terminfo/configure +index 9c66cad..30ade23 100755 +--- a/libraries/terminfo/configure ++++ b/libraries/terminfo/configure +@@ -1821,7 +1821,7 @@ if test "x$curses_libraries" != "xNONE"; then + TERMINFO_LIB_DIRS=$curses_libraries + fi + +-if test "x$curses_library" == "xNONE"; then ++if test "x$curses_library" = "xNONE"; then + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' diff --git a/dev-lang/ghc/ghc-9.8.4-r1.ebuild b/dev-lang/ghc/ghc-9.8.4-r1.ebuild index 6ff988c431761..1271d4b0777e0 100644 --- a/dev-lang/ghc/ghc-9.8.4-r1.ebuild +++ b/dev-lang/ghc/ghc-9.8.4-r1.ebuild @@ -589,6 +589,9 @@ src_prepare() { cd "${S}" # otherwise eapply will break + # https://bugs.gentoo.org/978912 + eapply "${FILESDIR}/ghc-9.8.4-fix-terminfo-build.patch" + eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch # https://gitlab.haskell.org/ghc/ghc/-/issues/22954