update to ghc-8.6.5 (backported from ghc:8.6)

epel9
Jens Petersen 6 years ago
parent 3c34896ffd
commit e55a957f1b

1
.gitignore vendored

@ -26,3 +26,4 @@ testsuite-6.12.3.tar.bz2
/ghc-8.2.2-src.tar.xz /ghc-8.2.2-src.tar.xz
/ghc-8.2.2-testsuite.tar.xz /ghc-8.2.2-testsuite.tar.xz
/ghc-8.4.4-src.tar.xz /ghc-8.4.4-src.tar.xz
/ghc-8.6.5-src.tar.xz

@ -0,0 +1,12 @@
Index: ghc-8.6.1/libraries/containers/include/containers.h
===================================================================
--- ghc-8.6.1.orig/libraries/containers/include/containers.h
+++ ghc-8.6.1/libraries/containers/include/containers.h
@@ -35,7 +35,6 @@
#ifdef __GLASGOW_HASKELL__
# define USE_ST_MONAD 1
-# define USE_UNBOXED_ARRAYS 1
#endif
#endif

@ -1,43 +1,32 @@
commit 4eebc8016f68719e1ccdf460754a97d1f4d6ef05 --- ghc-8.6.3/docs/users_guide/flags.py~ 2018-09-21 06:18:23.000000000 +0800
Author: Ben Gamari <ben@smart-cactus.org> +++ ghc-8.6.3/docs/users_guide/flags.py 2019-03-05 10:20:38.639782096 +0800
Date: Thu Sep 20 08:27:37 2018 -0400 @@ -49,6 +49,8 @@
import sphinx
users-guide: Fix build with sphinx 1.8
It seems that both add_object_type and add_directive_to_domain both register a
directive. Previously sphinx didn't seem to mind this but as of Sphinx 1.8 it
crashes with an exception.
diff --git a/docs/users_guide/flags.py b/docs/users_guide/flags.py
index a70f7fef1e..284b5e06cc 100644
--- a/docs/users_guide/flags.py
+++ b/docs/users_guide/flags.py
@@ -48,6 +48,8 @@ from docutils import nodes
from docutils.parsers.rst import Directive, directives
from sphinx import addnodes from sphinx import addnodes
from sphinx.domains.std import GenericObject from sphinx.domains.std import GenericObject
+from sphinx.domains import ObjType +from sphinx.domains import ObjType
+from sphinx.roles import XRefRole +from sphinx.roles import XRefRole
from sphinx.errors import SphinxError from sphinx.errors import SphinxError
from distutils.version import LooseVersion
from utils import build_table_from_list from utils import build_table_from_list
@@ -603,14 +605,21 @@
sphinx_version = LooseVersion(sphinx.__version__)
override_arg = {'override': True} if sphinx_version >= LooseVersion('1.8') else {}
@@ -599,14 +601,20 @@ def purge_flags(app, env, docname):
### Initialization
def setup(app):
+ # Yuck: We can't use app.add_object_type since we need to provide the + # Yuck: We can't use app.add_object_type since we need to provide the
+ # Directive instance ourselves. + # Directive instance ourselves.
+ std_object_types = app.registry.domain_object_types.setdefault('std', {}) + std_object_types = app.registry.domain_object_types.setdefault('std', {})
+
# Add ghc-flag directive, and override the class with our own # Add ghc-flag directive, and override the class with our own
- app.add_object_type('ghc-flag', 'ghc-flag') - app.add_object_type('ghc-flag', 'ghc-flag')
app.add_directive_to_domain('std', 'ghc-flag', Flag) app.add_directive_to_domain('std', 'ghc-flag', Flag, **override_arg)
+ app.add_role_to_domain('std', 'ghc-flag', XRefRole()) + app.add_role_to_domain('std', 'ghc-flag', XRefRole())
+ std_object_types['ghc-flag'] = ObjType('ghc-flag', 'ghc-flag') + std_object_types['ghc-flag'] = ObjType('ghc-flag', 'ghc-flag')
# Add extension directive, and override the class with our own # Add extension directive, and override the class with our own
- app.add_object_type('extension', 'extension') - app.add_object_type('extension', 'extension')
app.add_directive_to_domain('std', 'extension', LanguageExtension) app.add_directive_to_domain('std', 'extension', LanguageExtension,
**override_arg)
+ app.add_role_to_domain('std', 'extension', XRefRole()) + app.add_role_to_domain('std', 'extension', XRefRole())
+ std_object_types['extension'] = ObjType('ghc-flag', 'ghc-flag') + std_object_types['extension'] = ObjType('ghc-flag', 'ghc-flag')
+ +

