diff options
author | tv <tv@pkgsrc.org> | 2004-03-29 01:18:41 +0000 |
---|---|---|
committer | tv <tv@pkgsrc.org> | 2004-03-29 01:18:41 +0000 |
commit | 95b881c6a727db619f85023a58df95196bdff8db (patch) | |
tree | 10830347b4b07dd73773a08d8283601d0db0abc4 /archivers/bzip2 | |
parent | ace90f05e66cc26eae3416a3747fc472fedd24bb (diff) | |
download | pkgsrc-95b881c6a727db619f85023a58df95196bdff8db.tar.gz |
Obey CFLAGS/CPPFLAGS. Link the binaries with the .o's, not the .lo's
(libtool assumes that .lo means PIC, which is wrong for an end binary;
breaks on Interix where PIC in an end binary is broken)
Diffstat (limited to 'archivers/bzip2')
-rw-r--r-- | archivers/bzip2/Makefile | 8 | ||||
-rw-r--r-- | archivers/bzip2/distinfo | 4 | ||||
-rw-r--r-- | archivers/bzip2/patches/patch-aa | 59 |
3 files changed, 30 insertions, 41 deletions
diff --git a/archivers/bzip2/Makefile b/archivers/bzip2/Makefile index 18428aa4f99..514648e37e1 100644 --- a/archivers/bzip2/Makefile +++ b/archivers/bzip2/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2004/02/18 13:33:40 jlam Exp $ +# $NetBSD: Makefile,v 1.34 2004/03/29 01:18:41 tv Exp $ # DISTNAME= bzip2-1.0.2 @@ -17,15 +17,15 @@ MAKE_ENV+= REALCC="${CC}" .include "../../mk/compiler.mk" +CFLAGS+= ${CPPFLAGS} .if !empty(CC_VERSION:Mgcc*) -BZIP_CFLAGS= -Wall -Winline -fomit-frame-pointer -fno-strength-reduce +CFLAGS+= -Wall -Winline -fomit-frame-pointer -fno-strength-reduce .endif -MAKE_ENV+= BZIP_CFLAGS="${BZIP_CFLAGS}" INSTALLATION_DIRS= bin include lib man/man1 do-install: - ${LIBTOOL} --mode=install ${INSTALL_DATA} ${WRKSRC}/libbz2.la ${PREFIX}/lib + ${LIBTOOL} --mode=install ${INSTALL_SCRIPT} ${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 diff --git a/archivers/bzip2/distinfo b/archivers/bzip2/distinfo index d81d7fa090e..8186eefcc80 100644 --- a/archivers/bzip2/distinfo +++ b/archivers/bzip2/distinfo @@ -1,5 +1,5 @@ -$NetBSD: distinfo,v 1.9 2003/12/05 22:58:52 erh Exp $ +$NetBSD: distinfo,v 1.10 2004/03/29 01:18:41 tv Exp $ SHA1 (bzip2-1.0.2.tar.gz) = d47793959c0d65a4d7246e0247ed1358662d9ebf Size (bzip2-1.0.2.tar.gz) = 665198 bytes -SHA1 (patch-aa) = 40389fc4ba8d28eee7e78574a822f11ceb4802cc +SHA1 (patch-aa) = 53c56d73f4d88c953cfa5cab1d839f0ddd3cc0bc diff --git a/archivers/bzip2/patches/patch-aa b/archivers/bzip2/patches/patch-aa index 871b56fad01..173f8490a41 100644 --- a/archivers/bzip2/patches/patch-aa +++ b/archivers/bzip2/patches/patch-aa @@ -1,7 +1,8 @@ -$NetBSD: patch-aa,v 1.9 2003/12/30 16:46:03 cjep Exp $ ---- Makefile.orig 2002-01-25 17:34:53.000000000 -0600 -+++ Makefile 2003-12-05 16:45:09.000000000 -0600 -@@ -2,43 +2,36 @@ +$NetBSD: patch-aa,v 1.10 2004/03/29 01:18:41 tv Exp $ + +--- Makefile.orig Fri Jan 25 18:34:53 2002 ++++ Makefile Mon Mar 15 11:42:02 2004 +@@ -2,43 +2,35 @@ SHELL=/bin/sh # To assist in cross-compiling @@ -11,17 +12,24 @@ $NetBSD: patch-aa,v 1.9 2003/12/30 16:46:03 cjep Exp $ AR=ar RANLIB=ranlib -LDFLAGS= -+LDFLAGS+= # Suitably paranoid flags to avoid bugs in gcc-2.7 BIGFILES=-D_FILE_OFFSET_BITS=64 -CFLAGS=-Wall -Winline -O2 -fomit-frame-pointer -fno-strength-reduce $(BIGFILES) -+CFLAGS+=${BZIP_CFLAGS} $(BIGFILES) ++CFLAGS+=$(BIGFILES) -# Where you want it installed when you do 'make install' -PREFIX=/usr -- -- ++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 \ @@ -34,10 +42,13 @@ $NetBSD: patch-aa,v 1.9 2003/12/30 16:46:03 cjep Exp $ - -bzip2: libbz2.a bzip2.o - $(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2 -- --bzip2recover: bzip2recover.o ++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) @@ -46,22 +57,6 @@ $NetBSD: patch-aa,v 1.9 2003/12/30 16:46:03 cjep Exp $ - echo $(RANLIB) libbz2.a ; \ - $(RANLIB) libbz2.a ; \ - fi -+OBJS= blocksort.lo \ -+ huffman.lo \ -+ crctable.lo \ -+ randtable.lo \ -+ compress.lo \ -+ decompress.lo \ -+ bzlib.lo -+ -+all: libbz2.la bzip2 bzip2recover test -+ -+bzip2: libbz2.la bzip2.lo -+ $(LD) $(CFLAGS) $(LDFLAGS) -static -o bzip2 bzip2.lo libbz2.la -+ -+bzip2recover: bzip2recover.lo -+ $(LD) $(CFLAGS) $(LDFLAGS) -static -o bzip2recover bzip2recover.lo -+ +libbz2.la: $(OBJS) + rm -f libbz2.la + $(LD) $(LDFLAGS) -o libbz2.la $(OBJS) -version-info 0:0 \ @@ -69,7 +64,7 @@ $NetBSD: patch-aa,v 1.9 2003/12/30 16:46:03 cjep Exp $ check: test test: bzip2 -@@ -102,24 +95,24 @@ +@@ -102,20 +94,20 @@ sample1.rb2 sample2.rb2 sample3.rb2 \ sample1.tst sample2.tst sample3.tst @@ -95,11 +90,5 @@ $NetBSD: patch-aa,v 1.9 2003/12/30 16:46:03 cjep Exp $ -bzlib.o: bzlib.c +bzlib.lo: bzlib.c $(CC) $(CFLAGS) -c bzlib.c --bzip2.o: bzip2.c -+bzip2.lo: bzip2.c + bzip2.o: bzip2.c $(CC) $(CFLAGS) -c bzip2.c --bzip2recover.o: bzip2recover.c -+bzip2recover.lo: bzip2recover.c - $(CC) $(CFLAGS) -c bzip2recover.c - - DISTNAME=bzip2-1.0.2 |