Accepting request 140366 from home:ptrommler:branches:devel:languages:haskell

Do not disable debug packages, breaks build with debuginfo enabled. Build bootstrap version of compiler, which is faster and all we need to have a self-bootstrapped compiler in Factory.

OBS-URL: https://build.opensuse.org/request/show/140366
OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=119
This commit is contained in:
Peter Trommler 2012-11-06 16:12:44 +00:00 committed by Git OBS Bridge
parent efad0c7324
commit d4021a6d1a
4 changed files with 79 additions and 45 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:35004c0647f6719650381eea65d3e61c133003f867f04502e035401e40849e1b
size 120765176

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e699ec96312c9d231d84842f6a58b120d64da0f41f10dba1cdba6c2d512a77dc
size 120012932

View File

@ -1,7 +1,7 @@
-------------------------------------------------------------------
Mon Oct 15 07:51:55 UTC 2012 - peter.trommler@ohm-hochschule.de
Tue Nov 6 14:41:06 UTC 2012 - peter.trommler@ohm-hochschule.de
- remove bootstrap code
- generate debug packages for Factory
-------------------------------------------------------------------
Sun Oct 14 07:41:59 UTC 2012 - peter.trommler@ohm-hochschule.de

112
ghc.spec
View File

@ -1,6 +1,7 @@
#
# spec file for package ghc
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011, 2012 Peter Trommler peter.trommler@ohm-hochschule.de
#
# All modifications and additions to the file contributed by third parties
@ -15,23 +16,26 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# To bootstrap a new version of ghc, uncomment the following:
#%%global ghc_bootstrapping 1
#%%{?ghc_bootstrap}
%global ghc_bootstrapping 1
%{?ghc_bootstrap}
%global without_hscolour 1
#%%global without_manual 1
%global debug_package %{nil}
#%%global debug_package %{nil}
Name: ghc
Version: 7.4.1
Release: 1
Group: Development/Languages/Other
License: BSD-3-Clause
Release: 0
Url: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2
Summary: The Glorious Glasgow Haskell Compiler
License: BSD-3-Clause
Group: Development/Languages/Other
# Remove after initial bootstrap
%if %{defined without_binary_ghc}
# end bootstrap
%if %{defined ghc_bootstrapping}
BuildRequires: ghc-compiler >= 6.12
%else
@ -40,57 +44,66 @@ BuildRequires: ghc-compiler = %version
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-directory-devel
BuildREquires: ghc-haskell98-devel
BuildRequires: ghc-haskell98-devel
BuildRequires: ghc-pretty-devel
BuildRequires: ghc-process-devel
# These are needed so OBS will keep those packages
# Alternatively a Keep: line could be added to prjconf
%if 0%{?opensuse_bs}
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-unix-devel
BuildRequires: ghc-array-devel
BuildRequires: ghc-binary-devel
BuildRequires: ghc-deepseq-devel
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-old-locale-devel
BuildRequires: ghc-old-time-devel
BuildRequires: ghc-time-devel
BuildRequires: ghc-binary-devel
BuildRequires: ghc-deepseq-devel
BuildRequires: ghc-unix-devel
%if %{undefined without_hscolour}
BuildRequires: ghc-containers
BuildRequires: ghc-base
BuildRequires: ghc-haskell98
BuildRequires: ghc-array
BuildRequires: ghc-time
BuildRequires: ghc-process
BuildRequires: ghc-directory
BuildRequires: ghc-unix
BuildRequires: ghc-old-time
BuildRequires: ghc-old-locale
BuildRequires: ghc-filepath
BuildRequires: ghc-base
BuildRequires: ghc-containers
BuildRequires: ghc-deepseq
BuildRequires: ghc-directory
BuildRequires: ghc-filepath
BuildRequires: ghc-haskell98
BuildRequires: ghc-old-locale
BuildRequires: ghc-old-time
BuildRequires: ghc-process
BuildRequires: ghc-time
BuildRequires: ghc-unix
%endif
%endif
# Remove after initial bootstrap
%endif
#end bootstrap
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc
BuildRequires: ghc-rpm-macros >= 0.91
BuildRequires: glibc-devel
BuildRequires: gmp-devel
BuildRequires: libffi-devel
BuildRequires: ncurses-devel
BuildRequires: gcc
BuildRequires: pkg-config
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: glibc-devel
%if %{undefined without_manual}
BuildRequires: libxslt
BuildRequires: docbook-xsl-stylesheets
BuildRequires: docbook-utils
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libxslt
%endif
%if %{undefined without_haddock} && %{undefined without_hscolour}
BuildRequires: hscolour
%endif
PreReq: update-alternatives
Requires: ghc-compiler = %{version}-%{release}
Requires: ghc-libraries = %{version}-%{release}
Requires: ghc-ghc-devel = %{version}-%{release}
Requires: ghc-libraries = %{version}-%{release}
Source: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2
# remove after initial bootstrap
# Binary distributions for initial bootstrap
%global bootstrap_version %{version}
Source1: %{name}-%{bootstrap_version}-%{_arch}-unknown-linux.tar.bz2
# NoSource: 1
# end bootstrap
# PATCH-FIX-UPSTREAM ghc-use-system-libffi.patch peter.trommler@ohm-hochschule.de - See Haskell trac #4496 and #5743
Patch: ghc-use-system-libffi.patch
# PATCH-FIX-UPSTREAM ghc-suse-as-needed.patch peter.trommler@ohm-hochschule.de -- temporary fix for Haskell trac #7062, ghc libraries do not work with as_needed and new-dtags both enabled
@ -124,11 +137,10 @@ contact information, links to research groups) are available from the
Haskell home page at <http://www.haskell.org/>.
%package compiler
Summary: GHC compiler and utilities
License: BSD-3-Clause
Group: Development/Languages/Other
Requires: gcc
Requires: ghc-base-devel
Summary: GHC compiler and utilities
Group: Development/Languages/Other
Requires: gcc
Requires: ghc-base-devel
Requires(post): update-alternatives
Requires(postun): update-alternatives
@ -141,9 +153,15 @@ To install all of GHC install package ghc.
%global ghc_version_override %{version}
# Remove after initial bootstrap
%if %{defined without_binary_ghc}
# end bootstrap
%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}
# Remove after initial bootstrap
%endif
# end bootstrap
%global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release}
@ -177,14 +195,13 @@ To install all of GHC install package ghc.
%global version %{ghc_version_override}
%package libraries
Summary: GHC development libraries meta package
License: BSD-3-Clause
Group: Development/Libraries/Other
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}
Summary: GHC development libraries meta package
Group: Development/Libraries/Other
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 libraries
@ -192,6 +209,9 @@ This is a meta-package for all the development library packages in GHC
except the ghc library, which is installed by the toplevel ghc metapackage.
%prep
# Remove after initial bootstrap
%setup -q -T -c -n bootstrap -a 1
#end bootstrap
%setup -q
rm -r ghc-tarballs/{mingw,perl}
%patch -p1 -b .libffi
@ -206,6 +226,13 @@ ln -s $(pkg-config --variable=includedir libffi)/*.h rts/dist/build
%patch6 -p1
%build
# Remove after initial bootstrap
pushd ../bootstrap/%{name}-%{bootstrap_version}
./configure --prefix %{_builddir}/ghc
make install
popd
# end bootstrap
# required for patch1
autoreconf -fi
@ -231,6 +258,7 @@ export CFLAGS="${CFLAGS:-%optflags}"
--libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
--docdir=%{ghcdocroot} \
--with-ghc=%{_builddir}/ghc/bin/ghc\
--with-gcc=%{_bindir}/gcc
make %{?_smp_mflags}