void-packages/srcpkgs/bzip2/patches/soname.patch

48 lines
1.2 KiB
Diff

--- Makefile-libbz2_so.orig 2010-09-11 01:07:52.000000000 +0200
+++ Makefile-libbz2_so 2013-02-05 14:40:44.940114622 +0100
@@ -22,9 +22,9 @@
SHELL=/bin/sh
-CC=gcc
+CC ?= gcc
BIGFILES=-D_FILE_OFFSET_BITS=64
-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
+CFLAGS += -fpic -fPIC -Wall -Winline $(BIGFILES)
OBJS= blocksort.o \
huffman.o \
@@ -35,10 +35,11 @@ OBJS= blocksort.o \
bzlib.o
all: $(OBJS)
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
+ $(CC) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 $(OBJS)
$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
rm -f libbz2.so.1.0
ln -s libbz2.so.1.0.6 libbz2.so.1.0
+ ln -s libbz2.so.1.0.6 libbz2.so.1
clean:
rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared
--- Makefile.orig 2013-02-05 14:41:08.980543085 +0100
+++ Makefile 2013-02-05 14:41:34.306940942 +0100
@@ -15,13 +15,13 @@
SHELL=/bin/sh
# To assist in cross-compiling
-CC=gcc
-AR=ar
-RANLIB=ranlib
+CC ?= gcc
+AR ?= ar
+RANLIB ?= ranlib
LDFLAGS=
BIGFILES=-D_FILE_OFFSET_BITS=64
-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
+CFLAGS += -Wall -Winline -O2 $(BIGFILES)
# Where you want it installed when you do 'make install'
PREFIX=/usr/local