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 Sun Oct 14 07:41:59 UTC 2012 - peter.trommler@ohm-hochschule.de

View File

@ -1,6 +1,7 @@
# #
# spec file for package ghc # 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 # Copyright (c) 2011, 2012 Peter Trommler peter.trommler@ohm-hochschule.de
# #
# All modifications and additions to the file contributed by third parties # 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/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
# To bootstrap a new version of ghc, uncomment the following: # To bootstrap a new version of ghc, uncomment the following:
#%%global ghc_bootstrapping 1 %global ghc_bootstrapping 1
#%%{?ghc_bootstrap} %{?ghc_bootstrap}
%global without_hscolour 1 %global without_hscolour 1
#%%global without_manual 1 #%%global without_manual 1
%global debug_package %{nil} #%%global debug_package %{nil}
Name: ghc Name: ghc
Version: 7.4.1 Version: 7.4.1
Release: 1 Release: 0
Group: Development/Languages/Other
License: BSD-3-Clause
Url: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2 Url: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2
Summary: The Glorious Glasgow Haskell Compiler 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} %if %{defined ghc_bootstrapping}
BuildRequires: ghc-compiler >= 6.12 BuildRequires: ghc-compiler >= 6.12
%else %else
@ -40,57 +44,66 @@ BuildRequires: ghc-compiler = %version
BuildRequires: ghc-bytestring-devel BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel BuildRequires: ghc-containers-devel
BuildRequires: ghc-directory-devel BuildRequires: ghc-directory-devel
BuildREquires: ghc-haskell98-devel BuildRequires: ghc-haskell98-devel
BuildRequires: ghc-pretty-devel BuildRequires: ghc-pretty-devel
BuildRequires: ghc-process-devel BuildRequires: ghc-process-devel
# These are needed so OBS will keep those packages # These are needed so OBS will keep those packages
# Alternatively a Keep: line could be added to prjconf # Alternatively a Keep: line could be added to prjconf
%if 0%{?opensuse_bs} %if 0%{?opensuse_bs}
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-unix-devel
BuildRequires: ghc-array-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-locale-devel
BuildRequires: ghc-old-time-devel BuildRequires: ghc-old-time-devel
BuildRequires: ghc-time-devel BuildRequires: ghc-time-devel
BuildRequires: ghc-binary-devel BuildRequires: ghc-unix-devel
BuildRequires: ghc-deepseq-devel
%if %{undefined without_hscolour} %if %{undefined without_hscolour}
BuildRequires: ghc-containers
BuildRequires: ghc-base
BuildRequires: ghc-haskell98
BuildRequires: ghc-array BuildRequires: ghc-array
BuildRequires: ghc-time BuildRequires: ghc-base
BuildRequires: ghc-process BuildRequires: ghc-containers
BuildRequires: ghc-directory
BuildRequires: ghc-unix
BuildRequires: ghc-old-time
BuildRequires: ghc-old-locale
BuildRequires: ghc-filepath
BuildRequires: ghc-deepseq 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
%endif %endif
# Remove after initial bootstrap
%endif
#end bootstrap
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc
BuildRequires: ghc-rpm-macros >= 0.91 BuildRequires: ghc-rpm-macros >= 0.91
BuildRequires: glibc-devel
BuildRequires: gmp-devel BuildRequires: gmp-devel
BuildRequires: libffi-devel BuildRequires: libffi-devel
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: gcc
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: glibc-devel
%if %{undefined without_manual} %if %{undefined without_manual}
BuildRequires: libxslt
BuildRequires: docbook-xsl-stylesheets
BuildRequires: docbook-utils BuildRequires: docbook-utils
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libxslt
%endif %endif
%if %{undefined without_haddock} && %{undefined without_hscolour} %if %{undefined without_haddock} && %{undefined without_hscolour}
BuildRequires: hscolour BuildRequires: hscolour
%endif %endif
PreReq: update-alternatives PreReq: update-alternatives
Requires: ghc-compiler = %{version}-%{release} Requires: ghc-compiler = %{version}-%{release}
Requires: ghc-libraries = %{version}-%{release}
Requires: ghc-ghc-devel = %{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 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-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: 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 # 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
@ -125,7 +138,6 @@ Haskell home page at <http://www.haskell.org/>.
%package compiler %package compiler
Summary: GHC compiler and utilities Summary: GHC compiler and utilities
License: BSD-3-Clause
Group: Development/Languages/Other Group: Development/Languages/Other
Requires: gcc Requires: gcc
Requires: ghc-base-devel Requires: ghc-base-devel
@ -141,9 +153,15 @@ To install all of GHC install package ghc.
%global ghc_version_override %{version} %global ghc_version_override %{version}
# Remove after initial bootstrap
%if %{defined without_binary_ghc}
# end bootstrap
%global _use_internal_dependency_generator 0 %global _use_internal_dependency_generator 0
%global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir} %global __find_provides %{_rpmconfigdir}/ghc-deps.sh --provides %{buildroot}%{ghclibdir}
%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{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} %global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release}
@ -178,7 +196,6 @@ To install all of GHC install package ghc.
%package libraries %package libraries
Summary: GHC development libraries meta package Summary: GHC development libraries meta package
License: BSD-3-Clause
Group: Development/Libraries/Other Group: Development/Libraries/Other
Requires: ghc-compiler = %{version}-%{release} Requires: ghc-compiler = %{version}-%{release}
Obsoletes: ghc-devel < %{version}-%{release} Obsoletes: ghc-devel < %{version}-%{release}
@ -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. except the ghc library, which is installed by the toplevel ghc metapackage.
%prep %prep
# Remove after initial bootstrap
%setup -q -T -c -n bootstrap -a 1
#end bootstrap
%setup -q %setup -q
rm -r ghc-tarballs/{mingw,perl} rm -r ghc-tarballs/{mingw,perl}
%patch -p1 -b .libffi %patch -p1 -b .libffi
@ -206,6 +226,13 @@ ln -s $(pkg-config --variable=includedir libffi)/*.h rts/dist/build
%patch6 -p1 %patch6 -p1
%build %build
# Remove after initial bootstrap
pushd ../bootstrap/%{name}-%{bootstrap_version}
./configure --prefix %{_builddir}/ghc
make install
popd
# end bootstrap
# required for patch1 # required for patch1
autoreconf -fi autoreconf -fi
@ -231,6 +258,7 @@ export CFLAGS="${CFLAGS:-%optflags}"
--libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \ --libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \ --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
--docdir=%{ghcdocroot} \ --docdir=%{ghcdocroot} \
--with-ghc=%{_builddir}/ghc/bin/ghc\
--with-gcc=%{_bindir}/gcc --with-gcc=%{_bindir}/gcc
make %{?_smp_mflags} make %{?_smp_mflags}