]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/commitdiff
bzip2: Honour LDFLAGS
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 17 Oct 2016 23:40:49 +0000 (01:40 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 18 Oct 2016 20:58:07 +0000 (22:58 +0200)
bzip2 is using a very unusual build system which makes some
patches required to pass flags from the environment.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
bzip2/bzip2.nm
bzip2/patches/bzip2-1.0.4-makefile-CFLAGS.patch0 [new file with mode: 0644]
bzip2/patches/bzip2-1.0.4-saneso.patch [deleted file]
bzip2/patches/bzip2-1.0.5-install_docs-1.patch [deleted file]
bzip2/patches/bzip2-1.0.6-saneso.patch0 [new file with mode: 0644]

index c1e1035f4add4987d5610666de421d2bbd831b4d..4660dc7ad5917ef983331629e24cc6d93b0ba354 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = bzip2
 version    = 1.0.6
-release    = 6
+release    = 7
 
 groups     = Applications/Compression
 url        = http://www.bzip.org/
@@ -29,10 +29,12 @@ build
 
        build
                %{DO_FIX_LIBTOOL}
-               make -f Makefile-libbz2_so %{PARALLELISMFLAGS} CFLAGS="%{CFLAGS}"
+               make -f Makefile-libbz2_so %{PARALLELISMFLAGS} \
+                       CFLAGS="%{CFLAGS}" LDFLAGS="%{LDFLAGS}"
 
                make clean
-               make %{PARALLELISMFLAGS} CFLAGS="%{CFLAGS}"
+               make %{PARALLELISMFLAGS} \
+                       CFLAGS="%{CFLAGS}" LDFLAGS="%{LDFLAGS}"
        end
 
        install
diff --git a/bzip2/patches/bzip2-1.0.4-makefile-CFLAGS.patch0 b/bzip2/patches/bzip2-1.0.4-makefile-CFLAGS.patch0
new file mode 100644 (file)
index 0000000..5a95ed6
--- /dev/null
@@ -0,0 +1,25 @@
+--- Makefile
++++ Makefile
+@@ -18,10 +18,9 @@
+ CC=gcc
+ AR=ar
+ RANLIB=ranlib
+-LDFLAGS=
+ BIGFILES=-D_FILE_OFFSET_BITS=64
+-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
++CFLAGS+=-Wall -Winline $(BIGFILES) $(CPPFLAGS)
+ # Where you want it installed when you do 'make install'
+ PREFIX=/usr/local
+--- Makefile-libbz2_so
++++ Makefile-libbz2_so
+@@ -24,7 +24,7 @@
+ SHELL=/bin/sh
+ CC=gcc
+ BIGFILES=-D_FILE_OFFSET_BITS=64
+-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
++CFLAGS+=-fpic -fPIC -Wall -Winline $(BIGFILES) $(CPPFLAGS)
+ OBJS= blocksort.o  \
+       huffman.o    \
diff --git a/bzip2/patches/bzip2-1.0.4-saneso.patch b/bzip2/patches/bzip2-1.0.4-saneso.patch
deleted file mode 100644 (file)
index 6b3430c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-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-11 01:07:52.000000000 +0200
-+++ bzip2-1.0.6/Makefile-libbz2_so     2010-09-22 10:31:46.000000000 +0200
-@@ -35,7 +35,7 @@ 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
diff --git a/bzip2/patches/bzip2-1.0.5-install_docs-1.patch b/bzip2/patches/bzip2-1.0.5-install_docs-1.patch
deleted file mode 100644 (file)
index c3b0230..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-Submitted By:            Matthew Burgess <matthew@linuxfromscratch.org>
-Date:                    2007-01-31
-Initial Package Version: 1.0.4
-Upstream Status:         Not submitted
-Origin:                  Randy McMurchy & Steve Crosby
-Description:             Installs pre-formatted documentation
-
-diff -Naur bzip2-1.0.4.orig/Makefile bzip2-1.0.4/Makefile
---- bzip2-1.0.4.orig/Makefile  2007-01-03 03:49:21.000000000 +0000
-+++ bzip2-1.0.4/Makefile       2007-01-26 20:00:01.000000000 +0000
-@@ -25,7 +25,7 @@
- # Where you want it installed when you do 'make install'
- PREFIX=/usr/local
--
-+DOCDIR=share/doc/$(DISTNAME)
- OBJS= blocksort.o  \
-       huffman.o    \
-@@ -74,6 +74,7 @@
-       if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
-       if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
-       if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
-+      if ( test ! -d $(PREFIX)/$(DOCDIR) ) ; then mkdir -p $(PREFIX)/$(DOCDIR); fi
-       if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
-       cp -f bzip2 $(PREFIX)/bin/bzip2
-       cp -f bzip2 $(PREFIX)/bin/bunzip2
-@@ -107,6 +108,14 @@
-       echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
-       echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
-       echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
-+      cp -f manual.html $(PREFIX)/$(DOCDIR)
-+      cp -f manual.pdf $(PREFIX)/$(DOCDIR)
-+      cp -f manual.ps $(PREFIX)/$(DOCDIR)
-+      cp -f bzip2.txt $(PREFIX)/$(DOCDIR)
-+      chmod a+r $(PREFIX)/$(DOCDIR)/manual.html
-+      chmod a+r $(PREFIX)/$(DOCDIR)/manual.pdf
-+      chmod a+r $(PREFIX)/$(DOCDIR)/manual.ps
-+      chmod a+r $(PREFIX)/$(DOCDIR)/bzip2.txt
- clean: 
-       rm -f *.o libbz2.a bzip2 bzip2recover \
diff --git a/bzip2/patches/bzip2-1.0.6-saneso.patch0 b/bzip2/patches/bzip2-1.0.6-saneso.patch0
new file mode 100644 (file)
index 0000000..9c4ddf0
--- /dev/null
@@ -0,0 +1,13 @@
+--- Makefile-libbz2_so
++++ Makefile-libbz2_so
+@@ -35,8 +35,8 @@
+       bzlib.o
+ all: $(OBJS)
+-      $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS)
+-      $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6
++      $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 $(OBJS)
++      $(CC) $(LDFLAGS) $(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