# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= bzip2 VERSION= 1.0.8 REVISION= 1 KEYWORDS= archivers VARIANTS= standard SDESC[standard]= Block-sorting file compressor HOMEPAGE= none CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= https://sourceware.org/pub/bzip2/ DISTFILE[1]= bzip2-1.0.8.tar.gz:main DF_INDEX= 1 SPKGS[standard]= complete primary dev tools man docs OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none USES= cpe LICENSE= BSD4CLAUSE:primary LICENSE_FILE= BSD4CLAUSE:{{WRKSRC}}/LICENSE LICENSE_SCHEME= solo CPE_VENDOR= bzip FPC_EQUIVALENT= archivers/bzip2 MAKE_ARGS= PREFIX={{PREFIX}} [FILE:461:descriptions/desc.primary] This is bzip2, a advanced block-sorting file compressor. It is believed to be free from any patents. bzip2 compresses files using the Burrows-Wheeler block sorting text compression algorithm, and Huffman coding. Compression is generally considerably better than that achieved by more conventional LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors. This package contains the shared bzip2 shared library. [FILE:121:descriptions/desc.tools] This package contains a number of command-line tools to utilize bzip2 compression on files. They are statically linked. [FILE:97:distinfo] ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269 810029 bzip2-1.0.8.tar.gz [FILE:16:manifests/plist.primary] lib/libbz2.so.1 [FILE:42:manifests/plist.dev] include/bzlib.h lib/ libbz2.a libbz2.so [FILE:92:manifests/plist.tools] bin/ bunzip2 bz2cat bzcat bzegrep bzfgrep bzgrep bzip2 bzip2recover bzless bzmore [FILE:153:manifests/plist.man] share/man/man1/ bunzip2.1.gz bz2cat.1.gz bzcat.1.gz bzegrep.1.gz bzfgrep.1.gz bzgrep.1.gz bzip2.1.gz bzip2recover.1.gz bzless.1.gz bzmore.1.gz [FILE:80:manifests/plist.docs] share/doc/bzip2/ bzip2.txt manual.html manual.pdf manual.ps.bz2 manual.xml [FILE:4270:patches/patch-Makefile] --- Makefile.orig 2010-09-10 22:46:02 UTC +++ Makefile @@ -15,13 +15,22 @@ SHELL=/bin/sh # To assist in cross-compiling -CC=gcc +CC?=gcc AR=ar RANLIB=ranlib -LDFLAGS= BIGFILES=-D_FILE_OFFSET_BITS=64 -CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) +CFLAGS?=-O2 +CFLAGS+=-Wall -Winline -fomit-frame-pointer -fno-strength-reduce $(BIGFILES) +SOFLAGS=-fPIC -fpic -DPIC + +.if "${OPSYS}" == "Darwin" +MYLIBRARY= libbz2.1.dylib +MYLIBLINK= libbz2.dylib +.else +MYLIBRARY= libbz2.so.1 +MYLIBLINK= libbz2.so +.endif # Where you want it installed when you do 'make install' PREFIX=/usr/local @@ -35,22 +44,33 @@ decompress.o \ bzlib.o -all: libbz2.a bzip2 bzip2recover test +SO_OBJS= blocksort.so \ + huffman.so \ + crctable.so \ + randtable.so \ + compress.so \ + decompress.so \ + bzlib.so -bzip2: libbz2.a bzip2.o - $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2 +all: ${MYLIBRARY} libbz2.a bzip2 bzip2recover test + +bzip2: ${MYLIBRARY} libbz2.a bzip2.o + $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o libbz2.a bzip2recover: bzip2recover.o $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o libbz2.a: $(OBJS) rm -f libbz2.a - $(AR) cq libbz2.a $(OBJS) - @if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \ - -f /bin/ranlib -o -f /usr/ccs/bin/ranlib ) ; then \ - echo $(RANLIB) libbz2.a ; \ - $(RANLIB) libbz2.a ; \ - fi + $(AR) -rcs libbz2.a $(OBJS) + +libbz2.so.1: $(SO_OBJS) + $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1 $(SO_OBJS) + ln -sf libbz2.so.1 libbz2.so + +libbz2.1.dylib: $(SO_OBJS) + $(CC) $(LDFLAGS) -dynamiclib -o ${.TARGET} -install_name $(PREFIX)/lib/${.TARGET} -Wl,-single_module $(SO_OBJS) + ln -sf ${.TARGET} libbz2.dylib check: test test: bzip2 @@ -69,7 +89,34 @@ cmp sample3.tst sample3.ref @cat words3 -install: bzip2 bzip2recover +install: + mkdir -p $(DESTDIR)$(PREFIX)/bin \ + $(DESTDIR)$(PREFIX)/lib \ + $(DESTDIR)$(PREFIX)/include \ + $(DESTDIR)$(PREFIX)/share/doc/bzip2 \ + $(DESTDIR)$(MANPREFIX)/man/man1 + $(BSD_INSTALL_PROGRAM) bzip2 bzip2recover $(DESTDIR)$(PREFIX)/bin + $(BSD_INSTALL_SCRIPT) bzgrep bzmore $(DESTDIR)$(PREFIX)/bin + $(BSD_INSTALL_DATA) bzlib.h $(DESTDIR)$(PREFIX)/include + $(BSD_INSTALL_DATA) libbz2.a $(DESTDIR)$(PREFIX)/lib + $(BSD_INSTALL_LIB) $(MYLIBRARY) $(DESTDIR)$(PREFIX)/lib + $(BSD_INSTALL_MAN) bzip2.1 bzgrep.1 bzmore.1 $(DESTDIR)$(MANPREFIX)/man/man1 + ln -sf bzmore $(DESTDIR)$(PREFIX)/bin/bzless + ln -sf $(MYLIBRARY) $(DESTDIR)$(PREFIX)/lib/$(MYLIBLINK) +.for nf in bunzip2 bzcat bz2cat + ln -sf bzip2 $(DESTDIR)$(PREFIX)/bin/$(nf) + ln -sf bzip2.1 $(DESTDIR)$(MANPREFIX)/man/man1/$(nf).1 +.endfor +.for nf in bzegrep bzfgrep + ln -sf bzgrep $(DESTDIR)$(PREFIX)/bin/$(nf) + ln -sf bzgrep.1 $(DESTDIR)$(MANPREFIX)/man/man1/$(nf).1 +.endfor + ln -sf bzip2.1 $(DESTDIR)$(MANPREFIX)/man/man1/bzip2recover.1 + ln -sf bzmore.1 $(DESTDIR)$(MANPREFIX)/man/man1/bzless.1 + $(BSD_INSTALL_DATA) manual* bzip2.txt $(DESTDIR)$(PREFIX)/share/doc/bzip2/ + ./bzip2 -f $(DESTDIR)$(PREFIX)/share/doc/bzip2/manual.ps + +install-disable: bzip2 bzip2recover if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi @@ -109,10 +156,26 @@ echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1 clean: - rm -f *.o libbz2.a bzip2 bzip2recover \ + rm -f *.o *.so libbz2.a ${MYLIBRARY} bzip2 bzip2recover \ sample1.rb2 sample2.rb2 sample3.rb2 \ sample1.tst sample2.tst sample3.tst +blocksort.so: blocksort.c + @cat words0 + $(CC) $(CFLAGS) $(SOFLAGS) -c blocksort.c -o blocksort.so +huffman.so: huffman.c + $(CC) $(CFLAGS) $(SOFLAGS) -c huffman.c -o huffman.so +crctable.so: crctable.c + $(CC) $(CFLAGS) $(SOFLAGS) -c crctable.c -o crctable.so +randtable.so: randtable.c + $(CC) $(CFLAGS) $(SOFLAGS) -c randtable.c -o randtable.so +compress.so: compress.c + $(CC) $(CFLAGS) $(SOFLAGS) -c compress.c -o compress.so +decompress.so: decompress.c + $(CC) $(CFLAGS) $(SOFLAGS) -c decompress.c -o decompress.so +bzlib.so: bzlib.c + $(CC) $(CFLAGS) $(SOFLAGS) -c bzlib.c -o bzlib.so + blocksort.o: blocksort.c @cat words0 $(CC) $(CFLAGS) -c blocksort.c