[ghc-vector/f18] fix build on archs without ghci by skipping annotation in Monadic.hs

Jens Petersen petersen at fedoraproject.org
Thu Dec 6 04:57:53 UTC 2012


commit da3f317fa0b09b48a1c8dce9b06f95ae04dfb7d5
Author: Jens Petersen <petersen at redhat.com>
Date:   Thu Dec 6 13:57:43 2012 +0900

    fix build on archs without ghci by skipping annotation in Monadic.hs
    
    update with cabal-rpm

 ghc-vector.spec                         |   25 ++++++++++++++++---------
 vector-debian-no_ann_without_ghci.patch |   31 +++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 9 deletions(-)
---
diff --git a/ghc-vector.spec b/ghc-vector.spec
index f02de0e..e1c0fac 100644
--- a/ghc-vector.spec
+++ b/ghc-vector.spec
@@ -1,30 +1,29 @@
-# cabal2spec-0.25.2
 # https://fedoraproject.org/wiki/Packaging:Haskell
 # https://fedoraproject.org/wiki/PackagingDrafts/Haskell
 
 %global pkg_name vector
 
-%global common_summary Haskell efficient array library
+%global common_summary Efficient Arrays
 
 %global common_description An efficient implementation of Int-indexed arrays (both mutable and\
 immutable), with a powerful loop fusion optimization framework.
 
 Name:           ghc-%{pkg_name}
 Version:        0.9.1
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        %{common_summary}
 
-Group:          System Environment/Libraries
 License:        BSD
-# BEGIN cabal2spec
 URL:            http://hackage.haskell.org/package/%{pkg_name}
 Source0:        http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
-# Data.Vector.Fusion.Stream.Monadic ANN annotation requires ghci
-ExclusiveArch:  %{ghc_arches_with_ghci}
+Patch1:         vector-debian-no_ann_without_ghci.patch
+
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-rpm-macros %{!?without_hscolour:hscolour}
-# END cabal2spec
+BuildRequires:  ghc-rpm-macros
+# Begin cabal-rpm deps:
+BuildRequires:  ghc-deepseq-devel
 BuildRequires:  ghc-primitive-devel
+# End cabal-rpm deps
 
 %description
 %{common_description}
@@ -32,6 +31,9 @@ BuildRequires:  ghc-primitive-devel
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
+%ifnarch %{ghc_arches_with_ghci}
+%patch1 -p1 -b .orig
+%endif
 
 
 %build
@@ -54,6 +56,11 @@ BuildRequires:  ghc-primitive-devel
 
 
 %changelog
+* Thu Dec  6 2012 Jens Petersen <petersen at redhat.com> - 0.9.1-6
+- skip Data.Vector.Fusion.Stream.Monadic annotation on archs without ghci
+  and build on all archs
+- update with cabal-rpm
+
 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.9.1-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 
diff --git a/vector-debian-no_ann_without_ghci.patch b/vector-debian-no_ann_without_ghci.patch
new file mode 100644
index 0000000..967f336
--- /dev/null
+++ b/vector-debian-no_ann_without_ghci.patch
@@ -0,0 +1,31 @@
+Description: Disable annotation without ghci
+ Can be removed if ghc ignores annotation without an interpreter:
+ http://hackage.haskell.org/trac/ghc/ticket/4268  
+Author: Joachim Breitner <nomeata at debian.org>
+Bug-Debian: http://bugs.debian.org/640088
+Forwarded: no
+
+Index: haskell-vector-0.9.1/Data/Vector/Fusion/Stream/Monadic.hs
+===================================================================
+--- haskell-vector-0.9.1.orig/Data/Vector/Fusion/Stream/Monadic.hs	2012-02-10 23:48:51.000000000 +0100
++++ haskell-vector-0.9.1/Data/Vector/Fusion/Stream/Monadic.hs	2012-02-10 23:49:04.000000000 +0100
+@@ -94,15 +94,19 @@
+ import Data.Word ( Word8, Word16, Word32, Word, Word64 )
+ 
+ #if __GLASGOW_HASKELL__ >= 700
++#ifndef DEBIAN_NO_GHCI
+ import GHC.Exts ( SpecConstrAnnotation(..) )
+ #endif
++#endif
+ 
+ #include "vector.h"
+ 
+ data SPEC = SPEC | SPEC2
+ #if __GLASGOW_HASKELL__ >= 700
++#ifndef DEBIAN_NO_GHCI
+ {-# ANN type SPEC ForceSpecConstr #-}
+ #endif
++#endif
+ 
+ emptyStream :: String
+ {-# NOINLINE emptyStream #-}


More information about the scm-commits mailing list