summaryrefslogtreecommitdiff
path: root/archivers/xmill
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2003-02-17 09:20:25 +0000
committergrant <grant@pkgsrc.org>2003-02-17 09:20:25 +0000
commit50863252ec42188d59d0ffaf9212eea2c8220de0 (patch)
treedeae37ef773c2b81b6ff40ffcc75677a7f2c4784 /archivers/xmill
parent71ad56e6f71680b88cc89761f7c8fe690dd9b0af (diff)
downloadpkgsrc-50863252ec42188d59d0ffaf9212eea2c8220de0.tar.gz
Initial import of xmill-0.7 into The NetBSD packages collection.
XMill is a special-purpose compressor for XML data that typically achieves twice the compression rate over existing compressors, such as gzip. Provided by collver1@attbi.com in PR pkg/20353, with minor changes by me.
Diffstat (limited to 'archivers/xmill')
-rw-r--r--archivers/xmill/DESCR2
-rw-r--r--archivers/xmill/Makefile49
-rw-r--r--archivers/xmill/PLIST11
-rw-r--r--archivers/xmill/distinfo7
-rw-r--r--archivers/xmill/patches/patch-aa64
-rw-r--r--archivers/xmill/patches/patch-ab152
-rw-r--r--archivers/xmill/patches/patch-ac22
7 files changed, 307 insertions, 0 deletions
diff --git a/archivers/xmill/DESCR b/archivers/xmill/DESCR
new file mode 100644
index 00000000000..5ef9d822bfb
--- /dev/null
+++ b/archivers/xmill/DESCR
@@ -0,0 +1,2 @@
+XMill is a special-purpose compressor for XML data that typically achieves
+twice the compression rate over existing compressors, such as gzip.
diff --git a/archivers/xmill/Makefile b/archivers/xmill/Makefile
new file mode 100644
index 00000000000..ae7e48d876d
--- /dev/null
+++ b/archivers/xmill/Makefile
@@ -0,0 +1,49 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/02/17 09:20:25 grant Exp $
+
+DISTNAME= xmill-0-7
+PKGNAME= xmill-0.7
+CATEGORIES= archivers
+MASTER_SITES= # empty
+EXTRACT_SUFX= .zip
+
+MAINTAINER= collver1@attbi.com
+HOMEPAGE= http://www.research.att.com/sw/tools/xmill/
+COMMENT= Specialized compressor for XML
+
+BUILD_DEPENDS= unzip-[0-9]*:../../archivers/unzip
+
+EXTRACT_CMD= unzip -aq ${DOWNLOADED_DISTFILE}
+
+MAKEFILE= makefile
+
+WRKSRC= ${WRKDIR}
+
+RESTRICTED= "Redistribution not permitted"
+NO_SRC_ON_FTP= ${RESTRICTED}
+NO_SRC_ON_CDROM= ${RESTRICTED}
+NO_BIN_ON_FTP= ${RESTRICTED}
+NO_BIN_ON_CDROM= ${RESTRICTED}
+
+DOWNLOAD= http://www.research.att.com/sw/tools/xmill/download.html
+#DOWNLOAD= http://www.research.att.com/~mff/XMILL/xmill-0-7.zip
+
+_FETCH_MESSAGE= \
+ ${ECHO} "==============================================================="; \
+ ${ECHO} " XMILL distribution package must be fetched"; \
+ ${ECHO} " into ${DISTDIR} from"; \
+ ${ECHO} " ${DOWNLOAD}"; \
+ ${ECHO} "==============================================================="
+
+do-install:
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/xmill
+ ${INSTALL_DATA} ${WRKSRC}/COPYRIGHT.txt ${PREFIX}/share/doc/xmill
+ ${INSTALL_DATA} ${WRKSRC}/LICENSE.txt ${PREFIX}/share/doc/xmill
+ ${INSTALL_DATA} ${WRKSRC}/MANUAL.txt ${PREFIX}/share/doc/xmill
+ ${INSTALL_DATA} ${WRKSRC}/README.txt ${PREFIX}/share/doc/xmill
+ ${INSTALL_DATA} ${WRKSRC}/paper/xmill.ps.gz ${PREFIX}/share/doc/xmill
+ ${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
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/archivers/xmill/PLIST b/archivers/xmill/PLIST
new file mode 100644
index 00000000000..290964abd0e
--- /dev/null
+++ b/archivers/xmill/PLIST
@@ -0,0 +1,11 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/02/17 09:20:25 grant Exp $
+bin/xmill
+bin/xdemill
+bin/xbmill
+bin/xbdemill
+share/doc/xmill/COPYRIGHT.txt
+share/doc/xmill/LICENSE.txt
+share/doc/xmill/MANUAL.txt
+share/doc/xmill/README.txt
+share/doc/xmill/xmill.ps.gz
+@dirrm share/doc/xmill
diff --git a/archivers/xmill/distinfo b/archivers/xmill/distinfo
new file mode 100644
index 00000000000..bc9f7540d23
--- /dev/null
+++ b/archivers/xmill/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/02/17 09:20:25 grant Exp $
+
+SHA1 (xmill-0-7.zip) = d4771e8fc860936e0d7360e5df4fce01152469c7
+Size (xmill-0-7.zip) = 1315864 bytes
+SHA1 (patch-aa) = 0c93f9dc66b283f9de7b12ad159023d94675126a
+SHA1 (patch-ab) = 1103d1d987fa070b80490e7a891a6869d32e7f0d
+SHA1 (patch-ac) = 33d8a8e1950de7e55bcdf579a2fbb3dc24709cc4
diff --git a/archivers/xmill/patches/patch-aa b/archivers/xmill/patches/patch-aa
new file mode 100644
index 00000000000..b68d1420c4f
--- /dev/null
+++ b/archivers/xmill/patches/patch-aa
@@ -0,0 +1,64 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/02/17 09:20:26 grant Exp $
+
+--- makefile.orig Mon Nov 29 16:37:20 1999
++++ makefile
+@@ -34,20 +34,17 @@ TMP = ./tmp
+ SRC = ./src
+
+ CPP = g++
+-CPPFLAGS_XMILL = -O3 -c -Izlib -DXMILL
+-CPPFLAGS_XDEMILL = -O3 -c -Izlib -DXDEMILL
++CPPFLAGS_XMILL = -c -DXMILL
++CPPFLAGS_XDEMILL = -c -DXDEMILL
+
+ CC = gcc
+-CFLAGS = -O3 -c
++CFLAGS = -c
+ LINK=g++
+ # 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_OBJS = -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_OBJS = -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 @@ XDEMILL_OBJSPART = $(TMP)/CompressMan_u.
+ $(TMP)/DivCompress_u.o $(TMP)/EnumCompress_u.o $(TMP)/Error_u.o \
+ $(TMP)/Options_u.o $(TMP)/MemStreamer_u.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_OBJS)
++XBMILLOBJS = $(XMILL_OBJSPART) $(TMP)/ZLib_b.o $(BZLIB_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_OBJS)
++XBDEMILLOBJS = $(XDEMILL_OBJSPART) $(TMP)/ZLib_bu.o $(BZLIB_OBJS)
+
+ $(BIN)/xmill : $(XMILLOBJS)
+ $(LINK) -o $(BIN)/xmill $(LINK_FLAGS) $(XMILLOBJS)
+@@ -146,7 +143,7 @@ $(TMP)/ZLib.o : $(SRC)/ZLib.cp
+ $(CPP) -o $*.o $(CPPFLAGS_XMILL) $(SRC)/ZLib.cpp
+
+ $(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
+
+ #********************************************************************
+
+@@ -199,7 +196,7 @@ $(TMP)/ZLib_u.o : $(SRC)/ZLib.
+ $(CPP) -o $*.o $(CPPFLAGS_XDEMILL) $(SRC)/ZLib.cpp
+
+ $(TMP)/ZLib_bu.o : $(SRC)/ZLib.cpp
+- $(CPP) -o $*.o -I./bzlib $(CPPFLAGS_XDEMILL) -DUSE_BZIP $(SRC)/ZLib.cpp
++ $(CPP) -o $*.o $(CPPFLAGS_XDEMILL) -DUSE_BZIP $(SRC)/ZLib.cpp
+
+ #********************************************************************
+
diff --git a/archivers/xmill/patches/patch-ab b/archivers/xmill/patches/patch-ab
new file mode 100644
index 00000000000..4e8076eba29
--- /dev/null
+++ b/archivers/xmill/patches/patch-ab
@@ -0,0 +1,152 @@
+$NetBSD: patch-ab,v 1.1.1.1 2003/02/17 09:20:26 grant Exp $
+
+--- src/ZLib.cpp.orig Sat Feb 15 02:54:15 2003
++++ src/ZLib.cpp
+@@ -125,7 +125,7 @@ Compressor::~Compressor()
+ // 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 @@ void Compressor::CompressMemStream(MemSt
+ 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 @@ void Compressor::CompressMemStream(MemSt
+ 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 @@ void Compressor::CompressMemStream(MemSt
+ 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 @@ void Compressor::CompressData(unsigned c
+ 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 @@ void Compressor::CompressData(unsigned c
+ 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 @@ void Compressor::CompressData(unsigned c
+
+ // 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 @@ void Compressor::FinishCompress(unsigned
+ 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 @@ void Compressor::FinishCompress(unsigned
+ 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 @@ char Uncompressor::Uncompress(Input *inp
+ #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 @@ char Uncompressor::Uncompress(Input *inp
+
+ // 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 @@ char Uncompressor::Uncompress(Input *inp
+ 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/patches/patch-ac b/archivers/xmill/patches/patch-ac
new file mode 100644
index 00000000000..b71fbb3e1fe
--- /dev/null
+++ b/archivers/xmill/patches/patch-ac
@@ -0,0 +1,22 @@
+$NetBSD: patch-ac,v 1.1.1.1 2003/02/17 09:20:26 grant Exp $
+
+--- src/Main.cpp.orig Sat Feb 15 03:17:07 2003
++++ src/Main.cpp
+@@ -599,7 +599,7 @@ void Compress(char *srcfile,char *destfi
+ 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 @@ void Uncompress(char *sourcefile,char *d
+
+ 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);