diff --git a/alex-ghc74-fix-bang-pattern.patch b/alex-ghc74-fix-bang-pattern.patch deleted file mode 100644 index cbc5fe4..0000000 --- a/alex-ghc74-fix-bang-pattern.patch +++ /dev/null @@ -1,53 +0,0 @@ -# Author : Erik de Castro Lopo -# Description : Fix generated haskell code so it doesn't fail with -Werror. -# Debian Version : 2.3.5 -# Date : Sun, 17 Apr 2011 15:45:41 +1000 - ---- a/templates/GenericTemplate.hs -+++ b/templates/GenericTemplate.hs -@@ -9,7 +9,7 @@ - - #ifdef ALEX_GHC - #define ILIT(n) n# --#define FAST_INT_BINDING(n) (n) -+#define FAST_INT_BINDING(n) (!(n)) - #define IBOX(n) (I# (n)) - #define FAST_INT Int# - #define LT(n,m) (n <# m) -@@ -57,10 +57,10 @@ - ALEX_IF_BIGENDIAN - narrow16Int# i - where -- i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low) -- high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#))) -- low = int2Word# (ord# (indexCharOffAddr# arr off')) -- off' = off *# 2# -+ !i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low) -+ !high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#))) -+ !low = int2Word# (ord# (indexCharOffAddr# arr off')) -+ !off' = off *# 2# - ALEX_ELSE - indexInt16OffAddr# arr off - ALEX_ENDIF ---- a/src/Scan.x -+++ b/src/Scan.x -@@ -11,7 +11,7 @@ - ------------------------------------------------------------------------------- - - { --{-# OPTIONS_GHC -w #-} -+{-# OPTIONS_GHC -w -XBangPatterns #-} - - module Scan(lexer, AlexPosn(..), Token(..), Tkn(..), tokPosn) where - ---- a/src/Main.hs -+++ b/src/Main.hs -@@ -203,7 +203,7 @@ - hPutStrLn hdl code - - optsToInject :: Target -> [CLIFlags] -> String --optsToInject GhcTarget _ = "{-# LANGUAGE CPP,MagicHash #-}\n" -+optsToInject GhcTarget _ = "{-# LANGUAGE CPP,MagicHash,BangPatterns #-}\n" - optsToInject _ _ = "{-# LANGUAGE CPP #-}\n" - - importsToInject :: Target -> [CLIFlags] -> String diff --git a/alex.spec b/alex.spec index 2469ab4..12cff2b 100644 --- a/alex.spec +++ b/alex.spec @@ -3,13 +3,12 @@ Name: alex # part of haskell-platform Version: 3.0.5 -Release: 35%{?dist} +Release: 36%{?dist} Summary: Tool for generating lexical analysers in Haskell License: BSD URL: http://hackage.haskell.org/package/%{name} Source0: http://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz -Patch1: alex-ghc74-fix-bang-pattern.patch BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros @@ -22,9 +21,6 @@ BuildRequires: ghc-directory-devel BuildRequires: autoconf BuildRequires: docbook-style-xsl BuildRequires: libxslt -%ifarch ppc ppc64 -BuildRequires: alex -%endif %description Alex is a tool for generating lexical analysers in Haskell. It takes a @@ -35,9 +31,6 @@ lex or flex for C/C++. %prep %setup -q -%ifarch ppc ppc64 -%patch1 -p1 -b .orig -%endif %build @@ -61,6 +54,9 @@ cd .. %changelog +* Mon Apr 21 2014 Jens Petersen - 3.0.5-36 +- bang pattern patch no longer needed for ppc with ghc-7.6 + * Mon Apr 21 2014 Jens Petersen - 3.0.5-35 - bump over haskell-platform