Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
Jens Petersen | 5d5a7a4054 | |
Jens Petersen | 8e33cc3c68 | |
Jens Petersen | 0a7718420c | |
Jens Petersen | 0e992fcbf9 | |
Jens Petersen | 25560c0601 |
141
ghc.spec
141
ghc.spec
|
@ -10,19 +10,17 @@
|
|||
#%%global ghc_bootstrapping 1
|
||||
#%%{?ghc_test}
|
||||
#%%global without_hscolour 1
|
||||
#%%global without_testsuite 1
|
||||
|
||||
# archs that use system libffi
|
||||
%global libffi_archs %{ix86} x86_64
|
||||
# archs that don't use system libffi (needs fixing)
|
||||
%global libffi_copy_archs ppc ppc64
|
||||
|
||||
# unregisterized archs
|
||||
%global unregisterised_archs ppc64 armv7hl armv5tel
|
||||
|
||||
# ghc does not output dwarf format so debuginfo is not useful
|
||||
%global debug_package %{nil}
|
||||
|
||||
%if %{undefined ghc_bootstrapping}
|
||||
%global _use_internal_dependency_generator 0
|
||||
%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}
|
||||
%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}
|
||||
%endif
|
||||
|
||||
Name: ghc
|
||||
# part of haskell-platform
|
||||
# NB make sure to rebuild ghc after a version bump to avoid ABI change problems
|
||||
|
@ -31,10 +29,10 @@ Version: 7.0.4
|
|||
# - release can only be reset if all library versions get bumped simultaneously
|
||||
# (eg for a major release)
|
||||
# - minor release numbers should be incremented monotonically
|
||||
Release: 28%{?dist}
|
||||
Release: 31.3%{?dist}
|
||||
Summary: Glasgow Haskell Compiler
|
||||
# fedora ghc has been bootstrapped on the following archs:
|
||||
#ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9 ppc64
|
||||
#ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9 ppc64 armv7hl
|
||||
ExcludeArch: sparc64 s390x
|
||||
License: BSD
|
||||
Group: Development/Languages
|
||||
|
@ -46,8 +44,6 @@ Source3: ghc-doc-index.cron
|
|||
URL: http://haskell.org/ghc/
|
||||
# introduced for f14
|
||||
Obsoletes: ghc-doc < 6.12.3-4
|
||||
# BR for lib and binlib packages
|
||||
Provides: ghc-doc = %{version}-%{release}
|
||||
# introduced for f15
|
||||
Obsoletes: ghc-libs < 7.0.1-3
|
||||
Obsoletes: ghc-dph-base < 0.5, ghc-dph-base-devel < 0.5, ghc-dph-base-prof < 0.5
|
||||
|
@ -57,15 +53,13 @@ Obsoletes: ghc-dph-prim-par < 0.5, ghc-dph-prim-par-devel < 0.5, ghc-dph-prim-pa
|
|||
Obsoletes: ghc-dph-prim-seq < 0.5, ghc-dph-prim-seq-devel < 0.5, ghc-dph-prim-seq-prof < 0.5
|
||||
Obsoletes: ghc-dph-seq < 0.5, ghc-dph-seq-devel < 0.5, ghc-dph-seq-prof < 0.5
|
||||
Obsoletes: ghc-feldspar-language < 0.4, ghc-feldspar-language-devel < 0.4, ghc-feldspar-language-prof < 0.4
|
||||
# change to ghc-compiler once backported
|
||||
BuildRequires: ghc %{!?ghc_bootstrapping: = %{version}}
|
||||
BuildRequires: ghc-rpm-macros >= 0.13.5
|
||||
BuildRequires: ghc-rpm-macros >= 0.14
|
||||
BuildRequires: gmp-devel, libffi-devel
|
||||
BuildRequires: ghc-directory-devel, ghc-process-devel, ghc-pretty-devel, ghc-containers-devel, ghc-haskell98-devel, ghc-bytestring-devel
|
||||
# for internal terminfo
|
||||
BuildRequires: ncurses-devel
|
||||
Requires: gcc
|
||||
Requires: ghc-base-devel
|
||||
# llvm is an optional dependency
|
||||
%if %{undefined without_manual}
|
||||
BuildRequires: libxslt, docbook-style-xsl
|
||||
%endif
|
||||
|
@ -78,6 +72,8 @@ BuildRequires: python
|
|||
%ifarch ppc64
|
||||
BuildRequires: autoconf
|
||||
%endif
|
||||
Requires: ghc-compiler = %{version}-%{release}
|
||||
Requires: ghc-libraries = %{version}-%{release}
|
||||
Patch1: ghc-6.12.1-gen_contents_index-haddock-path.patch
|
||||
Patch2: ghc-gen_contents_index-type-level.patch
|
||||
Patch3: ghc-gen_contents_index-cron-batch.patch
|
||||
|
@ -110,30 +106,52 @@ for the functional language Haskell. Highlights:
|
|||
- Profiling is supported, both by time/allocation and heap profiling.
|
||||
- GHC comes with core libraries, and thousands more are available on Hackage.
|
||||
|
||||
%package compiler
|
||||
Summary: GHC compiler and utilities
|
||||
Group: Development/Languages
|
||||
Requires: gcc
|
||||
Requires: ghc-base-devel
|
||||
# llvm is an optional dependency
|
||||
|
||||
%description compiler
|
||||
The package contains the GHC compiler, tools and utilities.
|
||||
|
||||
The ghc libraries are provided by ghc-devel.
|
||||
To install all of ghc, install the ghc base package.
|
||||
|
||||
%global ghc_version_override %{version}
|
||||
|
||||
%global ghc_pkg_c_deps ghc = %{ghc_version_override}-%{release}
|
||||
# needs ghc_version_override for bootstrapping
|
||||
%global _use_internal_dependency_generator 0
|
||||
%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}
|
||||
%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}
|
||||
|
||||
|
||||
%global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release}
|
||||
|
||||
%define space %(echo -n ' ')
|
||||
%define BSDHaskellReport BSD%{space}and%{space}HaskellReport
|
||||
|
||||
%if %{defined ghclibdir}
|
||||
%ghc_binlib_package Cabal 1.10.2.0
|
||||
%ghc_binlib_package array 0.3.0.2
|
||||
%ghc_binlib_package -c gmp-devel,libffi-devel base 4.3.1.0
|
||||
%ghc_binlib_package -l %BSDHaskellReport array 0.3.0.2
|
||||
%ghc_binlib_package -l %BSDHaskellReport -c gmp-devel,libffi-devel base 4.3.1.0
|
||||
%ghc_binlib_package bytestring 0.9.1.10
|
||||
%ghc_binlib_package containers 0.4.0.0
|
||||
%ghc_binlib_package directory 1.1.0.0
|
||||
%ghc_binlib_package extensible-exceptions 0.1.1.2
|
||||
%ghc_binlib_package -l %BSDHaskellReport containers 0.4.0.0
|
||||
%ghc_binlib_package -l %BSDHaskellReport directory 1.1.0.0
|
||||
%ghc_binlib_package -l %BSDHaskellReport extensible-exceptions 0.1.1.2
|
||||
%ghc_binlib_package filepath 1.2.0.0
|
||||
%define ghc_pkg_obsoletes ghc-bin-package-db-devel < 0.0.0.0-12
|
||||
%ghc_binlib_package -x ghc %{ghc_version_override}
|
||||
%ghc_binlib_package ghc %{ghc_version_override}
|
||||
%undefine ghc_pkg_obsoletes
|
||||
%ghc_binlib_package haskell2010 1.0.0.0
|
||||
%ghc_binlib_package haskell98 1.1.0.1
|
||||
%ghc_binlib_package -l HaskellReport haskell2010 1.0.0.0
|
||||
%ghc_binlib_package -l HaskellReport haskell98 1.1.0.1
|
||||
%ghc_binlib_package hpc 0.5.0.6
|
||||
%ghc_binlib_package old-locale 1.0.0.2
|
||||
%ghc_binlib_package old-time 1.0.0.6
|
||||
%ghc_binlib_package -l %BSDHaskellReport old-locale 1.0.0.2
|
||||
%ghc_binlib_package -l %BSDHaskellReport old-time 1.0.0.6
|
||||
%ghc_binlib_package pretty 1.0.1.2
|
||||
%ghc_binlib_package process 1.0.1.5
|
||||
%ghc_binlib_package random 1.0.0.3
|
||||
%ghc_binlib_package -l %BSDHaskellReport process 1.0.1.5
|
||||
%ghc_binlib_package -l %BSDHaskellReport random 1.0.0.3
|
||||
%ghc_binlib_package template-haskell 2.5.0.0
|
||||
%ghc_binlib_package time 1.2.0.3
|
||||
%ghc_binlib_package unix 2.4.2.0
|
||||
|
@ -141,15 +159,17 @@ for the functional language Haskell. Highlights:
|
|||
|
||||
%global version %{ghc_version_override}
|
||||
|
||||
%package devel
|
||||
%package libraries
|
||||
Summary: GHC development libraries meta package
|
||||
Group: Development/Libraries
|
||||
Requires: ghc = %{version}-%{release}
|
||||
Requires: ghc-compiler = %{version}-%{release}
|
||||
Obsoletes: ghc-devel < %{version}-%{release}
|
||||
Provides: ghc-devel = %{version}-%{release}
|
||||
Obsoletes: ghc-prof < %{version}-%{release}
|
||||
Provides: ghc-prof = %{version}-%{release}
|
||||
%{?ghc_packages_list:Requires: %(echo %{ghc_packages_list} | sed -e "s/\([^ ]*\)-\([^ ]*\)/ghc-\1-devel = \2-%{release},/g")}
|
||||
|
||||
%description devel
|
||||
%description libraries
|
||||
This is a meta-package for all the development library packages in GHC.
|
||||
|
||||
%prep
|
||||
|
@ -164,7 +184,7 @@ This is a meta-package for all the development library packages in GHC.
|
|||
# make sure we don't use these
|
||||
rm -r ghc-tarballs/{mingw,perl}
|
||||
# use system libffi
|
||||
%ifarch %{libffi_archs}
|
||||
%ifnarch %{libffi_copy_archs}
|
||||
%patch4 -p1 -b .libffi
|
||||
rm -r ghc-tarballs/libffi
|
||||
%endif
|
||||
|
@ -196,14 +216,10 @@ BUILD_DOCBOOK_HTML = NO
|
|||
%if %{undefined without_hscolour}
|
||||
HSCOLOUR_SRCS = NO
|
||||
%endif
|
||||
%ifarch %{libffi_archs}
|
||||
SRC_HC_OPTS += -lffi
|
||||
%ifarch %{unregisterised_archs}
|
||||
GhcUnregisterised=YES
|
||||
%endif
|
||||
%ifarch ppc64
|
||||
GhcUnregisterised=YES
|
||||
GhcWithNativeCodeGen=NO
|
||||
SplitObjs=NO
|
||||
GhcWithInterpreter=NO
|
||||
GhcNotThreaded=YES
|
||||
SRC_HC_OPTS+=-optc-mminimal-toc -optl-pthread
|
||||
SRC_CC_OPTS+=-mminimal-toc -pthread -Wa,--noexecstack
|
||||
|
@ -261,7 +277,7 @@ ls $RPM_BUILD_ROOT%{ghclibdir}/libHS*.so >> ghc-base.files
|
|||
sed -i -e "s|^$RPM_BUILD_ROOT||g" ghc-base.files
|
||||
%endif
|
||||
ls -d $RPM_BUILD_ROOT%{ghclibdir}/libHS*.a $RPM_BUILD_ROOT%{ghclibdir}/package.conf.d/builtin_*.conf $RPM_BUILD_ROOT%{ghclibdir}/include >> ghc-base-devel.files
|
||||
%ifnarch %{libffi_archs}
|
||||
%ifarch %{libffi_copy_archs}
|
||||
echo $RPM_BUILD_ROOT%{ghclibdir}/HSffi.o >> ghc-base-devel.files
|
||||
%endif
|
||||
sed -i -e "s|^$RPM_BUILD_ROOT||g" ghc-base-devel.files
|
||||
|
@ -308,7 +324,7 @@ rm testghc/*
|
|||
make -C testsuite/tests/ghc-regress fast
|
||||
%endif
|
||||
|
||||
%post
|
||||
%post compiler
|
||||
# Alas, GHC, Hugs, and nhc all come with different set of tools in
|
||||
# addition to a runFOO:
|
||||
#
|
||||
|
@ -326,21 +342,22 @@ update-alternatives --install %{_bindir}/runhaskell runhaskell \
|
|||
update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
|
||||
%{_bindir}/hsc2hs-ghc 500
|
||||
|
||||
%preun
|
||||
%preun compiler
|
||||
if [ "$1" = 0 ]; then
|
||||
update-alternatives --remove runhaskell %{_bindir}/runghc
|
||||
update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
|
||||
%files compiler
|
||||
%doc ANNOUNCE HACKING LICENSE README
|
||||
%{_bindir}/*
|
||||
%dir %{ghclibdir}
|
||||
%{ghclibdir}/extra-gcc-opts
|
||||
%{ghclibdir}/ghc
|
||||
%{ghclibdir}/ghc-pkg
|
||||
%ifnarch ppc64
|
||||
%ifnarch %{unregisterised_archs}
|
||||
%{ghclibdir}/ghc-asm
|
||||
%{ghclibdir}/ghc-split
|
||||
%endif
|
||||
|
@ -381,10 +398,42 @@ fi
|
|||
%{_localstatedir}/lib/ghc
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
%files libraries
|
||||
|
||||
%changelog
|
||||
* Fri Nov 11 2011 Jens Petersen <petersen@redhat.com> - 7.0.4-31.3
|
||||
- the post and postun scripts are now for the compiler subpackage
|
||||
|
||||
* Wed Nov 2 2011 Jens Petersen <petersen@redhat.com> - 7.0.4-31.2
|
||||
- rename ghc-devel metapackage to ghc-libraries
|
||||
- require ghc-rpm-macros-0.14
|
||||
- move compiler and tools to ghc-compiler
|
||||
- the ghc base package is now a metapackage that installs all of ghc,
|
||||
ie ghc-compiler and ghc-devel (#750317)
|
||||
- drop ghc-doc provides
|
||||
- add HaskellReport license tag to some of the library subpackages
|
||||
which contain some code from the Haskell Reports
|
||||
|
||||
* Thu Oct 20 2011 Jens Petersen <petersen@redhat.com> - 7.0.4-31.1
|
||||
- setup ghc-deps.sh after ghc_version_override for bootstrapping
|
||||
- add armv5tel (ported by Henrik Nordström)
|
||||
- also use ghc-deps.sh when bootstrapping (ghc-rpm-macros-0.13.13)
|
||||
- replace libffi_archs with libffi_copy_archs for ppc just for now
|
||||
- include the ghc (ghci) library in ghc-devel (Narasim)
|
||||
|
||||
* Fri Sep 30 2011 Jens Petersen <petersen@redhat.com> - 7.0.4-31
|
||||
- build with ghc-rpm-macros >= 0.13.11 to fix provides and obsoletes versions
|
||||
in library devel subpackages
|
||||
|
||||
* Thu Sep 29 2011 Jens Petersen <petersen@redhat.com> - 7.0.4-30
|
||||
- no need to specify -lffi in build.mk (Henrik Nordström)
|
||||
|
||||
* Wed Sep 28 2011 Jens Petersen <petersen@redhat.com> - 7.0.4-29
|
||||
- port to armv7hl by Henrik Nordström (#741725)
|
||||
|
||||
* Tue Sep 27 2011 Jens Petersen <petersen@redhat.com> - 7.0.4-28.1
|
||||
- rebuild against libffi-3.0.10
|
||||
|
||||
* Wed Sep 14 2011 Jens Petersen <petersen@redhat.com> - 7.0.4-28
|
||||
- setup ghc-deps.sh when not bootstrapping!
|
||||
|
||||
|
|
Loading…
Reference in New Issue