Compare commits

...

19 Commits
master ... f15

Author SHA1 Message Date
Jens Petersen aee50d916a build with ghc-rpm-macros-0.14 for ghc-compiler 2011-11-12 15:14:38 +09:00
Jens Petersen 273f23e845 backport ghc-compiler, ghc-libraries, and HaskellReport changes 2011-11-11 19:12:09 +09:00
Jens Petersen da5d953402 add ghci lib to ghc-devel; armv5tel port; ues ghc-deps.sh also for bootstrap 2011-10-24 10:41:16 +09:00
Jens Petersen 1144d1bd3a use ghc-rpm-macros-0.13.11, and drop -lffi 2011-09-30 16:20:37 +09:00
Jens Petersen 3e5ca10542 backport latest packaging from f16/f17: drop prof subpackages and better macros
- 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
2011-09-28 14:28:58 +09:00
Jens Petersen e5780560de obsolete dph* and feldspar-language; tighten inter-subpackage requires with release
- 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
2011-05-21 23:39:19 +09:00
Jens Petersen 6773b65954 replace hscolour bcond by without_hscolour like in ghc-rpm-macros 2011-05-06 16:30:46 +09:00
Jiri Skala 2e56512f02 fixes path to gcc on ppc64 arch 2011-05-05 10:06:14 +02:00
Jens Petersen 0e03e01b23 apply the powerpc linker patch also to ppc 2011-04-27 16:34:27 +09:00
Jens Petersen a173f9cd1f branch release number for f15 2011-04-26 17:52:59 +09:00
Jens Petersen 3e0a27e42c bootstrap for ppc64 by Jiri Skala 2011-04-26 17:49:38 +09:00
Jens Petersen 2dedb98488 provides ghc-doc again; ghc-prof requires ghc-devel; ghc-devel requires ghc 2011-04-01 18:52:41 +09:00
Jens Petersen 8127ab5d2a dont strip static libs; no longer provide ghc-doc nor obsolete haddock
- Static stripping currently breaks ghci loading libHSghc.a
  see http://hackage.haskell.org/trac/ghc/ticket/5004
2011-03-31 20:24:56 +09:00
Jens Petersen c9692d8af1 bring back LICENSE files to library subpackages and drop ghc_reindex_haddock 2011-03-29 12:00:59 +09:00
Jens Petersen 9e4cbe6bfb rebuild against 7.0.2 2011-03-25 14:40:36 +09:00
Jens Petersen 86d7877383 also update ghc-use-system-libffi.patch 2011-03-25 13:41:22 +09:00
Jens Petersen a427fa2d4b backport ghc-7.0.2 from f16 rawhide for haskell-platform-2011.2.0.0 2011-03-25 11:45:54 +09:00
Jens Petersen dd086356f4 fix the bin-package-db obsoletes with ghc-rpm-macros-0.11.12 2011-03-16 17:30:53 +09:00
Jens Petersen 6af26d147c move bin-package-db into ghc-ghc 2011-03-09 17:44:19 +09:00
6 changed files with 332 additions and 136 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ ghc-6.12.3-src.tar.bz2
testsuite-6.12.3.tar.bz2
/ghc-7.0.1-src.tar.bz2
/testsuite-7.0.1.tar.bz2
/ghc-7.0.2-src.tar.bz2

View File

@ -0,0 +1,34 @@
diff -up ghc-7.0.2/rts/Linker.c.fix-powerpc ghc-7.0.2/rts/Linker.c
--- ghc-7.0.2/rts/Linker.c.fix-powerpc 2011-02-28 19:10:08.000000000 +0100
+++ ghc-7.0.2/rts/Linker.c 2011-04-25 22:20:10.781092305 +0200
@@ -70,11 +70,12 @@
#include <sys/wait.h>
#endif
-#if defined(linux_HOST_OS ) || defined(freebsd_HOST_OS) || \
- defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS ) || \
- defined(openbsd_HOST_OS ) || \
- ( defined(darwin_HOST_OS ) && !defined(powerpc_HOST_ARCH) )
-/* Don't use mmap on powerpc-apple-darwin as mmap doesn't support
+#if !defined(powerpc_HOST_ARCH) && \
+ ( defined(linux_HOST_OS ) || defined(freebsd_HOST_OS) || \
+ defined(dragonfly_HOST_OS) || defined(netbsd_HOST_OS ) || \
+ defined(openbsd_HOST_OS ) || defined(darwin_HOST_OS ) || \
+ defined(kfreebsdgnu_HOST_OS) )
+/* Don't use mmap on powerpc_HOST_ARCH as mmap doesn't support
* reallocating but we need to allocate jump islands just after each
* object images. Otherwise relative branches to jump islands can fail
* due to 24-bits displacement overflow.
@@ -2436,7 +2437,11 @@ static void ocFlushInstructionCacheFrom(
static void ocFlushInstructionCache( ObjectCode *oc )
{
/* The main object code */
- ocFlushInstructionCacheFrom(oc->image + oc->misalignment, oc->fileSize);
+ ocFlushInstructionCacheFrom(oc->image
+#ifdef darwin_HOST_OS
+ + oc->misalignment
+#endif
+ , oc->fileSize);
/* Jump Islands */
ocFlushInstructionCacheFrom(oc->symbol_extras, sizeof(SymbolExtra) * oc->n_symbol_extras);

