|
|
|
@ -1,70 +1,90 @@
|
|
|
|
|
# shared haskell library support for x86* archs from version 6.12
|
|
|
|
|
# Shared haskell libraries are supported for x86* archs
|
|
|
|
|
# (disabled for other archs in ghc-rpm-macros)
|
|
|
|
|
|
|
|
|
|
## default enabled options ##
|
|
|
|
|
%bcond_without doc
|
|
|
|
|
# test builds can made faster and smaller by disabling profiled libraries
|
|
|
|
|
# (currently libHSrts_thr_p.a breaks no prof build)
|
|
|
|
|
%bcond_without prof
|
|
|
|
|
# build xml manuals (users_guide, etc)
|
|
|
|
|
%bcond_without manual
|
|
|
|
|
# run testsuite
|
|
|
|
|
%bcond_without testsuite
|
|
|
|
|
# include colored html src
|
|
|
|
|
%bcond_without hscolour
|
|
|
|
|
# use system libffi
|
|
|
|
|
%ifarch %{ix86} x86_64
|
|
|
|
|
%bcond_without libffi
|
|
|
|
|
%endif
|
|
|
|
|
# 7.0.2 shipped broken testsuite
|
|
|
|
|
%global without_testsuite 1
|
|
|
|
|
|
|
|
|
|
## default disabled options ##
|
|
|
|
|
# quick build profile
|
|
|
|
|
%bcond_with quick
|
|
|
|
|
# To bootstrap a new version of ghc, uncomment the following:
|
|
|
|
|
#%%global ghc_bootstrapping 1
|
|
|
|
|
#%%{?ghc_bootstrap}
|
|
|
|
|
#%%global without_hscolour 1
|
|
|
|
|
|
|
|
|
|
# debuginfo is not useful for ghc
|
|
|
|
|
# To do a test build instead with shared libs, uncomment the following:
|
|
|
|
|
#%%global ghc_bootstrapping 1
|
|
|
|
|
#%%{?ghc_test}
|
|
|
|
|
#%%global without_hscolour 1
|
|
|
|
|
#%%global without_testsuite 1
|
|
|
|
|
|
|
|
|
|
# archs that use system libffi (needs fixing for secondary archs)
|
|
|
|
|
%global libffi_archs %{ix86} x86_64
|
|
|
|
|
|
|
|
|
|
# unregisterized archs
|
|
|
|
|
%global unregisterised_archs ppc64 armv7hl armv5tel
|
|
|
|
|
|
|
|
|
|
# ghc does not output dwarf format so debuginfo is not useful
|
|
|
|
|
%global debug_package %{nil}
|
|
|
|
|
|
|
|
|
|
# workaround http://hackage.haskell.org/trac/ghc/ticket/5004
|
|
|
|
|
# override /usr/lib/rpm/redhat/macros
|
|
|
|
|
%global __os_install_post \
|
|
|
|
|
/usr/lib/rpm/redhat/brp-compress \
|
|
|
|
|
%{!?__debug_package:\
|
|
|
|
|
/usr/lib/rpm/redhat/brp-strip %{__strip} \
|
|
|
|
|
/usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
|
|
|
|
|
} \
|
|
|
|
|
# Disable static stripping since it breaks loading libHSghc.a for ghc 7.0.2 and 7.0.3\
|
|
|
|
|
# /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
|
|
|
|
|
/usr/lib/rpm/brp-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build} \
|
|
|
|
|
/usr/lib/rpm/redhat/brp-python-hardlink \
|
|
|
|
|
%{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars} \
|
|
|
|
|
%{nil}
|
|
|
|
|
|
|
|
|
|
Name: ghc
|
|
|
|
|
# haskell-platform-2011.1.0.0
|
|
|
|
|
# haskell-platform-2011.2.0.0
|
|
|
|
|
# NB make sure to rebuild ghc after a version bump to avoid ABI change problems
|
|
|
|
|
Version: 7.0.1
|
|
|
|
|
# can't be reset - used by versioned library subpackages
|
|
|
|
|
Release: 11%{?dist}
|
|
|
|
|
Summary: Glasgow Haskell Compilation system
|
|
|
|
|
# fedora ghc has only been bootstrapped on the following archs:
|
|
|
|
|
ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9
|
|
|
|
|
Version: 7.0.2
|
|
|
|
|
# Since library subpackages are versioned:
|
|
|
|
|
# - 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: 16.8%{?dist}
|
|
|
|
|
Summary: Glasgow Haskell Compiler
|
|
|
|
|
ExclusiveArch: %{ghc_arches}
|
|
|
|
|
License: BSD
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
|
|
|
|
|
%if %{with testsuite}
|
|
|
|
|
%if %{undefined without_testsuite}
|
|
|
|
|
Source2: http://www.haskell.org/ghc/dist/%{version}/testsuite-%{version}.tar.bz2
|
|
|
|
|
%endif
|
|
|
|
|
Source3: ghc-doc-index.cron
|
|
|
|
|
URL: http://haskell.org/ghc/
|
|
|
|
|
# introduced for f14
|
|
|
|
|
Obsoletes: ghc-doc < 6.12.3-4
|
|
|
|
|
Provides: ghc-doc = %{version}-%{release}
|
|
|
|
|
# introduced for f11
|
|
|
|
|
Obsoletes: haddock < 2.4.2-3, ghc-haddock-devel < 2.4.2-3
|
|
|
|
|
Obsoletes: ghc-haddock-doc < 2.4.2-3
|
|
|
|
|
# introduced for f15
|
|
|
|
|
Obsoletes: ghc-libs < 7.0.1-3
|
|
|
|
|
BuildRequires: ghc, ghc-rpm-macros >= 0.11.10
|
|
|
|
|
Obsoletes: ghc-dph-base < 0.5, ghc-dph-base-devel < 0.5, ghc-dph-base-prof < 0.5
|
|
|
|
|
Obsoletes: ghc-dph-par < 0.5, ghc-dph-par-devel < 0.5, ghc-dph-par-prof < 0.5
|
|
|
|
|
Obsoletes: ghc-dph-prim-interface < 0.5, ghc-dph-prim-interface-devel < 0.5, ghc-dph-interface-prim-prof < 0.5
|
|
|
|
|
Obsoletes: ghc-dph-prim-par < 0.5, ghc-dph-prim-par-devel < 0.5, ghc-dph-prim-par-prof < 0.5
|
|
|
|
|
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
|
|
|
|
|
BuildRequires: ghc %{!?ghc_bootstrapping: = %{version}}
|
|
|
|
|
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 %{with manual}
|
|
|
|
|
%if %{undefined without_manual}
|
|
|
|
|
BuildRequires: libxslt, docbook-style-xsl
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with hscolour}
|
|
|
|
|
%if %{undefined without_haddock} && %{undefined without_hscolour}
|
|
|
|
|
BuildRequires: hscolour
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with testsuite}
|
|
|
|
|
%if %{undefined without_testsuite}
|
|
|
|
|
BuildRequires: python
|
|
|
|
|
%endif
|
|
|
|
|
%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
|
|
|
|
@ -73,67 +93,104 @@ Patch4: ghc-use-system-libffi.patch
|
|
|
|
|
# (see http://hackage.haskell.org/trac/hackage/ticket/600)
|
|
|
|
|
Patch5: Cabal-option-executable-dynamic.patch
|
|
|
|
|
Patch6: ghc-fix-linking-on-sparc.patch
|
|
|
|
|
Patch7: ghc-ppc64-pthread.patch
|
|
|
|
|
# http://hackage.haskell.org/trac/ghc/ticket/4999
|
|
|
|
|
Patch8: ghc-powerpc-linker-mmap.patch
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
GHC is a state-of-the-art programming suite for Haskell, a purely
|
|
|
|
|
functional programming language. It includes an optimizing compiler
|
|
|
|
|
generating good code for a variety of platforms, together with an
|
|
|
|
|
interactive system for convenient, quick development. The
|
|
|
|
|
distribution includes space and time profiling facilities, a large
|
|
|
|
|
collection of libraries, and support for various language
|
|
|
|
|
extensions, including concurrency, exceptions, and a foreign language
|
|
|
|
|
interface.
|
|
|
|
|
GHC is a state-of-the-art, open source, compiler and interactive environment
|
|
|
|
|
for the functional language Haskell. Highlights:
|
|
|
|
|
|
|
|
|
|
- GHC supports the entire Haskell 2010 language plus various extensions.
|
|
|
|
|
- GHC has particularly good support for concurrency and parallelism,
|
|
|
|
|
including support for Software Transactional Memory (STM).
|
|
|
|
|
- GHC generates fast code, particularly for concurrent programs
|
|
|
|
|
(check the results on the "Computer Language Benchmarks Game").
|
|
|
|
|
- GHC works on several platforms including Windows, Mac, Linux,
|
|
|
|
|
most varieties of Unix, and several different processor architectures.
|
|
|
|
|
- GHC has extensive optimisation capabilities,
|
|
|
|
|
including inter-module optimisation.
|
|
|
|
|
- GHC compiles Haskell code either directly to native code or using LLVM
|
|
|
|
|
as a back-end. GHC can also generate C code as an intermediate target for
|
|
|
|
|
porting to new platforms. The interactive environment compiles Haskell to
|
|
|
|
|
bytecode, and supports execution of mixed bytecode/compiled programs.
|
|
|
|
|
- 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
|
|
|
|
|
# added in f14
|
|
|
|
|
Obsoletes: ghc-doc < 6.12.3-4
|
|
|
|
|
# BR for f15 lib and binlib packages
|
|
|
|
|
Provides: ghc-doc = %{version}-%{release}
|
|
|
|
|
# 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}
|
|
|
|
|
|
|
|
|
|
%if 0%{?ghclibdir:1}
|
|
|
|
|
%ghc_binlib_package Cabal 1.10.0.0
|
|
|
|
|
%ghc_binlib_package array 0.3.0.2
|
|
|
|
|
%ghc_binlib_package -c gmp-devel,libffi-devel base 4.3.0.0
|
|
|
|
|
%ghc_binlib_package bin-package-db 0.0.0.0
|
|
|
|
|
%ghc_binlib_package bytestring 0.9.1.8
|
|
|
|
|
%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
|
|
|
|
|
# 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.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 -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
|
|
|
|
|
%ghc_binlib_package -x ghc %{ghc_version_override}
|
|
|
|
|
%ghc_binlib_package haskell2010 1.0.0.0
|
|
|
|
|
%ghc_binlib_package haskell98 1.1.0.0
|
|
|
|
|
%define ghc_pkg_obsoletes ghc-bin-package-db-devel < 0.0.0.0-12
|
|
|
|
|
%ghc_binlib_package ghc %{ghc_version_override}
|
|
|
|
|
%undefine ghc_pkg_obsoletes
|
|
|
|
|
%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.4
|
|
|
|
|
%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.1.0
|
|
|
|
|
%ghc_binlib_package unix 2.4.2.0
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%global version %{ghc_version_override}
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
%package libraries
|
|
|
|
|
Summary: GHC development libraries meta package
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
%{?ghc_packages_list:Requires: %(echo %{ghc_packages_list} | sed -e "s/\([^ ]*\)-\([^ ]*\)/ghc-\1-devel = \2,/g")}
|
|
|
|
|
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}
|
|
|
|
|
# since f15
|
|
|
|
|
Obsoletes: ghc-libs < 7.0.1-3
|
|
|
|
|
%{?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.
|
|
|
|
|
|
|
|
|
|
%if %{with prof}
|
|
|
|
|
%package prof
|
|
|
|
|
Summary: GHC profiling libraries meta-package
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
|
%{?ghc_packages_list:Requires: %(echo %{ghc_packages_list} | sed -e "s/\([^ ]*\)-\([^ ]*\)/ghc-\1-prof = \2,/g")}
|
|
|
|
|
Obsoletes: ghc-haddock-prof < 2.4.2-3
|
|
|
|
|
|
|
|
|
|
%description prof
|
|
|
|
|
This is a meta-package for all the profiling library packages in GHC.
|
|
|
|
|
They should be installed when GHC's profiling subsystem is needed.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{name}-%{version} %{?with_testsuite:-b2}
|
|
|
|
|
%setup -q -n %{name}-%{version} %{!?without_testsuite:-b2}
|
|
|
|
|
# absolute haddock path (was for html/libraries -> libraries)
|
|
|
|
|
%patch1 -p1 -b .orig
|
|
|
|
|
# type-level too big so skip it in gen_contents_index
|
|
|
|
@ -141,10 +198,10 @@ They should be installed when GHC's profiling subsystem is needed.
|
|
|
|
|
# disable gen_contents_index when not --batch for cron
|
|
|
|
|
%patch3 -p1
|
|
|
|
|
|
|
|
|
|
# use system libraries
|
|
|
|
|
# make sure we don't use these
|
|
|
|
|
rm -r ghc-tarballs/{mingw,perl}
|
|
|
|
|
# use system libffi
|
|
|
|
|
%if %{with libffi}
|
|
|
|
|
%ifarch %{libffi_archs}
|
|
|
|
|
%patch4 -p1 -b .libffi
|
|
|
|
|
rm -r ghc-tarballs/libffi
|
|
|
|
|
%endif
|
|
|
|
@ -153,40 +210,53 @@ rm -r ghc-tarballs/libffi
|
|
|
|
|
|
|
|
|
|
%patch6 -p1 -b .sparclinking
|
|
|
|
|
|
|
|
|
|
%ifarch ppc64
|
|
|
|
|
%patch7 -p1 -b .pthread
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%ifarch ppc ppc64
|
|
|
|
|
%patch8 -p1 -b .mmap
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# http://hackage.haskell.org/trac/ghc/wiki/Platforms
|
|
|
|
|
# cf https://github.com/gentoo-haskell/gentoo-haskell/tree/master/dev-lang/ghc
|
|
|
|
|
cat > mk/build.mk << EOF
|
|
|
|
|
GhcLibWays = v %{?with_prof:p} %{!?ghc_without_shared:dyn}
|
|
|
|
|
%if %{without doc}
|
|
|
|
|
GhcLibWays = v %{!?ghc_without_shared:dyn} %{!?without_prof:p}
|
|
|
|
|
%if %{defined without_haddock}
|
|
|
|
|
HADDOCK_DOCS = NO
|
|
|
|
|
%endif
|
|
|
|
|
%if %{without manual}
|
|
|
|
|
%if %{defined without_manual}
|
|
|
|
|
BUILD_DOCBOOK_HTML = NO
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with quick}
|
|
|
|
|
SRC_HC_OPTS = -H64m -O0 -fasm
|
|
|
|
|
GhcStage1HcOpts = -O -fasm
|
|
|
|
|
GhcStage2HcOpts = -O0 -fasm
|
|
|
|
|
GhcLibHcOpts = -O0 -fasm
|
|
|
|
|
SplitObjs = NO
|
|
|
|
|
%endif
|
|
|
|
|
%if %{without hscolour}
|
|
|
|
|
%if %{undefined without_hscolour}
|
|
|
|
|
HSCOLOUR_SRCS = NO
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with libffi}
|
|
|
|
|
SRC_HC_OPTS += -lffi
|
|
|
|
|
%ifarch %{unregisterised_archs}
|
|
|
|
|
GhcUnregisterised=YES
|
|
|
|
|
%endif
|
|
|
|
|
%ifarch ppc64
|
|
|
|
|
GhcNotThreaded=YES
|
|
|
|
|
SRC_HC_OPTS+=-optc-mminimal-toc -optl-pthread
|
|
|
|
|
SRC_CC_OPTS+=-mminimal-toc -pthread -Wa,--noexecstack
|
|
|
|
|
%endif
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
%ifarch ppc64
|
|
|
|
|
autoreconf
|
|
|
|
|
%endif
|
|
|
|
|
export CFLAGS="${CFLAGS:-%optflags}"
|
|
|
|
|
# specify gcc to avoid problems when bootstrapping with ccache
|
|
|
|
|
./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} \
|
|
|
|
|
--bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
|
|
|
|
|
--datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} \
|
|
|
|
|
--libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \
|
|
|
|
|
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
|
|
|
|
|
%{!?ghc_without_shared:--enable-shared}
|
|
|
|
|
--with-gcc=%{_bindir}/gcc
|
|
|
|
|
|
|
|
|
|
# 4 cpus or more sometimes breaks build
|
|
|
|
|
[ -z "$RPM_BUILD_NCPUS" ] && RPM_BUILD_NCPUS=$(/usr/bin/getconf _NPROCESSORS_ONLN)
|
|
|
|
|
# >4 cpus tends to break build
|
|
|
|
|
[ -z "$RPM_BUILD_NCPUS" ] && RPM_BUILD_NCPUS=$(%{_bindir}/getconf _NPROCESSORS_ONLN)
|
|
|
|
|
[ "$RPM_BUILD_NCPUS" -gt 4 ] && RPM_BUILD_NCPUS=4
|
|
|
|
|
make -j$RPM_BUILD_NCPUS
|
|
|
|
|
|
|
|
|
@ -200,29 +270,33 @@ ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")
|
|
|
|
|
echo "%doc libraries/$name/LICENSE" >> ghc-$name%{?ghc_without_shared:-devel}.files
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%ghc_gen_filelists bin-package-db 0.0.0.0
|
|
|
|
|
%ghc_gen_filelists ghc %{ghc_version_override}
|
|
|
|
|
%ghc_gen_filelists ghc-binary 0.5.0.2
|
|
|
|
|
%ghc_gen_filelists ghc-prim 0.2.0.0
|
|
|
|
|
%ghc_gen_filelists integer-gmp 0.2.0.2
|
|
|
|
|
%ghc_gen_filelists integer-gmp 0.2.0.3
|
|
|
|
|
|
|
|
|
|
%define merge_filelist()\
|
|
|
|
|
%if %{undefined ghc_without_shared}\
|
|
|
|
|
cat ghc-%1.files >> ghc-%2.files\
|
|
|
|
|
%endif\
|
|
|
|
|
cat ghc-%1-devel.files >> ghc-%2-devel.files\
|
|
|
|
|
cat ghc-%1-prof.files >> ghc-%2-prof.files\
|
|
|
|
|
cp -p libraries/%1/LICENSE libraries/LICENSE.%1\
|
|
|
|
|
echo "%doc libraries/LICENSE.%1" >> ghc-%2.files
|
|
|
|
|
|
|
|
|
|
%merge_filelist integer-gmp base
|
|
|
|
|
%merge_filelist ghc-prim base
|
|
|
|
|
%merge_filelist ghc-binary bin-package-db
|
|
|
|
|
%merge_filelist ghc-binary ghc
|
|
|
|
|
%merge_filelist bin-package-db ghc
|
|
|
|
|
|
|
|
|
|
%if %{undefined ghc_without_shared}
|
|
|
|
|
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 %{!?with_libffi:$RPM_BUILD_ROOT%{ghclibdir}/HSffi.o} $RPM_BUILD_ROOT%{ghclibdir}/package.conf.d/builtin_*.conf $RPM_BUILD_ROOT%{ghclibdir}/include >> ghc-base-devel.files
|
|
|
|
|
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}
|
|
|
|
|
echo $RPM_BUILD_ROOT%{ghclibdir}/HSffi.o >> ghc-base-devel.files
|
|
|
|
|
%endif
|
|
|
|
|
sed -i -e "s|^$RPM_BUILD_ROOT||g" ghc-base-devel.files
|
|
|
|
|
|
|
|
|
|
# these are handled as alternatives
|
|
|
|
@ -236,7 +310,7 @@ done
|
|
|
|
|
|
|
|
|
|
%ghc_strip_dynlinked
|
|
|
|
|
|
|
|
|
|
%if %{with doc}
|
|
|
|
|
%if %{undefined without_haddock}
|
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.hourly
|
|
|
|
|
install -p --mode=755 %SOURCE3 ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.hourly/ghc-doc-index
|
|
|
|
|
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/lib/ghc
|
|
|
|
@ -250,7 +324,7 @@ mkdir testghc
|
|
|
|
|
echo 'main = putStrLn "Foo"' > testghc/foo.hs
|
|
|
|
|
inplace/bin/ghc-stage2 testghc/foo.hs -o testghc/foo
|
|
|
|
|
[ "$(testghc/foo)" = "Foo" ]
|
|
|
|
|
# don't seem to work inplace:
|
|
|
|
|
# doesn't seem to work inplace:
|
|
|
|
|
#[ "$(inplace/bin/runghc testghc/foo.hs)" = "Foo" ]
|
|
|
|
|
rm testghc/*
|
|
|
|
|
echo 'main = putStrLn "Foo"' > testghc/foo.hs
|
|
|
|
@ -263,11 +337,11 @@ inplace/bin/ghc-stage2 testghc/foo.hs -o testghc/foo -dynamic
|
|
|
|
|
[ "$(testghc/foo)" = "Foo" ]
|
|
|
|
|
rm testghc/*
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with testsuite}
|
|
|
|
|
%if %{undefined without_testsuite}
|
|
|
|
|
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:
|
|
|
|
|
#
|
|
|
|
@ -285,35 +359,28 @@ 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
|
|
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
|
# (posttrans to make sure any old libs and docs have been removed first)
|
|
|
|
|
%ghc_pkg_recache
|
|
|
|
|
%ghc_reindex_haddock
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
|
|
|
|
|
%files compiler
|
|
|
|
|
%doc ANNOUNCE HACKING LICENSE README
|
|
|
|
|
%{_bindir}/*
|
|
|
|
|
%dir %{ghclibdir}
|
|
|
|
|
%{ghclibdir}/extra-gcc-opts
|
|
|
|
|
%{ghclibdir}/ghc
|
|
|
|
|
%{ghclibdir}/ghc-asm
|
|
|
|
|
%{ghclibdir}/ghc-pkg
|
|
|
|
|
%ifnarch %{unregisterised_archs}
|
|
|
|
|
%{ghclibdir}/ghc-asm
|
|
|
|
|
%{ghclibdir}/ghc-split
|
|
|
|
|
%endif
|
|
|
|
|
%{ghclibdir}/ghc-usage.txt
|
|
|
|
|
%{ghclibdir}/ghci-usage.txt
|
|
|
|
|
%{ghclibdir}/hsc2hs
|
|
|
|
|
%if %{with doc}
|
|
|
|
|
%{ghclibdir}/haddock
|
|
|
|
|
%{ghclibdir}/html
|
|
|
|
|
%{ghclibdir}/latex
|
|
|
|
|
%endif
|
|
|
|
|
%dir %{ghclibdir}/package.conf.d
|
|
|
|
|
%ghost %{ghclibdir}/package.conf.d/package.cache
|
|
|
|
|
%{ghclibdir}/runghc
|
|
|
|
@ -322,9 +389,12 @@ fi
|
|
|
|
|
%{_mandir}/man1/ghc.*
|
|
|
|
|
%dir %{_docdir}/ghc
|
|
|
|
|
%dir %{ghcdocbasedir}
|
|
|
|
|
%if %{with doc}
|
|
|
|
|
%if %{undefined without_haddock}
|
|
|
|
|
%{ghclibdir}/haddock
|
|
|
|
|
%{ghclibdir}/html
|
|
|
|
|
%{ghclibdir}/latex
|
|
|
|
|
%{ghcdocbasedir}/html
|
|
|
|
|
%if %{with manual}
|
|
|
|
|
%if %{undefined without_manual}
|
|
|
|
|
%{ghcdocbasedir}/Cabal
|
|
|
|
|
%{ghcdocbasedir}/haddock
|
|
|
|
|
%{ghcdocbasedir}/users_guide
|
|
|
|
@ -345,15 +415,89 @@ fi
|
|
|
|
|
%{_localstatedir}/lib/ghc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
|
|
|
|
|
%if %{with prof}
|
|
|
|
|
%files prof
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%endif
|
|
|
|
|
%files libraries
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Sat Nov 12 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-16.8
|
|
|
|
|
- build with ghc-rpm-macros-0.14 for ghc-compiler
|
|
|
|
|
|
|
|
|
|
* Fri Nov 11 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-16.7
|
|
|
|
|
- move ghc-doc and ghc-libs obsoletes
|
|
|
|
|
- the post and postun scripts are now for the compiler subpackage
|
|
|
|
|
- rename ghc-devel metapackage to ghc-libraries
|
|
|
|
|
- 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)
|
|
|
|
|
- add HaskellReport license tag to some of the library subpackages
|
|
|
|
|
which contain some code from the Haskell Reports
|
|
|
|
|
|
|
|
|
|
* Mon Oct 24 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-16.6
|
|
|
|
|
- setup ghc-deps.sh after ghc_version_override for bootstrapping
|
|
|
|
|
- add armv5tel (ported by Henrik Nordström)
|
|
|
|
|
- use ghc_arches
|
|
|
|
|
- also use ghc-deps.sh when bootstrapping (ghc-rpm-macros-0.13.13)
|
|
|
|
|
- include the ghc (ghci) library in ghc-devel (Narasim)
|
|
|
|
|
|
|
|
|
|
* Fri Sep 30 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-16.5
|
|
|
|
|
- build with ghc-rpm-macros >= 0.13.11 to fix provides and obsoletes versions
|
|
|
|
|
in library devel subpackages
|
|
|
|
|
- no need to specify -lffi in build.mk (Henrik Nordström)
|
|
|
|
|
|
|
|
|
|
* Wed Sep 28 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-16.4
|
|
|
|
|
- port to armv7hl by Henrik Nordström (#741725)
|
|
|
|
|
- setup dependency generation with ghc-deps.sh since it was moved to
|
|
|
|
|
ghc_lib_install in ghc-rpm-macros
|
|
|
|
|
- BR same ghc version unless ghc_bootstrapping defined
|
|
|
|
|
- add libffi_archs
|
|
|
|
|
- drop the quick build profile
|
|
|
|
|
- put dyn before p in GhcLibWays
|
|
|
|
|
- explain new bootstrapping mode using ghc_bootstrap (ghc-rpm-macros-0.13.5)
|
|
|
|
|
- update summary and description
|
|
|
|
|
- merge prof subpackages into the devel subpackages with ghc-rpm-macros-0.13
|
|
|
|
|
|
|
|
|
|
* Sat May 21 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-16.3
|
|
|
|
|
- obsolete dph libraries and feldspar-language
|
|
|
|
|
- configure with /usr/bin/gcc to help bootstrapping to new archs
|
|
|
|
|
(otherwise ccache tends to get hardcoded as gcc, which not in koji)
|
|
|
|
|
- posttrans scriplet for ghc_pkg_recache is redundant
|
|
|
|
|
- make devel and prof meta packages require libs with release
|
|
|
|
|
- make ghc-*-devel subpackages require ghc with release
|
|
|
|
|
|
|
|
|
|
* Sun May 01 2011 Jiri Skala <jskala@redhat.com> - 7.0.2-16.2
|
|
|
|
|
- fixes path to gcc on ppc64 arch
|
|
|
|
|
|
|
|
|
|
* Tue Apr 26 2011 Jiri Skala <jskala@redhat.com> - 7.0.2-16.1
|
|
|
|
|
- bootstrap to ppc64
|
|
|
|
|
- upstream ghc-powerpc-linker-mmap.patch for ppc64
|
|
|
|
|
|
|
|
|
|
* Fri Apr 1 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-16
|
|
|
|
|
- provides ghc-doc again: it is still a buildrequires for libraries
|
|
|
|
|
- ghc-prof now requires ghc-devel
|
|
|
|
|
- ghc-devel now requires ghc explicitly
|
|
|
|
|
|
|
|
|
|
* Wed Mar 30 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-15
|
|
|
|
|
- do not strip static libs since it breaks ghci-7.0.2 loading libHSghc.a
|
|
|
|
|
(see http://hackage.haskell.org/trac/ghc/ticket/5004)
|
|
|
|
|
- no longer provide ghc-doc
|
|
|
|
|
- no longer obsolete old haddock
|
|
|
|
|
|
|
|
|
|
* Tue Mar 29 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-14
|
|
|
|
|
- fix back missing LICENSE files in library subpackages
|
|
|
|
|
- drop ghc_reindex_haddock from install script
|
|
|
|
|
|
|
|
|
|
* Fri Mar 25 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-13
|
|
|
|
|
- rebuild against 7.0.2
|
|
|
|
|
|
|
|
|
|
* Fri Mar 25 2011 Jens Petersen <petersen@redhat.com> - 7.0.2-12
|
|
|
|
|
- update to 7.0.2 release
|
|
|
|
|
- disable broken testsuite
|
|
|
|
|
|
|
|
|
|
* Wed Mar 16 2011 Jens Petersen <petersen@redhat.com> - 7.0.1-11.2
|
|
|
|
|
- fix the bin-package-db obsoletes with ghc-rpm-macros-0.11.12
|
|
|
|
|
|
|
|
|
|
* Wed Mar 9 2011 Jens Petersen <petersen@redhat.com> - 7.0.1-11.1
|
|
|
|
|
- move bin-package-db into ghc-ghc
|
|
|
|
|
|
|
|
|
|
* Wed Feb 23 2011 Fabio M. Di Nitto <fdinitto@redhat.com> 7.0.1-11
|
|
|
|
|
- enable build on sparcv9
|
|
|
|
|
- add ghc-fix-linking-on-sparc.patch to fix ld being called
|
|
|
|
|