Complete bzip2-1.0.2 import.
MFC in: 14 days
This commit is contained in:
parent
ec6d600e40
commit
539011fe16
@ -116,12 +116,24 @@ SRCS+= _setjmp.S
|
||||
|
||||
# decompression functionality from libbz2
|
||||
.PATH: ${.CURDIR}/../../contrib/bzip2
|
||||
CFLAGS+=-I${.CURDIR}/../../contrib/bzip2 -DBZ_NO_STDIO -DBZ_NO_COMPRESS
|
||||
SRCS+= _bzlib.c crctable.c decompress.c huffman.c randtable.c
|
||||
CLEANFILES+= _bzlib.c _bzlib.c.orig
|
||||
CFLAGS+=-I${.CURDIR} -DBZ_NO_STDIO -DBZ_NO_COMPRESS
|
||||
SRCS+= _bzlib.c _crctable.c _decompress.c _huffman.c _randtable.c _bzlib.h \
|
||||
_bzlib_private.h
|
||||
|
||||
_bzlib.c: bzlib.c bzlib.c.diff
|
||||
patch -s -b .orig -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.c}
|
||||
# check your belt - ugly bzip2 stuff ahead
|
||||
.for file in bzlib.c bzlib.h bzlib_private.h
|
||||
CLEANFILES+= _${file} _${file}.orig
|
||||
|
||||
_${file}: ${file} ${file}.diff
|
||||
patch -s -b .orig -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.[ch]}
|
||||
.endfor
|
||||
|
||||
.for file in crctable.c decompress.c huffman.c randtable.c
|
||||
CLEANFILES+= _${file}
|
||||
|
||||
_${file}: ${file}
|
||||
sed "s|bzlib_private\.h|_bzlib_private.h|" ${.ALLSRC} > ${.TARGET}
|
||||
.endfor
|
||||
|
||||
# decompression functionality from libz
|
||||
.PATH: ${.CURDIR}/../libz
|
||||
|
@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include <bzlib.h>
|
||||
#include <_bzlib.h>
|
||||
|
||||
#define BZ_BUFSIZE 2048 /* XXX larger? */
|
||||
|
||||
|
@ -3,17 +3,20 @@ $FreeBSD$
|
||||
A patch to avoid linking into libstand compression routines from the bzip2
|
||||
that never being used anyway, while bloat loader(8) by additional 15KB.
|
||||
|
||||
--- _bzlib.c 2001/09/13 12:20:50 1.1
|
||||
+++ _bzlib.c 2001/09/13 12:29:24
|
||||
@@ -75,6 +75,7 @@
|
||||
--- _bzlib.c 2001/09/13 12:20:50 1.1
|
||||
+++ _bzlib.c 2001/09/13 12:29:24
|
||||
@@ -73,8 +73,9 @@
|
||||
bzBuffToBuffDecompress. Fixed.
|
||||
--*/
|
||||
|
||||
#include "bzlib_private.h"
|
||||
-#include "bzlib_private.h"
|
||||
+#include "_bzlib_private.h"
|
||||
|
||||
+#ifndef BZ_NO_COMPRESS
|
||||
|
||||
/*---------------------------------------------------*/
|
||||
/*--- Compression stuff ---*/
|
||||
@@ -101,6 +102,7 @@
|
||||
@@ -130,6 +131,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -21,7 +24,7 @@ that never being used anyway, while bloat loader(8) by additional 15KB.
|
||||
|
||||
/*---------------------------------------------------*/
|
||||
static
|
||||
@@ -127,6 +128,7 @@
|
||||
@@ -156,6 +158,7 @@
|
||||
if (addr != NULL) free ( addr );
|
||||
}
|
||||
|
||||
@ -29,7 +32,7 @@ that never being used anyway, while bloat loader(8) by additional 15KB.
|
||||
|
||||
/*---------------------------------------------------*/
|
||||
static
|
||||
@@ -499,6 +501,7 @@
|
||||
@@ -528,6 +531,7 @@
|
||||
return BZ_OK;
|
||||
}
|
||||
|
||||
@ -37,7 +40,7 @@ that never being used anyway, while bloat loader(8) by additional 15KB.
|
||||
|
||||
/*---------------------------------------------------*/
|
||||
/*--- Decompression stuff ---*/
|
||||
@@ -869,6 +869,7 @@
|
||||
@@ -898,6 +902,7 @@
|
||||
return BZ_OK;
|
||||
}
|
||||
|
||||
@ -45,7 +48,7 @@ that never being used anyway, while bloat loader(8) by additional 15KB.
|
||||
|
||||
#ifndef BZ_NO_STDIO
|
||||
/*---------------------------------------------------*/
|
||||
@@ -1558,6 +1559,7 @@
|
||||
@@ -1587,6 +1592,7 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
|
15
lib/libstand/bzlib.h.diff
Normal file
15
lib/libstand/bzlib.h.diff
Normal file
@ -0,0 +1,15 @@
|
||||
$FreeBSD$
|
||||
|
||||
--- bzlib.h 2002/02/01 15:20:44 1.1
|
||||
+++ bzlib.h 2002/02/01 15:20:49
|
||||
@@ -110,8 +110,10 @@
|
||||
#define BZ_EXPORT
|
||||
#endif
|
||||
|
||||
+#ifndef BZ_NO_STDIO
|
||||
/* Need a definitition for FILE */
|
||||
#include <stdio.h>
|
||||
+#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <windows.h>
|
13
lib/libstand/bzlib_private.h.diff
Normal file
13
lib/libstand/bzlib_private.h.diff
Normal file
@ -0,0 +1,13 @@
|
||||
$FreeBSD$
|
||||
|
||||
--- bzlib_private.h 2002/02/01 15:41:26 1.1
|
||||
+++ bzlib_private.h 2002/02/01 15:41:46
|
||||
@@ -70,7 +70,7 @@
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
-#include "bzlib.h"
|
||||
+#include "_bzlib.h"
|
||||
|
||||
|
||||
|
@ -6,9 +6,9 @@ INFO= bzip2
|
||||
INFOSECTION= "Programming & development tools."
|
||||
MAKEINFOFLAGS= --no-validate
|
||||
|
||||
CLEANFILES+= bzip2.texi
|
||||
CLEANFILES+= bzip2.texi bzip2.texi.orig
|
||||
|
||||
bzip2.texi: manual.texi
|
||||
ln -sf ${.ALLSRC} ${.TARGET}
|
||||
bzip2.texi: manual.texi manual.texi.diff
|
||||
patch -s -b .orig -o ${.TARGET} < ${.ALLSRC:M*.diff} ${.ALLSRC:M*.texi}
|
||||
|
||||
.include <bsd.info.mk>
|
||||
|
22
usr.bin/bzip2/doc/manual.texi.diff
Normal file
22
usr.bin/bzip2/doc/manual.texi.diff
Normal file
@ -0,0 +1,22 @@
|
||||
$FreeBSD$
|
||||
|
||||
--- manual.texi 2002/02/01 16:00:45 1.1
|
||||
+++ manual.texi 2002/02/01 16:01:11
|
||||
@@ -46,8 +46,6 @@
|
||||
find it identical to that contained in the file LICENSE in the
|
||||
source distribution.
|
||||
|
||||
-@bf{------------------ START OF THE LICENSE ------------------}
|
||||
-
|
||||
This program, @code{bzip2},
|
||||
and associated library @code{libbzip2}, are
|
||||
Copyright (C) 1996-2002 Julian R Seward. All rights reserved.
|
||||
@@ -89,8 +87,6 @@
|
||||
@code{jseward@@acm.org}
|
||||
|
||||
@code{bzip2}/@code{libbzip2} version 1.0.2 of 30 December 2001.
|
||||
-
|
||||
-@bf{------------------ END OF THE LICENSE ------------------}
|
||||
|
||||
Web sites:
|
||||
|
Loading…
Reference in New Issue
Block a user