diff options
author | danfe <danfe@FreeBSD.org> | 2008-12-24 21:09:35 +0800 |
---|---|---|
committer | danfe <danfe@FreeBSD.org> | 2008-12-24 21:09:35 +0800 |
commit | 12002cfaf0a4cfebe79f94db0d4bfbb34ce1b258 (patch) | |
tree | 3dea3c1259334e0e23390056e9c87d3a8987dc22 /archivers | |
parent | 8db43aecac569e95ba7ea91b68eb15515491acd9 (diff) | |
download | freebsd-ports-gnome-12002cfaf0a4cfebe79f94db0d4bfbb34ce1b258.tar.gz freebsd-ports-gnome-12002cfaf0a4cfebe79f94db0d4bfbb34ce1b258.tar.zst freebsd-ports-gnome-12002cfaf0a4cfebe79f94db0d4bfbb34ce1b258.zip |
- Update to version 0.8
- Stop using GNU make(1)
- Install examples and more complete docs set
- Cleanup Makefile
- Drop maintainership
- Reflect project move to SourceForge
Diffstat (limited to 'archivers')
-rw-r--r-- | archivers/xmill/Makefile | 39 | ||||
-rw-r--r-- | archivers/xmill/distinfo | 6 | ||||
-rw-r--r-- | archivers/xmill/files/patch-XMill+BZlib.cpp | 73 | ||||
-rw-r--r-- | archivers/xmill/files/patch-makefile | 185 | ||||
-rw-r--r-- | archivers/xmill/files/patch-src::Main.cpp | 27 | ||||
-rw-r--r-- | archivers/xmill/files/patch-src::ZLib.cpp | 150 | ||||
-rw-r--r-- | archivers/xmill/pkg-descr | 2 |
7 files changed, 165 insertions, 317 deletions
diff --git a/archivers/xmill/Makefile b/archivers/xmill/Makefile index 32743d3f625a..1d67d92730a3 100644 --- a/archivers/xmill/Makefile +++ b/archivers/xmill/Makefile @@ -6,38 +6,41 @@ # PORTNAME= xmill -DISTVERSION= 0-7 +DISTVERSION= 0.8 CATEGORIES= archivers -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} -MASTER_SITE_SUBDIR= ${PORTNAME} +MASTER_SITES= SF -MAINTAINER= danfe@FreeBSD.org +MAINTAINER= ports@FreeBSD.org COMMENT= An efficient compressor for XML -NO_WRKSUBDIR= yes +WRKSRC= ${WRKDIR}/${PORTNAME} MAKEFILE= makefile USE_ZIP= yes +USE_DOS2UNIX= ${MAKEFILE} XMill/BZlib.cpp -PLIST_FILES= bin/xmill bin/xdemill bin/xbmill bin/xbdemill -PORTDOCS= COPYRIGHT.txt LICENSE.txt MANUAL.txt README.txt xmill.ps.gz +PLIST_FILES= bin/xcmill bin/xdemill bin/xmilltest bin/xmillexample \ + bin/xmillinspect bin/ppmzip + +PORTDOCS= * +PORTEXAMPLES= * post-patch: - @${REINPLACE_CMD} -e 's,friend,& class,' \ - ${WRKSRC}/src/*.?pp +# Allow to build with modern GCC + @${REINPLACE_CMD} -e 's,friend,& class,' ${WRKSRC}/XMill/*.?pp \ + ${WRKSRC}/xmillinspect/xmillinspect.h do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/unix/xmill ${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC}/unix/xdemill ${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC}/unix/xbmill ${PREFIX}/bin - ${INSTALL_PROGRAM} ${WRKSRC}/unix/xbdemill ${PREFIX}/bin +.for p in ${PLIST_FILES:T} + ${INSTALL_PROGRAM} ${WRKSRC}/unix/${p} ${PREFIX}/bin +.endfor .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/COPYRIGHT.txt ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/LICENSE.txt ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/MANUAL.txt ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README.txt ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/paper/xmill.ps.gz ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/documentation/* ${DOCSDIR} +.endif +.if !defined(NOPORTEXAMPLES) + @${MKDIR} ${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/examples/* ${EXAMPLESDIR} .endif .include <bsd.port.mk> diff --git a/archivers/xmill/distinfo b/archivers/xmill/distinfo index 7c723728e17d..26411dbd8bad 100644 --- a/archivers/xmill/distinfo +++ b/archivers/xmill/distinfo @@ -1,3 +1,3 @@ -MD5 (xmill-0-7.zip) = d0f530efdb233b53f85bea36e6f21ce1 -SHA256 (xmill-0-7.zip) = cc1d1f075f85c441819be17338a97325e5ad11b14e0f8bcd1e251b52d8ba6ffa -SIZE (xmill-0-7.zip) = 1315864 +MD5 (xmill-0.8.zip) = 516ee68ca7ae7efc375dbd90f81c7566 +SHA256 (xmill-0.8.zip) = 850efdc280937d67492add1857d842abf81b24a9051266981f2d53d74e05ccfe +SIZE (xmill-0.8.zip) = 3112717 diff --git a/archivers/xmill/files/patch-XMill+BZlib.cpp b/archivers/xmill/files/patch-XMill+BZlib.cpp new file mode 100644 index 000000000000..24c25114c64e --- /dev/null +++ b/archivers/xmill/files/patch-XMill+BZlib.cpp @@ -0,0 +1,73 @@ +--- XMill/BZlib.cpp.orig 2008-07-26 04:10:15.000000000 +0700 ++++ XMill/BZlib.cpp 2008-07-26 04:20:22.000000000 +0700 +@@ -44,7 +44,7 @@ + + void BZip::initCompress() + { +- if(bzCompressInit(&bzstate,7,0,0) != BZ_OK) { ++ if(BZ2_bzCompressInit(&bzstate,7,0,0) != BZ_OK) { + throw new XMillException (XMILL_ERR_ZLIB, "Error while compressing container!"); + } + } +@@ -60,19 +60,19 @@ + { + if (flag == -1) + flag = BZ_FINISH; +- return bzCompress(&bzstate,flag); ++ return BZ2_bzCompress(&bzstate,flag); + } + + void BZip::endCompress() + { +- if(bzCompressEnd(&bzstate) != BZ_OK) { ++ if(BZ2_bzCompressEnd(&bzstate) != BZ_OK) { + throw new XMillException (XMILL_ERR_ZLIB, "Error while compressing container!"); + } + } + + void BZip::initUncompress() + { +- if(bzDecompressInit(&bzstate,0,0) != BZ_OK) { ++ if(BZ2_bzDecompressInit(&bzstate,0,0) != BZ_OK) { + throw new XMillException (XMILL_ERR_ZLIB, "Error while uncompressing container!"); + } + } +@@ -106,7 +106,7 @@ + + void BZip::endUncompress() + { +- if(bzDecompressEnd(&bzstate) != BZ_OK) { ++ if(BZ2_bzDecompressEnd(&bzstate) != BZ_OK) { + throw new XMillException (XMILL_ERR_ZLIB, "Error while uncompressing container!"); + } + } +@@ -138,22 +138,24 @@ + + int BZip::getTotalOut() + { +- return bzstate.total_out; ++ return bzstate.total_out_lo32; + } + + int BZip::getTotalIn() + { +- return bzstate.total_in; ++ return bzstate.total_in_lo32; + } + + void BZip::resetTotals() + { +- bzstate.total_in = 0; +- bzstate.total_out = 0; ++ bzstate.total_in_lo32 = 0; ++ bzstate.total_in_hi32 = 0; ++ bzstate.total_out_lo32 = 0; ++ bzstate.total_out_hi32 = 0; + } + + int BZip::doUncompress() + { +- return bzDecompress(&bzstate); ++ return BZ2_bzDecompress(&bzstate); + } + diff --git a/archivers/xmill/files/patch-makefile b/archivers/xmill/files/patch-makefile index 233d68c60bbe..7a9d3b94641d 100644 --- a/archivers/xmill/files/patch-makefile +++ b/archivers/xmill/files/patch-makefile @@ -1,138 +1,87 @@ ---- makefile.orig Mon Nov 29 16:37:20 1999 -+++ makefile Fri May 9 16:40:56 2003 -@@ -33,21 +33,18 @@ - TMP = ./tmp - SRC = ./src +--- makefile.orig 2008-07-26 04:10:14.000000000 +0700 ++++ makefile 2008-07-26 04:08:44.000000000 +0700 +@@ -43,25 +43,18 @@ + PPMZIPSRC = ./ppmzip + PPMSRC = ./ppmdi -CPP = g++ --CPPFLAGS_XMILL = -O3 -c -Izlib -DXMILL --CPPFLAGS_XDEMILL = -O3 -c -Izlib -DXDEMILL -+CPP = $(CXX) -+CPPFLAGS_XMILL = $(CXXFLAGS) -c -Izlib -DXMILL -+CPPFLAGS_XDEMILL = $(CXXFLAGS) -c -Izlib -DXDEMILL - -CC = gcc --CFLAGS = -O3 -c +-LINK = g++ +- +-CFLAGS = -O3 -c -w +-CPPFLAGS_XMILL = $(CFLAGS) -DXMILL -Izlib -Ibzlib -IXMill -Ippmdi +-CPPFLAGS_XDEMILL = $(CFLAGS) -Izlib -Ibzlib -DXDEMILL -Ippmdi +-CPPFLAGS_XMILLTEST = $(CFLAGS) -IXMill +-CPPFLAGS_PPMZIP = $(CFLAGS) -Ippmdi ++CPP = $(CXX) +CC = $(CC) -+CFLAGS += -c - LINK=g++ ++LINK = $(CPP) ++ ++CPPFLAGS = $(CXXFLAGS) -c -w ++CPPFLAGS_XMILL = $(CPPFLAGS) -DXMILL -IXMill -Ippmdi ++CPPFLAGS_XDEMILL = $(CPPFLAGS) -DXDEMILL -Ippmdi ++CPPFLAGS_XMILLTEST = $(CPPFLAGS) -IXMill ++CPPFLAGS_PPMZIP = $(CPPFLAGS) -Ippmdi + # LINK_FLAGS = -L. -ZLIB_OBJS = $(TMP)/adler32.o $(TMP)/crc32.o $(TMP)/deflate.o $(TMP)/trees.o $(TMP)/uncompr.o \ - $(TMP)/inffast.o $(TMP)/inflate.o $(TMP)/inftrees.o $(TMP)/infutil.o $(TMP)/infblock.o \ - $(TMP)/infcodes.o $(TMP)/zutil.o -+ZLIB_LIBS = -lz - +- -BZLIB_OBJS= $(TMP)/blocksort.o $(TMP)/bzlib.o $(TMP)/compress_b.o $(TMP)/crctable.o $(TMP)/decompress.o \ - $(TMP)/huffman.o $(TMP)/randtable.o -+BZLIB_LIBS = -lbz2 - - XMILL_OBJSPART = $(TMP)/CompressMan.o $(TMP)/ContMan.o $(TMP)/PathDict.o $(TMP)/PathTree.o \ - $(TMP)/RepeatCompress.o $(TMP)/RunLenCompress.o $(TMP)/SAXClient.o \ -@@ -61,11 +58,11 @@ - $(TMP)/DivCompress_u.o $(TMP)/EnumCompress_u.o $(TMP)/Error_u.o \ - $(TMP)/Options_u.o $(TMP)/MemStreamer_u.o +- + XMILLLIB_MISC = \ + $(TMP)/CompressMan.o $(TMP)/ContMan.o $(TMP)/PathDict.o \ + $(TMP)/UnCompCont.o \ +@@ -120,9 +113,9 @@ + XDEMILL_OBJSPART = $(TMP)/realmain_u.o $(TMP)/Options_u.o + XMILLTEST_OBJSPART = $(TMP)/testset.o $(TMP)/xmilltest.o --XMILLOBJS = $(ZLIB_OBJS) $(XMILL_OBJSPART) $(TMP)/ZLib.o --XBMILLOBJS = $(BZLIB_OBJS) $(XMILL_OBJSPART) $(TMP)/ZLib_b.o -+XMILLOBJS = $(XMILL_OBJSPART) $(TMP)/ZLib.o $(ZLIB_LIBS) -+XBMILLOBJS = $(XMILL_OBJSPART) $(TMP)/ZLib_b.o $(BZLIB_LIBS) +-XMILLOBJS = $(ZLIB_OBJS) $(XMILL_OBJSPART) $(XMILLLIB_OBJSPART) $(BZLIB_OBJS) $(PPMDI_OBJS) +-XDEMILLOBJS = $(ZLIB_OBJS) $(XDEMILL_OBJSPART) $(XMILLLIB_OBJSPART) $(BZLIB_OBJS) $(PPMDI_OBJS) +-XMILLTESTOBJS = $(ZLIB_OBJS) $(XMILLTEST_OBJSPART) $(XMILLLIB_OBJSPART) $(BZLIB_OBJS) $(PPMDI_OBJS) ++XMILLOBJS = $(XMILL_OBJSPART) $(XMILLLIB_OBJSPART) $(PPMDI_OBJS) ++XDEMILLOBJS = $(XDEMILL_OBJSPART) $(XMILLLIB_OBJSPART) $(PPMDI_OBJS) ++XMILLTESTOBJS = $(XMILLTEST_OBJSPART) $(XMILLLIB_OBJSPART) $(PPMDI_OBJS) --XDEMILLOBJS = $(ZLIB_OBJS) $(XDEMILL_OBJSPART) $(TMP)/ZLib_u.o --XBDEMILLOBJS = $(BZLIB_OBJS) $(XDEMILL_OBJSPART) $(TMP)/ZLib_bu.o -+XDEMILLOBJS = $(XDEMILL_OBJSPART) $(TMP)/ZLib_u.o $(ZLIB_LIBS) -+XBDEMILLOBJS = $(XDEMILL_OBJSPART) $(TMP)/ZLib_bu.o $(BZLIB_LIBS) + XMILLINSPECTOBJS = $(TMP)/containers.o $(TMP)/exprinfo.o \ + $(TMP)/globals.o \ +@@ -131,27 +124,27 @@ + $(TMP)/lists.o \ + $(TMP)/main.o \ + $(TMP)/xmillinspect.o \ +- $(ZLIB_OBJS) $(XMILLLIB_OBJSPART) $(BZLIB_OBJS) \ +- $(PPMDI_OBJS) ++ $(XMILLLIB_OBJSPART) $(PPMDI_OBJS) - $(BIN)/xmill : $(XMILLOBJS) - $(LINK) -o $(BIN)/xmill $(LINK_FLAGS) $(XMILLOBJS) -@@ -146,7 +143,7 @@ - $(CPP) -o $*.o $(CPPFLAGS_XMILL) $(SRC)/ZLib.cpp + XMILLEXAMPLEOBJS = $(TMP)/xmillexample.o \ +- $(ZLIB_OBJS) $(XMILLLIB_OBJSPART) $(BZLIB_OBJS) \ +- $(PPMDI_OBJS) ++ $(XMILLLIB_OBJSPART) $(PPMDI_OBJS) - $(TMP)/ZLib_b.o : $(SRC)/ZLib.cpp -- $(CPP) -o $*.o -I./bzlib $(CPPFLAGS_XMILL) -DUSE_BZIP $(SRC)/ZLib.cpp -+ $(CPP) -o $*.o $(CPPFLAGS_XMILL) -DUSE_BZIP $(SRC)/ZLib.cpp + $(BIN)/xcmill : $(XMILLOBJS) +- $(LINK) -o $(BIN)/xcmill $(LINK_FLAGS) $(XMILLOBJS) ++ $(LINK) -o $(BIN)/xcmill $(LINK_FLAGS) $(XMILLOBJS) -lz -lbz2 - #******************************************************************** + $(BIN)/xdemill : $(XDEMILLOBJS) +- $(LINK) -o $(BIN)/xdemill $(LINK_FLAGS) $(XDEMILLOBJS) ++ $(LINK) -o $(BIN)/xdemill $(LINK_FLAGS) $(XDEMILLOBJS) -lz -lbz2 -@@ -199,80 +196,7 @@ - $(CPP) -o $*.o $(CPPFLAGS_XDEMILL) $(SRC)/ZLib.cpp + $(BIN)/xmilltest : $(XMILLTESTOBJS) +- $(LINK) -o $(BIN)/xmilltest $(LINK_FLAGS) $(XMILLTESTOBJS) ++ $(LINK) -o $(BIN)/xmilltest $(LINK_FLAGS) $(XMILLTESTOBJS) -lz -lbz2 - $(TMP)/ZLib_bu.o : $(SRC)/ZLib.cpp -- $(CPP) -o $*.o -I./bzlib $(CPPFLAGS_XDEMILL) -DUSE_BZIP $(SRC)/ZLib.cpp -- --#******************************************************************** -- --$(TMP)/adler32.o : ./zlib/adler32.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/adler32.c -- --$(TMP)/crc32.o : ./zlib/crc32.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/crc32.c -- --$(TMP)/compress.o : ./zlib/compress.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/compress.c -- --$(TMP)/deflate.o : ./zlib/deflate.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/deflate.c -- --$(TMP)/gzio.o : ./zlib/gzio.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/gzio.c -- --$(TMP)/infblock.o : ./zlib/infblock.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/infblock.c -- --$(TMP)/infcodes.o : ./zlib/infcodes.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/infcodes.c -- --$(TMP)/inffast.o : ./zlib/inffast.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/inffast.c -- --$(TMP)/inflate.o : ./zlib/inflate.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/inflate.c -- --$(TMP)/inftrees.o : ./zlib/inftrees.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/inftrees.c -- --$(TMP)/infutil.o : ./zlib/infutil.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/infutil.c -- --$(TMP)/trees.o : ./zlib/trees.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/trees.c -- --$(TMP)/uncompr.o : ./zlib/uncompr.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/uncompr.c -- --$(TMP)/zutil.o : ./zlib/zutil.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/zutil.c -- --$(TMP)/minigzip.o : ./zlib/minigzip.c -- $(CC) -o $*.o $(CFLAGS) ./zlib/minigzip.c -- --#******************************************************************** -- --$(TMP)/blocksort.o : ./bzlib/blocksort.c -- $(CC) -o $*.o $(CFLAGS) ./bzlib/blocksort.c -- --$(TMP)/compress_b.o : ./bzlib/compress.c -- $(CC) -o $*.o $(CFLAGS) ./bzlib/compress.c -- --$(TMP)/crctable.o : ./bzlib/crctable.c -- $(CC) -o $*.o $(CFLAGS) ./bzlib/crctable.c -- --$(TMP)/decompress.o : ./bzlib/decompress.c -- $(CC) -o $*.o $(CFLAGS) ./bzlib/decompress.c -- --$(TMP)/huffman.o : ./bzlib/huffman.c -- $(CC) -o $*.o $(CFLAGS) ./bzlib/huffman.c -- --$(TMP)/randtable.o : ./bzlib/randtable.c -- $(CC) -o $*.o $(CFLAGS) ./bzlib/randtable.c -- --$(TMP)/bzlib.o : ./bzlib/bzlib.c -- $(CC) -o $*.o $(CFLAGS) ./bzlib/bzlib.c -- --#$(TMP)/bzip2.o : ./bzlib/bzip2.c --# $(CC) -o $*.o $(CFLAGS) ./bzlib/bzip2.c -+ $(CPP) -o $*.o $(CPPFLAGS_XDEMILL) -DUSE_BZIP $(SRC)/ZLib.cpp + $(BIN)/xmillexample : $(XMILLEXAMPLEOBJS) +- $(LINK) -o $(BIN)/xmillexample $(LINK_FLAGS) $(XMILLEXAMPLEOBJS) ++ $(LINK) -o $(BIN)/xmillexample $(LINK_FLAGS) $(XMILLEXAMPLEOBJS) \ ++ -lz -lbz2 - #******************************************************************** + $(BIN)/xmillinspect : $(XMILLINSPECTOBJS) +- $(LINK) -o $(BIN)/xmillinspect $(LINK_FLAGS) $(XMILLINSPECTOBJS) ++ $(LINK) -o $(BIN)/xmillinspect $(LINK_FLAGS) $(XMILLINSPECTOBJS) \ ++ -lz -lbz2 + $(BIN)/ppmzip : $(PPMZIPOBJS) + $(LINK) -o $(BIN)/ppmzip $(LINK_FLAGS) $(PPMZIPOBJS) diff --git a/archivers/xmill/files/patch-src::Main.cpp b/archivers/xmill/files/patch-src::Main.cpp deleted file mode 100644 index 9756335940ec..000000000000 --- a/archivers/xmill/files/patch-src::Main.cpp +++ /dev/null @@ -1,27 +0,0 @@ ---- src/Main.cpp.orig Fri May 9 16:24:51 2003 -+++ src/Main.cpp Fri May 9 16:25:41 2003 -@@ -599,7 +599,7 @@ - return;
- }
-
-- if(output.CreateFile((no_output==0) ? destfile : "")==0)
-+ if(output.CreateFile((no_output==0) ? destfile : (char *)"")==0)
- {
- Error("Could not create output file '");
- ErrorCont(destfile);
-@@ -816,7 +816,7 @@ -
- globallabeldict.Init();
-
-- if(output.CreateFile((no_output==0) ? destfile : "")==0)
-+ if(output.CreateFile((no_output==0) ? destfile : (char *)"")==0)
- {
- Error("Could not create output file '");
- ErrorCont(destfile);
-@@ -905,4 +905,4 @@ - {
- return malloc(size);
- }
--*/ -\ No newline at end of file -+*/ diff --git a/archivers/xmill/files/patch-src::ZLib.cpp b/archivers/xmill/files/patch-src::ZLib.cpp deleted file mode 100644 index be2ef0ce454e..000000000000 --- a/archivers/xmill/files/patch-src::ZLib.cpp +++ /dev/null @@ -1,150 +0,0 @@ ---- src/ZLib.cpp.orig Fri May 9 16:34:09 2003 -+++ src/ZLib.cpp Fri May 9 16:55:35 2003 -@@ -125,7 +125,7 @@ - // We finish compression, if there has been some data in the queue
- {
- #ifdef USE_BZIP
-- bzCompressEnd(&state);
-+ BZ2_bzCompressEnd(&state);
- #else
- deflateEnd(&state);
- #endif
-@@ -175,7 +175,7 @@ - if(isinitialized==0)
- {
- #ifdef USE_BZIP
-- if(bzCompressInit(&state,7,0,0)!=BZ_OK)
-+ if(BZ2_bzCompressInit(&state,7,0,0)!=BZ_OK)
- #else
- if(deflateInit(&state,zlib_compressidx)!=Z_OK)
- #endif
-@@ -183,8 +183,15 @@ - Error("Error while compressing container!");
- Exit();
- }
-+#ifdef USE_BZIP -+ state.total_out_lo32=0; -+ state.total_out_hi32=0; -+ state.total_in_lo32=0; -+ state.total_in_hi32=0; -+#else - state.total_out=0;
- state.total_in=0;
-+#endif -
- isinitialized=1;
- }
-@@ -205,7 +212,7 @@ - saveavail=state.avail_out;
-
- #ifdef USE_BZIP
-- if(bzCompress(&state,BZ_RUN)!=BZ_RUN_OK)
-+ if(BZ2_bzCompress(&state,BZ_RUN)!=BZ_RUN_OK)
- #else
- if(deflate(&state,Z_NO_FLUSH)!=Z_OK)
- #endif
-@@ -259,7 +266,7 @@ - if(isinitialized==0)
- {
- #ifdef USE_BZIP
-- if(bzCompressInit(&state,7,0,0)!=BZ_OK)
-+ if(BZ2_bzCompressInit(&state,7,0,0)!=BZ_OK)
- #else
- if(deflateInit(&state,zlib_compressidx)!=Z_OK)
- #endif
-@@ -267,8 +274,15 @@ - Error("Error while compressing container!");
- Exit();
- }
-+#ifdef USE_BZIP -+ state.total_out_lo32=0; -+ state.total_out_hi32=0; -+ state.total_in_lo32=0; -+ state.total_in_hi32=0; -+#else - state.total_out=0;
- state.total_in=0;
-+#endif - isinitialized=1;
- }
-
-@@ -278,7 +292,7 @@ -
- // The actual compression
- #ifdef USE_BZIP
-- if(bzCompress(&state,BZ_RUN)!=BZ_RUN_OK)
-+ if(BZ2_bzCompress(&state,BZ_RUN)!=BZ_RUN_OK)
- #else
- if(deflate(&state,Z_NO_FLUSH)!=Z_OK)
- #endif
-@@ -326,7 +340,7 @@ - saveavail=state.avail_out;
-
- #ifdef USE_BZIP
-- err=bzCompress(&state,BZ_FINISH);
-+ err=BZ2_bzCompress(&state,BZ_FINISH);
- #else
- err=deflate(&state,Z_FINISH);
- #endif
-@@ -353,15 +367,25 @@ - while(1);
-
- // Let's store the input and output size
-+#ifdef USE_BZIP -+ if(uncompressedsize!=NULL) *uncompressedsize =state.total_in_lo32; -+ if(compressedsize!=NULL) *compressedsize =state.total_out_lo32; -+ -+ state.total_out_lo32=0; -+ state.total_out_hi32=0; -+ state.total_in_lo32=0; -+ state.total_in_hi32=0; -+#else - if(uncompressedsize!=NULL) *uncompressedsize =state.total_in;
- if(compressedsize!=NULL) *compressedsize =state.total_out;
-
- state.total_out=0;
- state.total_in=0;
-+#endif -
- // Finally, we release the internal memory
- #ifdef USE_BZIP
-- if(bzCompressEnd(&state)!=BZ_OK)
-+ if(BZ2_bzCompressEnd(&state)!=BZ_OK)
- #else
- if(deflateReset(&state)!=Z_OK)
- #endif
-@@ -404,7 +428,7 @@ - #endif
-
- #ifdef USE_BZIP
-- if(bzDecompressInit(&state,0,0)!=BZ_OK)
-+ if(BZ2_bzDecompressInit(&state,0,0)!=BZ_OK)
- #else
- if(inflateInit(&state)!=Z_OK)
- #endif
-@@ -439,7 +463,7 @@ -
- // The actual decompression
- #ifdef USE_BZIP
-- switch(bzDecompress(&state))
-+ switch(BZ2_bzDecompress(&state))
- #else
- switch(inflate(&state,Z_NO_FLUSH))
- #endif
-@@ -454,11 +478,15 @@ - input->SkipData(save_in-state.avail_in);
-
- // Let's store the overall amount of "decompressed" data.
-+#ifdef USE_BZIP -+ *len=state.total_out_lo32; -+#else - *len=state.total_out;
-+#endif -
- // Let's finish the decompression entirely
- #ifdef USE_BZIP
-- if(bzDecompressEnd(&state)!=BZ_OK)
-+ if(BZ2_bzDecompressEnd(&state)!=BZ_OK)
- #else
- if(inflateReset(&state)!=Z_OK)
- #endif
diff --git a/archivers/xmill/pkg-descr b/archivers/xmill/pkg-descr index 66aab703ecc2..a120cba238b1 100644 --- a/archivers/xmill/pkg-descr +++ b/archivers/xmill/pkg-descr @@ -6,4 +6,4 @@ between those text strings for compression. Hence, XMill typically achieves much better compression rates than conventional compressors such as gzip. -WWW: http://www.research.att.com/sw/tools/XMILL/ +WWW: http://sourceforge.net/projects/xmill/ |