Update to haddock-0.5, build docs from sgml source, cleanup
From: Don Stewart <dons@cse.unsw.edu.au>
This commit is contained in:
parent
4d9e391a00
commit
0dc87172f5
@ -1,18 +1,21 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2003/07/25 00:26:13 avsm Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2003/07/31 01:11:14 avsm Exp $
|
||||
|
||||
COMMENT= "documentation tool for Haskell"
|
||||
COMMENT= "documentation tool for the functional language Haskell"
|
||||
|
||||
V= 0.4
|
||||
V= 0.5
|
||||
DISTNAME= haddock-${V}
|
||||
CATEGORIES= devel
|
||||
|
||||
HOMEPAGE= http://www.haskell.org/haddock/
|
||||
MAINTAINER= Don Stewart <dons@cse.unsw.edu.au>
|
||||
|
||||
MODULES= gettext iconv ghc
|
||||
MODULES= ghc
|
||||
|
||||
MASTER_SITES= http://www.haskell.org/haddock/
|
||||
DISTFILES= ${DISTNAME}-src.tar.gz
|
||||
MASTER_SITES0= ftp://ftp.cse.unsw.edu.au/pub/users/dons/haddock/
|
||||
|
||||
DISTFILES= ${DISTNAME}-src.tar.gz \
|
||||
haddock-regress-${V}.tgz:0
|
||||
|
||||
BUILD_DEPENDS+= ::textproc/docbook ::textproc/docbook-dsssl \
|
||||
::textproc/sgmlformat ::textproc/openjade \
|
||||
@ -20,8 +23,6 @@ BUILD_DEPENDS+= ::textproc/docbook ::textproc/docbook-dsssl \
|
||||
::textproc/html ::print/jadetex \
|
||||
::textproc/expat
|
||||
|
||||
NO_REGRESS= Yes
|
||||
|
||||
USE_GMAKE= Yes
|
||||
CONFIGURE_STYLE=gnu dest
|
||||
CONFIGURE_ENV= SGML_CATALOG_FILES=${LOCALBASE}/share/sgml/catalog
|
||||
|
@ -1,3 +1,6 @@
|
||||
MD5 (haddock-0.4-src.tar.gz) = 919e38378b91a223cb1e48178f1a85bd
|
||||
RMD160 (haddock-0.4-src.tar.gz) = 0fe6a06bb8434c7af93845cbc55461265acd8e14
|
||||
SHA1 (haddock-0.4-src.tar.gz) = 78a1cb2a52985363a1b9e98253eb4506f5201cb0
|
||||
MD5 (haddock-0.5-src.tar.gz) = c103855f8e1643034b3df02e9b8ae247
|
||||
MD5 (haddock-regress-0.5.tgz) = bd6ae5fe86929ba519fccb76b6c4cb6a
|
||||
RMD160 (haddock-0.5-src.tar.gz) = c25e5bb7b1cc7406880c6386e240ac1fa1f3e219
|
||||
RMD160 (haddock-regress-0.5.tgz) = ffabd57c9862c1835ff90f5e60b190737af50bbb
|
||||
SHA1 (haddock-0.5-src.tar.gz) = 5fb978edfab3d1032a14d022c2fb99fa0f2d043a
|
||||
SHA1 (haddock-regress-0.5.tgz) = 3b21d92a8e411f49016b6888e6bc07fcf285d35b
|
||||
|
30
devel/haddock/patches/patch-Makefile
Normal file
30
devel/haddock/patches/patch-Makefile
Normal file
@ -0,0 +1,30 @@
|
||||
--- Makefile.orig Tue Jul 23 18:57:50 2002
|
||||
+++ Makefile Fri Jul 25 14:24:25 2003
|
||||
@@ -370,3 +370,27 @@
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
+COMPILE_EXP=haddock.compile.expected
|
||||
+RUNTIME_EXP=haddock.generated.expected
|
||||
+COMPILE_OUT=haddock.compile.actual
|
||||
+RUNTIME_OUT=haddock.generated.actual
|
||||
+
|
||||
+check::
|
||||
+ @( cd haddock/examples/ ; ${MAKE} > ../../${COMPILE_OUT}.raw 2>&1 )
|
||||
+ @cat haddock/examples/*.html > ${RUNTIME_OUT}
|
||||
+ @( sed '1d;$$d' ${COMPILE_OUT}.raw > ${COMPILE_OUT} )
|
||||
+ @(if ( cmp -s ${COMPILE_EXP} ${COMPILE_OUT} && \
|
||||
+ cmp -s ${RUNTIME_EXP} ${RUNTIME_OUT} ) ; then \
|
||||
+ echo ;\
|
||||
+ echo "All is good!" ; \
|
||||
+ echo ;\
|
||||
+ else \
|
||||
+ echo ;\
|
||||
+ echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@";\
|
||||
+ echo "Unexpected regress results!" ;\
|
||||
+ echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@";\
|
||||
+ echo ;\
|
||||
+ echo "here is a diff:" ;\
|
||||
+ diff -u ${COMPILE_EXP} ${COMPILE_OUT} ;\
|
||||
+ diff -u ${RUNTIME_EXP} ${RUNTIME_OUT} ;\
|
||||
+ fi ; exit 0 )
|
@ -1,205 +0,0 @@
|
||||
|
||||
Upstream patch to Binary library to make it compile with GHC > 5.03
|
||||
|
||||
--- haddock/src/Binary.hs.orig Mon Jun 24 00:54:00 2002
|
||||
+++ haddock/src/Binary.hs Thu Jul 24 14:13:01 2003
|
||||
@@ -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]))
|
@ -7,5 +7,3 @@ next to the definitions of functions and types in the source code, in
|
||||
a syntax that is easy on the eye when writing the source code (no
|
||||
heavyweight mark-up). The documentation generated by Haddock is fully
|
||||
hyperlinked.
|
||||
|
||||
WWW: ${HOMEPAGE}
|
||||
|
@ -1,9 +1,9 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2003/07/25 00:26:13 avsm Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.2 2003/07/31 01:11:15 avsm Exp $
|
||||
bin/haddock
|
||||
bin/haddock-0.4
|
||||
lib/haddock-0.4/haddock.bin
|
||||
lib/haddock-0.4/haddock.css
|
||||
lib/haddock-0.4/haskell_icon.gif
|
||||
bin/haddock-0.5
|
||||
lib/haddock-0.5/haddock.bin
|
||||
lib/haddock-0.5/haddock.css
|
||||
lib/haddock-0.5/haskell_icon.gif
|
||||
share/doc/haddock/docbook.css
|
||||
share/doc/haddock/haddock.html
|
||||
share/doc/haddock/introduction.html
|
||||
@ -32,4 +32,4 @@ share/doc/haddock/x486.html
|
||||
share/doc/haddock/x57.html
|
||||
@dirrm share/doc/haddock/stylesheet-images
|
||||
@dirrm share/doc/haddock
|
||||
@dirrm lib/haddock-0.4
|
||||
@dirrm lib/haddock-0.5
|
||||
|
Loading…
Reference in New Issue
Block a user