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

Antonio Rojas arojas at archlinux.org
Mon Jul 1 18:28:24 UTC 2019


    Date: Monday, July 1, 2019 @ 18:28:24
  Author: arojas
Revision: 357209

Better way to use system build flags

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

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

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-07-01 15:27:44 UTC (rev 357208)
+++ PKGBUILD	2019-07-01 18:28:24 UTC (rev 357209)
@@ -3,7 +3,7 @@
 
 pkgname=bzip2
 pkgver=1.0.7
-pkgrel=1
+pkgrel=2
 pkgdesc="A high-quality data compression program"
 arch=('x86_64')
 license=('custom')
@@ -10,28 +10,16 @@
 url="https://sourceware.org/bzip2/"
 groups=('base')
 depends=('glibc' 'sh')
-source=(https://sourceware.org/pub/bzip2/$pkgname-$pkgver.tar.gz{,.sig}
-        bzip2-ldflags.patch)
+source=(https://sourceware.org/pub/bzip2/$pkgname-$pkgver.tar.gz{,.sig})
 sha256sums=('e768a87c5b1a79511499beb41500bcc4caf203726fff46a6f5f9ad27fe08ab2b'
-            'SKIP'
-            'fd7b402b94d42a642bd13430bf489077017de3dbbef9fb4656ccb6fb3c751504')
+            'SKIP')
 validpgpkeys=('EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A') # Mark Wielaard <mark at klomp.org>
         
-prepare() {
-  cd $pkgname-$pkgver
-
-  # use our optimization
-  sed -e "s|-O2|${CFLAGS}|g" -i Makefile*
-  # use our LDFLAGS
-  sed -e "s|LDFLAGS=|LDFLAGS=${LDFLAGS}|g" -i Makefile*
-  patch -p1 -i ../bzip2-ldflags.patch
-}
-
 build() {
   cd $pkgname-$pkgver
 
-  make -f Makefile-libbz2_so
-  make bzip2 bzip2recover
+  make -f Makefile-libbz2_so CC="gcc $CFLAGS $LDFLAGS"
+  make bzip2 bzip2recover CC="gcc $CFLAGS $LDFLAGS"
 }
 
 check() {

Deleted: bzip2-ldflags.patch
===================================================================
--- bzip2-ldflags.patch	2019-07-01 15:27:44 UTC (rev 357208)
+++ bzip2-ldflags.patch	2019-07-01 18:28:24 UTC (rev 357209)
@@ -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