@ -8,7 +8,7 @@
# to handle RCs # to handle RCs
%global ghc_release %{version} %global ghc_release %{version}
%global base_ver 4.11.1.0 %global base_ver 4.12.0.0
# build profiling libraries # build profiling libraries
# build haddock # build haddock
@ -30,19 +30,19 @@
# no longer build testsuite (takes time and not really being used) # no longer build testsuite (takes time and not really being used)
%bcond_with testsuite %bcond_with testsuite
# 8.4 needs llvm-5.0 # 8.6 needs llvm-6.0
%global llvm_major 5.0 %global llvm_major 6.0
%global ghc_llvm_archs armv7hl aarch64 %global ghc_llvm_archs armv7hl aarch64
%global ghc_unregisterized_arches s390 s390x %{mips} %global ghc_unregisterized_arches s390 s390x %{mips}
Name: ghc Name: ghc
Version: 8.4.4 Version: 8.6.5
# Since library subpackages are versioned: # Since library subpackages are versioned:
# - release can only be reset if *all* library versions get bumped simultaneously # - release can only be reset if *all* library versions get bumped simultaneously
# (sometimes after a major release) # (sometimes after a major release)
# - minor release numbers for a branch should be incremented monotonically # - minor release numbers for a branch should be incremented monotonically
Release: 99%{?dist} Release: 100%{?dist}
Summary: Glasgow Haskell Compiler Summary: Glasgow Haskell Compiler
License: BSD and HaskellReport License: BSD and HaskellReport
@ -57,10 +57,8 @@ Source7: runghc.man
# absolute haddock path (was for html/libraries -> libraries) # absolute haddock path (was for html/libraries -> libraries)
Patch1: ghc-gen_contents_index-haddock-path.patch Patch1: ghc-gen_contents_index-haddock-path.patch
Patch2: ghc-Cabal-install-PATH-warning.patch Patch2: ghc-Cabal-install-PATH-warning.patch
# https://github.com/ghc/ghc/pull/143
Patch5: ghc-configure-fix-sphinx-version-check.patch
# https://phabricator.haskell.org/rGHC4eebc8016f68719e1ccdf460754a97d1f4d6ef05 # https://phabricator.haskell.org/rGHC4eebc8016f68719e1ccdf460754a97d1f4d6ef05
Patch6: ghc-sphinx-1.8-4eebc8016.patch Patch6: ghc-8.6.3-sphinx-1.8.patch
# Arch dependent patches # Arch dependent patches
@ -70,19 +68,22 @@ Patch12: ghc-armv7-VFPv3D16--NEON.patch
# for s390x # for s390x
# https://ghc.haskell.org/trac/ghc/ticket/15689 # https://ghc.haskell.org/trac/ghc/ticket/15689
Patch15: ghc-warnings.mk-CC-Wall.patch Patch15: ghc-warnings.mk-CC-Wall.patch
# https://ghc.haskell.org/trac/ghc/ticket/15853 # https://gitlab.haskell.org/ghc/ghc/issues/15853
# https://phabricator.haskell.org/D5306 (in 8.8) # https://phabricator.haskell.org/D5306 (in 8.8)
Patch17: https://gitlab.haskell.org/ghc/ghc/commit/35a897782b6b0a252da7fdcf4921198ad4e1d96c.patch Patch17: https://gitlab.haskell.org/ghc/ghc/commit/35a897782b6b0a252da7fdcf4921198ad4e1d96c.patch
# revert 8.4.4 llvm changes # bigendian (s390x and ppc64)
# https://ghc.haskell.org/trac/ghc/ticket/15780 # fix haddock-library
Patch16: https://github.com/ghc/ghc/commit/6e361d895dda4600a85e01c72ff219474b5c7190.patch # https://gitlab.haskell.org/ghc/ghc/issues/15411
# https://gitlab.haskell.org/ghc/ghc/issues/16505
# https://bugzilla.redhat.com/show_bug.cgi?id=1651448
# https://ghc.haskell.org/trac/ghc/ticket/15914
Patch18: https://gitlab.haskell.org/ghc/ghc/uploads/5deb133cf910e9e0ca9ad9fe53f7383a/Disable-unboxed-arrays.patch
# Debian patches: # Debian patches:
Patch24: buildpath-abi-stability.patch Patch24: buildpath-abi-stability.patch
Patch26: no-missing-haddock-file-warning.patch Patch26: no-missing-haddock-file-warning.patch
Patch28: x32-use-native-x86_64-insn.patch Patch28: x32-use-native-x86_64-insn.patch
Patch30: fix-build-using-unregisterized-v8.2.patch
# fedora ghc has been bootstrapped on # fedora ghc has been bootstrapped on
# %%{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64 # %%{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64
@ -119,10 +120,12 @@ BuildRequires: python2-sphinx
%endif %endif
%endif %endif
%ifarch %{ghc_llvm_archs} %ifarch %{ghc_llvm_archs}
%if 0%{?fedora} >= 29
BuildRequires: llvm%{llvm_major} BuildRequires: llvm%{llvm_major}
%else
BuildRequires: llvm >= %{llvm_major}
%endif
%endif %endif
# patch5
BuildRequires: autoconf
%ifarch armv7hl %ifarch armv7hl
# patch12 # patch12
BuildRequires: autoconf, automake BuildRequires: autoconf, automake
@ -174,7 +177,11 @@ Requires: ghc-base-devel%{?_isa} = %{base_ver}-%{release}
Obsoletes: ghc-doc-index < %{version}-%{release} Obsoletes: ghc-doc-index < %{version}-%{release}
%endif %endif
%ifarch %{ghc_llvm_archs} %ifarch %{ghc_llvm_archs}
%if 0%{?fedora} >= 29
Requires: llvm%{llvm_major} Requires: llvm%{llvm_major}
%else
Requires: llvm >= %{llvm_major}
%endif
%endif %endif
%description compiler %description compiler
@ -225,37 +232,39 @@ This package provides the User Guide and Haddock manual.
# use "./libraries-versions.sh" to check versions # use "./libraries-versions.sh" to check versions
%if %{defined ghclibdir} %if %{defined ghclibdir}
%ghc_lib_subpackage -d -l BSD Cabal-2.2.0.1 %ghc_lib_subpackage -d -l BSD Cabal-2.4.0.1
%ghc_lib_subpackage -d -l %BSDHaskellReport array-0.5.2.0 %ghc_lib_subpackage -d -l %BSDHaskellReport array-0.5.3.0
%ghc_lib_subpackage -d -l %BSDHaskellReport -c gmp-devel%{?_isa},libffi-devel%{?_isa} base-%{base_ver} %ghc_lib_subpackage -d -l %BSDHaskellReport -c gmp-devel%{?_isa},libffi-devel%{?_isa} base-%{base_ver}
%ghc_lib_subpackage -d -l BSD binary-0.8.5.1 %ghc_lib_subpackage -d -l BSD binary-0.8.6.0
%ghc_lib_subpackage -d -l BSD bytestring-0.10.8.2 %ghc_lib_subpackage -d -l BSD bytestring-0.10.8.2
%ghc_lib_subpackage -d -l %BSDHaskellReport containers-0.5.11.0 %ghc_lib_subpackage -d -l %BSDHaskellReport containers-0.6.0.1
%ghc_lib_subpackage -d -l %BSDHaskellReport deepseq-1.4.3.0 %ghc_lib_subpackage -d -l %BSDHaskellReport deepseq-1.4.4.0
%ghc_lib_subpackage -d -l %BSDHaskellReport directory-1.3.1.5 %ghc_lib_subpackage -d -l %BSDHaskellReport directory-1.3.3.0
%ghc_lib_subpackage -d -l BSD filepath-1.4.2 %ghc_lib_subpackage -d -l BSD filepath-1.4.2.1
%ghc_lib_subpackage -d -l BSD ghc-boot-th-%{ghc_version_override} %ghc_lib_subpackage -d -l BSD ghc-boot-th-%{ghc_version_override}
%ghc_lib_subpackage -d -l BSD ghc-compact-0.1.0.0 %ghc_lib_subpackage -d -l BSD ghc-compact-0.1.0.0
%ghc_lib_subpackage -d -l BSD haskeline-0.7.4.2 %ghc_lib_subpackage -d -l BSD ghc-heap-%{ghc_version_override}
%ghc_lib_subpackage -d -l BSD haskeline-0.7.4.3
%ghc_lib_subpackage -d -l BSD hpc-0.6.0.3 %ghc_lib_subpackage -d -l BSD hpc-0.6.0.3
%ghc_lib_subpackage -d -l %BSDHaskellReport libiserv-8.6.3
%ghc_lib_subpackage -d -l BSD mtl-2.2.2 %ghc_lib_subpackage -d -l BSD mtl-2.2.2
%ghc_lib_subpackage -d -l BSD parsec-3.1.13.0 %ghc_lib_subpackage -d -l BSD parsec-3.1.13.0
%ghc_lib_subpackage -d -l BSD pretty-1.1.3.6 %ghc_lib_subpackage -d -l BSD pretty-1.1.3.6
%ghc_lib_subpackage -d -l %BSDHaskellReport process-1.6.3.0 %ghc_lib_subpackage -d -l %BSDHaskellReport process-1.6.5.0
%ghc_lib_subpackage -d -l BSD stm-2.4.5.1 %ghc_lib_subpackage -d -l BSD stm-2.5.0.0
%ghc_lib_subpackage -d -l BSD template-haskell-2.13.0.0 %ghc_lib_subpackage -d -l BSD template-haskell-2.14.0.0
%ghc_lib_subpackage -d -l BSD -c ncurses-devel%{?_isa} terminfo-0.4.1.1 %ghc_lib_subpackage -d -l BSD -c ncurses-devel%{?_isa} terminfo-0.4.1.2
%ghc_lib_subpackage -d -l BSD text-1.2.3.1 %ghc_lib_subpackage -d -l BSD text-1.2.3.1
%ghc_lib_subpackage -d -l BSD time-1.8.0.2 %ghc_lib_subpackage -d -l BSD time-1.8.0.2
%ghc_lib_subpackage -d -l BSD transformers-0.5.5.0 %ghc_lib_subpackage -d -l BSD transformers-0.5.6.2
%ghc_lib_subpackage -d -l BSD unix-2.7.2.2 %ghc_lib_subpackage -d -l BSD unix-2.7.2.2
%if %{with haddock} %if %{with haddock}
%ghc_lib_subpackage -d -l BSD xhtml-3000.2.2.1 %ghc_lib_subpackage -d -l BSD xhtml-3000.2.2.1
%endif %endif
# in ghc not ghc-devel: # in ghc not ghc-devel:
%ghc_lib_subpackage -d -x ghc-%{ghc_version_override} %ghc_lib_subpackage -d -x ghc-%{ghc_version_override}
%ghc_lib_subpackage -d -l BSD -x ghc-boot-%{ghc_version_override} %ghc_lib_subpackage -d -x -l BSD ghc-boot-%{ghc_version_override}
%ghc_lib_subpackage -d -l BSD -x ghci-%{ghc_version_override} %ghc_lib_subpackage -d -x -l BSD ghci-%{ghc_version_override}
%endif %endif
%global version %{ghc_version_override} %global version %{ghc_version_override}
@ -291,7 +300,6 @@ packages to be automatically installed too.
%patch1 -p1 -b .orig %patch1 -p1 -b .orig
%patch2 -p1 -b .orig %patch2 -p1 -b .orig
%patch5 -p1 -b .orig
%patch6 -p1 -b .orig %patch6 -p1 -b .orig
rm -r libffi-tarballs rm -r libffi-tarballs
@ -300,21 +308,19 @@ rm -r libffi-tarballs
%patch12 -p1 -b .orig %patch12 -p1 -b .orig
%endif %endif
%ifarch s390x %ifarch %{ghc_unregisterized_arches}
%patch15 -p1 -b .orig %patch15 -p1 -b .orig
%patch17 -p1 -b .orig %patch17 -p1 -b .orig
%endif %endif
%ifarch armv7hl aarch64 # bigendian
%patch16 -p1 -b .orig -R %ifarch ppc64 s390x
%patch18 -p1 -b .orig
%endif %endif
%patch24 -p1 -b .orig %patch24 -p1 -b .orig
%patch26 -p1 -b .orig %patch26 -p1 -b .orig
%patch28 -p1 -b .orig %patch28 -p1 -b .orig
%ifarch s390x
%patch30 -p1 -b .orig
%endif
%global gen_contents_index gen_contents_index.orig %global gen_contents_index gen_contents_index.orig
%if %{with haddock} %if %{with haddock}
@ -365,14 +371,27 @@ EOF
# for patch12 # for patch12
%ifarch armv7hl %ifarch armv7hl
autoreconf autoreconf
%else
# for patch5
autoconf
%endif %endif
%if 0%{?fedora} > 28
%ghc_set_gcc_flags %ghc_set_gcc_flags
%else
export CFLAGS="${CFLAGS:-%optflags}"
export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"
%endif
# for ghc >= 8.2 # for ghc >= 8.2
export CC=%{_bindir}/gcc export CC=%{_bindir}/gcc
# remove after Fedora default moves to 8.6
%ifarch %{ghc_unregisterized_arches}
cat > ghc-unregisterised-wrapper << EOF
#!/usr/bin/sh
exec /usr/bin/ghc -optc-I%{_libdir}/ghc-$(ghc --numeric-version)/include \${1+"\$@"}
EOF
chmod a+x ghc-unregisterised-wrapper
ln -s /usr/bin/ghc-pkg ghc-pkg-unregisterised-wrapper
%endif
# * %%configure induces cross-build due to different target/host/build platform names # * %%configure induces cross-build due to different target/host/build platform names
./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} \ ./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} \
--bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \ --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
@ -383,6 +402,7 @@ export CC=%{_bindir}/gcc
--with-system-libffi \ --with-system-libffi \
%ifarch %{ghc_unregisterized_arches} %ifarch %{ghc_unregisterized_arches}
--enable-unregisterised \ --enable-unregisterised \
--with-ghc=$PWD/ghc-unregisterised-wrapper \
%endif %endif
%{nil} %{nil}
@ -426,7 +446,7 @@ echo "%{ghclibdir}/include" >> ghc-base-devel.files
%ghc_gen_filelists ghc-boot %{ghc_version_override} %ghc_gen_filelists ghc-boot %{ghc_version_override}
%ghc_gen_filelists ghc %{ghc_version_override} %ghc_gen_filelists ghc %{ghc_version_override}
%ghc_gen_filelists ghci %{ghc_version_override} %ghc_gen_filelists ghci %{ghc_version_override}
%ghc_gen_filelists ghc-prim 0.5.2.0 %ghc_gen_filelists ghc-prim 0.5.3
%ghc_gen_filelists integer-gmp 1.0.2.0 %ghc_gen_filelists integer-gmp 1.0.2.0
%define merge_filelist()\ %define merge_filelist()\
@ -575,6 +595,7 @@ make test
%{ghclibdir}/bin/unlit %{ghclibdir}/bin/unlit
%{ghclibdir}/ghc-usage.txt %{ghclibdir}/ghc-usage.txt
%{ghclibdir}/ghci-usage.txt %{ghclibdir}/ghci-usage.txt
%{ghclibdir}/llvm-passes
%{ghclibdir}/llvm-targets %{ghclibdir}/llvm-targets
%dir %{ghclibdir}/package.conf.d %dir %{ghclibdir}/package.conf.d
%ghost %{ghclibdir}/package.conf.d/package.cache %ghost %{ghclibdir}/package.conf.d/package.cache
@ -637,6 +658,16 @@ make test
%changelog %changelog
* Wed Jul 17 2019 Jens Petersen <petersen@redhat.com> - 8.6.5-100
- update to GHC 8.6.5 (backport ghc:8.6 module stream)
- https://downloads.haskell.org/~ghc/8.6.5/docs/html/users_guide/8.6.1-notes.html
- https://downloads.haskell.org/~ghc/8.6.5/docs/html/users_guide/8.6.2-notes.html
- https://downloads.haskell.org/~ghc/8.6.5/docs/html/users_guide/8.6.3-notes.html
- https://downloads.haskell.org/~ghc/8.6.5/docs/html/users_guide/8.6.4-notes.html
- https://downloads.haskell.org/~ghc/8.6.5/docs/html/users_guide/8.6.5-notes.html
- enable s390x with unregisterized workaround for 8.4 (#1648537)
- also re-enable ppc64 with bigendian patch for containers (#1651448)
* Tue Jul 16 2019 Jens Petersen <petersen@redhat.com> - 8.4.4-99 * Tue Jul 16 2019 Jens Petersen <petersen@redhat.com> - 8.4.4-99
- subpackage library haddock documentation and profiling libraries - subpackage library haddock documentation and profiling libraries
- add ghc-doc and ghc-prof metapackages to pull in lib docs and prof libs - add ghc-doc and ghc-prof metapackages to pull in lib docs and prof libs

@ -1 +1 @@
SHA512 (ghc-8.4.4-src.tar.xz) = 685e102eee8cf8b6a377afd7871998c8c368a5da288469367e3fb804aa6109e6f59be5945b8cd3d1e36c851190ea9a7f74c576528589589313d237b721d86da5 SHA512 (ghc-8.6.5-src.tar.xz) = c08a7480200cb99e1ffbe4ce7669f552b1054054966f7e7efcbc5f98af8032e1249fa391c4fc4c7d62cc8e0be5d17fa05845177f3cea3dbcf86e6c92d40fc0f9

Loading…
Cancel
Save