Permalink
Browse files

Importing GHC 7.6.1 from Arch.

Signed-off-by: Magnus Therning <magnus@therning.org>
  • Loading branch information...
1 parent 39a71a5 commit 6e02fdcf6f1ac02a624e8cc0d6b8857bdafc022d @magthe magthe committed Sep 9, 2012
View
@@ -0,0 +1,17 @@
+warp
+wai
+temporary
+scion-browser
+parallel-io
+pandoc
+cblrepo
+bytestring-show
+anansi
+GLUT
+glib
+gtk
+pango
+ghc-mod
+buildwrapper
+persistent-template
+haddock
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -7,7 +7,7 @@
# This implies that all libraries need to be rebuilt when ghc is rebuilt.
pkgname=ghc
-pkgver=7.4.2
+pkgver=7.6.1
pkgrel=1
pkgdesc='The Glasgow Haskell Compiler'
arch=('i686' 'x86_64')
@@ -21,72 +21,59 @@ install='ghc.install'
# keep this otherwise a lot of tests will show as unexpected failures... need to investigate why using -jn for n > 1 does this...
#options=('!makeflags')
# missing rtl?
-provides=('haskell-array=0.4.0.0'
- 'haskell-base=4.5.1.0'
- 'haskell-binary=0.5.1.0'
+provides=('haskell-array=0.4.0.1'
+ 'haskell-base=4.6.0.0'
+ 'haskell-binary=0.5.1.1'
'haskell-bin-package-db=0.0.0.0'
- 'haskell-bytestring=0.9.2.1'
- 'haskell-containers=0.4.2.1'
- 'haskell-deepseq=1.3.0.0'
- 'haskell-directory=1.1.0.2'
- 'haskell-extensible-exceptions=0.1.1.4'
- 'haskell-filepath=1.3.0.0'
- 'haskell-ghc-prim=0.2.0.0'
- 'haskell-haskell2010=1.1.0.1'
- 'haskell-haskell98=2.0.0.1'
- 'haskell-hoopl=3.8.7.3'
- 'haskell-hpc=0.5.1.1'
- 'haskell-integer-gmp=0.4.0.0'
- 'haskell-old-locale=1.0.0.4'
- 'haskell-old-time=1.1.0.0'
+ 'haskell-bytestring=0.10.0.0'
+ 'haskell-containers=0.5.0.0'
+ 'haskell-deepseq=1.3.0.1'
+ 'haskell-directory=1.2.0.0'
+ 'haskell-filepath=1.3.0.1'
+ 'haskell-ghc-prim=0.3.0.0'
+ 'haskell-haskell2010=1.1.1.0'
+ 'haskell-haskell98=2.0.0.2'
+ 'haskell-hoopl=3.9.0.0'
+ 'haskell-hpc=0.6.0.0'
+ 'haskell-integer-gmp=0.5.0.0'
+ 'haskell-old-locale=1.0.0.5'
+ 'haskell-old-time=1.1.0.1'
'haskell-pretty=1.1.1.0'
- 'haskell-process=1.1.0.1'
- 'haskell-template-haskell=2.7.0.0'
- 'haskell-time=1.4'
- 'haskell-unix=2.5.1.1'
- 'haskell-cabal=1.14.0'
- )
-replaces=('haskell-array<0.4.0.0'
- 'haskell-base<4.5.1.0'
- 'haskell-binary<0.5.1.0'
+ 'haskell-process=1.1.0.2'
+ 'haskell-template-haskell=2.8.0.0'
+ 'haskell-time=1.4.0.1'
+ 'haskell-unix=2.6.0.0'
+ 'haskell-cabal=1.16.0')
+replaces=('haskell-array<0.4.0.1'
+ 'haskell-base<4.6.0.0'
+ 'haskell-binary<0.5.1.1'
'haskell-bin-package-db<0.0.0.0'
- 'haskell-bytestring<0.9.2.1'
- 'haskell-containers<0.4.2.1'
- 'haskell-deepseq<1.3.0.0'
- 'haskell-directory<1.1.0.2'
- 'haskell-extensible-exceptions<0.1.1.4'
- 'haskell-filepath<1.3.0.0'
- 'haskell-ghc-prim<0.2.0.0'
- 'haskell-haskell2010<1.1.0.1'
- 'haskell-haskell98<2.0.0.1'
- 'haskell-hoopl<3.8.7.3'
- 'haskell-hpc<0.5.1.1'
- 'haskell-integer-gmp<0.4.0.0'
- 'haskell-old-locale<1.0.0.4'
- 'haskell-old-time<1.1.0.0'
+ 'haskell-bytestring<0.10.0.0'
+ 'haskell-containers<0.5.0.0'
+ 'haskell-deepseq<1.3.0.1'
+ 'haskell-directory<1.2.0.0'
+ 'haskell-filepath<1.3.0.1'
+ 'haskell-ghc-prim<0.3.0.0'
+ 'haskell-haskell2010<1.1.1.0'
+ 'haskell-haskell98<2.0.0.2'
+ 'haskell-hoopl<3.9.0.0'
+ 'haskell-hpc<0.6.0.0'
+ 'haskell-integer-gmp<0.5.0.0'
+ 'haskell-old-locale<1.0.0.5'
+ 'haskell-old-time<1.1.0.1'
'haskell-pretty<1.1.1.0'
- 'haskell-process<1.1.0.1'
- 'haskell-template-haskell<2.7.0.0'
- 'haskell-time<1.4'
- 'haskell-unix<2.5.1.1'
- 'haskell-cabal<1.14.0'
- )
+ 'haskell-process<1.1.0.2'
+ 'haskell-template-haskell<2.8.0.0'
+ 'haskell-time<1.4.0.1'
+ 'haskell-unix<2.6.0.0'
+ 'haskell-cabal<1.16.0')
source=("http://www.haskell.org/ghc/dist/${pkgver}/ghc-${pkgver}-src.tar.bz2"
"http://www.haskell.org/ghc/dist/${pkgver}/ghc-${pkgver}-testsuite.tar.bz2"
- 'build.mk'
- 'silence-gen_contents_index.diff')
-md5sums=('267462db5c5a7c245fb26361b77007c4'
- '528005749c761fe6c12a0079bd84fb90'
- '88ad4108c26f56fc38466d82aaf9a295'
- '2ac480d025b706fc47acc58c54b246bb')
+ 'build.mk')
build() {
cd ghc-${pkgver}
- # Silence gen_contents_index for the common case.
- # http://hackage.haskell.org/trac/ghc/ticket/5992
- patch -Np1 -i ${srcdir}/silence-gen_contents_index.diff
-
cp ${srcdir}/build.mk mk/build.mk
./configure \
@@ -96,6 +83,9 @@ build() {
}
check() {
+ # keep this otherwise a lot of tests will show as unexpected failures... need to investigate why using -jn for n > 1 does this...
+ unset MAKEFLAGS
+
cd ghc-${pkgver}
# python2 rename
@@ -134,3 +124,7 @@ package() {
install -m644 LICENSE \
${pkgdir}/usr/share/licenses/ghc
}
+
+sha256sums=('f1dcdf4810a70d92a7e5c063a1f6cdb42b07d7fc48c0e3b437b882f4d1c5b9e0'
+ '32e223abcb8756ac16e14d8179142211be27b0898d146bbcfc17afb0e382d163'
+ 'cd7d83457a8790b523ef7ada3a6449e856dac7a4ae019939e2614f1e03f5c11f')
View
@@ -10,6 +10,9 @@
# Full build with max optimisation and everything enabled (very slow build)
BuildFlavour = perf
+# As above but build GHC using the LLVM backend
+#BuildFlavour = perf-llvm
+
# Fast build with optimised libraries, no profiling (RECOMMENDED):
#BuildFlavour = quick
@@ -51,6 +54,23 @@ endif
endif
+# ---------------- Perf build using LLVM -------------------------------------
+
+ifeq "$(BuildFlavour)" "perf-llvm"
+
+SRC_HC_OPTS = -O -H64m -fllvm
+GhcStage1HcOpts = -O -fllvm
+GhcStage2HcOpts = -O2 -fllvm
+GhcHcOpts = -Rghc-timing
+GhcLibHcOpts = -O2
+GhcLibWays += p
+
+ifeq "$(PlatformSupportsSharedLibs)" "YES"
+GhcLibWays += dyn
+endif
+
+endif
+
# -------- A Fast build ------------------------------------------------------
ifeq "$(BuildFlavour)" "quickest"
@@ -151,10 +171,14 @@ endif
ifeq "$(BuildFlavour)" "unreg"
+# Note that the LLVM backend works in unregisterised mode as well as
+# registerised mode. This often makes it a good choice for porting
+# GHC.
+
GhcUnregisterised = YES
GhcWithNativeCodeGen = NO
-SRC_HC_OPTS = -O -H64m
+SRC_HC_OPTS = -O -H64m # -fllvm
GhcStage1HcOpts = -O
GhcStage2HcOpts = -O2
GhcHcOpts = -Rghc-timing
@@ -3,5 +3,5 @@
# modify the relver of ghc, this saves on recompilations of cblrepo
for f in $*; do
- sed -e 's/\(.*\)ghc=7\.4\.2-1\(.*\)/\1ghc=7.4.2-1\2/' -i $f
+ sed -e 's/\(.*\)ghc=7\.4\.2-1\(.*\)/\1ghc=7.6.1-1\2/' -i $f
done
View
@@ -0,0 +1,99 @@
+Index: archhaskell-habs/haskell-crypto/src/Crypto-4.2.5/Data/Digest/SHA1.hs
+===================================================================
+--- archhaskell-habs.orig/haskell-crypto/src/Crypto-4.2.5/Data/Digest/SHA1.hs
++++ archhaskell-habs/haskell-crypto/src/Crypto-4.2.5/Data/Digest/SHA1.hs
+@@ -93,7 +93,7 @@ blockWord8sIn512 =
+ g [] = Nothing
+ g xs = Just (splitAt 64 xs)
+
+-fromBytes :: (Bits a) => [a] -> a
++fromBytes :: (Num a, Bits a) => [a] -> a
+ fromBytes input =
+ let dofb accum [] = accum
+ dofb accum (x:xs) = dofb ((shiftL accum 8) .|. x) xs
+Index: archhaskell-habs/haskell-crypto/src/Crypto-4.2.5/Data/Digest/SHA2.hs
+===================================================================
+--- archhaskell-habs.orig/haskell-crypto/src/Crypto-4.2.5/Data/Digest/SHA2.hs
++++ archhaskell-habs/haskell-crypto/src/Crypto-4.2.5/Data/Digest/SHA2.hs
+@@ -80,7 +80,7 @@ blockSize = 16
+ -- | 'padding' currently requires that the bitSize of @a@ divide the bitSize
+ -- of @w@
+ -----------------------------------------------------------------------------
+-padding :: (ShaData w, Bits a, Integral a) => [a] -> [[w]]
++padding :: (ShaData w, Bits a, Num w, Integral a) => [a] -> [[w]]
+ padding x = unfoldr block $ paddingHelper x 0 (0::Int) (0::Integer)
+ where
+ block [] = Nothing
+@@ -155,7 +155,7 @@ instance Hash Hash384 where
+ instance Hash Hash224 where
+ toOctets (Hash224 x0 x1 x2 x3 x4 x5 x6) = bitsToOctets =<< [x0, x1, x2, x3, x4, x5, x6]
+
+-shaStep :: (ShaData w) => Hash8 w -> [w] -> Hash8 w
++shaStep :: (ShaData w, Num w) => Hash8 w -> [w] -> Hash8 w
+ shaStep h m = (foldl' (flip id) h (zipWith mkStep3 ks ws)) `plus` h
+ where
+ ws = m++zipWith4 smallSigma (drop (blockSize-2) ws) (drop (blockSize-7) ws)
+@@ -173,7 +173,7 @@ shaStep h m = (foldl' (flip id) h (zipWi
+ -- | Due to the limitations of 'padding', 'sha' currently requires that the
+ -- bitSize of @a@ divide the bitSize of @w@
+ -----------------------------------------------------------------------------
+-sha :: (ShaData w, Bits a, Integral a) => Hash8 w -> [a] -> Hash8 w
++sha :: (ShaData w, Num w, Bits a, Integral a) => Hash8 w -> [a] -> Hash8 w
+ sha h0 x = foldl' shaStep h0 $ padding x
+
+ stringToOctets :: String -> [Word8]
+@@ -282,4 +282,4 @@ test_sha2 = "SHA-2" ~: test
+
+ -- Test with:
+ -- ghc -no-recomp -O --make Data/Digest/SHA2.hs -main-is Data.Digest.SHA2.moduleTest -o moduleTest && ./moduleTest && rm moduleTest
+-moduleTest = runTestTT test_sha2
+\ No newline at end of file
++moduleTest = runTestTT test_sha2
+Index: archhaskell-habs/haskell-crypto/src/Crypto-4.2.5/Data/LargeWord.hs
+===================================================================
+--- archhaskell-habs.orig/haskell-crypto/src/Crypto-4.2.5/Data/LargeWord.hs
++++ archhaskell-habs/haskell-crypto/src/Crypto-4.2.5/Data/LargeWord.hs
+@@ -62,7 +62,7 @@ instance LargeWord Word64 where
+ data LargeKey a b = LargeKey a b
+ deriving (Eq, Ord)
+
+-instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) =>
++instance (Num a, Ord a, Bits a, LargeWord a, Num b, Bits b, LargeWord b) =>
+ LargeWord (LargeKey a b) where
+ largeWordToInteger (LargeKey lo hi) =
+ largeWordToInteger lo + (2^(bitSize lo)) * largeWordToInteger hi
+@@ -96,17 +96,17 @@ instance (Ord a, Bits a, LargeWord a, Bi
+ where conv = integerToLargeWord . largeWordToInteger
+ largeBitSize ~(LargeKey lo hi) = largeBitSize lo + largeBitSize hi
+
+-instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) => Show (LargeKey a b) where
++instance (Num a, Ord a, Bits a, LargeWord a, Num b, Bits b, LargeWord b) => Show (LargeKey a b) where
+ showsPrec p = showInt . largeWordToInteger
+
+-instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) =>
++instance (Num a, Ord a, Bits a, LargeWord a, Num b, Bits b, LargeWord b) =>
+ Num (LargeKey a b) where
+ (+) = largeWordPlus
+ fromInteger = integerToLargeWord
+
+ -- Larger keys are instances of Bits provided their constituents are keys.
+
+-instance (Ord a, Bits a, LargeWord a, Bits b, LargeWord b) =>
++instance (Num a, Ord a, Bits a, LargeWord a, Num b, Bits b, LargeWord b) =>
+ Bits (LargeKey a b) where
+ (.&.) = largeWordAnd
+ (.|.) = largeWordOr
+@@ -130,11 +130,11 @@ aoflk = undefined
+ boflk :: (LargeKey a b) -> b
+ boflk = undefined
+
+-instance (Ord a, Bits a, LargeWord a, Ord b, Bits b, LargeWord b) =>
++instance (Num a, Ord a, Bits a, LargeWord a, Num b, Ord b, Bits b, LargeWord b) =>
+ Integral (LargeKey a b) where
+ toInteger = largeWordToInteger
+
+-instance (Ord a, Bits a, LargeWord a, Ord b, Bits b, LargeWord b) =>
++instance (Num a, Ord a, Bits a, LargeWord a, Num b, Ord b, Bits b, LargeWord b) =>
+ Real (LargeKey a b)
+
+ instance Enum (LargeKey a b)
View
@@ -1,7 +1,7 @@
-Index: new-ghc/haskell-dbus/src/DBus-0.4/DBus.hsc
+Index: archhaskell-habs/haskell-dbus/src/DBus-0.4/DBus.hsc
===================================================================
---- new-ghc.orig/haskell-dbus/src/DBus-0.4/DBus.hsc
-+++ new-ghc/haskell-dbus/src/DBus-0.4/DBus.hsc
+--- archhaskell-habs.orig/haskell-dbus/src/DBus-0.4/DBus.hsc
++++ archhaskell-habs/haskell-dbus/src/DBus-0.4/DBus.hsc
@@ -2,7 +2,7 @@
-- Copyright (C) 2006 Evan Martin <martine@danga.com>
@@ -26,10 +26,10 @@ Index: new-ghc/haskell-dbus/src/DBus-0.4/DBus.hsc
+instance Exception Error
-- vim: set ts=2 sw=2 tw=72 et ft=haskell :
-Index: new-ghc/haskell-dbus/src/DBus-0.4/DBus/Internal.hsc
+Index: archhaskell-habs/haskell-dbus/src/DBus-0.4/DBus/Internal.hsc
===================================================================
---- new-ghc.orig/haskell-dbus/src/DBus-0.4/DBus/Internal.hsc
-+++ new-ghc/haskell-dbus/src/DBus-0.4/DBus/Internal.hsc
+--- archhaskell-habs.orig/haskell-dbus/src/DBus-0.4/DBus/Internal.hsc
++++ archhaskell-habs/haskell-dbus/src/DBus-0.4/DBus/Internal.hsc
@@ -9,7 +9,7 @@
module DBus.Internal where
@@ -47,16 +47,32 @@ Index: new-ghc/haskell-dbus/src/DBus-0.4/DBus/Internal.hsc
+ throwIO $ Error name msg
-- vim: set ts=2 sw=2 tw=72 et ft=haskell :
-Index: new-ghc/haskell-dbus/src/DBus-0.4/DBus/Message.hsc
+Index: archhaskell-habs/haskell-dbus/src/DBus-0.4/DBus/Message.hsc
===================================================================
---- new-ghc.orig/haskell-dbus/src/DBus-0.4/DBus/Message.hsc
-+++ new-ghc/haskell-dbus/src/DBus-0.4/DBus/Message.hsc
-@@ -38,7 +38,7 @@ import Data.Int
+--- archhaskell-habs.orig/haskell-dbus/src/DBus-0.4/DBus/Message.hsc
++++ archhaskell-habs/haskell-dbus/src/DBus-0.4/DBus/Message.hsc
+@@ -38,9 +38,9 @@ import Data.Int
import Data.Word
import Data.Char
import Data.Dynamic
-import Foreign
+import Foreign hiding (unsafePerformIO)
import Foreign.C.String
- import Foreign.C.Types (CInt)
+-import Foreign.C.Types (CInt)
++import Foreign.C.Types (CInt(..))
import System.IO.Unsafe
+
+ import DBus.Internal
+Index: archhaskell-habs/haskell-dbus/src/DBus-0.4/DBus/Connection.hsc
+===================================================================
+--- archhaskell-habs.orig/haskell-dbus/src/DBus-0.4/DBus/Connection.hsc
++++ archhaskell-habs/haskell-dbus/src/DBus-0.4/DBus/Connection.hsc
+@@ -24,7 +24,7 @@ import Control.Exception (bracket)
+ import Control.Monad (when)
+ import Foreign
+ import Foreign.C.String
+-import Foreign.C.Types (CInt)
++import Foreign.C.Types (CInt(..))
+
+ import DBus.Internal
+ import DBus.Message
View
@@ -1,11 +1,11 @@
-Index: habs/haskell-gluraw/PKGBUILD
+Index: archhaskell-habs/haskell-gluraw/PKGBUILD
===================================================================
---- habs.orig/haskell-gluraw/PKGBUILD
-+++ habs/haskell-gluraw/PKGBUILD
+--- archhaskell-habs.orig/haskell-gluraw/PKGBUILD
++++ archhaskell-habs/haskell-gluraw/PKGBUILD
@@ -13,7 +13,7 @@ arch=('i686' 'x86_64')
makedepends=()
depends=("ghc=7.4.2-1"
- "haskell-openglraw=1.2.0.0-1"
+ "haskell-openglraw=1.2.0.0-25"
- "GLU")
+ "mesa")
options=('strip')
Oops, something went wrong.

0 comments on commit 6e02fdc

Please sign in to comment.