diff options
author | jlam <jlam> | 2001-06-21 22:36:54 +0000 |
---|---|---|
committer | jlam <jlam> | 2001-06-21 22:36:54 +0000 |
commit | cfce5ebb85ffa5d0dc9d06c0d2291f92a30eca01 (patch) | |
tree | b47b999c66fd5c0540ae5824ffd35819fe52856f /archivers | |
parent | 0bd123e127ea4ab8a3da323a1114dd66a4a26384 (diff) | |
download | pkgsrc-cfce5ebb85ffa5d0dc9d06c0d2291f92a30eca01.tar.gz |
Install the headers and libraries for bzip2, and add a buildlink.mk file
for use by other package Makefiles.
Diffstat (limited to 'archivers')
-rw-r--r-- | archivers/bzip2/Makefile | 8 | ||||
-rw-r--r-- | archivers/bzip2/buildlink.mk | 54 | ||||
-rw-r--r-- | archivers/bzip2/distinfo | 4 | ||||
-rw-r--r-- | archivers/bzip2/patches/patch-aa | 52 | ||||
-rw-r--r-- | archivers/bzip2/pkg/PLIST | 8 |
5 files changed, 114 insertions, 12 deletions
diff --git a/archivers/bzip2/Makefile b/archivers/bzip2/Makefile index 8d29c916493..5f2f10d59d7 100644 --- a/archivers/bzip2/Makefile +++ b/archivers/bzip2/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2001/06/10 01:14:58 wiz Exp $ +# $NetBSD: Makefile,v 1.17 2001/06/21 22:36:54 jlam Exp $ # DISTNAME= bzip2-1.0.1 @@ -9,6 +9,10 @@ MAINTAINER= packages@netbsd.org HOMEPAGE= http://sourceware.cygnus.com/bzip2/ COMMENT= Block-sorting file compressor +USE_BUILDLINK_ONLY= # defined +USE_LIBTOOL= # defined +MAKE_ENV+= REALCC="${CC}" + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/bzip2 ${PREFIX}/bin ${LN} -f ${PREFIX}/bin/bzip2 ${PREFIX}/bin/bunzip2 @@ -19,5 +23,7 @@ do-install: ${LN} -s ${PREFIX}/man/man1/bzip2.1 ${PREFIX}/man/man1/bunzip2.1 ${LN} -s ${PREFIX}/man/man1/bzip2.1 ${PREFIX}/man/man1/bzcat.1 ${LN} -s ${PREFIX}/man/man1/bzip2.1 ${PREFIX}/man/man1/bzip2recover.1 + ${INSTALL_DATA} ${WRKSRC}/bzlib.h ${PREFIX}/include + ${LIBTOOL} ${INSTALL_DATA} ${WRKSRC}/libbz2.la ${PREFIX}/lib .include "../../mk/bsd.pkg.mk" diff --git a/archivers/bzip2/buildlink.mk b/archivers/bzip2/buildlink.mk new file mode 100644 index 00000000000..dc20ebe6b44 --- /dev/null +++ b/archivers/bzip2/buildlink.mk @@ -0,0 +1,54 @@ +# $NetBSD: buildlink.mk,v 1.1 2001/06/21 22:36:54 jlam Exp $ +# +# This Makefile fragment is included by packages that use bzip2. +# +# To use this Makefile fragment, simply: +# +# (1) Optionally define BZIP2_REQD to the version of bzip2 desired. +# (2) Include this Makefile fragment in the package Makefile, +# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header +# search path, and +# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search +# path. + +.if !defined(BZIP2_BUILDLINK_MK) +BZIP2_BUILDLINK_MK= # defined + +.include "../../mk/bsd.prefs.mk" + +BZIP2_REQD?= 1.0.1 + +.if exists(/usr/include/bzlib.h) +# +# Recent versions of the libbz2 API prefix all functions with "BZ2_". +# +_BUILTIN_BZIP2!= ${EGREP} -c "BZ2_" /usr/include/bzlib.h || ${TRUE} +.else +_BUILTIN_BZIP2!= 0 +.endif + +.if ${_BUILTIN_BZIP2} == "0" +_NEED_BZIP2= YES +.else +_NEED_BZIP2= NO +.endif + +.if ${_NEED_BZIP2} == "YES" +DEPENDS+= bzip2>=${BZIP2_REQD}:../../archivers/bzip2 +BUILDLINK_PREFIX.bzip2= ${LOCALBASE} +.else +BUILDLINK_PREFIX.bzip2= /usr +.endif + +BUILDLINK_FILES.bzip2= include/bzlib.h +BUILDLINK_FILES.bzip2+= lib/libbz2.* + +BUILDLINK_TARGETS.bzip2= bzip2-buildlink +BUILDLINK_TARGETS+= ${BUILDLINK_TARGETS.bzip2} + +pre-configure: ${BUILDLINK_TARGETS.bzip2} +bzip2-buildlink: _BUILDLINK_USE + +.include "../../mk/bsd.buildlink.mk" + +.endif # BZIP2_BUILDLINK_MK diff --git a/archivers/bzip2/distinfo b/archivers/bzip2/distinfo index 1b870da0406..9a86f03aeaa 100644 --- a/archivers/bzip2/distinfo +++ b/archivers/bzip2/distinfo @@ -1,5 +1,5 @@ -$NetBSD: distinfo,v 1.3 2001/06/10 01:14:58 wiz Exp $ +$NetBSD: distinfo,v 1.4 2001/06/21 22:36:54 jlam Exp $ SHA1 (bzip2-1.0.1.tar.gz) = 0a5a71eded51be0c15d9532b44060f61b564d4f5 Size (bzip2-1.0.1.tar.gz) = 464991 bytes -SHA1 (patch-aa) = 21b3a6b55a03da6de467b08f1ccd634d632f08fe +SHA1 (patch-aa) = 21afc4dd0c581674674e6d57fb633d91537b1b9a diff --git a/archivers/bzip2/patches/patch-aa b/archivers/bzip2/patches/patch-aa index b7b384ae40e..5e2c0c00b34 100644 --- a/archivers/bzip2/patches/patch-aa +++ b/archivers/bzip2/patches/patch-aa @@ -1,17 +1,53 @@ -$NetBSD: patch-aa,v 1.2 2001/06/10 01:14:59 wiz Exp $ +$NetBSD: patch-aa,v 1.3 2001/06/21 22:36:55 jlam Exp $ ---- Makefile.orig Fri Jun 23 22:34:47 2000 +--- Makefile.orig Fri Jun 23 16:34:47 2000 +++ Makefile -@@ -15,10 +15,10 @@ - all: libbz2.a bzip2 bzip2recover test +@@ -1,6 +1,7 @@ - bzip2: libbz2.a bzip2.o + SHELL=/bin/sh +-CC=gcc ++CC=${LIBTOOL} ${REALCC} ++LD=${LIBTOOL} ${REALCC} + BIGFILES=-D_FILE_OFFSET_BITS=64 + CFLAGS=-Wall -Winline -O2 -fomit-frame-pointer -fno-strength-reduce $(BIGFILES) + +@@ -12,22 +13,18 @@ + decompress.o \ + bzlib.o + +-all: libbz2.a bzip2 bzip2recover test ++all: libbz2.la bzip2 bzip2recover test + +-bzip2: libbz2.a bzip2.o - $(CC) $(CFLAGS) -o bzip2 bzip2.o -L. -lbz2 -+ $(CC) $(CFLAGS) -static -o bzip2 bzip2.o -L. -lbz2 ++bzip2: libbz2.la bzip2.o ++ $(CC) $(CFLAGS) -static -o bzip2 bzip2.o libbz2.la bzip2recover: bzip2recover.o - $(CC) $(CFLAGS) -o bzip2recover bzip2recover.o + $(CC) $(CFLAGS) -static -o bzip2recover bzip2recover.o - libbz2.a: $(OBJS) - rm -f libbz2.a +-libbz2.a: $(OBJS) +- rm -f libbz2.a +- ar cq libbz2.a $(OBJS) +- @if ( test -f /usr/bin/ranlib -o -f /bin/ranlib -o \ +- -f /usr/ccs/bin/ranlib ) ; then \ +- echo ranlib libbz2.a ; \ +- ranlib libbz2.a ; \ +- fi ++libbz2.la: $(OBJS) ++ rm -f libbz2.la ++ $(LD) $(LDFLAGS) -o libbz2.la $(OBJS:.o=.lo) -version-info 0:0 \ ++ -rpath $(PREFIX)/lib + + test: bzip2 + @cat words1 +@@ -44,8 +41,6 @@ + cmp sample2.tst sample2.ref + cmp sample3.tst sample3.ref + @cat words3 +- +-PREFIX=/usr + + install: bzip2 bzip2recover + if ( test ! -d $(PREFIX)/bin ) ; then mkdir $(PREFIX)/bin ; fi diff --git a/archivers/bzip2/pkg/PLIST b/archivers/bzip2/pkg/PLIST index e258baa5fa9..d67aebf670c 100644 --- a/archivers/bzip2/pkg/PLIST +++ b/archivers/bzip2/pkg/PLIST @@ -1,8 +1,14 @@ -@comment $NetBSD: PLIST,v 1.4 1998/10/14 21:51:15 tron Exp $ +@comment $NetBSD: PLIST,v 1.5 2001/06/21 22:36:55 jlam Exp $ bin/bzip2 bin/bunzip2 bin/bzcat bin/bzip2recover +include/bzlib.h +lib/libbz2.a +lib/libbz2.la +lib/libbz2.so +lib/libbz2.so.0 +lib/libbz2.so.0.0 man/man1/bzip2.1 man/man1/bunzip2.1 man/man1/bzcat.1 |