- Update to 1.0.4

PR:		108441
Submitted by:	Jason Harris <jharris@widomaker.com> (maintainer)
This commit is contained in:
Martin Wilke 2007-01-28 00:47:14 +00:00
parent ae8ac661bd
commit 98ec1eddc8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=183491
5 changed files with 15 additions and 107 deletions

View file

@ -7,15 +7,14 @@
# #
PORTNAME= bzip2 PORTNAME= bzip2
PORTVERSION= 1.0.3 PORTVERSION= 1.0.4
PORTREVISION= 1
CATEGORIES= archivers CATEGORIES= archivers
MASTER_SITES= http://www.bzip.org/${PORTVERSION}/ MASTER_SITES= http://www.bzip.org/${PORTVERSION}/
MAINTAINER= jharris@widomaker.com MAINTAINER= jharris@widomaker.com
COMMENT= A block-sorting file compressor COMMENT= A block-sorting file compressor
INSTALLS_SHLIB= yes USE_LDCONFIG= yes
PATCH_STRIP= -p3 PATCH_STRIP= -p3
MAN1= bzip2.1 bzgrep.1 bzmore.1 MAN1= bzip2.1 bzgrep.1 bzmore.1

View file

@ -1,3 +1,3 @@
MD5 (bzip2-1.0.3.tar.gz) = 8a716bebecb6e647d2e8a29ea5d8447f MD5 (bzip2-1.0.4.tar.gz) = fc310b254f6ba5fbb5da018f04533688
SHA256 (bzip2-1.0.3.tar.gz) = 4aaa8e7b4ecf03d91c33e8bf92d489533fa6c1f99e825c34058003f18eb68c13 SHA256 (bzip2-1.0.4.tar.gz) = f41c3898fbd53e68e0b052418960e538813cc98afcd72b2b604079d8de3e529c
SIZE (bzip2-1.0.3.tar.gz) = 669075 SIZE (bzip2-1.0.4.tar.gz) = 841221

View file

@ -1,6 +1,6 @@
--- Makefile.orig Thu Feb 17 14:28:24 2005 --- Makefile.orig Tue Jan 2 22:49:21 2007
+++ Makefile Tue Jul 19 02:39:56 2005 +++ Makefile Sat Jan 27 12:02:14 2007
@@ -2,13 +2,15 @@ @@ -15,13 +15,15 @@
SHELL=/bin/sh SHELL=/bin/sh
# To assist in cross-compiling # To assist in cross-compiling
@ -11,14 +11,14 @@
LDFLAGS= LDFLAGS=
BIGFILES=-D_FILE_OFFSET_BITS=64 BIGFILES=-D_FILE_OFFSET_BITS=64
-CFLAGS=-Wall -Winline -O -g $(BIGFILES) -CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
+CFLAGS?=-O2 +CFLAGS?=-O2
+CFLAGS+=-Wall -Winline -fomit-frame-pointer -fno-strength-reduce $(BIGFILES) +CFLAGS+=-Wall -Winline -fomit-frame-pointer -fno-strength-reduce $(BIGFILES)
+SOFLAGS=-fPIC -fpic -DPIC +SOFLAGS=-fPIC -fpic -DPIC
# Where you want it installed when you do 'make install' # Where you want it installed when you do 'make install'
PREFIX=/usr PREFIX=/usr/local
@@ -22,10 +24,18 @@ @@ -35,10 +37,18 @@
decompress.o \ decompress.o \
bzlib.o bzlib.o
@ -40,7 +40,7 @@
bzip2recover: bzip2recover.o bzip2recover: bzip2recover.o
$(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o
@@ -39,6 +49,10 @@ @@ -52,6 +62,10 @@
$(RANLIB) libbz2.a ; \ $(RANLIB) libbz2.a ; \
fi fi
@ -51,7 +51,7 @@
check: test check: test
test: bzip2 test: bzip2
@cat words1 @cat words1
@@ -96,9 +110,25 @@ @@ -109,9 +123,25 @@
echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1 echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
clean: clean:

View file

@ -1,92 +1 @@
--- bzip2.c.orig Wed Feb 16 03:25:35 2005
+++ bzip2.c Sun Oct 16 09:47:40 2005
@@ -312,6 +312,7 @@
static void copyFileName ( Char*, Char* );
static void* myMalloc ( Int32 );
+static int applySavedFileAttrToOutputFile ( int fd );
@@ -457,6 +458,10 @@
ret = fflush ( zStream );
if (ret == EOF) goto errhandler_io;
if (zStream != stdout) {
+ int fd = fileno ( zStream );
+ if (fd < 0) goto errhandler_io;
+ ret = applySavedFileAttrToOutputFile ( fd );
+ if (ret != 0) goto errhandler_io;
ret = fclose ( zStream );
outputHandleJustInCase = NULL;
if (ret == EOF) goto errhandler_io;
@@ -569,6 +574,12 @@
closeok:
if (ferror(zStream)) goto errhandler_io;
+ if ( stream != stdout) {
+ int fd = fileno ( stream );
+ if (fd < 0) goto errhandler_io;
+ ret = applySavedFileAttrToOutputFile ( fd );
+ if (ret != 0) goto errhandler_io;
+ }
ret = fclose ( zStream );
if (ret == EOF) goto errhandler_io;
@@ -1129,7 +1140,7 @@
static
-void applySavedMetaInfoToOutputFile ( Char *dstName )
+void applySavedTimeInfoToOutputFile ( Char *dstName )
{
# if BZ_UNIX
IntNative retVal;
@@ -1138,16 +1149,26 @@
uTimBuf.actime = fileMetaInfo.st_atime;
uTimBuf.modtime = fileMetaInfo.st_mtime;
- retVal = chmod ( dstName, fileMetaInfo.st_mode );
- ERROR_IF_NOT_ZERO ( retVal );
-
retVal = utime ( dstName, &uTimBuf );
ERROR_IF_NOT_ZERO ( retVal );
+# endif
+}
+
+static
+int applySavedFileAttrToOutputFile ( int fd )
+{
+# if BZ_UNIX
+ IntNative retVal;
+
+ retVal = fchmod ( fd, fileMetaInfo.st_mode );
+ if (retVal != 0)
+ return retVal;
- retVal = chown ( dstName, fileMetaInfo.st_uid, fileMetaInfo.st_gid );
+ (void) fchown ( fd, fileMetaInfo.st_uid, fileMetaInfo.st_gid );
/* chown() will in many cases return with EPERM, which can
be safely ignored.
*/
+ return 0;
# endif
}
@@ -1370,7 +1391,7 @@
/*--- If there was an I/O error, we won't get here. ---*/
if ( srcMode == SM_F2F ) {
- applySavedMetaInfoToOutputFile ( outName );
+ applySavedTimeInfoToOutputFile ( outName );
deleteOutputOnInterrupt = False;
if ( !keepInputFiles ) {
IntNative retVal = remove ( inName );
@@ -1548,7 +1569,7 @@
/*--- If there was an I/O error, we won't get here. ---*/
if ( magicNumberOK ) {
if ( srcMode == SM_F2F ) {
- applySavedMetaInfoToOutputFile ( outName );
+ applySavedTimeInfoToOutputFile ( outName );
deleteOutputOnInterrupt = False;
if ( !keepInputFiles ) {
IntNative retVal = remove ( inName );

View file

@ -1,4 +1,4 @@
This is bzip2, a advanced block-sorting file compressor. It is This is bzip2, a advanced block-sorting file compressor. It is
believed to be free from any patents. believed to be free from any patents.
WWW: http://www.bzip.org WWW: http://www.bzip.org/