2007-11-18 15:41:39 +00:00
|
|
|
#
|
2012-01-27 10:47:59 +00:00
|
|
|
# spec file for package ghc
|
|
|
|
#
|
2019-12-29 02:01:37 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-01-27 10:47:59 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-11-07 09:45:55 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-01-27 10:47:59 +00:00
|
|
|
#
|
|
|
|
|
2016-09-28 14:53:35 +00:00
|
|
|
|
2016-09-28 10:48:25 +00:00
|
|
|
%if 0%{?suse_version} == 1315 && !0%{?is_opensuse}
|
|
|
|
%define without_manual 1
|
|
|
|
%endif
|
2012-11-06 16:12:44 +00:00
|
|
|
|
2018-05-14 13:15:35 +00:00
|
|
|
%ifnarch %{arm} s390x
|
|
|
|
%define with_libnuma 1
|
|
|
|
%else
|
|
|
|
%define with_libnuma 0
|
|
|
|
%endif
|
|
|
|
|
2019-12-29 14:37:43 +00:00
|
|
|
%global unregisterised_archs s390 s390x riscv64
|
2013-09-27 14:30:03 +00:00
|
|
|
|
2012-01-27 10:47:59 +00:00
|
|
|
Name: ghc
|
2020-01-19 12:18:21 +00:00
|
|
|
Version: 8.8.2
|
2012-11-06 16:12:44 +00:00
|
|
|
Release: 0
|
2019-12-29 10:45:55 +00:00
|
|
|
URL: https://www.haskell.org/ghc/
|
2020-01-19 12:18:21 +00:00
|
|
|
Source: https://downloads.haskell.org/~ghc/8.8.2/ghc-%{version}-src.tar.xz
|
|
|
|
Source1: https://downloads.haskell.org/~ghc/8.8.2/ghc-%{version}-src.tar.xz.sig
|
2020-01-01 02:01:31 +00:00
|
|
|
Summary: The Glorious Glasgow Haskell Compiler
|
2012-11-06 16:12:44 +00:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Languages/Other
|
2020-01-01 02:01:31 +00:00
|
|
|
ExclusiveArch: aarch64 %{arm} %{ix86} x86_64 ppc64 ppc64le riscv64 s390x
|
2017-12-21 19:35:55 +00:00
|
|
|
# hard to port to PIE, some prebuilt static libraries are non-PIC ...
|
|
|
|
#!BuildIgnore: gcc-PIE
|
2013-09-27 14:30:03 +00:00
|
|
|
BuildRequires: binutils-devel
|
2012-11-06 16:12:44 +00:00
|
|
|
BuildRequires: gcc
|
2019-12-29 10:45:55 +00:00
|
|
|
BuildRequires: ghc-bootstrap >= 8.4
|
2013-07-31 16:21:12 +00:00
|
|
|
BuildRequires: ghc-rpm-macros-extra
|
2012-11-06 16:12:44 +00:00
|
|
|
BuildRequires: glibc-devel
|
2012-06-26 16:06:48 +00:00
|
|
|
BuildRequires: gmp-devel
|
2016-09-28 10:48:25 +00:00
|
|
|
BuildRequires: libdw-devel
|
2013-09-27 14:30:03 +00:00
|
|
|
BuildRequires: libelf-devel
|
2015-10-03 18:03:32 +00:00
|
|
|
#Fix for openSUSE:Leap:42.1
|
|
|
|
%if 0%{?suse_version} == 1315
|
|
|
|
BuildRequires: libffi48-devel
|
|
|
|
%else
|
2012-06-26 16:06:48 +00:00
|
|
|
BuildRequires: libffi-devel
|
2015-10-03 18:03:32 +00:00
|
|
|
%endif
|
2018-05-14 13:15:35 +00:00
|
|
|
BuildRequires: libtool
|
2018-11-07 10:28:43 +00:00
|
|
|
# not resolvable on ppc
|
2018-11-07 10:51:03 +00:00
|
|
|
%if 0%{?suse_version} >= 1500
|
2018-11-07 09:45:55 +00:00
|
|
|
BuildRequires: memory-constraints
|
2018-11-07 10:28:43 +00:00
|
|
|
%endif
|
2018-05-14 13:15:35 +00:00
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: pkg-config
|
|
|
|
BuildRequires: xz
|
2017-12-21 19:35:55 +00:00
|
|
|
%ifarch aarch64 %{arm}
|
2016-09-28 10:48:25 +00:00
|
|
|
BuildRequires: binutils-gold
|
|
|
|
%endif
|
2017-12-21 19:35:55 +00:00
|
|
|
%ifarch aarch64 %{arm} %{ix86} x86_64
|
2019-03-12 15:07:26 +00:00
|
|
|
%if 0%{?suse_version} >= 1550
|
2019-12-29 10:45:55 +00:00
|
|
|
BuildRequires: llvm7-devel
|
2018-06-05 13:10:29 +00:00
|
|
|
%else
|
|
|
|
BuildRequires: llvm-devel
|
|
|
|
%endif
|
2017-12-21 19:35:55 +00:00
|
|
|
%endif
|
2012-01-27 10:47:59 +00:00
|
|
|
%if %{undefined without_manual}
|
2018-12-19 02:01:33 +00:00
|
|
|
BuildRequires: python3-Sphinx
|
2015-07-17 14:55:57 +00:00
|
|
|
%endif
|
|
|
|
|
2018-05-14 13:15:35 +00:00
|
|
|
%if %with_libnuma
|
|
|
|
BuildRequires: libnuma-devel
|
|
|
|
%endif
|
|
|
|
|
2019-12-29 10:45:55 +00:00
|
|
|
# bogus requires
|
2019-12-29 14:37:43 +00:00
|
|
|
%ifarch x86_64
|
|
|
|
BuildRequires: ghc-bootstrap-helpers
|
|
|
|
%else
|
2019-12-29 10:45:55 +00:00
|
|
|
BuildRequires: alex
|
|
|
|
BuildRequires: happy
|
2019-12-29 14:37:43 +00:00
|
|
|
%endif
|
2018-10-18 09:46:41 +00:00
|
|
|
|
2012-01-27 10:47:59 +00:00
|
|
|
PreReq: update-alternatives
|
2012-06-03 15:38:23 +00:00
|
|
|
Requires: ghc-compiler = %{version}-%{release}
|
|
|
|
Requires: ghc-ghc-devel = %{version}-%{release}
|
2012-11-06 16:12:44 +00:00
|
|
|
Requires: ghc-libraries = %{version}-%{release}
|
2018-10-18 09:46:41 +00:00
|
|
|
# PATCH-FIX-UPSTREAM Disable-unboxed-arrays.patch ptrommler@icloud.com -- Do not use unboxed arrays on big-endian platforms. See Haskell Trac #15411.
|
|
|
|
Patch3: Disable-unboxed-arrays.patch
|
2020-01-01 15:27:50 +00:00
|
|
|
# PATCH-FIX-UPSTREAM fix-unregisterised-v8.4-8.6.patch
|
|
|
|
Patch6: fix-unregisterised-v8.4-8.6.patch
|
2017-12-21 19:35:55 +00:00
|
|
|
# PATCH-FIX-UPSTREAM ghc-pie.patch - set linux as default PIE platform
|
|
|
|
Patch35: ghc-pie.patch
|
2017-02-22 20:36:57 +00:00
|
|
|
# PATCH-FIX-OPENSUSE ghc-8.0.2-Cabal-dynlibdir.patch -- Fix shared library directory location.
|
|
|
|
Patch100: ghc-8.0.2-Cabal-dynlibdir.patch
|
2017-05-29 11:09:39 +00:00
|
|
|
# PATCH-FIX-UPSTREAM buildpath-abi-stability.patch -- debian patch for more stable abi-1
|
|
|
|
Patch110: buildpath-abi-stability.patch
|
2007-11-14 20:15:15 +00:00
|
|
|
|
|
|
|
%description
|
2012-02-20 13:22:09 +00:00
|
|
|
Haskell is the standard purely functional programming language; the
|
|
|
|
current language version is Haskell 98, agreed in December 1998.
|
2012-02-19 20:48:10 +00:00
|
|
|
|
2012-02-20 13:22:09 +00:00
|
|
|
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/>.
|
2012-01-27 10:47:59 +00:00
|
|
|
|
2012-06-03 15:38:23 +00:00
|
|
|
%package compiler
|
2012-11-06 16:12:44 +00:00
|
|
|
Summary: GHC compiler and utilities
|
|
|
|
Group: Development/Languages/Other
|
|
|
|
Requires: gcc
|
|
|
|
Requires: ghc-base-devel
|
2012-06-03 15:38:23 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2017-12-21 19:35:55 +00:00
|
|
|
%ifarch aarch64 %{arm}
|
2015-07-17 14:55:57 +00:00
|
|
|
Requires: binutils-gold
|
|
|
|
%endif
|
2019-12-29 19:23:19 +00:00
|
|
|
%ifarch aarch64 %{arm}
|
2019-03-13 14:36:33 +00:00
|
|
|
%if 0%{?suse_version} >= 1550
|
2019-12-29 10:45:55 +00:00
|
|
|
Requires: llvm7
|
2018-06-05 13:10:29 +00:00
|
|
|
%else
|
|
|
|
Requires: llvm
|
2018-04-26 17:07:46 +00:00
|
|
|
%endif
|
2017-12-21 19:35:55 +00:00
|
|
|
%endif
|
2019-12-29 19:23:19 +00:00
|
|
|
%ifarch x86_64 %{ix86}
|
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
Suggests: llvm7
|
|
|
|
%else
|
|
|
|
Suggests: llvm
|
|
|
|
%endif
|
|
|
|
%endif
|
2012-06-03 15:38:23 +00:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2012-01-27 10:47:59 +00:00
|
|
|
%global ghc_version_override %{version}
|
|
|
|
|
2012-10-13 13:11:56 +00:00
|
|
|
%global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release}
|
2012-01-27 10:47:59 +00:00
|
|
|
|
2018-05-14 13:15:35 +00:00
|
|
|
%if %with_libnuma
|
|
|
|
%define libnuma_dep ,libnuma-devel
|
2018-07-05 01:01:12 +00:00
|
|
|
%else
|
|
|
|
%define libnuma_dep %{nil}
|
2018-05-14 13:15:35 +00:00
|
|
|
%endif
|
|
|
|
|
2012-01-27 10:47:59 +00:00
|
|
|
%if %{defined ghclibdir}
|
2020-01-19 12:18:21 +00:00
|
|
|
%ghc_lib_subpackage -d Cabal-3.0.1.0
|
2019-12-29 10:45:55 +00:00
|
|
|
%ghc_lib_subpackage -d array-0.5.4.0
|
|
|
|
%ghc_lib_subpackage -d -c gmp-devel,libffi-devel,libdw-devel,libelf-devel%{libnuma_dep} base-4.13.0.0
|
|
|
|
%ghc_lib_subpackage -d binary-0.8.7.0
|
2020-01-19 12:18:21 +00:00
|
|
|
%ghc_lib_subpackage -d bytestring-0.10.10.0
|
2019-12-29 10:45:55 +00:00
|
|
|
%ghc_lib_subpackage -d containers-0.6.2.1
|
2018-10-18 09:46:41 +00:00
|
|
|
%ghc_lib_subpackage -d deepseq-1.4.4.0
|
2020-01-19 12:18:21 +00:00
|
|
|
%ghc_lib_subpackage -d directory-1.3.4.0
|
2018-10-18 09:46:41 +00:00
|
|
|
%ghc_lib_subpackage -d filepath-1.4.2.1
|
2017-05-29 11:09:39 +00:00
|
|
|
%ghc_lib_subpackage -d -x ghc-%{ghc_version_override}
|
|
|
|
%ghc_lib_subpackage -d ghc-boot-%{ghc_version_override}
|
|
|
|
%ghc_lib_subpackage -d ghc-boot-th-%{ghc_version_override}
|
2017-12-21 19:35:55 +00:00
|
|
|
%ghc_lib_subpackage -d ghc-compact-0.1.0.0
|
2018-10-18 09:46:41 +00:00
|
|
|
%ghc_lib_subpackage -d ghc-heap-%{ghc_version_override}
|
2017-05-29 11:09:39 +00:00
|
|
|
%ghc_lib_subpackage -d -x ghci-%{ghc_version_override}
|
2019-12-29 10:45:55 +00:00
|
|
|
%ghc_lib_subpackage -d haskeline-0.7.5.0
|
2017-05-29 11:09:39 +00:00
|
|
|
%ghc_lib_subpackage -d hpc-0.6.0.3
|
2019-12-29 10:45:55 +00:00
|
|
|
%ghc_lib_subpackage -d libiserv-%{ghc_version_override}
|
2018-05-14 13:15:35 +00:00
|
|
|
%ghc_lib_subpackage -d mtl-2.2.2
|
2019-12-29 10:45:55 +00:00
|
|
|
%ghc_lib_subpackage -d parsec-3.1.14.0
|
2018-05-14 13:15:35 +00:00
|
|
|
%ghc_lib_subpackage -d pretty-1.1.3.6
|
2020-01-19 12:18:21 +00:00
|
|
|
%ghc_lib_subpackage -d process-1.6.7.0
|
2018-10-18 09:46:41 +00:00
|
|
|
%ghc_lib_subpackage -d stm-2.5.0.0
|
2019-12-29 10:45:55 +00:00
|
|
|
%ghc_lib_subpackage -d template-haskell-2.15.0.0
|
|
|
|
%ghc_lib_subpackage -d -c ncurses-devel terminfo-0.4.1.4
|
|
|
|
%ghc_lib_subpackage -d text-1.2.4.0
|
|
|
|
%ghc_lib_subpackage -d time-1.9.3
|
2019-03-06 19:33:34 +00:00
|
|
|
%ghc_lib_subpackage -d transformers-0.5.6.2
|
2017-12-21 19:35:55 +00:00
|
|
|
%ghc_lib_subpackage -d unix-2.7.2.2
|
2018-05-14 13:15:35 +00:00
|
|
|
%ghc_lib_subpackage -d xhtml-3000.2.2.1
|
2012-01-11 22:02:10 +00:00
|
|
|
%endif
|
|
|
|
|
2012-01-27 10:47:59 +00:00
|
|
|
%global version %{ghc_version_override}
|
2007-11-14 20:15:15 +00:00
|
|
|
|
2012-06-03 15:38:23 +00:00
|
|
|
%package libraries
|
2012-11-06 16:12:44 +00:00
|
|
|
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}
|
2012-06-03 15:38:23 +00:00
|
|
|
%{?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.
|
|
|
|
|
2007-11-14 20:15:15 +00:00
|
|
|
%prep
|
2012-01-11 22:02:10 +00:00
|
|
|
%setup -q
|
2019-12-28 17:01:53 +00:00
|
|
|
%ifarch ppc64 s390 s390x
|
2018-10-18 09:46:41 +00:00
|
|
|
%patch3 -p1
|
|
|
|
%endif
|
2020-01-01 15:27:50 +00:00
|
|
|
%patch6 -p1
|
2017-12-21 19:35:55 +00:00
|
|
|
%patch35 -p1
|
2017-02-22 20:36:57 +00:00
|
|
|
%patch100 -p1
|
2017-05-29 11:09:39 +00:00
|
|
|
%patch110 -p1
|
2015-07-17 14:55:57 +00:00
|
|
|
|
2012-01-27 10:47:59 +00:00
|
|
|
%build
|
2013-12-19 11:36:13 +00:00
|
|
|
cat > mk/build.mk <<EOF
|
2017-12-21 19:35:55 +00:00
|
|
|
%ifarch aarch64 %{arm}
|
|
|
|
BuildFlavour = perf-llvm
|
|
|
|
%else
|
2013-09-05 06:14:00 +00:00
|
|
|
BuildFlavour = perf
|
2013-09-27 14:30:03 +00:00
|
|
|
%endif
|
2013-12-19 11:36:13 +00:00
|
|
|
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
|
2012-01-27 10:47:59 +00:00
|
|
|
GhcLibWays = v %{!?ghc_without_shared:dyn} %{!?without_prof:p}
|
2014-11-05 21:40:33 +00:00
|
|
|
%if %{defined ghc_without_shared}
|
|
|
|
DYNAMIC_BY_DEFAULT = NO
|
|
|
|
DYNAMIC_GHC_PROGRAMS = NO
|
|
|
|
%endif
|
2013-12-19 11:36:13 +00:00
|
|
|
%ifarch %{unregisterised_archs}
|
|
|
|
GhcUnregisterised = YES
|
|
|
|
GhcWithNativeCodeGen = NO
|
|
|
|
SRC_HC_OPTS = -O -H64m
|
|
|
|
GhcStage1HcOpts = -O
|
2014-11-05 21:40:33 +00:00
|
|
|
GhcStage2HcOpts = -O
|
2013-12-19 11:36:13 +00:00
|
|
|
GhcHcOpts = -Rghc-timing
|
2014-11-05 21:40:33 +00:00
|
|
|
GhcLibHcOpts = -O
|
2016-09-28 10:48:25 +00:00
|
|
|
SRC_HC_OPTS += -optc-fno-builtin -optc-Wno-return-type
|
|
|
|
SRC_CC_OPTS += -fno-builtin -Wno-return-type
|
2013-09-27 14:30:03 +00:00
|
|
|
%endif
|
2012-01-27 10:47:59 +00:00
|
|
|
%if %{defined without_haddock}
|
|
|
|
HADDOCK_DOCS = NO
|
|
|
|
%endif
|
2016-09-28 10:48:25 +00:00
|
|
|
BUILD_SPHINX_PS = NO
|
2012-01-27 10:47:59 +00:00
|
|
|
%if %{defined without_manual}
|
2016-09-28 10:48:25 +00:00
|
|
|
BUILD_SPHINX_HTML = NO
|
|
|
|
BUILD_SPHINX_PDF = NO
|
2012-01-27 10:47:59 +00:00
|
|
|
%endif
|
|
|
|
%if %{defined without_hscolour}
|
|
|
|
HSCOLOUR_SRCS = NO
|
2012-01-11 22:02:10 +00:00
|
|
|
%endif
|
2012-01-27 10:47:59 +00:00
|
|
|
EOF
|
2008-04-01 22:04:35 +00:00
|
|
|
|
2012-01-27 10:47:59 +00:00
|
|
|
export CFLAGS="${CFLAGS:-%optflags}"
|
2012-06-26 16:06:48 +00:00
|
|
|
./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} \
|
2017-02-22 20:36:57 +00:00
|
|
|
--with-system-libffi
|
2012-01-11 22:02:10 +00:00
|
|
|
|
2019-12-28 17:01:53 +00:00
|
|
|
%ifnarch s390 s390x riscv64
|
2018-11-07 10:46:16 +00:00
|
|
|
%if 0%{?suse_version} >= 1500
|
2018-11-07 09:45:55 +00:00
|
|
|
%limit_build -m 2000
|
2012-01-11 22:02:10 +00:00
|
|
|
make %{?_smp_mflags}
|
2018-11-07 10:46:16 +00:00
|
|
|
%else
|
|
|
|
make -j 2
|
|
|
|
%endif
|
2015-05-28 11:21:57 +00:00
|
|
|
%else
|
2019-12-28 17:01:53 +00:00
|
|
|
make
|
2015-05-28 11:21:57 +00:00
|
|
|
%endif
|
2007-11-14 20:15:15 +00:00
|
|
|
|
|
|
|
%install
|
2018-05-14 13:15:35 +00:00
|
|
|
%if 0%{?suse_version} <= 1320
|
|
|
|
%ghc_suse_disable_debug_packages
|
|
|
|
%endif
|
2012-02-19 20:48:10 +00:00
|
|
|
%makeinstall
|
2012-01-11 22:02:10 +00:00
|
|
|
|
2012-01-27 10:47:59 +00:00
|
|
|
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
|
2019-12-29 10:45:55 +00:00
|
|
|
# TODO: containers have license in $name/$name
|
|
|
|
#echo "%%doc libraries/$name/LICENSE" >> ghc-$name.files
|
2012-01-27 10:47:59 +00:00
|
|
|
done
|
2012-01-11 22:02:10 +00:00
|
|
|
|
2013-07-31 16:21:12 +00:00
|
|
|
# ghc-base should own ghclibdir
|
|
|
|
echo "%dir %{ghclibdir}" >> ghc-base.files
|
|
|
|
|
2012-01-27 10:47:59 +00:00
|
|
|
%ghc_gen_filelists ghc %{ghc_version_override}
|
2016-09-28 10:48:25 +00:00
|
|
|
%ghc_gen_filelists ghci %{ghc_version_override}
|
2018-10-18 09:46:41 +00:00
|
|
|
%ghc_gen_filelists ghc-prim 0.5.3
|
2018-05-14 13:15:35 +00:00
|
|
|
%ghc_gen_filelists integer-gmp 1.0.2.0
|
2012-01-27 10:47:59 +00:00
|
|
|
|
|
|
|
%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
|
|
|
|
|
|
|
|
%if %{undefined ghc_without_shared}
|
2015-08-20 05:53:26 +00:00
|
|
|
echo %%dir %{ghclibdir}/rts >> ghc-base.files
|
|
|
|
ls %{buildroot}%{ghclibdir}/rts/libHS*.so >> ghc-base.files
|
2013-07-31 16:21:12 +00:00
|
|
|
sed -i -e "s|^%{buildroot}||g" ghc-base.files
|
2012-01-27 10:47:59 +00:00
|
|
|
%endif
|
2015-08-20 05:53:26 +00:00
|
|
|
echo %%dir %{ghclibdir}/rts >> ghc-base-devel.files
|
2016-09-28 10:48:25 +00:00
|
|
|
ls -d %{buildroot}%{ghclibdir}/rts/libHS*.a %{buildroot}%{ghclibdir}/package.conf.d/rts.conf %{buildroot}%{ghclibdir}/include >> ghc-base-devel.files
|
2013-07-31 16:21:12 +00:00
|
|
|
sed -i -e "s|^%{buildroot}||g" ghc-base-devel.files
|
2012-01-11 22:02:10 +00:00
|
|
|
|
|
|
|
# these are handled as alternatives
|
2014-11-05 21:40:33 +00:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
2012-01-11 22:02:10 +00:00
|
|
|
for i in hsc2hs runhaskell; do
|
2013-07-31 16:21:12 +00:00
|
|
|
if [ -x %{buildroot}%{_bindir}/$i-ghc ]; then
|
|
|
|
rm %{buildroot}%{_bindir}/$i
|
2012-01-11 22:02:10 +00:00
|
|
|
else
|
2013-07-31 16:21:12 +00:00
|
|
|
mv %{buildroot}%{_bindir}/$i{,-ghc}
|
2012-01-11 22:02:10 +00:00
|
|
|
fi
|
2014-11-05 21:40:33 +00:00
|
|
|
ln -s -f %{_sysconfdir}/alternatives/$i %{buildroot}%{_bindir}/$i
|
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/$i
|
2012-01-11 22:02:10 +00:00
|
|
|
done
|
|
|
|
|
2018-06-05 13:10:29 +00:00
|
|
|
%if 0%{?suse_version} <= 1320
|
2012-01-27 10:47:59 +00:00
|
|
|
%ghc_strip_dynlinked
|
2018-06-05 13:10:29 +00:00
|
|
|
%endif
|
2012-01-27 10:47:59 +00:00
|
|
|
|
2016-09-28 10:48:25 +00:00
|
|
|
find %{buildroot}%{ghclibdocdir} -name LICENSE -exec rm '{}' ';'
|
|
|
|
|
2012-06-26 16:06:48 +00:00
|
|
|
%check
|
2012-10-13 13:11:56 +00:00
|
|
|
# Actually, I took this from Jens Petersen's Fedora package
|
2012-06-26 16:06:48 +00:00
|
|
|
# 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
|
2014-11-05 21:40:33 +00:00
|
|
|
#inplace/bin/ghc-stage2 testghc/foo.hs -o testghc/foo -dynamic
|
|
|
|
#[ "$(testghc/foo)" = "Foo" ]
|
2012-06-26 16:06:48 +00:00
|
|
|
rm testghc/*
|
|
|
|
%endif
|
|
|
|
|
2012-06-03 15:38:23 +00:00
|
|
|
%post compiler
|
2012-01-27 10:47:59 +00:00
|
|
|
# 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*
|
2016-08-19 08:28:46 +00:00
|
|
|
%{_sbindir}/update-alternatives --install %{_bindir}/runhaskell runhaskell %{_bindir}/runghc 500
|
|
|
|
%{_sbindir}/update-alternatives --install %{_bindir}/hsc2hs hsc2hs %{_bindir}/hsc2hs-ghc 500
|
2007-11-14 20:15:15 +00:00
|
|
|
|
2012-06-03 15:38:23 +00:00
|
|
|
%preun compiler
|
2007-11-14 20:15:15 +00:00
|
|
|
if test "$1" = 0; then
|
2016-08-19 08:28:46 +00:00
|
|
|
%{_sbindir}/update-alternatives --remove runhaskell %{_bindir}/runghc
|
|
|
|
%{_sbindir}/update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc
|
2007-11-14 20:15:15 +00:00
|
|
|
fi
|
|
|
|
|
2012-01-27 10:47:59 +00:00
|
|
|
%files
|
2018-04-26 07:07:46 +00:00
|
|
|
%license LICENSE
|
2012-06-03 15:38:23 +00:00
|
|
|
|
|
|
|
%files compiler
|
2018-04-26 07:07:46 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc ANNOUNCE
|
2012-01-27 10:47:59 +00:00
|
|
|
%{_bindir}/ghc
|
|
|
|
%{_bindir}/ghc-%{version}
|
|
|
|
%{_bindir}/ghc-pkg
|
|
|
|
%{_bindir}/ghc-pkg-%{version}
|
|
|
|
%{_bindir}/ghci
|
|
|
|
%{_bindir}/ghci-%{version}
|
|
|
|
%{_bindir}/hp2ps
|
|
|
|
%{_bindir}/hpc
|
2014-11-05 21:40:33 +00:00
|
|
|
%{_bindir}/hsc2hs
|
|
|
|
%ghost %{_sysconfdir}/alternatives/hsc2hs
|
2012-01-27 10:47:59 +00:00
|
|
|
%{_bindir}/hsc2hs-ghc
|
|
|
|
%{_bindir}/runghc
|
2013-07-31 16:21:12 +00:00
|
|
|
%{_bindir}/runghc-%{version}
|
2014-11-05 21:40:33 +00:00
|
|
|
%{_bindir}/runhaskell
|
|
|
|
%ghost %{_sysconfdir}/alternatives/runhaskell
|
2012-01-27 10:47:59 +00:00
|
|
|
%{_bindir}/runhaskell-ghc
|
2014-11-05 21:40:33 +00:00
|
|
|
%dir %{ghclibdir}
|
2012-06-06 13:50:28 +00:00
|
|
|
%{ghclibdir}/settings
|
2014-11-05 21:40:33 +00:00
|
|
|
%dir %{ghclibdir}/bin
|
|
|
|
%{ghclibdir}/bin/ghc
|
|
|
|
%{ghclibdir}/bin/ghc-pkg
|
2016-09-28 10:48:25 +00:00
|
|
|
%{ghclibdir}/bin/ghc-iserv
|
|
|
|
%{ghclibdir}/bin/ghc-iserv-dyn
|
|
|
|
%{ghclibdir}/bin/ghc-iserv-prof
|
2017-12-21 19:35:55 +00:00
|
|
|
%{ghclibdir}/bin/hp2ps
|
2014-11-05 21:40:33 +00:00
|
|
|
%{ghclibdir}/bin/hpc
|
|
|
|
%{ghclibdir}/bin/hsc2hs
|
2012-01-27 10:47:59 +00:00
|
|
|
%ifnarch %{unregisterised_archs}
|
2016-09-28 10:48:25 +00:00
|
|
|
%{ghclibdir}/bin/ghc-split
|
2012-01-26 17:15:15 +00:00
|
|
|
%endif
|
2012-01-27 10:47:59 +00:00
|
|
|
%{ghclibdir}/ghc-usage.txt
|
|
|
|
%{ghclibdir}/ghci-usage.txt
|
|
|
|
%dir %{ghclibdir}/package.conf.d
|
|
|
|
%ghost %{ghclibdir}/package.conf.d/package.cache
|
2017-12-21 19:35:55 +00:00
|
|
|
%ghost %{ghclibdir}/package.conf.d/package.cache.lock
|
2014-11-05 21:40:33 +00:00
|
|
|
%{ghclibdir}/platformConstants
|
|
|
|
%{ghclibdir}/bin/runghc
|
2012-01-27 10:47:59 +00:00
|
|
|
%{ghclibdir}/template-hsc.h
|
2016-09-28 10:48:25 +00:00
|
|
|
%{ghclibdir}/bin/unlit
|
|
|
|
%dir %{_datadir}/doc/ghc-%{version}
|
2012-01-27 10:47:59 +00:00
|
|
|
%dir %{ghcdocbasedir}
|
|
|
|
%dir %{ghcdocbasedir}/libraries
|
2014-11-05 21:40:33 +00:00
|
|
|
%if %{undefined without_manual}
|
2012-06-06 13:50:28 +00:00
|
|
|
%{_mandir}/man1/ghc.*
|
2014-11-05 21:40:33 +00:00
|
|
|
%endif
|
2012-01-27 10:47:59 +00:00
|
|
|
%if %{undefined without_haddock}
|
|
|
|
%{_bindir}/haddock
|
|
|
|
%{_bindir}/haddock-ghc-%{version}
|
|
|
|
%{ghclibdir}/html
|
|
|
|
%{ghclibdir}/latex
|
2018-10-18 09:46:41 +00:00
|
|
|
%{ghclibdir}/llvm-passes
|
2018-05-14 13:15:35 +00:00
|
|
|
%{ghclibdir}/llvm-targets
|
2014-11-05 21:40:33 +00:00
|
|
|
%{ghclibdir}/bin/haddock
|
2012-01-27 10:47:59 +00:00
|
|
|
%if %{undefined without_manual}
|
|
|
|
%{ghcdocbasedir}/haddock
|
|
|
|
%{ghcdocbasedir}/users_guide
|
2012-01-11 22:02:10 +00:00
|
|
|
%endif
|
2012-01-27 10:47:59 +00:00
|
|
|
%{ghcdocbasedir}/libraries/gen_contents_index
|
2019-12-29 10:45:55 +00:00
|
|
|
#%%{ghcdocbasedir}/libraries/hslogo-16.png
|
|
|
|
#%%{ghcdocbasedir}/libraries/ocean.css
|
|
|
|
%{ghcdocbasedir}/libraries/linuwial.css
|
2018-05-14 13:15:35 +00:00
|
|
|
%{ghcdocbasedir}/libraries/quick-jump.css
|
2012-01-27 10:47:59 +00:00
|
|
|
%{ghcdocbasedir}/libraries/prologue.txt
|
2013-07-31 16:21:12 +00:00
|
|
|
%{ghcdocbasedir}/libraries/synopsis.png
|
2012-01-27 10:47:59 +00:00
|
|
|
%{ghcdocbasedir}/index.html
|
|
|
|
%ghost %{ghcdocbasedir}/libraries/doc-index*.html
|
2018-05-14 13:15:35 +00:00
|
|
|
%ghost %{ghcdocbasedir}/libraries/haddock-bundle.min.js
|
2012-01-27 10:47:59 +00:00
|
|
|
%ghost %{ghcdocbasedir}/libraries/haddock-util.js
|
|
|
|
%ghost %{ghcdocbasedir}/libraries/index*.html
|
|
|
|
%ghost %{ghcdocbasedir}/libraries/minus.gif
|
|
|
|
%ghost %{ghcdocbasedir}/libraries/plus.gif
|
2012-01-11 22:02:10 +00:00
|
|
|
%endif
|
2018-06-05 13:10:29 +00:00
|
|
|
# With 1.7.4 of ghc-rpm-macros license files are installed here
|
|
|
|
# but rpm does not own this directory on older openSUSE.
|
|
|
|
%if 0%{?suse_version} <= 1320
|
|
|
|
%dir %{_datadir}/licenses
|
|
|
|
%endif
|
2007-11-14 20:15:15 +00:00
|
|
|
|
2012-06-03 15:38:23 +00:00
|
|
|
%files libraries
|
2018-04-26 07:07:46 +00:00
|
|
|
%license LICENSE
|
2012-06-03 15:38:23 +00:00
|
|
|
|
2007-11-14 20:15:15 +00:00
|
|
|
%changelog
|