[arch-commits] Commit in lib32-bzip2/trunk (PKGBUILD bzip2-ldflags.patch)

Antonio Rojas arojas at archlinux.org
Mon Jul 1 18:30:57 UTC 2019


    Date: Monday, July 1, 2019 @ 18:30:57
  Author: arojas
Revision: 487168

Better way to use system build flags

Modified:
  lib32-bzip2/trunk/PKGBUILD
Deleted:
  lib32-bzip2/trunk/bzip2-ldflags.patch

---------------------+
 PKGBUILD            |   24 +++++-------------------
 bzip2-ldflags.patch |   11 -----------
 2 files changed, 5 insertions(+), 30 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-07-01 18:30:44 UTC (rev 487167)
+++ PKGBUILD	2019-07-01 18:30:57 UTC (rev 487168)
@@ -4,7 +4,7 @@
 _pkgbasename=bzip2
 pkgname=lib32-bzip2
 pkgver=1.0.7
-pkgrel=1
+pkgrel=2
 pkgdesc="A high-quality data compression program (32-bit)"
 arch=('x86_64')
 license=('custom')
@@ -11,30 +11,16 @@
 url="https://sourceware.org/bzip2/"
 depends=('lib32-glibc' $_pkgbasename)
 makedepends=('gcc-multilib')
-source=(https://sourceware.org/pub/bzip2/$_pkgbasename-$pkgver.tar.gz{,.sig}
-        bzip2-ldflags.patch)
+source=(https://sourceware.org/pub/bzip2/$_pkgbasename-$pkgver.tar.gz{,.sig})
 sha512sums=('e0e19b493e6b1f7beeb0eeb0be8a6358c24202173f28acb1e902a768835be9e24f2cb966452fbc90fc3e4e692532ce0c7e86d06aef2d52c0d2a9ac16e12ec8c8'
-            'SKIP'
-            'e9b5e247c727279e9b8711fb6a1c2bb843470e292ea5e5b596d2803b9fa39633d4726b984b5a8c399f55f4d8d6635b2ca7b479b41a22402300f3edde2df798a4')
+            'SKIP')
 validpgpkeys=('EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A') # Mark Wielaard <mark at klomp.org>
 
-prepare() {
-  cd ${_pkgbasename}-${pkgver}
-
-  sed -i "s|CC=gcc|CC=gcc -m32|" Makefile
-  sed -i "s|CC=gcc|CC=gcc -m32|" Makefile-libbz2_so
-
-  # use our LDFLAGS
-  sed -e "s|-O2|${CFLAGS}|g" -i Makefile*
-  sed -e "s|LDFLAGS=|LDFLAGS=${LDFLAGS}|g" -i Makefile*
-  patch -p1 -i ../bzip2-ldflags.patch
-}
-
 build() {
   cd ${_pkgbasename}-${pkgver}
  
-  make -f Makefile-libbz2_so
-  make libbz2.a
+  make -f Makefile-libbz2_so CC="gcc -m32 $CFLAGS $LDFLAGS"
+  make libbz2.a CC="gcc -m32 $CFLAGS $LDFLAGS"
 }
 
 package(){

Deleted: bzip2-ldflags.patch
===================================================================
--- bzip2-ldflags.patch	2019-07-01 18:30:44 UTC (rev 487167)
+++ bzip2-ldflags.patch	2019-07-01 18:30:57 UTC (rev 487168)
@@ -1,11 +0,0 @@
---- bzip2-1.0.7/Makefile-libbz2_so.orig	2019-06-29 09:08:21.186324313 +0000
-+++ bzip2-1.0.7/Makefile-libbz2_so	2019-06-29 09:09:37.397240774 +0000
-@@ -35,7 +35,7 @@
-       bzlib.o
- 
- all: $(OBJS)
--	$(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.7 $(OBJS)
-+	$(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.7 $(OBJS) $(LDFLAGS)
- 	$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.7
- 	rm -f libbz2.so.1.0
- 	ln -s libbz2.so.1.0.7 libbz2.so.1.0



More information about the arch-commits mailing list