pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/bzip2 Use in-tree versions. The replacement ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a147167349d9
branches:  trunk
changeset: 531571:a147167349d9
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Aug 02 13:04:41 2007 +0000

description:
Use in-tree versions. The replacement Makefile can be used for direct
builds in bootstrap tools as well. Add DESTDIR support.

diffstat:

 archivers/bzip2/Makefile         |  36 ++++++++------
 archivers/bzip2/files/Makefile   |  32 +++++++++++++
 archivers/bzip2/patches/patch-aa |  96 ----------------------------------------
 3 files changed, 53 insertions(+), 111 deletions(-)

diffs (200 lines):

diff -r ed1efb21808f -r a147167349d9 archivers/bzip2/Makefile
--- a/archivers/bzip2/Makefile  Thu Aug 02 13:01:33 2007 +0000
+++ b/archivers/bzip2/Makefile  Thu Aug 02 13:04:41 2007 +0000
@@ -1,39 +1,45 @@
-# $NetBSD: Makefile,v 1.43 2007/01/06 15:34:37 wiz Exp $
+# $NetBSD: Makefile,v 1.44 2007/08/02 13:04:41 joerg Exp $
 #
 
 DISTNAME=      bzip2-1.0.4
 CATEGORIES=    archivers
 MASTER_SITES=  http://www.bzip.org/1.0.4/
 
-MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+MAINTAINER=    joerg%NetBSD.org@localhost
 HOMEPAGE=      http://www.bzip.org/
 COMMENT=       Block-sorting file compressor
 
+DISTFILES=     # empty
+EXTRACT_ONLY=  # empty
+
 PKG_INSTALLATION_TYPES=        overwrite pkgviews
+PKG_DESTDIR_SUPPORT=   user-destdir
 
 USE_LIBTOOL=           yes
-MAKE_ENV+=             REALCC=${CC:Q}
 
 .include "../../mk/compiler.mk"
 
 CFLAGS+=               ${CPPFLAGS}
 .if !empty(CC_VERSION:Mgcc*)
-CFLAGS+=               -Wall -Winline -fomit-frame-pointer -fno-strength-reduce
+CFLAGS+=               -Wall -Winline -fomit-frame-pointer
 .endif
 
 INSTALLATION_DIRS=     bin include lib ${PKGMANDIR}/man1
 
+do-extract:
+       ${CP} -r ${FILESDIR} ${WRKSRC}
+
 do-install:
