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

48 lines
1.2 KiB
Diff

--- a/Makefile-libbz2_so 2019-07-17 21:09:34.798780817 +0200
+++ b/Makefile-libbz2_so 2019-07-17 21:09:47.306781668 +0200
@@ -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 @@
bzlib.o
all: $(OBJS)
- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)
+ $(CC) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.8 $(OBJS)
$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8
rm -f libbz2.so.1.0
ln -s libbz2.so.1.0.8 libbz2.so.1.0
+ ln -s libbz2.so.1.0.8 libbz2.so.1
clean:
rm -f $(OBJS) bzip2.o libbz2.so.1.0.8 libbz2.so.1.0 bzip2-shared
--- a/Makefile 2019-07-17 21:15:28.649804898 +0200
+++ b/Makefile 2019-07-17 21:16:14.981808051 +0200
@@ -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