try fixing sphinx-build --version detection in configure

https://github.com/ghc/ghc/pull/143
This commit is contained in:
Jens Petersen 2018-05-28 12:44:26 +09:00
parent 8a638fc974
commit 52da5da5ad
2 changed files with 22 additions and 1 deletions

View File

@ -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
])

View File

@ -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