aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2000-06-08 22:47:20 +0800
committersobomax <sobomax@FreeBSD.org>2000-06-08 22:47:20 +0800
commit87414063f61a548e236200c39c9bf446b85791ee (patch)
tree8f69fb8753b64e65294bcc503c6324337d3e56d6
parent274d815b157040033648718312093727f14ea59b (diff)
downloadfreebsd-ports-gnome-87414063f61a548e236200c39c9bf446b85791ee.tar.gz
freebsd-ports-gnome-87414063f61a548e236200c39c9bf446b85791ee.tar.zst
freebsd-ports-gnome-87414063f61a548e236200c39c9bf446b85791ee.zip
Build shared library as well.
-rw-r--r--archivers/bzip2/Makefile6
-rw-r--r--archivers/bzip2/files/patch-aa70
-rw-r--r--archivers/bzip2/pkg-plist4
3 files changed, 77 insertions, 3 deletions
diff --git a/archivers/bzip2/Makefile b/archivers/bzip2/Makefile
index ba5c6782ce5a..b317b8d3a4ff 100644
--- a/archivers/bzip2/Makefile
+++ b/archivers/bzip2/Makefile
@@ -16,6 +16,7 @@ MASTER_SITES= ftp://ftp.freesoftware.com/pub/sourceware/bzip2/v100/ \
MAINTAINER= obrien@FreeBSD.org
FETCH_BEFORE_ARGS= -b
+
MAN1= bzip2.1
MLINKS= bzip2.1 bunzip2.1 bzip2.1 bzcat.1 bzip2.1 bz2cat.1 \
bzip2.1 bzip2recover.1
@@ -28,6 +29,8 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bzip2recover ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/bzlib.h ${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/libbz2.a ${PREFIX}/lib
+ ${INSTALL_DATA} ${WRKSRC}/libbz2.so.1 ${PREFIX}/lib
+ ${LN} -sf ${PREFIX}/lib/libbz2.so.1 ${PREFIX}/lib/libbz2.so
${INSTALL_MAN} ${WRKSRC}/bzip2.1 ${PREFIX}/man/man1
.if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/share/doc/bzip2
@@ -35,4 +38,7 @@ do-install:
${PREFIX}/bin/bzip2 -f ${PREFIX}/share/doc/bzip2/manual.ps
.endif
+post-install:
+ ${LDCONFIG} -m ${PREFIX}/lib
+
.include <bsd.port.mk>
diff --git a/archivers/bzip2/files/patch-aa b/archivers/bzip2/files/patch-aa
index a695b9ec9fcd..33419f799219 100644
--- a/archivers/bzip2/files/patch-aa
+++ b/archivers/bzip2/files/patch-aa
@@ -1,6 +1,6 @@
---- Makefile.orig Tue May 16 16:31:04 2000
-+++ Makefile Sat May 27 16:54:49 2000
-@@ -1,8 +1,9 @@
+--- Makefile.orig Wed May 17 00:31:04 2000
++++ Makefile Thu Jun 8 17:41:26 2000
+@@ -1,8 +1,10 @@
SHELL=/bin/sh
-CC=gcc
@@ -9,6 +9,70 @@
-CFLAGS=-Wall -Winline -O2 -fomit-frame-pointer -fno-strength-reduce $(BIGFILES)
+CFLAGS?=-O2
+CFLAGS+=-Wall -Winline -fomit-frame-pointer -fno-strength-reduce $(BIGFILES)
++SOFLAGS=-fPIC -fpic -DPIC
OBJS= blocksort.o \
huffman.o \
+@@ -12,10 +14,18 @@
+ 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) -o bzip2 bzip2.o -L. -lbz2
++all: libbz2.so.1 libbz2.a bzip2 bzip2recover test
++
++bzip2: libbz2.so.1 libbz2.a bzip2.o
++ $(CC) $(CFLAGS) -o bzip2 bzip2.o libbz2.a
+
+ bzip2recover: bzip2recover.o
+ $(CC) $(CFLAGS) -o bzip2recover bzip2recover.o
+@@ -29,6 +39,10 @@
+ ranlib libbz2.a ; \
+ fi
+
++libbz2.so.1: $(SO_OBJS)
++ $(CC) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1 $(SO_OBJS)
++ ln -sf libbz2.so.1 libbz2.so
++
+ test: bzip2
+ @cat words1
+ ./bzip2 -1 < sample1.ref > sample1.rb2
+@@ -69,12 +83,27 @@
+ chmod a+r $(PREFIX)/lib/libbz2.a
+
+ clean:
+- rm -f *.o libbz2.a bzip2 bzip2recover \
++ rm -f *.o *.so libbz2.a libbz2.so.1 bzip2 bzip2recover \
+ sample1.rb2 sample2.rb2 sample3.rb2 \
+ sample1.tst sample2.tst sample3.tst
+
+-blocksort.o: blocksort.c
++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
+ $(CC) $(CFLAGS) -c blocksort.c
+ huffman.o: huffman.c
+ $(CC) $(CFLAGS) -c huffman.c
diff --git a/archivers/bzip2/pkg-plist b/archivers/bzip2/pkg-plist
index 431f3a8e8c71..d582c5526fb7 100644
--- a/archivers/bzip2/pkg-plist
+++ b/archivers/bzip2/pkg-plist
@@ -5,6 +5,10 @@ bin/bz2cat
bin/bzip2recover
include/bzlib.h
lib/libbz2.a
+lib/libbz2.so
+lib/libbz2.so.1
+@unexec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -R
+@exec /usr/bin/env OBJFORMAT=%%PORTOBJFORMAT%% /sbin/ldconfig -m %B
share/doc/bzip2/manual.ps.bz2
share/doc/bzip2/manual.texi
share/doc/bzip2/manual_1.html