diff options
author | Max Khon <fjoe@FreeBSD.org> | 2003-05-09 19:03:17 +0000 |
---|---|---|
committer | Max Khon <fjoe@FreeBSD.org> | 2003-05-09 19:03:17 +0000 |
commit | 751000fc4323bb80f1546d65386a33d7bb875fb5 (patch) | |
tree | 998eead9745c7b33ca86dcc2614fa246774ea550 /archivers/xmill | |
parent | Upgrade to PyQT 3.5 (diff) |
New port: xmill
An efficient compressor for XML.
Submitted by: Alexey Dokuchaev
Notes
Notes:
svn path=/head/; revision=80559
Diffstat (limited to 'archivers/xmill')
-rw-r--r-- | archivers/xmill/Makefile | 43 | ||||
-rw-r--r-- | archivers/xmill/distinfo | 1 | ||||
-rw-r--r-- | archivers/xmill/files/patch-makefile | 138 | ||||
-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 | 9 | ||||
-rw-r--r-- | archivers/xmill/pkg-plist | 10 |
7 files changed, 378 insertions, 0 deletions
diff --git a/archivers/xmill/Makefile b/archivers/xmill/Makefile new file mode 100644 index 000000000000..769076eb1920 --- /dev/null +++ b/archivers/xmill/Makefile @@ -0,0 +1,43 @@ +# New ports collection makefile for: xmill +# Date created: 09 May 2003 +# Whom: Alexey Dokuchaev <danfe@regency.nsu.ru> +# +# $FreeBSD$ +# + +PORTNAME= xmill +PORTVERSION= 0.7 +CATEGORIES= archivers +MASTER_SITES= http://www.research.att.com/~mff/XMILL/ +DISTNAME= xmill-0-7 + +MAINTAINER= danfe@regency.nsu.ru +COMMENT= An efficient compressor for XML + +NO_WRKSUBDIR= yes +MAKEFILE= makefile + +USE_ZIP= yes + +.include <bsd.port.pre.mk> + +.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) +IGNORE="Explicit agreement to the terms and conditions of the license required. Download ${DISTNAME}${EXTRACT_SUFX} manually from http://www.research.att.com/sw/tools/xmill/download.html, put it under ${DISTDIR} and run make again" +.endif + +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 + +.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} +.endif + +.include <bsd.port.post.mk> diff --git a/archivers/xmill/distinfo b/archivers/xmill/distinfo new file mode 100644 index 000000000000..8e38823345b9 --- /dev/null +++ b/archivers/xmill/distinfo @@ -0,0 +1 @@ +MD5 (xmill-0-7.zip) = d0f530efdb233b53f85bea36e6f21ce1 diff --git a/archivers/xmill/files/patch-makefile b/archivers/xmill/files/patch-makefile new file mode 100644 index 000000000000..233d68c60bbe --- /dev/null +++ b/archivers/xmill/files/patch-makefile @@ -0,0 +1,138 @@ +--- 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 + +-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 ++CC = $(CC) ++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_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 + +-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) + +-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) + + $(BIN)/xmill : $(XMILLOBJS) + $(LINK) -o $(BIN)/xmill $(LINK_FLAGS) $(XMILLOBJS) +@@ -146,7 +143,7 @@ + $(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,80 +196,7 @@ + $(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 +- +-#******************************************************************** +- +-$(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 + + #******************************************************************** + diff --git a/archivers/xmill/files/patch-src::Main.cpp b/archivers/xmill/files/patch-src::Main.cpp new file mode 100644 index 000000000000..9756335940ec --- /dev/null +++ b/archivers/xmill/files/patch-src::Main.cpp @@ -0,0 +1,27 @@ +--- 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 new file mode 100644 index 000000000000..be2ef0ce454e --- /dev/null +++ b/archivers/xmill/files/patch-src::ZLib.cpp @@ -0,0 +1,150 @@ +--- 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 new file mode 100644 index 000000000000..609d4cf7fcd7 --- /dev/null +++ b/archivers/xmill/pkg-descr @@ -0,0 +1,9 @@ +XMill is a new tool for compressing XML data efficiently. It is based +on a regrouping strategy that leverages the effect of highly-efficient +compression techniques in compressors such as gzip. XMill groups XML +text strings with respect to their meaning and exploits similarities +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/ diff --git a/archivers/xmill/pkg-plist b/archivers/xmill/pkg-plist new file mode 100644 index 000000000000..ec22bd5f1c85 --- /dev/null +++ b/archivers/xmill/pkg-plist @@ -0,0 +1,10 @@ +bin/xmill +bin/xdemill +bin/xbmill +bin/xbdemill +%%PORTDOCS%%share/doc/xmill/COPYRIGHT.txt +%%PORTDOCS%%share/doc/xmill/LICENSE.txt +%%PORTDOCS%%share/doc/xmill/MANUAL.txt +%%PORTDOCS%%share/doc/xmill/README.txt +%%PORTDOCS%%share/doc/xmill/xmill.ps.gz +%%PORTDOCS%%@dirrm share/doc/xmill |