From 3bf1941f83444b2ab98f18ffa70dacdb33620380 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Dec 05 2012 04:57:19 +0000 Subject: fix build on archs without ghci (#883479) - keep split, vector, and primitive in own pkgs --- diff --git a/haskell-platform.spec b/haskell-platform.spec index f438690..11b475f 100644 --- a/haskell-platform.spec +++ b/haskell-platform.spec @@ -1,4 +1,3 @@ -# cabal2spec-0.25 # https://fedoraproject.org/wiki/Packaging:Haskell # https://fedoraproject.org/wiki/PackagingDrafts/Haskell @@ -7,26 +6,30 @@ %global cabal_install_version 0.14.0 %global happy_version 1.18.10 +%global primitive_version 0.5.0.1 +%global split_version 0.2.1.1 +%global vector_version 0.10.0.1 + Name: haskell-platform Version: 2012.4.0.0 # Since library subpackages are versioned: # - release can only be reset if all library versions get bumped simultaneously # (eg for a major release) # - minor release numbers should be incremented monotonically -Release: 19%{?dist} +Release: 20%{?dist} Summary: Standard Haskell distribution Group: Development/Tools License: BSD -# BEGIN cabal2spec URL: http://hackage.haskell.org/platform Source0: http://lambda.haskell.org/platform/download/%{version}/%{name}-%{version}.tar.gz -ExclusiveArch: %{ghc_arches} +Patch1: ghc-GLUT-extralibs.patch +Patch2: alex-ghc74-fix-bang-pattern.patch + BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros >= 0.95.2 # for fixing RPATH in the binary programs BuildRequires: chrpath -# END cabal2spec BuildRequires: ghc-compiler = %{ghc_compiler_version} # GLUT BuildRequires: freeglut-devel%{?_isa} @@ -47,14 +50,18 @@ BuildRequires: ghc-time-devel BuildRequires: ghc-bytestring-devel # zlib BuildRequires: zlib-devel%{?_isa} -# "ghci" library is not officially part of hackage-platform +# part of HP-2012.4 +BuildRequires: ghc-split-devel = %{split_version} +BuildRequires: ghc-primitive-devel = %{primitive_version} +%ifarch %{ghc_arches_with_ghci} +BuildRequires: ghc-vector-devel = %{vector_version} +%endif +# ghci "ghc" library is not officially part of hackage-platform Requires: ghc-compiler = %{ghc_compiler_version} Requires: alex = %{alex_version}-%{release} Requires: cabal-install = %{cabal_install_version}-%{release} Requires: happy = %{happy_version}-%{release} Requires: ghc-haskell-platform-devel = %{version}-%{release} -Patch1: ghc-GLUT-extralibs.patch -Patch2: alex-ghc74-fix-bang-pattern.patch %description Haskell Platform is a suite of stable and well used Haskell libraries @@ -72,11 +79,9 @@ and tools. It provides a good starting environment for Haskell development. %ghc_lib_subpackage -c freeglut-devel%{?_isa} GLUT 2.1.2.1 %ghc_lib_subpackage html 1.0.1.2 %ghc_lib_subpackage parallel 3.2.0.3 -%ghc_lib_subpackage primitive 0.5.0.1 %ghc_lib_subpackage -l %BSDHaskellReport random 1.0.1.1 %ghc_lib_subpackage QuickCheck 2.5.1.1 # alex -%ghc_lib_subpackage split 0.2.1.1 %ghc_lib_subpackage stm 2.4 %ghc_lib_subpackage async 2.0.1.3 %ghc_lib_subpackage syb 0.3.7 @@ -92,7 +97,6 @@ and tools. It provides a good starting environment for Haskell development. %ghc_lib_subpackage regex-base 0.93.2 %ghc_lib_subpackage regex-posix 0.95.2 %ghc_lib_subpackage regex-compat 0.95.1 -%ghc_lib_subpackage vector 0.10.0.1 %ghc_lib_subpackage xhtml 3000.2.1 %ghc_lib_subpackage cgi 3001.1.7.4 %ghc_lib_subpackage -c zlib-devel%{?_isa} zlib 0.5.4.0 @@ -154,17 +158,21 @@ hand-written or generated by another program). %global version %{haskell_platform_version} - -# devel subpackage +%ifarch %{ghc_arches_with_ghci} %ghc_devel_package -m haskell-platform %{version} %{?ghc_packages_list:Requires: %(echo %{ghc_packages_list} | sed -e "s/\([^ ]*\)-\([^ ]*\)/ghc-\1-devel = \2-%{release},/g")} Requires: ghc-libraries = %{ghc_compiler_version} +# part of HP-2012.4 +Requires: ghc-primitive-devel = %{primitive_version} +Requires: ghc-split-devel = %{split_version} +Requires: ghc-vector-devel = %{vector_version} # added in F17 devel cycle Obsoletes: ghc-haskell-platform < %{version}-%{release} %ghc_devel_description haskell-platform Haskell Platform is a suite of stable and well used Haskell libraries and tools. It provides a good starting environment for Haskell development. +%endif %prep @@ -189,7 +197,7 @@ PATH=$HOME/.cabal/bin:$PATH %define cabal_configure_options --user cd packages -for i in $(cat platform.packages); do +for i in $(egrep -v "^(primitive|split|vector)-" platform.packages); do name=$(echo $i | sed -e "s/\(.*\)-.*/\1/") ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/") cd $name-$ver @@ -203,9 +211,11 @@ GLUT) ./Setup register --inplace ;; haskell-platform) +%ifarch %{ghc_arches_with_ghci} cabal_configure_extra_options="--with-cabal-install=../cabal-install-%{cabal_install_version}/dist/build/cabal/cabal --with-happy=../happy-%{happy_version}/dist/build/happy/happy --with-alex=../alex-%{alex_version}/dist/build/alex/alex" %ghc_lib_build_without_haddock $name $ver cabal_configure_extra_options= +%endif ;; *) %ghc_lib_build $name $ver @@ -232,7 +242,7 @@ cd packages PACKAGES_DIR=$PWD -for i in $(cat platform.packages); do +for i in $(egrep -v "^(primitive|split|vector)-" platform.packages); do name=$(echo $i | sed -e "s/\(.*\)-.*/\1/") ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/") cd $name-$ver @@ -281,11 +291,14 @@ for i in alex cabal happy; do done %endif + %ghc_devel_post_postun haskell-platform +%ifarch %{ghc_arches_with_ghci} %files %doc packages/%{name}-%{version}/LICENSE +%endif %files -n alex @@ -326,6 +339,10 @@ done %changelog +* Wed Dec 5 2012 Jens Petersen - 2012.4.0.0-20 +- keep split, vector, and primitive in their own existing src packages +- allow building on ghc archs without ghci: ie without vector library (#883479) + * Sat Oct 20 2012 Jens Petersen - 2012.4.0.0-19 - update to 2012.4.0.0 - new subpackages: async, split, vector, and primitive (vector dep)