diff options
author | Andres Loeh <kosmikus@gentoo.org> | 2003-07-28 13:09:19 +0000 |
---|---|---|
committer | Andres Loeh <kosmikus@gentoo.org> | 2003-07-28 13:09:19 +0000 |
commit | d57950a0d8ee7fe46ac2d830f731c0526640ea9b (patch) | |
tree | 2adc1f96c2532ceeec44b27a497e07b1c9339d5c /dev-haskell | |
parent | *** empty log message *** (diff) | |
download | gentoo-2-d57950a0d8ee7fe46ac2d830f731c0526640ea9b.tar.gz gentoo-2-d57950a0d8ee7fe46ac2d830f731c0526640ea9b.tar.bz2 gentoo-2-d57950a0d8ee7fe46ac2d830f731c0526640ea9b.zip |
fixed bug #23291
Diffstat (limited to 'dev-haskell')
-rw-r--r-- | dev-haskell/haddock/ChangeLog | 6 | ||||
-rw-r--r-- | dev-haskell/haddock/Manifest | 5 | ||||
-rw-r--r-- | dev-haskell/haddock/files/haddock-0.4-ghc6.patch | 203 | ||||
-rw-r--r-- | dev-haskell/haddock/haddock-0.4.ebuild | 11 |
4 files changed, 220 insertions, 5 deletions
diff --git a/dev-haskell/haddock/ChangeLog b/dev-haskell/haddock/ChangeLog index 3918abc324c7..e87fcfb9b398 100644 --- a/dev-haskell/haddock/ChangeLog +++ b/dev-haskell/haddock/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-haskell/haddock # Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/ChangeLog,v 1.2 2003/06/05 11:18:16 kosmikus Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/ChangeLog,v 1.3 2003/07/28 13:09:06 kosmikus Exp $ + + 28 Jul 2003; Andres Loeh <kosmikus@gentoo.org> haddock-0.4.ebuild, + files/haddock-0.4-ghc6.patch: + Fixed bug #23291. Marked stable for x86. 05 Jun 2003; Andres Loeh <kosmikus@gentoo.org> haddock-0.4.ebuild: fixed dependencies diff --git a/dev-haskell/haddock/Manifest b/dev-haskell/haddock/Manifest index 287ab82dade4..0cb03e6e7aa1 100644 --- a/dev-haskell/haddock/Manifest +++ b/dev-haskell/haddock/Manifest @@ -1,3 +1,4 @@ -MD5 b32a17083e2beddb422fbc873e953d7c haddock-0.4.ebuild 1960 -MD5 a73e3298b72b7ea07f4dee1b9b06efbd ChangeLog 650 +MD5 8179a81337753427bf912469bbf42ad0 haddock-0.4.ebuild 2066 +MD5 7f24863d166e7a9ba989af4993991270 ChangeLog 795 +MD5 0fe55540bd0531c1ca8da69fb5098d76 files/haddock-0.4-ghc6.patch 6858 MD5 345c00e86d5388d60c897e487987922a files/digest-haddock-0.4 67 diff --git a/dev-haskell/haddock/files/haddock-0.4-ghc6.patch b/dev-haskell/haddock/files/haddock-0.4-ghc6.patch new file mode 100644 index 000000000000..d5192c49aaf8 --- /dev/null +++ b/dev-haskell/haddock/files/haddock-0.4-ghc6.patch @@ -0,0 +1,203 @@ +diff -Naur haddock-0.4-orig/haddock/src/Binary.hs haddock-0.4/haddock/src/Binary.hs +--- haddock-0.4-orig/haddock/src/Binary.hs 2002-06-23 14:54:00.000000000 +0000 ++++ haddock-0.4/haddock/src/Binary.hs 2003-07-28 12:29:09.000000000 +0000 +@@ -64,7 +64,6 @@ + import Monad + import Exception + import GlaExts hiding (ByteArray, newByteArray, freezeByteArray) +-import Array + import IO + #if __GLASGOW_HASKELL__ < 503 + import PrelIOBase -- ( IOError(..), IOErrorType(..) ) +@@ -77,11 +76,19 @@ + #endif + + type BinArray = MutableByteArray RealWorld Int ++newArray_ :: Ix ix => (ix, ix) -> IO (MutableByteArray RealWorld ix) + newArray_ bounds = stToIO (newCharArray bounds) ++ ++unsafeWrite :: Ix ix => MutableByteArray RealWorld ix -> ix -> Word8 -> IO () + unsafeWrite arr ix e = stToIO (writeWord8Array arr ix e) ++ ++unsafeRead :: Ix ix => MutableByteArray RealWorld ix -> ix -> IO Word8 + unsafeRead arr ix = stToIO (readWord8Array arr ix) + ++hPutArray :: Handle -> MutableByteArray RealWorld a -> Int -> IO () + hPutArray h arr sz = hPutBufBA h arr sz ++ ++hGetArray :: Handle -> MutableByteArray RealWorld a -> Int -> IO Int + hGetArray h sz = hGetBufBA h sz + + #if __GLASGOW_HASKELL__ < 503 +@@ -160,14 +167,15 @@ + | size <= 0 = error "Data.Binary.openBinMem: size must be >= 0" + | otherwise = do + arr <- newArray_ (0,size-1) +- arr_r <- newIORef arr ++ arr_r0 <- newIORef arr + ix_r <- newFastMutInt + writeFastMutInt ix_r 0 +- sz_r <- newFastMutInt +- writeFastMutInt sz_r size +- return (BinMem undefined ix_r sz_r arr_r) ++ sz_r0 <- newFastMutInt ++ writeFastMutInt sz_r0 size ++ return (BinMem undefined ix_r sz_r0 arr_r0) + +-noBinHandleUserData = error "Binary.BinHandle: no user data" ++--noBinHandleUserData :: a ++--noBinHandleUserData = error "Binary.BinHandle: no user data" + + --getUserData :: BinHandle -> BinHandleState + --getUserData bh = state bh +@@ -180,24 +188,24 @@ + seekBin (BinIO _ ix_r h) (BinPtr p) = do + writeFastMutInt ix_r p + hSeek h AbsoluteSeek (fromIntegral p) +-seekBin h@(BinMem _ ix_r sz_r a) (BinPtr p) = do +- sz <- readFastMutInt sz_r ++seekBin h@(BinMem _ ix_r sz_r0 _) (BinPtr p) = do ++ sz <- readFastMutInt sz_r0 + if (p >= sz) + then do expandBin h p; writeFastMutInt ix_r p + else writeFastMutInt ix_r p + + isEOFBin :: BinHandle -> IO Bool +-isEOFBin (BinMem _ ix_r sz_r a) = do ++isEOFBin (BinMem _ ix_r sz_r0 _) = do + ix <- readFastMutInt ix_r +- sz <- readFastMutInt sz_r ++ sz <- readFastMutInt sz_r0 + return (ix >= sz) +-isEOFBin (BinIO _ ix_r h) = hIsEOF h ++isEOFBin (BinIO _ _ h) = hIsEOF h + + writeBinMem :: BinHandle -> FilePath -> IO () + writeBinMem (BinIO _ _ _) _ = error "Data.Binary.writeBinMem: not a memory handle" +-writeBinMem (BinMem _ ix_r sz_r arr_r) fn = do ++writeBinMem (BinMem _ ix_r _ arr_r0) fn = do + h <- openFileEx fn (BinaryMode WriteMode) +- arr <- readIORef arr_r ++ arr <- readIORef arr_r0 + ix <- readFastMutInt ix_r + hPutArray h arr ix + hClose h +@@ -212,24 +220,24 @@ + when (count /= filesize) + (error ("Binary.readBinMem: only read " ++ show count ++ " bytes")) + hClose h +- arr_r <- newIORef arr ++ arr_r0 <- newIORef arr + ix_r <- newFastMutInt + writeFastMutInt ix_r 0 +- sz_r <- newFastMutInt +- writeFastMutInt sz_r filesize +- return (BinMem undefined {-initReadState-} ix_r sz_r arr_r) ++ sz_r0 <- newFastMutInt ++ writeFastMutInt sz_r0 filesize ++ return (BinMem undefined {-initReadState-} ix_r sz_r0 arr_r0) + + -- expand the size of the array to include a specified offset + expandBin :: BinHandle -> Int -> IO () +-expandBin (BinMem _ ix_r sz_r arr_r) off = do +- sz <- readFastMutInt sz_r ++expandBin (BinMem _ _ sz_r0 arr_r0) off = do ++ sz <- readFastMutInt sz_r0 + let sz' = head (dropWhile (<= off) (iterate (* 2) sz)) +- arr <- readIORef arr_r ++ arr <- readIORef arr_r0 + arr' <- newArray_ (0,sz'-1) + sequence_ [ unsafeRead arr i >>= unsafeWrite arr' i + | i <- [ 0 .. sz-1 ] ] +- writeFastMutInt sz_r sz' +- writeIORef arr_r arr' ++ writeFastMutInt sz_r0 sz' ++ writeIORef arr_r0 arr' + hPutStrLn stderr ("expanding to size: " ++ show sz') + return () + expandBin (BinIO _ _ _) _ = return () +@@ -239,14 +247,14 @@ + -- Low-level reading/writing of bytes + + putWord8 :: BinHandle -> Word8 -> IO () +-putWord8 h@(BinMem _ ix_r sz_r arr_r) w = do ++putWord8 h@(BinMem _ ix_r sz_r0 arr_r0) w = do + ix <- readFastMutInt ix_r +- sz <- readFastMutInt sz_r ++ sz <- readFastMutInt sz_r0 + -- double the size of the array if it overflows + if (ix >= sz) + then do expandBin h ix + putWord8 h w +- else do arr <- readIORef arr_r ++ else do arr <- readIORef arr_r0 + unsafeWrite arr ix w + writeFastMutInt ix_r (ix+1) + return () +@@ -257,12 +265,12 @@ + return () + + getWord8 :: BinHandle -> IO Word8 +-getWord8 (BinMem _ ix_r sz_r arr_r) = do ++getWord8 (BinMem _ ix_r sz_r0 arr_r0) = do + ix <- readFastMutInt ix_r +- sz <- readFastMutInt sz_r ++ sz <- readFastMutInt sz_r0 + when (ix >= sz) $ +- throw (mkIOError eofErrorType "Data.Binary.getWord8" Nothing Nothing) +- arr <- readIORef arr_r ++ ioError (mkIOError eofErrorType "Data.Binary.getWord8" Nothing Nothing) ++ arr <- readIORef arr_r0 + w <- unsafeRead arr ix + writeFastMutInt ix_r (ix+1) + return w +@@ -363,8 +371,8 @@ + -- Instances for standard types + + instance Binary () where +- put_ bh () = return () +- get _ = return () ++ put_ _ () = return () ++ get _ = return () + -- getF bh p = case getBitsF bh 0 p of (_,b) -> ((),b) + + instance Binary Bool where +@@ -494,22 +502,23 @@ + data MBA = MBA (MutableByteArray# RealWorld) + + newByteArray :: Int# -> IO MBA +-newByteArray sz = IO $ \s -> +- case newByteArray# sz s of { (# s, arr #) -> ++newByteArray sz = IO $ \s0 -> ++ case newByteArray# sz s0 of { (# s, arr #) -> + (# s, MBA arr #) } + + freezeByteArray :: MutableByteArray# RealWorld -> IO ByteArray +-freezeByteArray arr = IO $ \s -> +- case unsafeFreezeByteArray# arr s of { (# s, arr #) -> ++freezeByteArray arr0 = IO $ \s0 -> ++ case unsafeFreezeByteArray# arr0 s0 of { (# s, arr #) -> + (# s, BA arr #) } + + writeByteArray :: MutableByteArray# RealWorld -> Int# -> Word8 -> IO () + +-writeByteArray arr i w8 = IO $ \s -> +- case word8ToWord w8 of { W# w# -> +- case writeCharArray# arr i (chr# (word2Int# w#)) s of { s -> ++writeByteArray arr i w8 = IO $ \s0 -> ++ case fromIntegral w8 of { W# w# -> ++ case writeCharArray# arr i (chr# (word2Int# w#)) s0 of { s -> + (# s , () #) }} + ++indexByteArray :: ByteArray# -> Int# -> Word8 + indexByteArray a# n# = fromIntegral (I# (ord# (indexCharArray# a# n#))) + + instance (Integral a, Binary a) => Binary (Ratio a) where +@@ -530,6 +539,7 @@ + word8s :: [Word8] + word8s = map (fromIntegral.ord) str + ++getString :: BinHandle -> IO String + getString bh = do + word8s <- get bh + return (map (chr.fromIntegral) (word8s :: [Word8])) diff --git a/dev-haskell/haddock/haddock-0.4.ebuild b/dev-haskell/haddock/haddock-0.4.ebuild index 182359c5e797..9ec833cc4080 100644 --- a/dev-haskell/haddock/haddock-0.4.ebuild +++ b/dev-haskell/haddock/haddock-0.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/haddock-0.4.ebuild,v 1.3 2003/06/06 08:32:52 kosmikus Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/haddock/haddock-0.4.ebuild,v 1.4 2003/07/28 13:09:06 kosmikus Exp $ # # USE variable summary: # doc - Build extra documenation from DocBook sources, @@ -8,6 +8,7 @@ # tetex - Build the above docs as PostScript as well. +inherit base IUSE="doc tetex" DESCRIPTION="A documentation tool for Haskell" @@ -15,7 +16,7 @@ SRC_URI="http://www.haskell.org/haddock/${P}-src.tar.gz" HOMEPAGE="http://www.haskell.org/haddock" SLOT="0" -KEYWORDS="~x86 ~sparc" +KEYWORDS="x86 ~sparc" LICENSE="as-is" DEPEND="virtual/ghc @@ -31,6 +32,12 @@ RDEPEND="" # extend path to /opt/ghc/bin to guarantee that ghc-bin is found GHCPATH="${PATH}:/opt/ghc/bin" +src_unpack() { + base_src_unpack + cd ${S} + patch -p1 < ${FILESDIR}/haddock-${PV}-ghc6.patch +} + src_compile() { # unset SGML_CATALOG_FILES because documentation installation # breaks otherwise ... |