ghc/ghc.spec

427 lines
14 KiB
RPMSpec
Raw Normal View History

#
# spec file for package ghc
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%global unregisterised_archs ppc64le s390 s390s
Name: ghc
Accepting request 304515 from devel:languages:haskell:lts + add ghc-glibc-2.20_BSD_SOURCE.patch from fedora - updated to 7.8.4 + removed D177.patch (in upstream) + removed D173.patch (in upstream) + removed ghc.git-e18525f.patch (in upstream) + refresh 0001-implement-native-code-generator-for-ppc64.patch * A critical bug in the LLVM backend which would cause the compiler to generate incorrect code has been fixed (issue #9439). * Several bugs in the code generator have been fixed for unregisterised platforms, such as 64bit PowerPC (issue #8819 and #8849). * A bug that could cause GHC's constructor specialization pass (enabled by default at -O2, or via -fspec-constr) to loop forever and consume large amounts of memory has been fixed (issue #8960). * A bug that would cause GHC to fail when attempting to determine GCC's version information in non-english locales has been fixed (issue #8825). * A minor bug that allowed GHC to seemingly import (but not use) private data constructors has been fixed (issue #9006). * A bug in the register allocator which would cause GHC to crash during compilation has been fixed (issue #9303). * A bug that caused the compiler to panic on some input C-- code has been fixed (issue #9329). * A few various minor deadlocks in the runtime system when using forkProcess have been fixed. * A bug which made blocked STM transactions non-interruptible has been fixed (issue #9379). * A bug in the compiler which broke pattern synonym imports across modules in Haddock has been fixed (issue #9417). * A minor bug in the code generator in which the popCnt16# did not zero-extend its result has been fixed (issue #9435). * A bug which caused the compiler to panic on pattern synonyms inside a class declaration has been fixed (issue #9705). * A bug in the typechecker revolving around un-saturated type family applications has been fixed (issue #9433). * Several bugs have been fixed causing problems with building GHC on ARM (issues #8951, #9620, #9336, and #9552). * A bug in the typechecker that could cause an infinite loop when using superclasses in a cycle has been fixed (issue #9415). * A bug causing corruption in signal handling with the single-threaded runtime system has been fixed (issue #9817). * A bug that could cause compiled programs to crash due to use of overlapping type families has been fixed (issue #9371). * A bug in the inliner that caused certain expressions within unboxed tuples to not be properly evaluated has been fixed (issue #9390). * A bug that caused the compiler to not always properly detect LLVM tools (particularly on Windows) has been fixed (issue #7143). * A bug that prevented GHC from deriving Generic1 instances for data families has been fixed (#9563). * A bug that caused type inference to infer the incorrect type in the presence of certain type families and constraints has been fixed (issue #9316). OBS-URL: https://build.opensuse.org/request/show/304515 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=170
2015-05-02 09:36:33 +00:00
Version: 7.8.4
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
ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le
BuildRequires: binutils-devel
BuildRequires: gcc
BuildRequires: ghc-bootstrap >= 7.4
BuildRequires: ghc-rpm-macros-extra
BuildRequires: glibc-devel
BuildRequires: gmp-devel
BuildRequires: libelf-devel
BuildRequires: libffi-devel
Accepting request 304515 from devel:languages:haskell:lts + add ghc-glibc-2.20_BSD_SOURCE.patch from fedora - updated to 7.8.4 + removed D177.patch (in upstream) + removed D173.patch (in upstream) + removed ghc.git-e18525f.patch (in upstream) + refresh 0001-implement-native-code-generator-for-ppc64.patch * A critical bug in the LLVM backend which would cause the compiler to generate incorrect code has been fixed (issue #9439). * Several bugs in the code generator have been fixed for unregisterised platforms, such as 64bit PowerPC (issue #8819 and #8849). * A bug that could cause GHC's constructor specialization pass (enabled by default at -O2, or via -fspec-constr) to loop forever and consume large amounts of memory has been fixed (issue #8960). * A bug that would cause GHC to fail when attempting to determine GCC's version information in non-english locales has been fixed (issue #8825). * A minor bug that allowed GHC to seemingly import (but not use) private data constructors has been fixed (issue #9006). * A bug in the register allocator which would cause GHC to crash during compilation has been fixed (issue #9303). * A bug that caused the compiler to panic on some input C-- code has been fixed (issue #9329). * A few various minor deadlocks in the runtime system when using forkProcess have been fixed. * A bug which made blocked STM transactions non-interruptible has been fixed (issue #9379). * A bug in the compiler which broke pattern synonym imports across modules in Haddock has been fixed (issue #9417). * A minor bug in the code generator in which the popCnt16# did not zero-extend its result has been fixed (issue #9435). * A bug which caused the compiler to panic on pattern synonyms inside a class declaration has been fixed (issue #9705). * A bug in the typechecker revolving around un-saturated type family applications has been fixed (issue #9433). * Several bugs have been fixed causing problems with building GHC on ARM (issues #8951, #9620, #9336, and #9552). * A bug in the typechecker that could cause an infinite loop when using superclasses in a cycle has been fixed (issue #9415). * A bug causing corruption in signal handling with the single-threaded runtime system has been fixed (issue #9817). * A bug that could cause compiled programs to crash due to use of overlapping type families has been fixed (issue #9371). * A bug in the inliner that caused certain expressions within unboxed tuples to not be properly evaluated has been fixed (issue #9390). * A bug that caused the compiler to not always properly detect LLVM tools (particularly on Windows) has been fixed (issue #7143). * A bug that prevented GHC from deriving Generic1 instances for data families has been fixed (#9563). * A bug that caused type inference to infer the incorrect type in the presence of certain type families and constraints has been fixed (issue #9316). OBS-URL: https://build.opensuse.org/request/show/304515 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=170
2015-05-02 09:36:33 +00:00
%ifnarch ppc
BuildRequires: llvm
%endif
BuildRequires: ncurses-devel
BuildRequires: pkg-config
BuildRequires: xz
%if %{undefined without_manual}
BuildRequires: docbook-utils
BuildRequires: docbook-xsl-stylesheets
BuildRequires: libxslt
%endif
# Patch 19 changes build system
BuildRequires: autoconf
BuildRequires: automake
PreReq: update-alternatives
Requires: ghc-compiler = %{version}-%{release}
Requires: ghc-ghc-devel = %{version}-%{release}
Requires: ghc-libraries = %{version}-%{release}
Source: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.xz
Source1: ghc-rpmlintrc
# PATCH-FIX-UPSTREAM llvm-powerpc64-datalayout.patch peter.trommler@ohm-hochschule.de - Add target datalayout for llvm on powerpc 64.
Patch8: llvm-powerpc64-datalayout.patch
# PATCH-FIX-UPSTREAM D349.patch peter.trommler@ohm-hochschule.de - Fix dynamic linker, see Haskell trac #8935.
Patch12: D349.patch
# PATCH-FIX-UPSTREAM integer-gmp.patch peter.trommler@ohm-hochschule.de -- Fix upstream ticket #8156 see https://ghc.haskell.org/trac/ghc/ticket/8156. We need this for SLE 11 where libgmp is too old and so we have to use the bundled libgmp. This patch fixes the build.
Patch13: integer-gmp.patch
# PATCH-FIX-UPSTREAM ghc-7.8.2-cgen-constify.patch peter.trommler@ohm-hochschule.de - Make constant strings constant in C backend to save data segment space. This is a gentoo patch.
Patch14: ghc-7.8.2-cgen-constify.patch
# PATCH-FIX-UPSTREAM D560.patch peter.trommler@ohm-hochschule.de -- Fix loading of PIC register. See https://phabricator.haskell.org/D560.
Patch18: D560.patch
# PATCH-FEATURE-UPSTREAM 0001-implement-native-code-generator-for-ppc64.patch peter.trommler@ohm-hochschule.de -- Implement native code generator for ppc64. Haskell Trac #9863.
Patch19: 0001-implement-native-code-generator-for-ppc64.patch
# PATCH-FIX-UPSTREAM ghc-glibc-2.20_BSD_SOURCE.patch peter.trommler@ohm-hochschule.de -- Define _DEFAULT_SOURCE in Stg.h to avoid warnings from glibc. Fedora patch
Patch20: ghc-glibc-2.20_BSD_SOURCE.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Haskell is the standard purely functional programming language; the
current language version is Haskell 98, agreed in December 1998.
GHC is a state-of-the-art programming suite for Haskell. Included is
an optimising 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 foreign
language interfaces (C, C++, etc).
A wide variety of Haskell related resources (tutorials, libraries,
specifications, documentation, compilers, interprbeters, references,
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
Group: Development/Languages/Other
Requires: gcc
Requires: ghc-base-devel
# This Requires fixes an issue in ghc's runtime system (rts) when
# locale files are missing. RTS loops and a memory leak eventually
# exhausts all memory and the program crashes. See Haskell trac #7695.
Requires: glibc-locale
Requires(post): update-alternatives
Requires(postun): update-alternatives
%description compiler
This package contains the GHC compiler, tools and utilities.
The GHC libraries are provided by ghc-devel.
To install all of GHC install package ghc.
%global ghc_version_override %{version}
%global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release}
%if %{defined ghclibdir}
Accepting request 304515 from devel:languages:haskell:lts + add ghc-glibc-2.20_BSD_SOURCE.patch from fedora - updated to 7.8.4 + removed D177.patch (in upstream) + removed D173.patch (in upstream) + removed ghc.git-e18525f.patch (in upstream) + refresh 0001-implement-native-code-generator-for-ppc64.patch * A critical bug in the LLVM backend which would cause the compiler to generate incorrect code has been fixed (issue #9439). * Several bugs in the code generator have been fixed for unregisterised platforms, such as 64bit PowerPC (issue #8819 and #8849). * A bug that could cause GHC's constructor specialization pass (enabled by default at -O2, or via -fspec-constr) to loop forever and consume large amounts of memory has been fixed (issue #8960). * A bug that would cause GHC to fail when attempting to determine GCC's version information in non-english locales has been fixed (issue #8825). * A minor bug that allowed GHC to seemingly import (but not use) private data constructors has been fixed (issue #9006). * A bug in the register allocator which would cause GHC to crash during compilation has been fixed (issue #9303). * A bug that caused the compiler to panic on some input C-- code has been fixed (issue #9329). * A few various minor deadlocks in the runtime system when using forkProcess have been fixed. * A bug which made blocked STM transactions non-interruptible has been fixed (issue #9379). * A bug in the compiler which broke pattern synonym imports across modules in Haddock has been fixed (issue #9417). * A minor bug in the code generator in which the popCnt16# did not zero-extend its result has been fixed (issue #9435). * A bug which caused the compiler to panic on pattern synonyms inside a class declaration has been fixed (issue #9705). * A bug in the typechecker revolving around un-saturated type family applications has been fixed (issue #9433). * Several bugs have been fixed causing problems with building GHC on ARM (issues #8951, #9620, #9336, and #9552). * A bug in the typechecker that could cause an infinite loop when using superclasses in a cycle has been fixed (issue #9415). * A bug causing corruption in signal handling with the single-threaded runtime system has been fixed (issue #9817). * A bug that could cause compiled programs to crash due to use of overlapping type families has been fixed (issue #9371). * A bug in the inliner that caused certain expressions within unboxed tuples to not be properly evaluated has been fixed (issue #9390). * A bug that caused the compiler to not always properly detect LLVM tools (particularly on Windows) has been fixed (issue #7143). * A bug that prevented GHC from deriving Generic1 instances for data families has been fixed (#9563). * A bug that caused type inference to infer the incorrect type in the presence of certain type families and constraints has been fixed (issue #9316). OBS-URL: https://build.opensuse.org/request/show/304515 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=170
2015-05-02 09:36:33 +00:00
%ghc_lib_subpackage Cabal 1.18.1.5
%ghc_lib_subpackage array 0.5.0.0
Accepting request 304515 from devel:languages:haskell:lts + add ghc-glibc-2.20_BSD_SOURCE.patch from fedora - updated to 7.8.4 + removed D177.patch (in upstream) + removed D173.patch (in upstream) + removed ghc.git-e18525f.patch (in upstream) + refresh 0001-implement-native-code-generator-for-ppc64.patch * A critical bug in the LLVM backend which would cause the compiler to generate incorrect code has been fixed (issue #9439). * Several bugs in the code generator have been fixed for unregisterised platforms, such as 64bit PowerPC (issue #8819 and #8849). * A bug that could cause GHC's constructor specialization pass (enabled by default at -O2, or via -fspec-constr) to loop forever and consume large amounts of memory has been fixed (issue #8960). * A bug that would cause GHC to fail when attempting to determine GCC's version information in non-english locales has been fixed (issue #8825). * A minor bug that allowed GHC to seemingly import (but not use) private data constructors has been fixed (issue #9006). * A bug in the register allocator which would cause GHC to crash during compilation has been fixed (issue #9303). * A bug that caused the compiler to panic on some input C-- code has been fixed (issue #9329). * A few various minor deadlocks in the runtime system when using forkProcess have been fixed. * A bug which made blocked STM transactions non-interruptible has been fixed (issue #9379). * A bug in the compiler which broke pattern synonym imports across modules in Haddock has been fixed (issue #9417). * A minor bug in the code generator in which the popCnt16# did not zero-extend its result has been fixed (issue #9435). * A bug which caused the compiler to panic on pattern synonyms inside a class declaration has been fixed (issue #9705). * A bug in the typechecker revolving around un-saturated type family applications has been fixed (issue #9433). * Several bugs have been fixed causing problems with building GHC on ARM (issues #8951, #9620, #9336, and #9552). * A bug in the typechecker that could cause an infinite loop when using superclasses in a cycle has been fixed (issue #9415). * A bug causing corruption in signal handling with the single-threaded runtime system has been fixed (issue #9817). * A bug that could cause compiled programs to crash due to use of overlapping type families has been fixed (issue #9371). * A bug in the inliner that caused certain expressions within unboxed tuples to not be properly evaluated has been fixed (issue #9390). * A bug that caused the compiler to not always properly detect LLVM tools (particularly on Windows) has been fixed (issue #7143). * A bug that prevented GHC from deriving Generic1 instances for data families has been fixed (#9563). * A bug that caused type inference to infer the incorrect type in the presence of certain type families and constraints has been fixed (issue #9316). OBS-URL: https://build.opensuse.org/request/show/304515 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=170
2015-05-02 09:36:33 +00:00
%ghc_lib_subpackage -c gmp-devel,libffi-devel base 4.7.0.2
%ghc_lib_subpackage binary 0.7.1.0
%ghc_lib_subpackage bytestring 0.10.4.0
%ghc_lib_subpackage containers 0.5.5.1
%ghc_lib_subpackage deepseq 1.3.0.2
%ghc_lib_subpackage directory 1.2.1.0
%ghc_lib_subpackage filepath 1.3.0.2
%define ghc_pkg_obsoletes ghc-bin-package-db-devel < 0.0.0.0-%{release}
%ghc_lib_subpackage -x ghc %{ghc_version_override}
%undefine ghc_pkg_obsoletes
%ghc_lib_subpackage haskeline 0.7.1.2
%ghc_lib_subpackage haskell2010 1.1.2.0
%ghc_lib_subpackage haskell98 2.0.0.3
%ghc_lib_subpackage hoopl 3.10.0.1
%ghc_lib_subpackage hpc 0.6.0.1
%ghc_lib_subpackage old-locale 1.0.0.6
%ghc_lib_subpackage old-time 1.1.0.2
%ghc_lib_subpackage pretty 1.1.1.1
%ghc_lib_subpackage process 1.2.0.0
%ghc_lib_subpackage template-haskell 2.9.0.0
%ghc_lib_subpackage terminfo 0.4.0.0
%ghc_lib_subpackage time 1.4.2
%ghc_lib_subpackage transformers 0.3.0.0
%ghc_lib_subpackage unix 2.7.0.1
%ghc_lib_subpackage xhtml 3000.2.1
%endif
%global version %{ghc_version_override}
%package libraries
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
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
%setup -q
%patch8 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%build
# Patch 19 modifies build system
perl boot
# Check if bootstrap is required, i.e. version is different from ghc's version
# Note: Cannot use ghc_version macro here as we defined version override earlier
%if "%version" != "%(ghc --numeric-version)"
%define ghc_boot 1
cat > mk/build.mk <<EOF
GhcLibWays = v %{!?ghc_without_shared:dyn}
%if %{defined ghc_without_shared}
DYNAMIC_BY_DEFAULT = NO
DYNAMIC_GHC_PROGRAMS = NO
%endif
%ifarch %{unregisterised_archs}
GhcUnregisterised = YES
GhcWithNativeCodeGen = NO
GhcWithInterpreter = YES
SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O
GhcStage2HcOpts = -O
GhcHcOpts = -Rghc-timing
GhcLibHcOpts = -O
SRC_HC_OPTS += -optc-fno-builtin
SRC_CC_OPTS += -fno-builtin
%endif
HADDOCK_DOCS = NO
BUILD_DOCBOOK_HTML = NO
HSCOLOUR_SRCS = NO
EOF
./configure --prefix=%{_builddir}/ghc-boot --with-system-libffi
make %{?_smp_mflags}
make install
make clean
%endif
cat > mk/build.mk <<EOF
%ifnarch %{unregisterised_archs}
BuildFlavour = perf
%endif
EOF
# BuildFlavours are defined in mk/build.mk.sample
cat mk/build.mk.sample >> mk/build.mk
# override some settings
cat >> mk/build.mk << EOF
GhcLibWays = v %{!?ghc_without_shared:dyn} %{!?without_prof:p}
%if %{defined ghc_without_shared}
DYNAMIC_BY_DEFAULT = NO
DYNAMIC_GHC_PROGRAMS = NO
%endif
%ifarch %{unregisterised_archs}
GhcUnregisterised = YES
GhcWithNativeCodeGen = NO
SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O
GhcStage2HcOpts = -O
GhcHcOpts = -Rghc-timing
GhcLibHcOpts = -O
SRC_HC_OPTS += -optc-fno-builtin
SRC_CC_OPTS += -fno-builtin
%endif
%if %{defined without_haddock}
HADDOCK_DOCS = NO
%endif
%if %{defined without_manual}
BUILD_DOCBOOK_HTML = NO
%endif
%if %{defined without_hscolour}
HSCOLOUR_SRCS = NO
%endif
EOF
export CFLAGS="${CFLAGS:-%optflags}"
./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_boot:--with-ghc=%{_builddir}/ghc-boot/bin/ghc} \
--with-system-libffi
make %{?_smp_mflags}
%install
%ghc_suse_disable_debug_packages
%makeinstall
for i in %{ghc_packages_list}; do
name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")
ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")
%ghc_gen_filelists $name $ver
echo "%doc libraries/$name/LICENSE" >> ghc-$name.files
done
# ghc-base should own ghclibdir
echo "%dir %{ghclibdir}" >> ghc-base.files
%ghc_gen_filelists bin-package-db 0.0.0.0
%ghc_gen_filelists ghc %{ghc_version_override}
%ghc_gen_filelists ghc-prim 0.3.1.0
%ghc_gen_filelists integer-gmp 0.5.1.0
%define merge_filelist()\
cat ghc-%1.files >> ghc-%2.files\
cat ghc-%1-devel.files >> ghc-%2-devel.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 bin-package-db ghc
%if %{undefined ghc_without_shared}
echo %%dir %{ghclibdir}/rts-1.0 >> ghc-base.files
ls %{buildroot}%{ghclibdir}/rts-1.0/libHS*.so >> ghc-base.files
sed -i -e "s|^%{buildroot}||g" ghc-base.files
%endif
echo %%dir %{ghclibdir}/rts-1.0 >> ghc-base-devel.files
ls -d %{buildroot}%{ghclibdir}/rts-1.0/libHS*.a %{buildroot}%{ghclibdir}/package.conf.d/builtin_*.conf %{buildroot}%{ghclibdir}/include >> ghc-base-devel.files
sed -i -e "s|^%{buildroot}||g" ghc-base-devel.files
# these are handled as alternatives
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for i in hsc2hs runhaskell; do
if [ -x %{buildroot}%{_bindir}/$i-ghc ]; then
rm %{buildroot}%{_bindir}/$i
else
mv %{buildroot}%{_bindir}/$i{,-ghc}
fi
ln -s -f %{_sysconfdir}/alternatives/$i %{buildroot}%{_bindir}/$i
touch %{buildroot}%{_sysconfdir}/alternatives/$i
done
%ghc_strip_dynlinked
%check
# Actually, I took this from Jens Petersen's Fedora package
# stolen from ghc6/debian/rules:
# Do some very simple tests that the compiler actually works
rm -rf testghc
mkdir testghc
echo 'main = putStrLn "Foo"' > testghc/foo.hs
inplace/bin/ghc-stage2 testghc/foo.hs -o testghc/foo
[ "$(testghc/foo)" = "Foo" ]
# doesn't seem to work inplace:
#[ "$(inplace/bin/runghc testghc/foo.hs)" = "Foo" ]
rm testghc/*
echo 'main = putStrLn "Foo"' > testghc/foo.hs
inplace/bin/ghc-stage2 testghc/foo.hs -o testghc/foo -O2
[ "$(testghc/foo)" = "Foo" ]
rm testghc/*
%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
%post compiler
# Alas, GHC, Hugs and nhc all come with different set of tools in addition to
# a runFOO:
#
# * GHC: hsc2hs
# * Hugs: hsc2hs, cpphs
# * nhc: cpphs
#
# Therefore it is currently not possible to use --slave below to form link
# groups under a single name 'runhaskell'. Either these tools should be
# disentangled from the Haskell implementations or all implementations should
# have the same set of tools. *sigh*
Accepting request 304515 from devel:languages:haskell:lts + add ghc-glibc-2.20_BSD_SOURCE.patch from fedora - updated to 7.8.4 + removed D177.patch (in upstream) + removed D173.patch (in upstream) + removed ghc.git-e18525f.patch (in upstream) + refresh 0001-implement-native-code-generator-for-ppc64.patch * A critical bug in the LLVM backend which would cause the compiler to generate incorrect code has been fixed (issue #9439). * Several bugs in the code generator have been fixed for unregisterised platforms, such as 64bit PowerPC (issue #8819 and #8849). * A bug that could cause GHC's constructor specialization pass (enabled by default at -O2, or via -fspec-constr) to loop forever and consume large amounts of memory has been fixed (issue #8960). * A bug that would cause GHC to fail when attempting to determine GCC's version information in non-english locales has been fixed (issue #8825). * A minor bug that allowed GHC to seemingly import (but not use) private data constructors has been fixed (issue #9006). * A bug in the register allocator which would cause GHC to crash during compilation has been fixed (issue #9303). * A bug that caused the compiler to panic on some input C-- code has been fixed (issue #9329). * A few various minor deadlocks in the runtime system when using forkProcess have been fixed. * A bug which made blocked STM transactions non-interruptible has been fixed (issue #9379). * A bug in the compiler which broke pattern synonym imports across modules in Haddock has been fixed (issue #9417). * A minor bug in the code generator in which the popCnt16# did not zero-extend its result has been fixed (issue #9435). * A bug which caused the compiler to panic on pattern synonyms inside a class declaration has been fixed (issue #9705). * A bug in the typechecker revolving around un-saturated type family applications has been fixed (issue #9433). * Several bugs have been fixed causing problems with building GHC on ARM (issues #8951, #9620, #9336, and #9552). * A bug in the typechecker that could cause an infinite loop when using superclasses in a cycle has been fixed (issue #9415). * A bug causing corruption in signal handling with the single-threaded runtime system has been fixed (issue #9817). * A bug that could cause compiled programs to crash due to use of overlapping type families has been fixed (issue #9371). * A bug in the inliner that caused certain expressions within unboxed tuples to not be properly evaluated has been fixed (issue #9390). * A bug that caused the compiler to not always properly detect LLVM tools (particularly on Windows) has been fixed (issue #7143). * A bug that prevented GHC from deriving Generic1 instances for data families has been fixed (#9563). * A bug that caused type inference to infer the incorrect type in the presence of certain type families and constraints has been fixed (issue #9316). OBS-URL: https://build.opensuse.org/request/show/304515 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=170
2015-05-02 09:36:33 +00:00
"%{_sbindir}/update-alternatives" --install %{_bindir}/runhaskell runhaskell %{_bindir}/runghc 500
"%{_sbindir}/update-alternatives" --install %{_bindir}/hsc2hs hsc2hs %{_bindir}/hsc2hs-ghc 500
%preun compiler
if test "$1" = 0; then
Accepting request 304515 from devel:languages:haskell:lts + add ghc-glibc-2.20_BSD_SOURCE.patch from fedora - updated to 7.8.4 + removed D177.patch (in upstream) + removed D173.patch (in upstream) + removed ghc.git-e18525f.patch (in upstream) + refresh 0001-implement-native-code-generator-for-ppc64.patch * A critical bug in the LLVM backend which would cause the compiler to generate incorrect code has been fixed (issue #9439). * Several bugs in the code generator have been fixed for unregisterised platforms, such as 64bit PowerPC (issue #8819 and #8849). * A bug that could cause GHC's constructor specialization pass (enabled by default at -O2, or via -fspec-constr) to loop forever and consume large amounts of memory has been fixed (issue #8960). * A bug that would cause GHC to fail when attempting to determine GCC's version information in non-english locales has been fixed (issue #8825). * A minor bug that allowed GHC to seemingly import (but not use) private data constructors has been fixed (issue #9006). * A bug in the register allocator which would cause GHC to crash during compilation has been fixed (issue #9303). * A bug that caused the compiler to panic on some input C-- code has been fixed (issue #9329). * A few various minor deadlocks in the runtime system when using forkProcess have been fixed. * A bug which made blocked STM transactions non-interruptible has been fixed (issue #9379). * A bug in the compiler which broke pattern synonym imports across modules in Haddock has been fixed (issue #9417). * A minor bug in the code generator in which the popCnt16# did not zero-extend its result has been fixed (issue #9435). * A bug which caused the compiler to panic on pattern synonyms inside a class declaration has been fixed (issue #9705). * A bug in the typechecker revolving around un-saturated type family applications has been fixed (issue #9433). * Several bugs have been fixed causing problems with building GHC on ARM (issues #8951, #9620, #9336, and #9552). * A bug in the typechecker that could cause an infinite loop when using superclasses in a cycle has been fixed (issue #9415). * A bug causing corruption in signal handling with the single-threaded runtime system has been fixed (issue #9817). * A bug that could cause compiled programs to crash due to use of overlapping type families has been fixed (issue #9371). * A bug in the inliner that caused certain expressions within unboxed tuples to not be properly evaluated has been fixed (issue #9390). * A bug that caused the compiler to not always properly detect LLVM tools (particularly on Windows) has been fixed (issue #7143). * A bug that prevented GHC from deriving Generic1 instances for data families has been fixed (#9563). * A bug that caused type inference to infer the incorrect type in the presence of certain type families and constraints has been fixed (issue #9316). OBS-URL: https://build.opensuse.org/request/show/304515 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=170
2015-05-02 09:36:33 +00:00
"%{_sbindir}/update-alternatives" --remove runhaskell %{_bindir}/runghc
"%{_sbindir}/update-alternatives" --remove hsc2hs %{_bindir}/hsc2hs-ghc
fi
%files
%defattr(-,root,root,-)
%doc LICENSE
%files compiler
%defattr(-,root,root,-)
%doc ANNOUNCE LICENSE
%{_bindir}/ghc
%{_bindir}/ghc-%{version}
%{_bindir}/ghc-pkg
%{_bindir}/ghc-pkg-%{version}
%{_bindir}/ghci
%{_bindir}/ghci-%{version}
%{_bindir}/hp2ps
%{_bindir}/hpc
%{_bindir}/hsc2hs
%ghost %{_sysconfdir}/alternatives/hsc2hs
%{_bindir}/hsc2hs-ghc
%{_bindir}/runghc
%{_bindir}/runghc-%{version}
%{_bindir}/runhaskell
%ghost %{_sysconfdir}/alternatives/runhaskell
%{_bindir}/runhaskell-ghc
%dir %{ghclibdir}
%{ghclibdir}/settings
%dir %{ghclibdir}/bin
%{ghclibdir}/bin/ghc
%{ghclibdir}/bin/ghc-pkg
%{ghclibdir}/bin/hpc
%{ghclibdir}/bin/hsc2hs
%ifnarch %{unregisterised_archs}
%{ghclibdir}/ghc-split
%endif
%{ghclibdir}/ghc-usage.txt
%{ghclibdir}/ghci-usage.txt
%{ghclibdir}/mkGmpDerivedConstants
%dir %{ghclibdir}/package.conf.d
%ghost %{ghclibdir}/package.conf.d/package.cache
%{ghclibdir}/platformConstants
%{ghclibdir}/bin/runghc
%{ghclibdir}/template-hsc.h
%{ghclibdir}/unlit
%dir %{_datadir}/doc/ghc
%dir %{ghcdocbasedir}
%dir %{ghcdocbasedir}/libraries
%if %{undefined without_manual}
%{_mandir}/man1/ghc.*
%endif
%if %{undefined without_haddock}
%{_bindir}/haddock
%{_bindir}/haddock-ghc-%{version}
%{ghclibdir}/html
%{ghclibdir}/latex
%{ghclibdir}/bin/haddock
%if %{undefined without_manual}
%{ghcdocbasedir}/haddock
%{ghcdocbasedir}/users_guide
%endif
%{ghcdocbasedir}/libraries/frames.html
%{ghcdocbasedir}/libraries/gen_contents_index
%{ghcdocbasedir}/libraries/hslogo-16.png
%{ghcdocbasedir}/libraries/ocean.css
%{ghcdocbasedir}/libraries/prologue.txt
%{ghcdocbasedir}/libraries/synopsis.png
%{ghcdocbasedir}/index.html
%ghost %{ghcdocbasedir}/libraries/doc-index*.html
%ghost %{ghcdocbasedir}/libraries/haddock-util.js
%ghost %{ghcdocbasedir}/libraries/index*.html
%ghost %{ghcdocbasedir}/libraries/minus.gif
%ghost %{ghcdocbasedir}/libraries/plus.gif
%endif
%files libraries
%defattr(-,root,root,-)
%doc LICENSE
%changelog