Accepting request 99816 from home:ptrommler:devel:languages:haskell:platform-2011.4
Haskell Platform 2011.4 OBS-URL: https://build.opensuse.org/request/show/99816 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=83
This commit is contained in:
parent
bcd4c9ded2
commit
636ff98665
145
Cabal-option-executable-dynamic.patch
Normal file
145
Cabal-option-executable-dynamic.patch
Normal file
@ -0,0 +1,145 @@
|
||||
diff -rN -u old-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Configure.hs new-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Configure.hs
|
||||
--- old-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Configure.hs 2011-01-22 14:49:22.000000000 +1000
|
||||
+++ new-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Configure.hs 2011-01-22 14:49:22.000000000 +1000
|
||||
@@ -488,6 +488,7 @@
|
||||
withVanillaLib = fromFlag $ configVanillaLib cfg,
|
||||
withProfLib = fromFlag $ configProfLib cfg,
|
||||
withSharedLib = fromFlag $ configSharedLib cfg,
|
||||
+ withDynExe = fromFlag $ configDynExe cfg,
|
||||
withProfExe = fromFlag $ configProfExe cfg,
|
||||
withOptimization = fromFlag $ configOptimization cfg,
|
||||
withGHCiLib = fromFlag $ configGHCiLib cfg,
|
||||
diff -u ghc-7.0.1/libraries/Cabal/Distribution/Simple/GHC.hs.orig ghc-7.0.1/libraries/Cabal/Distribution/Simple/GHC.hs
|
||||
--- ghc-7.0.1/libraries/Cabal/Distribution/Simple/GHC.hs.orig 2010-11-13 04:10:09.000000000 +1000
|
||||
+++ ghc-7.0.1/libraries/Cabal/Distribution/Simple/GHC.hs 2011-01-22 14:52:52.000000000 +1000
|
||||
@@ -537,6 +537,7 @@
|
||||
info verbosity "Building C Sources..."
|
||||
sequence_ [do let (odir,args) = constructCcCmdLine lbi libBi clbi pref
|
||||
filename verbosity
|
||||
+ False
|
||||
(withProfLib lbi)
|
||||
createDirectoryIfMissingVerbose verbosity True odir
|
||||
runGhcProg args
|
||||
@@ -671,7 +672,7 @@
|
||||
info verbosity "Building C Sources."
|
||||
sequence_ [do let (odir,args) = constructCcCmdLine lbi exeBi clbi
|
||||
exeDir filename verbosity
|
||||
- (withProfExe lbi)
|
||||
+ (withDynExe lbi) (withProfExe lbi)
|
||||
createDirectoryIfMissingVerbose verbosity True odir
|
||||
runGhcProg args
|
||||
| filename <- cSources exeBi]
|
||||
@@ -679,7 +680,7 @@
|
||||
srcMainFile <- findFile (exeDir : hsSourceDirs exeBi) modPath
|
||||
|
||||
let cObjs = map (`replaceExtension` objExtension) (cSources exeBi)
|
||||
- let binArgs linkExe profExe =
|
||||
+ let binArgs linkExe dynExe profExe =
|
||||
"--make"
|
||||
: (if linkExe
|
||||
then ["-o", targetDir </> exeNameReal]
|
||||
@@ -691,6 +692,9 @@
|
||||
++ ["-l"++lib | lib <- extraLibs exeBi]
|
||||
++ ["-L"++libDir | libDir <- extraLibDirs exeBi]
|
||||
++ concat [["-framework", f] | f <- PD.frameworks exeBi]
|
||||
+ ++ if dynExe
|
||||
+ then ["-dynamic"]
|
||||
+ else []
|
||||
++ if profExe
|
||||
then ["-prof",
|
||||
"-hisuf", "p_hi",
|
||||
@@ -704,9 +708,9 @@
|
||||
-- run at compile time needs to be the vanilla ABI so it can
|
||||
-- be loaded up and run by the compiler.
|
||||
when (withProfExe lbi && TemplateHaskell `elem` allExtensions exeBi)
|
||||
- (runGhcProg (binArgs False False))
|
||||
+ (runGhcProg (binArgs (withDynExe lbi) False False))
|
||||
|
||||
- runGhcProg (binArgs True (withProfExe lbi))
|
||||
+ runGhcProg (binArgs True (withDynExe lbi) (withProfExe lbi))
|
||||
|
||||
-- | Filter the "-threaded" flag when profiling as it does not
|
||||
-- work with ghc-6.8 and older.
|
||||
@@ -836,9 +840,9 @@
|
||||
ierror = error ("internal error: unexpected package db stack: " ++ show dbstack)
|
||||
|
||||
constructCcCmdLine :: LocalBuildInfo -> BuildInfo -> ComponentLocalBuildInfo
|
||||
- -> FilePath -> FilePath -> Verbosity -> Bool
|
||||
+ -> FilePath -> FilePath -> Verbosity -> Bool -> Bool
|
||||
->(FilePath,[String])
|
||||
-constructCcCmdLine lbi bi clbi pref filename verbosity profiling
|
||||
+constructCcCmdLine lbi bi clbi pref filename verbosity dynamic profiling
|
||||
= let odir | compilerVersion (compiler lbi) >= Version [6,4,1] [] = pref
|
||||
| otherwise = pref </> takeDirectory filename
|
||||
-- ghc 6.4.1 fixed a bug in -odir handling
|
||||
@@ -852,6 +856,7 @@
|
||||
-- option to ghc here when compiling C code, so that the PROFILING
|
||||
-- macro gets defined. The macro is used in ghc's Rts.h in the
|
||||
-- definitions of closure layouts (Closures.h).
|
||||
+ ++ ["-dynamic" | dynamic]
|
||||
++ ["-prof" | profiling])
|
||||
|
||||
ghcCcOptions :: LocalBuildInfo -> BuildInfo -> ComponentLocalBuildInfo
|
||||
diff -rN -u old-ghc-7.0.1/libraries/Cabal/Distribution/Simple/LocalBuildInfo.hs new-ghc-7.0.1/libraries/Cabal/Distribution/Simple/LocalBuildInfo.hs
|
||||
--- old-ghc-7.0.1/libraries/Cabal/Distribution/Simple/LocalBuildInfo.hs 2011-01-22 14:49:22.000000000 +1000
|
||||
+++ new-ghc-7.0.1/libraries/Cabal/Distribution/Simple/LocalBuildInfo.hs 2011-01-22 14:49:22.000000000 +1000
|
||||
@@ -118,6 +118,7 @@
|
||||
withVanillaLib:: Bool, -- ^Whether to build normal libs.
|
||||
withProfLib :: Bool, -- ^Whether to build profiling versions of libs.
|
||||
withSharedLib :: Bool, -- ^Whether to build shared versions of libs.
|
||||
+ withDynExe :: Bool, -- ^Whether to link executables dynamically
|
||||
withProfExe :: Bool, -- ^Whether to build executables for profiling.
|
||||
withOptimization :: OptimisationLevel, -- ^Whether to build with optimization (if available).
|
||||
withGHCiLib :: Bool, -- ^Whether to build libs suitable for use with GHCi.
|
||||
diff -rN -u old-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Setup.hs new-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Setup.hs
|
||||
--- old-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Setup.hs 2011-01-22 14:49:22.000000000 +1000
|
||||
+++ new-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Setup.hs 2011-01-22 14:49:22.000000000 +1000
|
||||
@@ -270,6 +270,7 @@
|
||||
configVanillaLib :: Flag Bool, -- ^Enable vanilla library
|
||||
configProfLib :: Flag Bool, -- ^Enable profiling in the library
|
||||
configSharedLib :: Flag Bool, -- ^Build shared library
|
||||
+ configDynExe :: Flag Bool, -- ^Enable dynamic linking of the executables.
|
||||
configProfExe :: Flag Bool, -- ^Enable profiling in the executables.
|
||||
configConfigureArgs :: [String], -- ^Extra arguments to @configure@
|
||||
configOptimization :: Flag OptimisationLevel, -- ^Enable optimization.
|
||||
@@ -301,6 +302,7 @@
|
||||
configVanillaLib = Flag True,
|
||||
configProfLib = Flag False,
|
||||
configSharedLib = Flag False,
|
||||
+ configDynExe = Flag False,
|
||||
configProfExe = Flag False,
|
||||
configOptimization = Flag NormalOptimisation,
|
||||
configProgPrefix = Flag (toPathTemplate ""),
|
||||
@@ -388,10 +390,16 @@
|
||||
configSharedLib (\v flags -> flags { configSharedLib = v })
|
||||
(boolOpt [] [])
|
||||
|
||||
+ ,option "" ["executable-dynamic"]
|
||||
+ "Executable dynamic linking (fedora patch)"
|
||||
+ configDynExe (\v flags -> flags { configDynExe = v })
|
||||
+ (boolOpt [] [])
|
||||
+
|
||||
,option "" ["executable-profiling"]
|
||||
"Executable profiling"
|
||||
configProfExe (\v flags -> flags { configProfExe = v })
|
||||
(boolOpt [] [])
|
||||
+
|
||||
,multiOption "optimization"
|
||||
configOptimization (\v flags -> flags { configOptimization = v })
|
||||
[optArg' "n" (Flag . flagToOptimisationLevel)
|
||||
@@ -553,6 +561,7 @@
|
||||
configVanillaLib = mempty,
|
||||
configProfLib = mempty,
|
||||
configSharedLib = mempty,
|
||||
+ configDynExe = mempty,
|
||||
configProfExe = mempty,
|
||||
configConfigureArgs = mempty,
|
||||
configOptimization = mempty,
|
||||
@@ -583,6 +592,7 @@
|
||||
configVanillaLib = combine configVanillaLib,
|
||||
configProfLib = combine configProfLib,
|
||||
configSharedLib = combine configSharedLib,
|
||||
+ configDynExe = combine configDynExe,
|
||||
configProfExe = combine configProfExe,
|
||||
configConfigureArgs = combine configConfigureArgs,
|
||||
configOptimization = combine configOptimization,
|
3
_service
Normal file
3
_service
Normal file
@ -0,0 +1,3 @@
|
||||
<services>
|
||||
<service name="download_url"><param name="path">/ghc/dist/7.0.4/ghc-7.0.4-src.tar.bz2</param><param name="host">haskell.org</param></service>
|
||||
</services>
|
3
_service:download_url:ghc-7.0.4-src.tar.bz2
Normal file
3
_service:download_url:ghc-7.0.4-src.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1a9b78d9d66c9c21de6c0932e36bb87406a4856f1611bf83bd44539bdc6ed0ed
|
||||
size 24205070
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dcb7113104bfc2f864d7b6cf696a5192c817a3f93168e833b025ae4334b2c6df
|
||||
size 493287
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d66a8e52572f4ff819fe5c4e34c6dd1e84a7763e25c3fadcc222453c0bd8534d
|
||||
size 8060565
|
120
ghc-use-system-libffi.patch
Normal file
120
ghc-use-system-libffi.patch
Normal file
@ -0,0 +1,120 @@
|
||||
diff -up ghc-7.0.1/compiler/ghc.cabal.in.libffi ghc-7.0.1/compiler/ghc.cabal.in
|
||||
--- ghc-7.0.1/compiler/ghc.cabal.in.libffi 2010-11-13 04:10:03.000000000 +1000
|
||||
+++ ghc-7.0.1/compiler/ghc.cabal.in 2010-11-16 19:04:28.000000000 +1000
|
||||
@@ -83,7 +83,7 @@ Library
|
||||
if flag(ghci)
|
||||
Build-Depends: template-haskell
|
||||
CPP-Options: -DGHCI
|
||||
- Include-Dirs: ../libffi/build/include
|
||||
+ pkgconfig-depends: libffi
|
||||
|
||||
if !flag(ncg)
|
||||
CPP-Options: -DOMIT_NATIVE_CODEGEN
|
||||
diff -up ghc-7.0.1/ghc.mk.libffi ghc-7.0.1/ghc.mk
|
||||
--- ghc-7.0.1/ghc.mk.libffi 2010-11-13 04:10:05.000000000 +1000
|
||||
+++ ghc-7.0.1/ghc.mk 2010-11-16 19:04:28.000000000 +1000
|
||||
@@ -437,7 +437,6 @@ utils/runghc/dist/package-data.mk: compi
|
||||
# add the final two package.conf dependencies: ghc-prim depends on RTS,
|
||||
# and RTS depends on libffi.
|
||||
libraries/ghc-prim/dist-install/package-data.mk : rts/package.conf.inplace
|
||||
-rts/package.conf.inplace : libffi/package.conf.inplace
|
||||
endif
|
||||
|
||||
# --------------------------------
|
||||
@@ -452,11 +451,6 @@ ALL_STAGE1_LIBS += $(foreach lib,$(PACKA
|
||||
endif
|
||||
BOOT_LIBS = $(foreach lib,$(STAGE0_PACKAGES),$(libraries/$(lib)_dist-boot_v_LIB))
|
||||
|
||||
-OTHER_LIBS = libffi/dist-install/build/libHSffi$(v_libsuf) libffi/dist-install/build/HSffi.o
|
||||
-ifeq "$(BuildSharedLibs)" "YES"
|
||||
-OTHER_LIBS += libffi/dist-install/build/libHSffi$(dyn_libsuf)
|
||||
-endif
|
||||
-
|
||||
# ----------------------------------------
|
||||
# Special magic for the ghc-prim package
|
||||
|
||||
@@ -581,7 +575,6 @@ BUILD_DIRS += \
|
||||
driver/ghci \
|
||||
driver/ghc \
|
||||
driver/haddock \
|
||||
- libffi \
|
||||
includes \
|
||||
rts
|
||||
|
||||
@@ -937,11 +930,10 @@ INSTALL_DISTDIR_compiler = stage2
|
||||
|
||||
# Now we can do the installation
|
||||
install_packages: install_libexecs
|
||||
-install_packages: libffi/package.conf.install rts/package.conf.install
|
||||
+install_packages: rts/package.conf.install
|
||||
$(call INSTALL_DIR,"$(DESTDIR)$(topdir)")
|
||||
"$(RM)" $(RM_OPTS_REC) "$(INSTALLED_PACKAGE_CONF)"
|
||||
$(call INSTALL_DIR,"$(INSTALLED_PACKAGE_CONF)")
|
||||
- "$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update libffi/package.conf.install
|
||||
"$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update rts/package.conf.install
|
||||
$(foreach p, $(INSTALLED_PKG_DIRS), \
|
||||
$(call make-command, \
|
||||
@@ -1024,7 +1016,7 @@ BIN_DIST_MK = $(BIN_DIST_PREP_DIR)/bindi
|
||||
unix-binary-dist-prep:
|
||||
"$(RM)" $(RM_OPTS_REC) bindistprep/
|
||||
"$(MKDIRHIER)" $(BIN_DIST_PREP_DIR)
|
||||
- set -e; for i in packages LICENSE compiler ghc rts libraries utils docs libffi includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh extra-gcc-opts.in ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done
|
||||
+ set -e; for i in packages LICENSE compiler ghc rts libraries utils docs includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh extra-gcc-opts.in ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done
|
||||
echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(BIN_DIST_MK)
|
||||
echo "LATEX_DOCS = $(LATEX_DOCS)" >> $(BIN_DIST_MK)
|
||||
echo "BUILD_DOCBOOK_HTML = $(BUILD_DOCBOOK_HTML)" >> $(BIN_DIST_MK)
|
||||
@@ -1102,7 +1094,7 @@ SRC_DIST_DIR=$(shell pwd)/$(SRC_DIST_NAM
|
||||
#
|
||||
# Files to include in source distributions
|
||||
#
|
||||
-SRC_DIST_DIRS = mk rules docs distrib bindisttest libffi includes utils docs rts compiler ghc driver libraries ghc-tarballs
|
||||
+SRC_DIST_DIRS = mk rules docs distrib bindisttest includes utils docs rts compiler ghc driver libraries ghc-tarballs
|
||||
SRC_DIST_FILES += \
|
||||
configure.ac config.guess config.sub configure \
|
||||
aclocal.m4 README ANNOUNCE HACKING LICENSE Makefile install-sh \
|
||||
diff -up ghc-7.0.1/rts/ghc.mk.libffi ghc-7.0.1/rts/ghc.mk
|
||||
--- ghc-7.0.1/rts/ghc.mk.libffi 2010-11-13 04:10:06.000000000 +1000
|
||||
+++ ghc-7.0.1/rts/ghc.mk 2010-11-16 19:06:09.000000000 +1000
|
||||
@@ -430,15 +430,15 @@ endif
|
||||
|
||||
$(eval $(call build-dependencies,rts,dist,1))
|
||||
|
||||
-$(rts_dist_depfile_c_asm) : libffi/dist-install/build/ffi.h $(DTRACEPROBES_H)
|
||||
+$(rts_dist_depfile_c_asm) : $(DTRACEPROBES_H)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# libffi stuff
|
||||
|
||||
-rts_CC_OPTS += -Ilibffi/build/include
|
||||
-rts_HC_OPTS += -Ilibffi/build/include
|
||||
-rts_HSC2HS_OPTS += -Ilibffi/build/include
|
||||
-rts_LD_OPTS += -Llibffi/build/include
|
||||
+rts_CC_OPTS += $(shell pkg-config --cflags libffi)
|
||||
+rts_HC_OPTS += $(shell pkg-config --cflags libffi)
|
||||
+rts_HSC2HS_OPTS += $(shell pkg-config --cflags libffi)
|
||||
+rts_LD_OPTS += $(shell pkg-config --libs libffi)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# compile dtrace probes if dtrace is supported
|
||||
diff -up ghc-7.0.1/rts/package.conf.in.libffi ghc-7.0.1/rts/package.conf.in
|
||||
--- ghc-7.0.1/rts/package.conf.in.libffi 2010-11-13 04:10:06.000000000 +1000
|
||||
+++ ghc-7.0.1/rts/package.conf.in 2010-11-16 19:04:28.000000000 +1000
|
||||
@@ -24,8 +24,9 @@ library-dirs: TOP"/rts/dist/build" PAPI
|
||||
hs-libraries: "HSrts"
|
||||
|
||||
extra-libraries:
|
||||
+ "ffi"
|
||||
#ifdef HAVE_LIBM
|
||||
- "m" /* for ldexp() */
|
||||
+ , "m" /* for ldexp() */
|
||||
#endif
|
||||
#ifdef HAVE_LIBRT
|
||||
, "rt"
|
||||
@@ -55,7 +56,6 @@ include-dirs: TOP"/includes"
|
||||
#endif
|
||||
|
||||
includes: Stg.h
|
||||
-depends: builtin_ffi
|
||||
hugs-options:
|
||||
cc-options:
|
||||
|
30
ghc.changes
30
ghc.changes
@ -1,21 +1,33 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jan 30 20:51:29 UTC 2010 - herbert@graeber-clan.de
|
||||
Wed Jan 4 17:31:04 UTC 2012 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- provide ghc-rpm-macros to ease bootsrapping of ghc-6.12.1
|
||||
- Enabled hscolour
|
||||
- Prepared for libffi patch (needs fix fo bnc#711489)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 28 20:30:55 UTC 2009 - herbert@graeber-clan.de
|
||||
Thu Dec 29 13:35:07 UTC 2011 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- drop support for openSUSE < 11.0
|
||||
- use "BuildRecommends" for alex and happy on openSUSE 11.2 and up
|
||||
- Lowered ghc BR to 6.10
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 4 20:21:38 UTC 2009 - herbert@graeber-clan.de
|
||||
Wed Dec 28 21:09:31 UTC 2011 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- must still use suns java for openSUSE 10.3
|
||||
- Added Cabal patch (required for ghc-rpm-macros)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 4 20:14:12 UTC 2009 - herbert@graeber-clan.de
|
||||
Wed Dec 28 19:00:09 UTC 2011 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- use java-1_6_0-openjdk instead of other java packages
|
||||
- unset bootstrapping
|
||||
- additional BR that should not be required
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 27 15:05:20 UTC 2011 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- Fixed versions and names in libraries
|
||||
- Fixed files section
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 22 18:22:32 UTC 2011 - peter.trommler@ohm-hochschule.de
|
||||
|
||||
- Start version 7.0.4
|
||||
|
||||
|
720
ghc.spec
720
ghc.spec
@ -1,293 +1,234 @@
|
||||
# Copyright (c) 2007-2009 Herbert Graeber
|
||||
# This file and all modifications and additions to the pristine
|
||||
# package are under the same license as the package itself.
|
||||
#
|
||||
# Please submit bugfixes or comments to herbert@links2linux.de
|
||||
# spec file for package ghc
|
||||
# based on fedora package
|
||||
#
|
||||
# Copyright (c) 2012 Peter Trommler peter.trommler@ohm-hochschule.de
|
||||
#
|
||||
# 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.
|
||||
|
||||
# norootforbuild
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
Name: ghc
|
||||
Version: 6.10.4
|
||||
Release: 0
|
||||
Summary: The Glasgow Haskell Compilation system
|
||||
Summary(de): Das Glasgow-Haskell-Compilation-System
|
||||
License: BSD3
|
||||
Group: Development/Languages/Haskell
|
||||
Source0: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2
|
||||
Source1: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src-extralibs.tar.bz2
|
||||
Source3: macros.ghc
|
||||
URL: http://haskell.org/ghc/
|
||||
Provides: haddock = 2.4.2
|
||||
Obsoletes: haddock <= 2.3.0, haddock-doc <= 2.3.0
|
||||
PreReq: update-alternatives
|
||||
Requires: gmp-devel
|
||||
Requires: libedit-devel
|
||||
Requires: update-alternatives
|
||||
BuildRequires: ghc >= 5.0
|
||||
%if %{suse_version} <= 1110
|
||||
BuildRequires: happy >= 1.15
|
||||
BuildRequires: alex >= 2.0
|
||||
# To bootstrap a new version of ghc, uncomment the following:
|
||||
#%%global ghc_bootstrapping 1
|
||||
#%%{?ghc_bootstrap}
|
||||
#%%global without_hscolour 1
|
||||
|
||||
%global debug_package %{nil}
|
||||
|
||||
%global without_manual 1
|
||||
#%%global without_haddock 1
|
||||
|
||||
#%%global libffi_archs %%{ix86} x86_64
|
||||
|
||||
|
||||
Name: ghc
|
||||
Version: 7.0.4
|
||||
Release: 1
|
||||
Group: Development/Languages/Other
|
||||
License: BSD
|
||||
Url: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.tar.bz2
|
||||
Summary: The Glorious Glasgow Haskell Compiler
|
||||
%if %{undefined ghc-bootsrapping}
|
||||
BuildRequires: ghc >= 6.10
|
||||
%else
|
||||
BuildRecommends: happy >= 1.15
|
||||
BuildRecommends: alex >= 2.0
|
||||
BuildRequires: ghc = %version
|
||||
%endif
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gmp-devel
|
||||
BuildRequires: texlive-latex
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: sgml-skel
|
||||
BuildRequires: docbook-xsl-stylesheets
|
||||
BuildRequires: docbook-utils
|
||||
BuildRequires: update-alternatives
|
||||
BuildRequires: java-1_6_0-openjdk
|
||||
BuildRequires: fop
|
||||
BuildRequires: xmltex
|
||||
%if 0%{?suse_version} >= 1110
|
||||
BuildRequires: dblatex
|
||||
BuildRequires: ghc-directory-devel ghc-process-devel ghc-pretty-devel
|
||||
BuildRequires: ghc-containers-devel ghc-haskell98-devel ghc-bytestring-devel
|
||||
BuildRequires: ghc-rpm-macros >= 0.14
|
||||
# up to ghc-time-devel should be Required by ghc, remove after fix!
|
||||
BuildRequires: ghc-base-devel ghc-filepath-devel ghc-unix-devel
|
||||
BuildRequires: ghc-array-devel ghc-old-locale-devel ghc-old-time-devel
|
||||
BuildRequires: ghc-random-devel
|
||||
BuildRequires: ghc-time-devel
|
||||
BuildRequires: gcc pkg-config
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: gmp-devel libffi-devel
|
||||
%if %{undefined without_manual}
|
||||
BuildRequires: libxslt docbook-xsl-stylesheets docbook-utils dblatex
|
||||
%endif
|
||||
BuildRequires: fdupes
|
||||
Provides: ghc-rpm-macros = 0.0.1
|
||||
Provides: haskell_compiler
|
||||
Provides: ghc-Cabal-devel = 1.6.0.3
|
||||
Provides: ghc-HUnit-devel = 1.2.0.3
|
||||
Provides: ghc-QuickCheck-devel = 1.2.0.0
|
||||
Provides: ghc-array-devel = 0.2.0.0
|
||||
Provides: ghc-base-devel = 3.0.3.1
|
||||
Provides: ghc-base-devel = 4.1.0.0
|
||||
Provides: ghc-bytestring-devel = 0.9.1.4
|
||||
Provides: ghc-containers-devel = 0.2.0.1
|
||||
Provides: ghc-directory-devel = 1.0.0.3
|
||||
Provides: ghc-dph-base-devel = 0.3
|
||||
Provides: ghc-dph-par-devel = 0.3
|
||||
Provides: ghc-dph-prim-interface-devel = 0.3
|
||||
Provides: ghc-dph-prim-par-devel = 0.3
|
||||
Provides: ghc-dph-prim-seq-devel = 0.3
|
||||
Provides: ghc-dph-seq-devel = 0.3
|
||||
Provides: ghc-extensible-exceptions-devel = 0.1.1.0
|
||||
Provides: ghc-filepath-devel = 1.1.0.2
|
||||
Provides: ghc-ghc-prim-devel = 0.1.0.0
|
||||
Provides: ghc-haddock-devel = 2.4.2
|
||||
Provides: ghc-haskell-src-devel = 1.0.1.3
|
||||
Provides: ghc-haskell98-devel = 1.0.1.0
|
||||
Provides: ghc-hpc-devel = 0.5.0.3
|
||||
Provides: ghc-hsc2hs-devel = 0.67
|
||||
Provides: ghc-html-devel = 1.0.1.2
|
||||
Provides: ghc-integer-devel = 0.1.0.1
|
||||
Provides: ghc-mtl-devel = 1.1.0.2
|
||||
Provides: ghc-network-devel = 2.2.1
|
||||
Provides: ghc-old-locale-devel = 1.0.0.1
|
||||
Provides: ghc-old-time-devel = 1.0.0.2
|
||||
Provides: ghc-packedstring-devel = 0.1.0.1
|
||||
Provides: ghc-parallel-devel = 1.1.0.1
|
||||
Provides: ghc-parsec-devel = 2.1.0.1
|
||||
Provides: ghc-pretty-devel = 1.0.1.0
|
||||
Provides: ghc-process-devel = 1.0.1.1
|
||||
Provides: ghc-random-devel = 1.0.0.1
|
||||
Provides: ghc-regex-base-devel = 0.72.0.2
|
||||
Provides: ghc-regex-compat-devel = 0.71.0.1
|
||||
Provides: ghc-regex-posix-devel = 0.72.0.3
|
||||
Provides: ghc-stm-devel = 2.1.1.2
|
||||
Provides: ghc-syb-devel = 0.1.0.1
|
||||
Provides: ghc-template-haskell-devel = 2.3.0.1
|
||||
Provides: ghc-time-devel = 1.1.3
|
||||
Provides: ghc-unix-devel = 2.3.2.0
|
||||
Provides: ghc-xhtml-devel = 3000.2.0.1
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Prefix: /usr
|
||||
# FIXME: containers, array and base not pulled in by OBS
|
||||
%if %{undefined without_haddock} && %{undefined without_hscolour}
|
||||
BuildRequires: hscolour ghc-containers ghc-base ghc-array
|
||||
BuildRequires: ghc-haskell98 ghc-random ghc-time ghc-process
|
||||
BuildRequires: ghc-directory ghc-unix ghc-old-time ghc-old-locale
|
||||
BuildRequires: ghc-filepath
|
||||
%endif
|
||||
BuildRequires: fdupes
|
||||
PreReq: update-alternatives
|
||||
Requires: gcc gmp-devel ghc-base-devel
|
||||
# Fedora put compiler into ghc-compiler and left ghc empty?!
|
||||
Provides: ghc-compiler
|
||||
Source: %{name}-%{version}-src.tar.bz2
|
||||
#Patch5 on Fedora
|
||||
Patch: Cabal-option-executable-dynamic.patch
|
||||
#Patch4 on Fedora
|
||||
Patch1: ghc-use-system-libffi.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).
|
||||
The Glorious Glasgow Haskell Compiler as published on haskell.org.
|
||||
|
||||
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/>.
|
||||
%global ghc_version_override %{version}
|
||||
|
||||
%package prof
|
||||
Summary: Profiling libraries for GHC
|
||||
Group: Development/Libraries/Haskell
|
||||
Requires: ghc = %{version}-%{release}
|
||||
Provides: ghc-prof = %{version}
|
||||
Provides: ghc-Cabal-prof = 1.6.0.3
|
||||
Provides: ghc-HUnit-prof = 1.2.0.3
|
||||
Provides: ghc-QuickCheck-prof = 1.2.0.0
|
||||
Provides: ghc-array-prof = 0.2.0.0
|
||||
Provides: ghc-base-prof = 3.0.3.1
|
||||
Provides: ghc-base-prof = 4.1.0.0
|
||||
Provides: ghc-bytestring-prof = 0.9.1.4
|
||||
Provides: ghc-containers-prof = 0.2.0.1
|
||||
Provides: ghc-directory-prof = 1.0.0.3
|
||||
Provides: ghc-dph-base-prof = 0.3
|
||||
Provides: ghc-dph-par-prof = 0.3
|
||||
Provides: ghc-dph-prim-interface-prof = 0.3
|
||||
Provides: ghc-dph-prim-par-prof = 0.3
|
||||
Provides: ghc-dph-prim-seq-prof = 0.3
|
||||
Provides: ghc-dph-seq-prof = 0.3
|
||||
Provides: ghc-extensible-exceptions-prof = 0.1.1.0
|
||||
Provides: ghc-filepath-prof = 1.1.0.2
|
||||
Provides: ghc-ghc-prim-prof = 0.1.0.0
|
||||
Provides: ghc-haddock-prof = 2.4.2
|
||||
Provides: ghc-haskell-src-prof = 1.0.1.3
|
||||
Provides: ghc-haskell98-prof = 1.0.1.0
|
||||
Provides: ghc-hpc-prof = 0.5.0.3
|
||||
Provides: ghc-hsc2hs-prof = 0.67
|
||||
Provides: ghc-html-prof = 1.0.1.2
|
||||
Provides: ghc-integer-prof = 0.1.0.1
|
||||
Provides: ghc-mtl-prof = 1.1.0.2
|
||||
Provides: ghc-network-prof = 2.2.1
|
||||
Provides: ghc-old-locale-prof = 1.0.0.1
|
||||
Provides: ghc-old-time-prof = 1.0.0.2
|
||||
Provides: ghc-packedstring-prof = 0.1.0.1
|
||||
Provides: ghc-parallel-prof = 1.1.0.1
|
||||
Provides: ghc-parsec-prof = 2.1.0.1
|
||||
Provides: ghc-pretty-prof = 1.0.1.0
|
||||
Provides: ghc-process-prof = 1.0.1.1
|
||||
Provides: ghc-random-prof = 1.0.0.1
|
||||
Provides: ghc-regex-base-prof = 0.72.0.2
|
||||
Provides: ghc-regex-compat-prof = 0.71.0.1
|
||||
Provides: ghc-regex-posix-prof = 0.72.0.3
|
||||
Provides: ghc-stm-prof = 2.1.1.2
|
||||
Provides: ghc-syb-prof = 0.1.0.1
|
||||
Provides: ghc-template-haskell-prof = 2.3.0.1
|
||||
Provides: ghc-time-prof = 1.1.3
|
||||
Provides: ghc-unix-prof = 2.3.2.0
|
||||
Provides: ghc-xhtml-prof = 3000.2.0.1
|
||||
%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}
|
||||
|
||||
%description prof
|
||||
Profiling libraries for Glorious Glasgow Haskell Compilation System (GHC).
|
||||
They should be installed when GHC's profiling subsystem is needed.
|
||||
%global ghc_pkg_c_deps ghc = %{ghc_version_override}-%{release}
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for GHC
|
||||
Group: Development/Languages/Haskell
|
||||
Requires: ghc = %{version}-%{release}
|
||||
Provides: ghc-Cabal-doc = 1.6.0.3
|
||||
Provides: ghc-HUnit-doc = 1.2.0.3
|
||||
Provides: ghc-QuickCheck-doc = 1.2.0.0
|
||||
Provides: ghc-array-doc = 0.2.0.0
|
||||
Provides: ghc-base-doc = 3.0.3.1
|
||||
Provides: ghc-base-doc = 4.1.0.0
|
||||
Provides: ghc-bytestring-doc = 0.9.1.4
|
||||
Provides: ghc-containers-doc = 0.2.0.1
|
||||
Provides: ghc-directory-doc = 1.0.0.3
|
||||
Provides: ghc-dph-base-doc = 0.3
|
||||
Provides: ghc-dph-par-doc = 0.3
|
||||
Provides: ghc-dph-prim-interface-doc = 0.3
|
||||
Provides: ghc-dph-prim-par-doc = 0.3
|
||||
Provides: ghc-dph-prim-seq-doc = 0.3
|
||||
Provides: ghc-dph-seq-doc = 0.3
|
||||
Provides: ghc-extensible-exceptions-doc = 0.1.1.0
|
||||
Provides: ghc-filepath-doc = 1.1.0.2
|
||||
Provides: ghc-ghc-prim-doc = 0.1.0.0
|
||||
Provides: ghc-haddock-doc = 2.4.2
|
||||
Provides: ghc-haskell-src-doc = 1.0.1.3
|
||||
Provides: ghc-haskell98-doc = 1.0.1.0
|
||||
Provides: ghc-hpc-doc = 0.5.0.3
|
||||
Provides: ghc-hsc2hs-doc = 0.67
|
||||
Provides: ghc-html-doc = 1.0.1.2
|
||||
Provides: ghc-integer-doc = 0.1.0.1
|
||||
Provides: ghc-mtl-doc = 1.1.0.2
|
||||
Provides: ghc-network-doc = 2.2.1
|
||||
Provides: ghc-old-locale-doc = 1.0.0.1
|
||||
Provides: ghc-old-time-doc = 1.0.0.2
|
||||
Provides: ghc-packedstring-doc = 0.1.0.1
|
||||
Provides: ghc-parallel-doc = 1.1.0.1
|
||||
Provides: ghc-parsec-doc = 2.1.0.1
|
||||
Provides: ghc-pretty-doc = 1.0.1.0
|
||||
Provides: ghc-process-doc = 1.0.1.1
|
||||
Provides: ghc-random-doc = 1.0.0.1
|
||||
Provides: ghc-regex-base-doc = 0.72.0.2
|
||||
Provides: ghc-regex-compat-doc = 0.71.0.1
|
||||
Provides: ghc-regex-posix-doc = 0.72.0.3
|
||||
Provides: ghc-stm-doc = 2.1.1.2
|
||||
Provides: ghc-syb-doc = 0.1.0.1
|
||||
Provides: ghc-template-haskell-doc = 2.3.0.1
|
||||
Provides: ghc-time-doc = 1.1.3
|
||||
Provides: ghc-unix-doc = 2.3.2.0
|
||||
Provides: ghc-xhtml-doc = 3000.2.0.1
|
||||
|
||||
%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 PostScript and HTML format. Alternatively,
|
||||
the documentation is available online at
|
||||
|
||||
http://haskell.org/ghc/documentation.html
|
||||
|
||||
|
||||
# the debuginfo subpackage is currently empty anyway, so don't generate it
|
||||
%define debug_package %{nil}
|
||||
%define __spec_install_post /usr/lib/rpm/brp-compress
|
||||
|
||||
%prep
|
||||
%setup -q -b 1
|
||||
|
||||
%build
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
|
||||
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
|
||||
FFLAGS="${FFLAGS:-%optflags}" ; export FFLAGS ; \
|
||||
./configure --host=%{_target_platform} --build=%{_target_platform} --target=%{_target_platform} \
|
||||
--program-prefix=%{?_program_prefix} --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} \
|
||||
--infodir=%{_infodir} \
|
||||
%ifarch x86_64 amd64 ia32e
|
||||
--enable-libsuffix=64
|
||||
%if %{defined ghclibdir}
|
||||
%ghc_binlib_package Cabal 1.10.2.0
|
||||
%ghc_binlib_package array 0.3.0.2
|
||||
%ghc_binlib_package -c gmp-devel,libffi-devel base 4.3.1.0
|
||||
%ghc_binlib_package bytestring 0.9.1.10
|
||||
%ghc_binlib_package containers 0.4.0.0
|
||||
%ghc_binlib_package directory 1.1.0.0
|
||||
%ghc_binlib_package extensible-exceptions 0.1.1.2
|
||||
%ghc_binlib_package filepath 1.2.0.0
|
||||
%define ghc_pkg_obsoletes ghc-bin-package-db-devel < 0.0.0.0-%{release}
|
||||
%ghc_binlib_package -x ghc %{ghc_version_override}
|
||||
%undefine ghc_pkg_obsoletes
|
||||
%ghc_binlib_package haskell2010 1.0.0.0
|
||||
%ghc_binlib_package haskell98 1.1.0.1
|
||||
%ghc_binlib_package hpc 0.5.0.6
|
||||
%ghc_binlib_package old-locale 1.0.0.2
|
||||
%ghc_binlib_package old-time 1.0.0.6
|
||||
%ghc_binlib_package pretty 1.0.1.2
|
||||
%ghc_binlib_package process 1.0.1.5
|
||||
%ghc_binlib_package random 1.0.0.3
|
||||
%ghc_binlib_package template-haskell 2.5.0.0
|
||||
%ghc_binlib_package time 1.2.0.3
|
||||
%ghc_binlib_package unix 2.4.2.0
|
||||
%endif
|
||||
|
||||
# Don't install these tools, we'll use update-alternatives below.
|
||||
touch mk/build.mk
|
||||
echo "NO_INSTALL_RUNHASKELL=YES" >>mk/build.mk
|
||||
#echo "NO_INSTALL_HSC2HS=YES" >>mk/build.mk
|
||||
%global version %{ghc_version_override}
|
||||
|
||||
cat <<"EOF" >>mk/build.mk
|
||||
docdir := %{_datadir}/doc/%{name}
|
||||
htmldir := $(docdir)
|
||||
dvidir := $(docdir)
|
||||
pdfdir := $(docdir)
|
||||
psdir := $(docdir)
|
||||
%prep
|
||||
%setup -q
|
||||
%{?suse_update_config:%{suse_update_config -f}}
|
||||
rm -r ghc-tarballs/{mingw,perl}
|
||||
%patch -p1 -b .orig
|
||||
# Need to fix libffi first cf bnc#711489
|
||||
#%%patch1 -p1 -b .libffi
|
||||
|
||||
%build
|
||||
# http://hackage.haskell.org/trac/ghc/wiki/Platforms
|
||||
# cf https://github.com/gentoo-haskell/gentoo-haskell/tree/master/dev-lang/ghc
|
||||
cat > mk/build.mk << EOF
|
||||
GhcLibWays = v %{!?ghc_without_shared:dyn} %{!?without_prof:p}
|
||||
NO_INSTALL_RUNHASKELL=YES
|
||||
NO_INSTALL_HSC2HS=YES
|
||||
%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
|
||||
%ifarch %{unregisterised_archs}
|
||||
GhcUnregisterised=YES
|
||||
%endif
|
||||
%ifarch ppc64
|
||||
GhcNotThreaded=YES
|
||||
SRC_HC_OPTS+=-optc-mminimal-toc -optl-pthread
|
||||
SRC_CC_OPTS+=-mminimal-toc -pthread -Wa,--noexecstack
|
||||
%endif
|
||||
EOF
|
||||
|
||||
make %{?jobs:-j%jobs} all datadir="${_datadir}/doc/%{name}"
|
||||
make html
|
||||
make -C libraries HADDOCK_DOCS=YES
|
||||
( cd libraries/Cabal && docbook2html doc/Cabal.xml --output doc/Cabal )
|
||||
make -C docs/storage-mgt ps
|
||||
export SUSE_ASNEEDED=0
|
||||
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} --docdir=%{_docdir}/%{name} \
|
||||
%{?with_shared:--enable-shared}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} docdir=%{_datadir}/doc/%{name} HADDOCK_DOCS=YES install install-docs
|
||||
mv %{buildroot}%{_prefix}/bin/hsc2hs %{buildroot}%{_prefix}/bin/hsc2hs-ghc
|
||||
install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rpm/macros.ghc
|
||||
%make_install
|
||||
|
||||
dir=`pwd`
|
||||
pushd %{buildroot}
|
||||
libdir=`echo %{_libdir}/%{name}-%{version} | sed 's|^/||'`
|
||||
find $libdir -type d -print | \
|
||||
sed 's|^|%dir /|' > $dir/rpm-noprof-lib-files
|
||||
find $libdir ! -type d ! -name '*.p_hi' ! -name '*_p.a' -print | \
|
||||
sed 's|^|/|' >> $dir/rpm-noprof-lib-files
|
||||
find $libdir ! -type d \( -name '*.p_hi' -or -name '*_p.a' \) -print | \
|
||||
sed 's|^|/|' > $dir/rpm-prof-lib-files
|
||||
popd
|
||||
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%{?ghc_without_shared:-devel}.files
|
||||
done
|
||||
|
||||
%fdupes $RPM_BUILD_ROOT
|
||||
%ghc_gen_filelists bin-package-db 0.0.0.0
|
||||
%ghc_gen_filelists ghc %{ghc_version_override}
|
||||
%ghc_gen_filelists ghc-binary 0.5.0.2
|
||||
%ghc_gen_filelists ghc-prim 0.2.0.0
|
||||
%ghc_gen_filelists integer-gmp 0.2.0.3
|
||||
|
||||
%define merge_filelist()\
|
||||
%if %{undefined ghc_without_shared}\
|
||||
cat ghc-%1.files >> ghc-%2.files\
|
||||
%endif\
|
||||
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 ghc-binary ghc
|
||||
%merge_filelist bin-package-db ghc
|
||||
|
||||
%if %{undefined ghc_without_shared}
|
||||
ls $RPM_BUILD_ROOT%{ghclibdir}/libHS*.so >> ghc-base.files
|
||||
sed -i -e "s|^$RPM_BUILD_ROOT||g" ghc-base.files
|
||||
%endif
|
||||
ls -d $RPM_BUILD_ROOT%{ghclibdir}/libHS*.a $RPM_BUILD_ROOT%{ghclibdir}/package.conf.d/builtin_*.conf $RPM_BUILD_ROOT%{ghclibdir}/include >> ghc-base-devel.files
|
||||
#%%ifnarch %%{libffi_archs}
|
||||
echo $RPM_BUILD_ROOT%{ghclibdir}/HSffi.o >> ghc-base-devel.files
|
||||
#%%endif
|
||||
sed -i -e "s|^$RPM_BUILD_ROOT||g" ghc-base-devel.files
|
||||
|
||||
# these are handled as alternatives
|
||||
for i in hsc2hs runhaskell; do
|
||||
if [ -x ${RPM_BUILD_ROOT}%{_bindir}/$i-ghc ]; then
|
||||
rm ${RPM_BUILD_ROOT}%{_bindir}/$i
|
||||
else
|
||||
mv ${RPM_BUILD_ROOT}%{_bindir}/$i{,-ghc}
|
||||
fi
|
||||
done
|
||||
|
||||
%ghc_strip_dynlinked
|
||||
|
||||
%if 0%{?suse_version} > 1020
|
||||
%fdupes -s %{buildroot}
|
||||
%endif
|
||||
|
||||
%post
|
||||
update-alternatives --install %{_bindir}/runhaskell runhaskell \
|
||||
%{_bindir}/runghc 500
|
||||
update-alternatives --install %{_bindir}/hsc2hs hsc2hs \
|
||||
%{_bindir}/hsc2hs-ghc 500
|
||||
%ghc_pkg_recache
|
||||
# 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*
|
||||
update-alternatives --install %{_bindir}/runhaskell runhaskell %{_bindir}/runghc 500
|
||||
update-alternatives --install %{_bindir}/hsc2hs hsc2hs %{_bindir}/hsc2hs-ghc 500
|
||||
|
||||
%preun
|
||||
if test "$1" = 0; then
|
||||
@ -295,213 +236,66 @@ if test "$1" = 0; then
|
||||
update-alternatives --remove hsc2hs %{_bindir}/hsc2hs-ghc
|
||||
fi
|
||||
|
||||
%files -f rpm-noprof-lib-files
|
||||
%defattr(-,root,root)
|
||||
%doc ANNOUNCE
|
||||
%doc HACKING
|
||||
%doc LICENSE
|
||||
%doc README
|
||||
%{_sysconfdir}/rpm/macros.ghc
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
#%%doc ANNOUNCE HACKING LICENSE README
|
||||
%{_bindir}/ghc
|
||||
%{_bindir}/ghc-%{version}
|
||||
%{_bindir}/ghc-pkg
|
||||
%{_bindir}/ghc-pkg-%{version}
|
||||
%{_bindir}/ghci
|
||||
%{_bindir}/ghci-%{version}
|
||||
%{_bindir}/hasktags
|
||||
%{_bindir}/hp2ps
|
||||
%{_bindir}/hpc
|
||||
%ghost %attr(755,root,root) %{_bindir}/hsc2hs
|
||||
%{_bindir}/hsc2hs-ghc
|
||||
%{_bindir}/runghc
|
||||
%{_bindir}/runhaskell
|
||||
%ghost %attr(755,root,root) %{_bindir}/runhaskell
|
||||
%{_bindir}/runhaskell-ghc
|
||||
%dir %{ghclibdir}
|
||||
%{ghclibdir}/extra-gcc-opts
|
||||
%{ghclibdir}/ghc
|
||||
%{ghclibdir}/ghc-pkg
|
||||
%ifnarch %{unregisterised_archs}
|
||||
%{ghclibdir}/ghc-asm
|
||||
%{ghclibdir}/ghc-split
|
||||
%endif
|
||||
%{ghclibdir}/ghc-usage.txt
|
||||
%{ghclibdir}/ghci-usage.txt
|
||||
%{ghclibdir}/hsc2hs
|
||||
%dir %{ghclibdir}/package.conf.d
|
||||
%ghost %{ghclibdir}/package.conf.d/package.cache
|
||||
%{ghclibdir}/runghc
|
||||
%{ghclibdir}/template-hsc.h
|
||||
%{ghclibdir}/unlit
|
||||
#should be %%dir
|
||||
%{_docdir}/ghc
|
||||
%dir %{ghcdocbasedir}
|
||||
%if %{undefined without_haddock}
|
||||
%{_bindir}/haddock
|
||||
%{_mandir}/man1/ghc.1*
|
||||
%dir %{_libdir}/ghc-%{version}
|
||||
%config(noreplace) %{_libdir}/ghc-%{version}/package.conf
|
||||
|
||||
%files prof -f rpm-prof-lib-files
|
||||
%defattr(-,root,root)
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
%doc LICENSE
|
||||
%{_datadir}/doc/%{name}
|
||||
%doc docs/comm
|
||||
%doc docs/docbook-cheat-sheet/docbook-cheat-sheet
|
||||
%doc docs/users_guide/users_guide
|
||||
%doc libraries/Cabal/doc/Cabal
|
||||
%doc docs/storage-mgt/ldv.ps
|
||||
%doc docs/storage-mgt/rp.ps
|
||||
%doc docs/storage-mgt/sm.ps
|
||||
%{_bindir}/haddock-ghc-%{version}
|
||||
%{ghclibdir}/html
|
||||
%{ghclibdir}/latex
|
||||
%{ghclibdir}/haddock
|
||||
%{ghcdocbasedir}/html
|
||||
%if %{undefined without_manual}
|
||||
%{ghcdocbasedir}/Cabal
|
||||
%{ghcdocbasedir}/haddock
|
||||
%{ghcdocbasedir}/users_guide
|
||||
%endif
|
||||
%dir %{ghcdocbasedir}/libraries
|
||||
%{ghcdocbasedir}/libraries/frames.html
|
||||
%{ghcdocbasedir}/libraries/gen_contents_index
|
||||
%{ghcdocbasedir}/libraries/hscolour.css
|
||||
%{ghcdocbasedir}/libraries/ocean.css
|
||||
%{ghcdocbasedir}/libraries/prologue.txt
|
||||
%{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
|
||||
|
||||
%changelog
|
||||
* Sun Jul 26 2009 Herbert Graeber <herber@graeber-clan.de> 6.10.4
|
||||
- update to version 6.10.4
|
||||
* Fixed a segfault that could occur when calling mkWeakForeignEnv#.
|
||||
* Fixed a crash that could occur when calling unblock inside unsafePerformIO.
|
||||
* Stop primops such as readMutVar# being inlined, which can cause loss of
|
||||
referential transparency.
|
||||
* Fixed a bug that meant ctrl-C was ignored by processes we run with runProcess.
|
||||
* Fixed a bug where gcc processes run by GHC get killed on Mac OS X 10.4.11.
|
||||
* Fixed a bug where processes on Windows could hold file handles open after
|
||||
they had finished, leading to permission denied errors.
|
||||
* GHCi only uses Haskeline if the input is a terminal.
|
||||
* Fixed building with newer versions of MSYS binutils.
|
||||
|
||||
* Mon May 11 2009 Herbert Graeber <herber@graeber-clan.de> 6.10.3
|
||||
- add provides for libraries contained
|
||||
- dblatex is only available for 11.0 up
|
||||
|
||||
* Sun May 10 2009 Herbert Graeber <herber@graeber-clan.de> 6.10.3
|
||||
- Update to version 6.10.3
|
||||
* Control-C now works again in GHCi. In 6.10.2 it was ignored on some platformsr
|
||||
due to the changes in signal handling.
|
||||
* GHCi uses Haskeline, rather than editline, for line editing. This fixes a crash
|
||||
when pressing control-C on some platforms, removes a C library dependency, and
|
||||
provides a better user interface.
|
||||
* It is now possible to build PDF and PS versions of the users guide, using
|
||||
dblatex.
|
||||
|
||||
* Mon Apr 21 2009 Herbert Graeber <herber@graeber-clan.de> 6.10.2
|
||||
- Fix macros.ghc to use the right doc directory for reindex
|
||||
|
||||
* Mon Apr 13 2009 Herbert Graeber <herber@graeber-clan.de> 6.10.2
|
||||
- update rpm macros to generate -devel subpackages for libraries
|
||||
|
||||
* Thu Apr 2 2009 Herbert Graeber <herber@graeber-clan.de> 6.10.2
|
||||
- Update to version 6.10.2
|
||||
* System.FilePath.dropTrailingPathSeparator "\\" will now return "\\" rather than "".
|
||||
* The compatibility Control.OldException functions now catch new-style exceptions as DynExceptions.
|
||||
* It is now possible to create C finalizers which, unlike Haskell finalizers, are guaranteed to run.
|
||||
* There is now a +RTS -xm<address> flag, which tells GHC where to try to allocate memory.
|
||||
* There is now a +RTS --machine-readable flag. Currently it only affects the +RTS -t output.
|
||||
* There are now more fields printed by the +RTS --info flag.
|
||||
* ghc-pkg will now complain if told to use a package.conf that doesn't exist.
|
||||
* ghc-pkg check now looks for missing files (including .hi files), and reports all packages that are
|
||||
transitively broken.
|
||||
* The TypeFamilies extension now implies the RelaxedPolyRec extension.
|
||||
* We now ship with haddock 2.4.2 (was 2.3.0).
|
||||
* Several Library updates
|
||||
|
||||
* Sun Mar 1 2009 Herbert Graeber <herber@graeber-clan.de> 6.10.1
|
||||
- Obsolete external haddock
|
||||
- remove support for openSUSE <= 10.2
|
||||
- remove provides for library components
|
||||
|
||||
* Wed Feb 25 2009 herbert Graeber <herber@graeber-clan.de> 6.10.1
|
||||
- fix install of macros rpm
|
||||
|
||||
* Tue Feb 24 2009 herbert Graeber <herber@graeber-clan.de> 6.10.1
|
||||
- prepare for use of haskell packaging conventions
|
||||
- move library doc files to /usr/share/doc/ghc/libraries
|
||||
|
||||
* Mon Nov 25 2008 Herbert Graeber <herbert@links2linux.de> 6.10.1
|
||||
- add some directories to files list
|
||||
|
||||
* Wed Nov 5 2008 Herbert Graeber <herbert@links2linux.de> 6.10.1
|
||||
- update to version 6.10.1
|
||||
|
||||
* Fri Aug 22 2008 Herbert Graeber <herbert@links2linux.de> 6.8.3
|
||||
- fix the optional-openal patch
|
||||
- only one job for building documentation
|
||||
|
||||
* Wed Aug 20 2008 Herbert Graeber <herbert@links2linux.de> 6.8.3
|
||||
- repackaged tar file usinmg bz2
|
||||
- changed library provides to match the ones generated by cabal-rpm
|
||||
|
||||
* Tue Aug 19 2008 Herbert Graeber <herbert@links2linux.de> 6.8.3
|
||||
- the ghc-doc packages contains the LICENSES files even without docs built
|
||||
|
||||
* Mon Aug 18 2008 Herbert Graeber <herbert@links2linux.de> 6.8.3
|
||||
- add provides for all libraries included
|
||||
- create a doc package even when docs cannot be created
|
||||
- remove support for SUSE Linux 10.0 and below
|
||||
- add requirement for readline-devel
|
||||
- do not build docs for ext-core for now
|
||||
- suppress some messages from rpmlint
|
||||
- no man page without docs
|
||||
- build docs only if the ghc version haddock has built with matches the ghc to build
|
||||
- fix ghc-pks doc location
|
||||
- update to version 6.8.3
|
||||
|
||||
* Fri Mar 04 2008 Herbert Graeber <herbert@links2linux.de>
|
||||
- ghc cannot use different host and target platforms (i686 and i586)
|
||||
|
||||
* Wed Mar 02 2008 Herbert Graeber <herbert@links2linux.de>
|
||||
- build haddock docs
|
||||
|
||||
* Wed Dec 12 2007 Herbert Graeber <herbert@links2linux.de>
|
||||
- Update to 6.8.2
|
||||
* removed the --dodc-dir option
|
||||
* let standalone deriving declarations respect scope
|
||||
* several extensions to ghci command set
|
||||
* several bug fixes
|
||||
|
||||
* Sun Dec 9 2007 Herbert Graeber <herbert@links2linux.de>
|
||||
- Update to 6.8.2 release candidate from 2007-12-06
|
||||
|
||||
* Sun Nov 25 2007 Herbert Graeber <herbert@links2linux.de>
|
||||
- Disable ps docs for SUSE Linux 10.0 and below
|
||||
|
||||
* Wed Nov 21 2007 Herbert Graeber <herbert@links2linux.de>
|
||||
- Fixes for SUSE Linux 10.1 and below
|
||||
|
||||
* Sun Nov 11 2007 Herbert Graeber <herbert@links2linux.de>
|
||||
- Update to version 6.8.1
|
||||
* Haskell Program Coverage (hpc) support has been added to the compiler
|
||||
* GHCi now includes a debugger
|
||||
* The first phase of the base package split has been done
|
||||
* The code generator now uses pointer tagging (which should mean most
|
||||
code improves by 10-15%, and as a result the compiler is also faster).
|
||||
- Use update-alternatives to enable multiple ghc versions
|
||||
- Build with shared license file
|
||||
- Reenable ps docs
|
||||
|
||||
* Wed Apr 25 2007 Herbert Graeber <herbert@links2linux.de>
|
||||
- Update to version 6.6.1
|
||||
* Many, many bugs have been fixed relative to 6.6. Far too many to list here.
|
||||
* GHC can now be used to compile C++ files.
|
||||
* There is an --install-signal-handlers=<yes|no> RTS flag. The main use is
|
||||
to stop GHC installing signal handlers when you are putting your code in a DLL.
|
||||
* Newtypes can now be defined using GADT syntax.
|
||||
* Linear implicit parameters are no longer accepted.
|
||||
* There is a manpage for ghc and ghci.
|
||||
* The building guide has been moved to the wiki.
|
||||
* GHC now comes with the filepath library.
|
||||
* The base, cabal, regex-base, pretty-printer and unix packages have various bug fixes,
|
||||
as well as a couple of interface changes that shouldn't affect most users. The version
|
||||
numbers have been bumped.
|
||||
* There are newer versions of all of the extralibs.
|
||||
|
||||
* Thu Oct 25 2006 Herbert Graeber <herbert@links2linux.de>
|
||||
- Enable openal and freealut support for openSUSE 10.2
|
||||
|
||||
* Mon Oct 16 2006 Herbert Graeber <herbert@links2linux.de>
|
||||
- Update to version 6.6
|
||||
|
||||
* Mon Sep 04 2006 Herbert Graeber <herbert@links2linux.de>
|
||||
- Use docbook-utils for html documentation
|
||||
- Require sgml-skel for build
|
||||
|
||||
* Tue Aug 29 2006 Herbert Graeber <herbert@links2linux.de>
|
||||
- Disabled ps documentation (no fop without java)
|
||||
|
||||
* Mon Aug 28 2006 Herbert Graeber <herbert@links2linux.de>
|
||||
- Move to the SUSE Build Service
|
||||
|
||||
* Tue Apr 18 2006 Herbert Graeber <herbert@links2linux.de>
|
||||
- Update to version 6.4.2
|
||||
- Removed openal/alut support (Does not work with SUSEs openal)
|
||||
|
||||
* Wed Apr 12 2006 Herbert Graeber <herbert@links2linux.de>
|
||||
- SUSE 10.1 needs gmp-devel
|
||||
- Added patch for gcc 4.1 compatibility on x86_64
|
||||
|
||||
* Wed Sep 21 2005 Herbert Graeber <herbert@links2linux.de>
|
||||
- Update to version 6.4.1
|
||||
|
||||
* Tue Apr 19 2005 Herbert Graeber <herbert@links2linux.de>
|
||||
- Disabled object uplitting and ghci for x86_64
|
||||
|
||||
* Sun Mar 13 2005 Herbert Graeber <herbert@links2linux.de>
|
||||
- Update to version 6.4
|
||||
|
31
macros.ghc
31
macros.ghc
@ -1,31 +0,0 @@
|
||||
%cabal %{_bindir}/runghc Setup
|
||||
|
||||
%cabal_configure \
|
||||
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_docdir}/%{name}-%{version} --htmldir=%{pkg_docdir} --libsubdir='$compiler/$pkgid'
|
||||
|
||||
%cabal_makefile \
|
||||
%cabal makefile -f cabal-rpm.mk \
|
||||
make -f cabal-rpm.mk %{_smp_mflags} \
|
||||
%{nil}
|
||||
|
||||
%cabal_install %cabal copy --destdir=${RPM_BUILD_ROOT} -v
|
||||
|
||||
%ghc_gen_filelists() \
|
||||
rm -f %1-devel.files %1-prof.files \
|
||||
echo '%defattr(-,root,root,-)' > %1-devel.files \
|
||||
find ${RPM_BUILD_ROOT}%{pkg_libdir} -type d | sed 's/^/%dir /' >> %1-devel.files \
|
||||
find ${RPM_BUILD_ROOT}%{pkg_libdir} ! \\( -type d -o -name '*_p.a' -o -name '*.p_hi' \\) >> %1-devel.files \
|
||||
echo '%defattr(-,root,root,-)' > %1-prof.files \
|
||||
find ${RPM_BUILD_ROOT}%{pkg_libdir} \\( -name '*_p.a' -o -name '*.p_hi' \\) >> %1-prof.files \
|
||||
sed -i -e "s!${RPM_BUILD_ROOT}!!g" %1-devel.files %1-prof.files \
|
||||
%{nil}
|
||||
|
||||
%ghc_gen_scripts %cabal register --gen-script ; %cabal unregister --gen-script
|
||||
|
||||
%ghc_install_scripts install -m 755 register.sh unregister.sh ${RPM_BUILD_ROOT}%{pkg_libdir}
|
||||
|
||||
%ghc_register_pkg %{pkg_libdir}/register.sh >/dev/null || :
|
||||
|
||||
%ghc_unregister_pkg %{pkg_libdir}/unregister.sh >/dev/null || :
|
||||
|
||||
%ghc_reindex_haddock ( cd %{_datadir}/doc/ghc/libraries && [ -x "./gen_contents_index" ] && ./gen_contents_index ) || :
|
Loading…
x
Reference in New Issue
Block a user