backport more changes from 7.8.3 spec to 7.6.3 spec

- remove the build hack to switch from llvm to llvm34 (#1161049)
- use rpm internal dependency generator with ghc.attr on F21+
- fix bash-ism in ghc-doc-index (#1146733)
- do "quick" build when bootstrapping
- setup LDFLAGS
epel9
Jens Petersen 10 years ago
parent 6977ee8fbf
commit 663bc535f4

3
ghc

@ -1,3 +0,0 @@
#!/bin/sh
/usr/bin/ghc -pgmlc llc-3.4 -pgmlo opt-3.4 $*

@ -34,5 +34,5 @@ if [ -x "gen_contents_index" -a ! -r "$PKGDIRCACHE.new" -o -n "$DIR_DIFF" ]; the
fi fi
if [ -f $PKGDIRCACHE.new ]; then if [ -f $PKGDIRCACHE.new ]; then
mv -f $PKGDIRCACHE{.new,} mv -f $PKGDIRCACHE.new $PKGDIRCACHE
fi fi

@ -1,3 +0,0 @@
#!/bin/sh
/usr/bin/ghc-pkg $*

@ -22,7 +22,7 @@ Version: 7.6.3
# - 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: 27%{?dist} Release: 28%{?dist}
Summary: Glasgow Haskell Compiler Summary: Glasgow Haskell Compiler
License: %BSDHaskellReport License: %BSDHaskellReport
@ -33,8 +33,6 @@ Source2: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-testsuite.tar
%endif %endif
Source3: ghc-doc-index.cron Source3: ghc-doc-index.cron
Source4: ghc-doc-index Source4: ghc-doc-index
Source5: ghc
Source6: ghc-pkg
# 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
# fedora does not allow copy libraries # fedora does not allow copy libraries
@ -105,7 +103,7 @@ Obsoletes: ghc-feldspar-language < 0.4, ghc-feldspar-language-devel < 0.4, ghc-f
%if %{undefined ghc_bootstrapping} %if %{undefined ghc_bootstrapping}
BuildRequires: ghc-compiler = %{version} BuildRequires: ghc-compiler = %{version}
%endif %endif
%if 0%{?fedora} >= 20 %if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
BuildRequires: ghc-rpm-macros-extra BuildRequires: ghc-rpm-macros-extra
%else %else
BuildRequires: ghc-rpm-macros BuildRequires: ghc-rpm-macros
@ -198,11 +196,13 @@ documention.
%global ghc_version_override %{version} %global ghc_version_override %{version}
# currently only F21+ ghc-rpm-macros has ghc.attr
%if 0%{?fedora} < 21
# needs ghc_version_override for bootstrapping # needs ghc_version_override for bootstrapping
%global _use_internal_dependency_generator 0 %global _use_internal_dependency_generator 0
%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}
%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir} %global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}
%endif
%global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release} %global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release}
@ -328,6 +328,12 @@ BuildFlavour = perf
%else %else
BuildFlavour = perf-llvm BuildFlavour = perf-llvm
%endif %endif
%else
%ifnarch armv7hl armv5tel
BuildFlavour = quick-llvm
%else
BuildFlavour = quick
%endif
%endif %endif
GhcLibWays = v %{!?ghc_without_shared:dyn} %{!?without_prof:p} GhcLibWays = v %{!?ghc_without_shared:dyn} %{!?without_prof:p}
%if %{defined without_haddock} %if %{defined without_haddock}
@ -343,7 +349,6 @@ BUILD_DOCBOOK_HTML = NO
#EXTRA_HC_OPTS=-debug #EXTRA_HC_OPTS=-debug
EOF EOF
export CFLAGS="${CFLAGS:-%optflags}"
# note %%configure induces cross-build due to different target/host/build platform names # note %%configure induces cross-build due to different target/host/build platform names
# --with-gcc=%{_bindir}/gcc is to avoid ccache hardcoding problem when bootstrapping # --with-gcc=%{_bindir}/gcc is to avoid ccache hardcoding problem when bootstrapping
%ifarch ppc64le aarch64 armv7hl %ifarch ppc64le aarch64 armv7hl
@ -352,9 +357,8 @@ for i in $(find . -name config.guess -o -name config.sub) ; do
done done
autoreconf autoreconf
%endif %endif
%ifarch armv7hl armv5tel export CFLAGS="${CFLAGS:-%optflags}"
export GHC=%SOURCE5 export LDFLAGS="${LDFLAGS:-%__global_ldflags}"
%endif
./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} \
--datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} \ --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} \
@ -556,6 +560,13 @@ fi
%changelog %changelog
* Mon Nov 17 2014 Jens Petersen <petersen@redhat.com> - 7.6.3-28
- remove the build hack to switch from llvm to llvm34 (#1161049)
- use rpm internal dependency generator with ghc.attr on F21+
- fix bash-ism in ghc-doc-index (#1146733)
- do "quick" build when bootstrapping
- setup LDFLAGS
* Mon Nov 17 2014 Jens Petersen <petersen@redhat.com> - 7.6.3-27 * Mon Nov 17 2014 Jens Petersen <petersen@redhat.com> - 7.6.3-27
- use llvm34 instead of llvm-3.5 for arm (#1161049) - use llvm34 instead of llvm-3.5 for arm (#1161049)

Loading…
Cancel
Save