-       ${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/libbz2.la ${PREFIX}/lib
-       ${LIBTOOL} --mode=install ${INSTALL_PROGRAM} ${WRKSRC}/bzip2 ${PREFIX}/bin
-       ${LN} -f ${PREFIX}/bin/bzip2 ${PREFIX}/bin/bunzip2
-       ${LN} -f ${PREFIX}/bin/bzip2 ${PREFIX}/bin/bzcat
-       ${LIBTOOL} --mode=install ${INSTALL_PROGRAM} ${WRKSRC}/bzip2recover ${PREFIX}/bin
-       ${INSTALL_MAN} ${WRKSRC}/bzip2.1 ${PREFIX}/${PKGMANDIR}/man1
-       ${RM} -f ${PREFIX}/${PKGMANDIR}/man1/bunzip2.1 ${PREFIX}/${PKGMANDIR}/man1/bzcat.1 ${PREFIX}/${PKGMANDIR}/man1/bzip2recover.1
-       ${LN} -s ${PREFIX}/${PKGMANDIR}/man1/bzip2.1 ${PREFIX}/${PKGMANDIR}/man1/bunzip2.1
-       ${LN} -s ${PREFIX}/${PKGMANDIR}/man1/bzip2.1 ${PREFIX}/${PKGMANDIR}/man1/bzcat.1
-       ${LN} -s ${PREFIX}/${PKGMANDIR}/man1/bzip2.1 ${PREFIX}/${PKGMANDIR}/man1/bzip2recover.1
-       ${INSTALL_DATA} ${WRKSRC}/bzlib.h ${PREFIX}/include
+       ${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/libbz2.la ${DESTDIR}${PREFIX}/lib
+       ${LIBTOOL} --mode=install ${INSTALL_PROGRAM} ${WRKSRC}/bzip2 ${DESTDIR}${PREFIX}/bin
+       ${LN} -f ${DESTDIR}${PREFIX}/bin/bzip2 ${DESTDIR}${PREFIX}/bin/bunzip2
+       ${LN} -f ${DESTDIR}${PREFIX}/bin/bzip2 ${DESTDIR}${PREFIX}/bin/bzcat
+       ${LIBTOOL} --mode=install ${INSTALL_PROGRAM} ${WRKSRC}/bzip2recover ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_MAN} ${WRKSRC}/bzip2.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+       cd ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 && rm -f bunzip2.1 bzcat.1 bzip2recover.1
+       ${LN} -s bzip2.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/bunzip2.1
+       ${LN} -s bzip2.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/bzcat.1
+       ${LN} -s bzip2.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/bzip2recover.1
+       ${INSTALL_DATA} ${WRKSRC}/bzlib.h ${DESTDIR}${PREFIX}/include
 
 .include "../../mk/bsd.pkg.mk"
diff -r ed1efb21808f -r a147167349d9 archivers/bzip2/files/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/bzip2/files/Makefile    Thu Aug 02 13:04:41 2007 +0000
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile,v 1.1 2007/08/02 13:04:42 joerg Exp $
+#
+# Replacement Makefile for bzip2.
+#
+
+OBJS=  blocksort.o bzlib.o compress.o crctable.o \
+       decompress.o huffman.o randtable.o
+LOBJS= ${OBJS:R:S/$/.lo/g}
+
+all: libbz2.la bzip2 bzip2recover
+
+libbz2.la: ${LOBJS}
+       ${LIBTOOL} --mode=link ${CC} ${LDFLAGS} ${CFLAGS} -o ${.TARGET} \
+           ${LOBJS} -version-info 0:0 -rpath ${PREFIX}/lib
+
+libbz2.a: ${OBJS}
+       ${AR} cq ${.TARGET} ${OBJS}
+       ${RANLIB} ${.TARGET}
+
+bzip2: libbz2.a bzip2.o
+       ${LIBTOOL} --mode=link ${CC} ${LDFLAGS} ${CFLAGS} -o ${.TARGET} \
+           bzip2.o libbz2.la
+bzip2recover: bzip2recover.o
+       ${CC} ${LDFLAGS} ${CFLAGS} -o ${.TARGET} bzip2recover.o
+
+.SUFFIXES: .c .o .lo
+
+.c.o:
+       ${CC} -c ${CFLAGS} -o ${.TARGET} ${.IMPSRC}
+
+.c.lo:
+       ${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} -o ${.TARGET} ${.IMPSRC}
diff -r ed1efb21808f -r a147167349d9 archivers/bzip2/patches/patch-aa
--- a/archivers/bzip2/patches/patch-aa  Thu Aug 02 13:01:33 2007 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-$NetBSD: patch-aa,v 1.12 2007/01/06 15:34:37 wiz Exp $
-
---- Makefile.orig      2007-01-03 03:49:21.000000000 +0000
-+++ Makefile
-@@ -15,42 +15,35 @@
- SHELL=/bin/sh
- 
- # To assist in cross-compiling
--CC=gcc
--AR=ar
--RANLIB=ranlib
--LDFLAGS=
-+CC=${LIBTOOL} --mode=compile ${REALCC}
-+LD=${LIBTOOL} --mode=link ${REALCC}
-+#AR=ar
-+#RANLIB=ranlib
-+#LDFLAGS=
- 
- BIGFILES=-D_FILE_OFFSET_BITS=64
--CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
-+CFLAGS+=$(BIGFILES)
- 
--# Where you want it installed when you do 'make install'
--PREFIX=/usr/local
-+OBJS= blocksort.lo  \
-+      huffman.lo    \
-+      crctable.lo   \
-+      randtable.lo  \
-+      compress.lo   \
-+      decompress.lo \
-+      bzlib.lo
- 
-+all: libbz2.la bzip2 bzip2recover test
- 
--OBJS= blocksort.o  \
--      huffman.o    \
--      crctable.o   \
--      randtable.o  \
--      compress.o   \
--      decompress.o \
--      bzlib.o
--
--all: libbz2.a bzip2 bzip2recover test
--
--bzip2: libbz2.a bzip2.o
--      $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
-+bzip2: libbz2.la bzip2.o
-+      $(LD) $(CFLAGS) $(LDFLAGS) -static -o bzip2 bzip2.o libbz2.la
- 
- bzip2recover: bzip2recover.o
--      $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o
-+      $(LD) $(CFLAGS) $(LDFLAGS) -static -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
-+libbz2.la: $(OBJS)
-+      rm -f libbz2.la
-+      $(LD) $(LDFLAGS) -o libbz2.la $(OBJS) -version-info 0:0 \
-+              -rpath $(PREFIX)/lib
- 
- check: test
- test: bzip2
-@@ -113,20 +106,20 @@ clean: 
-       sample1.rb2 sample2.rb2 sample3.rb2 \
-       sample1.tst sample2.tst sample3.tst
- 
--blocksort.o: blocksort.c
-+blocksort.lo: blocksort.c
-       @cat words0
-       $(CC) $(CFLAGS) -c blocksort.c
--huffman.o: huffman.c
-+huffman.lo: huffman.c
-       $(CC) $(CFLAGS) -c huffman.c
--crctable.o: crctable.c
-+crctable.lo: crctable.c
-       $(CC) $(CFLAGS) -c crctable.c
--randtable.o: randtable.c
-+randtable.lo: randtable.c
-       $(CC) $(CFLAGS) -c randtable.c
--compress.o: compress.c
-+compress.lo: compress.c
-       $(CC) $(CFLAGS) -c compress.c
--decompress.o: decompress.c
-+decompress.lo: decompress.c
-       $(CC) $(CFLAGS) -c decompress.c
--bzlib.o: bzlib.c
-+bzlib.lo: bzlib.c
-       $(CC) $(CFLAGS) -c bzlib.c
- bzip2.o: bzip2.c
-       $(CC) $(CFLAGS) -c bzip2.c



Home | Main Index | Thread Index | Old Index