From 92d190083df7f45f68b170c74e0204b32b81c3f3 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Mon, 28 May 2018 12:44:26 +0900 Subject: [PATCH] try fixing sphinx-build --version detection in configure https://github.com/ghc/ghc/pull/143 --- ghc-configure-fix-sphinx-version-check.patch | 11 +++++++++++ ghc.spec | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ghc-configure-fix-sphinx-version-check.patch diff --git a/ghc-configure-fix-sphinx-version-check.patch b/ghc-configure-fix-sphinx-version-check.patch new file mode 100644 index 0000000..c19da05 --- /dev/null +++ b/ghc-configure-fix-sphinx-version-check.patch @@ -0,0 +1,11 @@ +--- ghc-8.2.2/configure.ac~ 2017-11-21 05:22:42.000000000 +0900 ++++ ghc-8.2.2/configure.ac 2018-05-28 12:37:35.296728423 +0900 +@@ -745,7 +745,7 @@ + AC_CACHE_CHECK([for version of sphinx-build], fp_cv_sphinx_version, + changequote(, )dnl + [if test -n "$SPHINXBUILD"; then +- fp_cv_sphinx_version=`"$SPHINXBUILD" --version 2>&1 | sed 's/Sphinx\( (sphinx-build)\)\? v\?\([0-9]\.[0-9]\.[0-9]\)/\2/' | head -n1`; ++ fp_cv_sphinx_version=`"$SPHINXBUILD" --version 2>&1 | sed 's/.* v\?\([0-9]\.[0-9]\.[0-9]\)/\1/' | head -n1`; + fi; + changequote([, ])dnl + ]) diff --git a/ghc.spec b/ghc.spec index 98118e9..9807eb1 100644 --- a/ghc.spec +++ b/ghc.spec @@ -41,6 +41,8 @@ Patch2: ghc-Cabal-install-PATH-warning.patch # https://ghc.haskell.org/trac/ghc/ticket/14381 # https://phabricator.haskell.org/D4159 Patch4: D4159.patch +# https://github.com/ghc/ghc/pull/143 +Patch5: ghc-configure-fix-sphinx-version-check.patch Patch12: ghc-armv7-VFPv3D16--NEON.patch @@ -81,11 +83,14 @@ BuildRequires: perl-interpreter BuildRequires: python3 %endif %if %{with manual} -BuildRequires: python3-sphinx +# for /usr/bin/sphinx-build +BuildRequires: python2-sphinx %endif %ifarch armv7hl aarch64 BuildRequires: llvm%{llvm_major} %endif +# patch5 +BuildRequires: autoconf %ifarch armv7hl # patch12 BuildRequires: autoconf, automake @@ -252,6 +257,7 @@ except the ghc library, which is installed by the toplevel ghc metapackage. %patch2 -p1 -b .orig %patch4 -p1 -b .orig +%patch5 -p1 -b .orig %if 0%{?fedora} || 0%{?rhel} > 6 rm -r libffi-tarballs @@ -310,8 +316,12 @@ EOF ## (http://ghc.haskell.org/trac/ghc/wiki/Debugging/RuntimeSystem) #EXTRA_HC_OPTS=-debug +# for patch12 %ifarch armv7hl autoreconf +%else +# for patch5 +autoconf %endif %if 0%{?fedora} > 28