Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
Jens Petersen | b221df6c0e | |
Jens Petersen | 4e07df038b | |
Jens Petersen | dfffa76225 | |
Fedora Release Engineering | abc91d6134 | |
Jens Petersen | 359ea90a8d | |
Jens Petersen | a0482aeba9 | |
Jesse Keating | a2348652b8 |
21
Makefile
21
Makefile
|
@ -1,21 +0,0 @@
|
|||
# Makefile for source rpm: ghc
|
||||
# $Id$
|
||||
NAME := ghc
|
||||
SPECFILE = $(NAME).spec
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
91
ghc.spec
91
ghc.spec
|
@ -1,8 +1,6 @@
|
|||
# shared haskell libraries supported for x86* archs (enabled in ghc-rpm-macros)
|
||||
|
||||
## default enabled options ##
|
||||
# experimental shared libraries support available in ghc-6.12 for x86
|
||||
%ifarch %{ix86} x86_64
|
||||
%bcond_without shared
|
||||
%endif
|
||||
%bcond_without doc
|
||||
# test builds can made faster and smaller by disabling profiled libraries
|
||||
# (currently libHSrts_thr_p.a breaks no prof build)
|
||||
|
@ -18,15 +16,13 @@
|
|||
# include colored html src
|
||||
%bcond_with hscolour
|
||||
|
||||
%global haddock_version 2.5.0
|
||||
|
||||
# the debuginfo subpackage is currently empty anyway, so don't generate it
|
||||
# ghc does not output dwarf format so debuginfo is not useful
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: ghc
|
||||
# break of haskell-platform-2009.2.0.2
|
||||
# part of haskell-platform-2010.1.0.0
|
||||
Version: 6.12.1
|
||||
Release: 5%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: Glasgow Haskell Compilation system
|
||||
# fedora ghc has only been bootstrapped on the following archs:
|
||||
ExclusiveArch: %{ix86} x86_64 ppc alpha
|
||||
|
@ -37,15 +33,14 @@ Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
|
|||
Source1: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src-extralibs.tar.bz2
|
||||
%endif
|
||||
URL: http://haskell.org/ghc/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
Obsoletes: ghc682, ghc681, haddock09
|
||||
# introduced for f11 and can be removed for f13:
|
||||
Obsoletes: haddock < %{haddock_version}, ghc-haddock-devel < %{haddock_version}
|
||||
Provides: haddock = %{haddock_version}
|
||||
BuildRequires: ghc, happy, ghc-rpm-macros >= 0.5.2
|
||||
# introduced for f11
|
||||
Obsoletes: haddock < 2.4.2-3, ghc-haddock-devel < 2.4.2-3
|
||||
BuildRequires: ghc, happy, ghc-rpm-macros >= 0.5.6
|
||||
BuildRequires: gmp-devel, ncurses-devel
|
||||
Requires: gcc, gmp-devel
|
||||
%if %{with shared}
|
||||
# for forwards compatibility
|
||||
Provides: ghc-devel = %{version}-%{release}
|
||||
%if %{undefined ghc_without_shared}
|
||||
# not sure if this is actually needed:
|
||||
BuildRequires: libffi-devel
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
@ -60,7 +55,7 @@ Patch1: ghc-6.12.1-gen_contents_index-haddock-path.patch
|
|||
|
||||
%description
|
||||
GHC is a state-of-the-art programming suite for Haskell, a purely
|
||||
functional programming language. It includes an optimising compiler
|
||||
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
|
||||
|
@ -74,14 +69,14 @@ Group: Development/Languages
|
|||
Requires: %{name} = %{version}-%{release}
|
||||
# for haddock
|
||||
Requires(posttrans): %{name} = %{version}-%{release}
|
||||
Obsoletes: ghc-haddock-doc < %{haddock_version}
|
||||
Obsoletes: ghc-haddock-doc < 2.4.2-3
|
||||
|
||||
%description doc
|
||||
Preformatted documentation for the Glorious Glasgow Haskell Compilation System
|
||||
(GHC) and its libraries. It should be installed if you like to have local
|
||||
access to the documentation in HTML format.
|
||||
|
||||
%if %{with shared}
|
||||
%if %{undefined ghc_without_shared}
|
||||
%package libs
|
||||
Summary: Shared libraries for GHC
|
||||
Group: Development/Libraries
|
||||
|
@ -95,8 +90,7 @@ Shared libraries for Glorious Glasgow Haskell Compilation System (GHC).
|
|||
Summary: Profiling libraries for GHC
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Obsoletes: ghc682-prof, ghc681-prof
|
||||
Obsoletes: ghc-haddock-prof < %{haddock_version}
|
||||
Obsoletes: ghc-haddock-prof < 2.4.2-3
|
||||
|
||||
%description prof
|
||||
Profiling libraries for Glorious Glasgow Haskell Compilation System (GHC).
|
||||
|
@ -117,19 +111,19 @@ rm -r ghc-tarballs/{mingw,perl}
|
|||
|
||||
%build
|
||||
cat > mk/build.mk << EOF
|
||||
GhcLibWays = v %{?with_prof:p} %{?with_shared:dyn}
|
||||
GhcLibWays = v %{?with_prof:p} %{!?ghc_without_shared:dyn}
|
||||
%if %{without doc}
|
||||
HADDOCK_DOCS = NO
|
||||
HADDOCK_DOCS = NO
|
||||
%endif
|
||||
%if %{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
|
||||
SRC_HC_OPTS = -H64m -O0 -fasm
|
||||
GhcStage1HcOpts = -O -fasm
|
||||
GhcStage2HcOpts = -O0 -fasm
|
||||
GhcLibHcOpts = -O0 -fasm
|
||||
SplitObjs = NO
|
||||
%endif
|
||||
%if %{without hscolour}
|
||||
HSCOLOUR_SRCS = NO
|
||||
|
@ -142,14 +136,14 @@ export CFLAGS="${CFLAGS:-%optflags}"
|
|||
--datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} \
|
||||
--libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \
|
||||
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
|
||||
%{?with_shared:--enable-shared}
|
||||
%{!?ghc_without_shared:--enable-shared}
|
||||
|
||||
# 8 cpus seems to break build
|
||||
#make %{_smp_mflags}
|
||||
make
|
||||
# 4 cpus or more sometimes breaks build
|
||||
[ -z "$RPM_BUILD_NCPUS" ] && RPM_BUILD_NCPUS=$(/usr/bin/getconf _NPROCESSORS_ONLN)
|
||||
[ "$RPM_BUILD_NCPUS" -gt 4 ] && RPM_BUILD_NCPUS=4
|
||||
make -j$RPM_BUILD_NCPUS
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=${RPM_BUILD_ROOT} install
|
||||
|
||||
SRC_TOP=$PWD
|
||||
|
@ -182,6 +176,9 @@ for i in hsc2hs runhaskell; do
|
|||
fi
|
||||
done
|
||||
|
||||
%ghc_strip_dynlinked
|
||||
|
||||
|
||||
%check
|
||||
# stolen from ghc6/debian/rules:
|
||||
# Do some very simple tests that the compiler actually works
|
||||
|
@ -195,16 +192,13 @@ echo 'main = putStrLn "Foo"' > testghc/foo.hs
|
|||
inplace/bin/ghc-stage2 testghc/foo.hs -o testghc/foo -O2
|
||||
[ "$(testghc/foo)" = "Foo" ]
|
||||
rm testghc/*
|
||||
%if %{with shared}
|
||||
%if %{undefined ghc_without_shared}
|
||||
echo 'main = putStrLn "Foo"' > testghc/foo.hs
|
||||
inplace/bin/ghc-stage2 testghc/foo.hs -o testghc/foo -dynamic
|
||||
[ "$(testghc/foo)" = "Foo" ]
|
||||
rm testghc/*
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
# Alas, GHC, Hugs, and nhc all come with different set of tools in
|
||||
# addition to a runFOO:
|
||||
|
@ -231,7 +225,7 @@ fi
|
|||
|
||||
%posttrans
|
||||
# (posttrans to make sure any old libs have been removed first)
|
||||
ghc-pkg recache
|
||||
%ghc_pkg_recache
|
||||
|
||||
%posttrans doc
|
||||
# (posttrans to make sure any old docs have been removed first)
|
||||
|
@ -265,7 +259,7 @@ ghc-pkg recache
|
|||
%ghost %{ghcdocbasedir}/libraries/plus.gif
|
||||
%endif
|
||||
|
||||
%if %{with shared}
|
||||
%if %{undefined ghc_without_shared}
|
||||
%files libs -f ghc-libs.files
|
||||
%defattr(-,root,root,-)
|
||||
%endif
|
||||
|
@ -276,6 +270,23 @@ ghc-pkg recache
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Mar 28 2011 Jens Petersen <petersen@redhat.com> - 6.12.1-7
|
||||
- provide ghc-devel for compatibility with cabal2spec-0.22.5
|
||||
- use ghc_without_shared
|
||||
- drop buildroot and buildroot cleaning
|
||||
- smp build with max 4 cpus
|
||||
- strip all dynlinked files not just shared objects (ghc-rpm-macros-0.5.9)
|
||||
|
||||
* Fri Apr 30 2010 Jens Petersen <petersen@redhat.com>
|
||||
- drop the ghc-utf8-string obsoletes (#571478)
|
||||
|
||||
* Mon Apr 12 2010 Jens Petersen <petersen@redhat.com> - 6.12.1-6
|
||||
- ghc-6.12.1 is part of haskell-platform-2010.1.0.0
|
||||
- drop old ghc682, ghc681, haddock09 obsoletes
|
||||
- drop haddock_version and no longer provide haddock explicitly
|
||||
- add obsoletes for ghc-utf8-string (#571478, reported by Jochen Schmitt)
|
||||
- update ghc-rpm-macros BR to 0.5.6 for ghc_pkg_recache
|
||||
|
||||
* Mon Jan 11 2010 Jens Petersen <petersen@redhat.com> - 6.12.1-5
|
||||
- drop ghc-6.12.1-no-filter-libs.patch and extras packages again
|
||||
- filter ghc-ghc-prof files from ghc-prof
|
||||
|
@ -332,7 +343,7 @@ ghc-pkg recache
|
|||
- add bcond for manual and extralibs
|
||||
- reenable ppc secondary arch
|
||||
- don't provide ghc-haddock-*
|
||||
- remove obsoltete post requires policycoreutils
|
||||
- remove obsolete post requires policycoreutils
|
||||
- add vanilla v to GhcLibWays when building without prof
|
||||
- handle without hscolour
|
||||
- can't smp make currently
|
||||
|
|
Loading…
Reference in New Issue