]> git.ipfire.org Git - people/pmueller/ipfire-3.x.git/commitdiff
bzip2: Respect CFLAGS and LDFLAGS
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 10 Mar 2023 16:30:01 +0000 (16:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 13 Mar 2023 14:43:56 +0000 (14:43 +0000)
Add two patches to proper use our CFLAGS and LDFLAGS.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
bzip2/bzip2.nm
bzip2/patches/01-bzip2-saneso.patch [moved from bzip2/patches/bzip2-saneso.patch with 100% similarity]
bzip2/patches/02-bzip2-cflags.patch [new file with mode: 0644]
bzip2/patches/03-bzip2-ldflags.patch [new file with mode: 0644]

index adab756581db2c0e4c72925acb75a5263fb441c1..2b0e12cc8a9e1aa1ae47cb112646b9446f4a24a0 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = bzip2
 version    = 1.0.8
-release    = 1
+release    = 2
 
 groups     = Applications/Compression
 url        = https://sourceware.org/bzip2/
diff --git a/bzip2/patches/02-bzip2-cflags.patch b/bzip2/patches/02-bzip2-cflags.patch
new file mode 100644 (file)
index 0000000..992abbf
--- /dev/null
@@ -0,0 +1,12 @@
+diff -up bzip2-1.0.6/Makefile-libbz2_so.pom bzip2-1.0.6/Makefile-libbz2_so
+--- bzip2-1.0.6/Makefile-libbz2_so.pom 2010-09-22 10:36:24.000000000 +0200
++++ bzip2-1.0.6/Makefile-libbz2_so     2010-09-22 10:36:58.000000000 +0200
+@@ -35,7 +35,7 @@ OBJS= blocksort.o  \
+       bzlib.o
+ all: $(OBJS)
+-      $(CC) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.8 $(OBJS)
++      $(CC) $(CFLAGS) -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
diff --git a/bzip2/patches/03-bzip2-ldflags.patch b/bzip2/patches/03-bzip2-ldflags.patch
new file mode 100644 (file)
index 0000000..53c6ecc
--- /dev/null
@@ -0,0 +1,36 @@
+diff -up bzip2-1.0.6/Makefile.jx bzip2-1.0.6/Makefile
+--- bzip2-1.0.6/Makefile.jx    2010-09-10 18:46:02.000000000 -0400
++++ bzip2-1.0.6/Makefile       2015-08-14 13:04:33.891504131 -0400
+@@ -18,10 +18,6 @@ SHELL=/bin/sh
+ CC=gcc
+ AR=ar
+ RANLIB=ranlib
+-LDFLAGS=
+-
+-BIGFILES=-D_FILE_OFFSET_BITS=64
+-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
+ # Where you want it installed when you do 'make install'
+ PREFIX=/usr/local
+diff -up bzip2-1.0.6/Makefile-libbz2_so.jx bzip2-1.0.6/Makefile-libbz2_so
+--- bzip2-1.0.6/Makefile-libbz2_so.jx  2015-08-14 13:04:33.885503955 -0400
++++ bzip2-1.0.6/Makefile-libbz2_so     2015-08-14 13:06:52.554581179 -0400
+@@ -24,7 +24,6 @@
+ SHELL=/bin/sh
+ CC=gcc
+ BIGFILES=-D_FILE_OFFSET_BITS=64
+-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
+ OBJS= blocksort.o  \
+       huffman.o    \
+@@ -35,8 +34,8 @@ OBJS= blocksort.o  \
+       bzlib.o
+ all: $(OBJS)
+-      $(CC) $(CFLAGS) -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
++      $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.8 $(OBJS)
++      $(CC) $(CFLAGS) $(LDFLAGS) -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