[ghc-vector] skip Monadic ANN on archs without ghci, to build on all archs

Jens Petersen petersen at fedoraproject.org
Thu Dec 6 04:36:05 UTC 2012


commit e9907c4153d2be0e005a7aeb15a0e46ff306214f
Author: Jens Petersen <petersen at redhat.com>
Date:   Thu Dec 6 13:35:52 2012 +0900

    skip Monadic ANN on archs without ghci, to build on all archs
    
    patch taken from Debian

 ghc-vector.spec                         |   12 +++++++++---
 vector-debian-no_ann_without_ghci.patch |   31 +++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 3 deletions(-)
---
diff --git a/ghc-vector.spec b/ghc-vector.spec
index 2640b81..05a13fe 100644
--- a/ghc-vector.spec
+++ b/ghc-vector.spec
@@ -11,15 +11,14 @@ immutable), with a powerful loop fusion optimization framework.
 Name:           ghc-%{pkg_name}
 # part of haskell-platform-2012.4
 Version:        0.10.0.1
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        %{common_summary}
 
 License:        BSD
 URL:            http://hackage.haskell.org/package/%{pkg_name}
 Source0:        http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz
+Patch1:         vector-debian-no_ann_without_ghci.patch
 
-# Data.Vector.Fusion.Stream.Monadic ANN annotation requires ghci
-ExclusiveArch:  %{ghc_arches_with_ghci}
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-rpm-macros
 # Begin cabal-rpm deps:
@@ -33,6 +32,9 @@ BuildRequires:  ghc-primitive-devel
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
+%ifnarch %{ghc_arches_with_ghci}
+%patch1 -p1 -b .orig
+%endif
 
 
 %build
@@ -55,6 +57,10 @@ BuildRequires:  ghc-primitive-devel
 
 
 %changelog
+* Thu Dec  6 2012 Jens Petersen <petersen at redhat.com> - 0.10.0.1-2
+- skip Data.Vector.Fusion.Stream.Monadic annotation on archs without ghci
+  and build on all archs
+
 * Tue Nov 27 2012 Jens Petersen <petersen at redhat.com> - 0.10.0.1-1
 - update to 0.10.0.1, part of haskell-platform-2012.4
 
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