18
ghc-ppc64-pthread.patch Normal file
View File

@ -0,0 +1,18 @@
diff -up ghc-7.0.2/aclocal.m4.pthread ghc-7.0.2/aclocal.m4
--- ghc-7.0.2/aclocal.m4.pthread 2011-02-28 13:10:03.000000000 -0500
+++ ghc-7.0.2/aclocal.m4 2011-04-20 07:12:36.489772545 -0400
@@ -1385,7 +1385,7 @@ AC_MSG_NOTICE(Building in-tree ghc-pwd)
dnl except we don't want to have to know what make is called. Sigh.
rm -rf utils/ghc-pwd/dist-boot
mkdir utils/ghc-pwd/dist-boot
- if ! "$WithGhc" -v0 -no-user-package-conf -hidir utils/ghc-pwd/dist-boot -odir utils/ghc-pwd/dist-boot -stubdir utils/ghc-pwd/dist-boot --make utils/ghc-pwd/Main.hs -o utils/ghc-pwd/dist-boot/ghc-pwd
+ if ! "$WithGhc" -optl-pthread -v0 -no-user-package-conf -hidir utils/ghc-pwd/dist-boot -odir utils/ghc-pwd/dist-boot -stubdir utils/ghc-pwd/dist-boot --make utils/ghc-pwd/Main.hs -o utils/ghc-pwd/dist-boot/ghc-pwd
then
AC_MSG_ERROR([Building ghc-pwd failed])
fi
diff -up ghc-7.0.2/ghc/ghc.wrapper.pthread ghc-7.0.2/ghc/ghc.wrapper
--- ghc-7.0.2/ghc/ghc.wrapper.pthread 2011-04-20 09:58:50.307894773 -0400
+++ ghc-7.0.2/ghc/ghc.wrapper 2011-04-20 09:59:14.477894370 -0400
@@ -1 +1 @@
-exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" -pgma "$pgmgcc" -pgml "$pgmgcc" -pgmP "$pgmgcc -E -undef -traditional" ${1+"$@"}
+exec "$executablename" -B"$topdir" -pgmc "$pgmgcc" -pgma "$pgmgcc" -pgml "$pgmgcc" -pgmP "$pgmgcc -E -undef -traditional" -optl-pthread ${1+"$@"}

View File

@ -47,9 +47,9 @@ diff -up ghc-7.0.1/ghc.mk.libffi ghc-7.0.1/ghc.mk
install_packages: install_libexecs
-install_packages: libffi/package.conf.install rts/package.conf.install
+install_packages: rts/package.conf.install
$(INSTALL_DIR) "$(DESTDIR)$(topdir)"
$(call INSTALL_DIR,"$(DESTDIR)$(topdir)")
"$(RM)" $(RM_OPTS_REC) "$(INSTALLED_PACKAGE_CONF)"
$(INSTALL_DIR) "$(INSTALLED_PACKAGE_CONF)"
$(call INSTALL_DIR,"$(INSTALLED_PACKAGE_CONF)")
- "$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update libffi/package.conf.install
"$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update rts/package.conf.install
$(foreach p, $(INSTALLED_PKG_DIRS), \

408
ghc.spec
View File

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

View File

@ -1,2 +1 @@
91814d1de48c661fd79ffa810026ed19 ghc-7.0.1-src.tar.bz2
96ea44f9c0fe6552883e2aa129f3e701 testsuite-7.0.1.tar.bz2
946a18a0dc30437db72c0d3fdf26ca42 ghc-7.0.2-src.tar.bz2