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

Antonio Rojas arojas at archlinux.org
Sun Jun 30 20:44:11 UTC 2019


    Date: Sunday, June 30, 2019 @ 20:44:11
  Author: arojas
Revision: 486777

Update to 1.0.7

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

---------------------+
 PKGBUILD            |   46 ++++++++++++++++++++++++++--------------------
 bzip2-ldflags.patch |   11 +++++++++++
 2 files changed, 37 insertions(+), 20 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-06-30 20:41:53 UTC (rev 486776)
+++ PKGBUILD	2019-06-30 20:44:11 UTC (rev 486777)
@@ -3,42 +3,48 @@
 
 _pkgbasename=bzip2
 pkgname=lib32-bzip2
-pkgver=1.0.6
-pkgrel=3
+pkgver=1.0.7
+pkgrel=1
 pkgdesc="A high-quality data compression program (32-bit)"
 arch=('x86_64')
 license=('custom')
-url="http://sources.redhat.com/bzip2"
+url="https://sourceware.org/bzip2/"
 depends=('lib32-glibc' $_pkgbasename)
 makedepends=('gcc-multilib')
-source=(https://sources.archlinux.org/other/packages/bzip2/bzip2-${pkgver}.tar.gz)
-sha512sums=('00ace5438cfa0c577e5f578d8a808613187eff5217c35164ffe044fbafdfec9e98f4192c02a7d67e01e5a5ccced630583ad1003c37697219b0f147343a3fdd12')
+source=(https://sourceware.org/pub/bzip2/$_pkgbasename-$pkgver.tar.gz{,.sig}
+        bzip2-ldflags.patch)
+sha512sums=('e0e19b493e6b1f7beeb0eeb0be8a6358c24202173f28acb1e902a768835be9e24f2cb966452fbc90fc3e4e692532ce0c7e86d06aef2d52c0d2a9ac16e12ec8c8'
+            'SKIP'
+            'e9b5e247c727279e9b8711fb6a1c2bb843470e292ea5e5b596d2803b9fa39633d4726b984b5a8c399f55f4d8d6635b2ca7b479b41a22402300f3edde2df798a4')
+validpgpkeys=('EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A') # Mark Wielaard <mark at klomp.org>
 
-build() {
-  cd "${srcdir}/${_pkgbasename}-${pkgver}"
+prepare() {
+  cd ${_pkgbasename}-${pkgver}
 
   sed -i "s|CC=gcc|CC=gcc -m32|" Makefile
   sed -i "s|CC=gcc|CC=gcc -m32|" Makefile-libbz2_so
 
-  # add large-file support
-  sed -e 's/^CFLAGS=\(.*\)$/CFLAGS=\1 \$(BIGFILES)/' -i ./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
+}
 
-  # use our optimization
-  sed -i "s|-O2|${CFLAGS}|g" Makefile
-  sed -i "s|-O2|${CFLAGS}|g" Makefile-libbz2_so
-
+build() {
+  cd ${_pkgbasename}-${pkgver}
+ 
   make -f Makefile-libbz2_so
   make libbz2.a
 }
 
 package(){
-  cd "${srcdir}/${_pkgbasename}-${pkgver}"
-  install -Dm755 libbz2.so.1.0.6 "${pkgdir}"/usr/lib32/libbz2.so.1.0.6
-  ln -s libbz2.so.1.0.6 "${pkgdir}"/usr/lib32/libbz2.so
-  ln -s libbz2.so.1.0.6 "${pkgdir}"/usr/lib32/libbz2.so.1
-  ln -s libbz2.so.1.0.6 "${pkgdir}"/usr/lib32/libbz2.so.1.0
+  cd ${_pkgbasename}-${pkgver}
 
-  install -Dm644 libbz2.a ${pkgdir}/usr/lib32/libbz2.a
+  install -dm755 "$pkgdir"/usr/lib32
+  cp -a libbz2.so* "$pkgdir"/usr/lib32
+  ln -s libbz2.so.$pkgver "$pkgdir"/usr/lib32/libbz2.so
 
-  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+  install -Dm644 libbz2.a "$pkgdir"/usr/lib32/libbz2.a
+
+  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE
 }

Added: bzip2-ldflags.patch
===================================================================
--- bzip2-ldflags.patch	                        (rev 0)
+++ bzip2-ldflags.patch	2019-06-30 20:44:11 UTC (rev 486777)
@@ -0,0 +1,11 @@
+--- 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