From 242ac1895b5f6a8c7693b9e1a5f6acb25a66a75c Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sat, 18 Jan 2020 23:56:35 +0100 Subject: [PATCH] dev-lang/GHC: add missing patch --- .../GHC/files/GHC-8.8.1-no-alex.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 packages/dev-lang/GHC/files/GHC-8.8.1-no-alex.patch diff --git a/packages/dev-lang/GHC/files/GHC-8.8.1-no-alex.patch b/packages/dev-lang/GHC/files/GHC-8.8.1-no-alex.patch new file mode 100644 index 00000000..39b6eeed --- /dev/null +++ b/packages/dev-lang/GHC/files/GHC-8.8.1-no-alex.patch @@ -0,0 +1,33 @@ +https://github.com/gentoo-haskell/gentoo-haskell/issues/959 + +From 144abba394c6a23eb877fbde727111a5e75b9d47 Mon Sep 17 00:00:00 2001 +From: Ben Gamari +Date: Wed, 18 Sep 2019 23:50:20 -0400 +Subject: [PATCH] configure: Don't depend upon alex in source dist build + +This fixes #16860 by verifying that the generated sources don't already +exist before asserting that the `alex` executable was found. This +replicates the logic already used for `happy` in the case of `alex`. +--- + aclocal.m4 | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -984,8 +984,11 @@ else + fi; + changequote([, ])dnl + ]) +-FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[3.1.7], +- [AC_MSG_ERROR([Alex version 3.1.7 or later is required to compile GHC.])])[] ++if test ! -f compiler/parser/Lexer.hs ++then ++ FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[3.1.7], ++ [AC_MSG_ERROR([Alex version 3.1.7 or later is required to compile GHC.])])[] ++fi + AlexVersion=$fptools_cv_alex_version; + AC_SUBST(AlexVersion) + ]) +-- +2.23.0 +