* sync lbzip2 with main arch

This commit is contained in:
Alexander Baldeck 2020-02-03 11:24:55 +01:00
parent 62500edf2a
commit 17e5713bf4
3 changed files with 39 additions and 18 deletions

View File

@ -1,24 +1,26 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Dan Ziemba <zman0900@gmail.com>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
pkgname=lbzip2
pkgver=2.5
pkgrel=4
pkgrel=5
pkgdesc="A parallel, SMP-based, bzip2-compatible compression utility"
arch=(x86_64 powerpc64le)
url="http://lbzip2.org"
license=('GPL3')
depends=('glibc')
source=(http://archive.lbzip2.org/$pkgname-$pkgver.tar.bz2
lbzip2-gnulib-recent-libc.patch)
sha512sums=('63468178604df926bd2071c23b068bddcb6fcab54bac92a149224c5ed99a38cc7e8366ae21eecf12ad9c1a193827ef627d2517ac9a7a65791a959dfcacd96127'
'593462292f530c655abe07f84ec79012d3473719bd6445bb228fb3f44b7d03666a02b437fea8df9b5fc6e7f20765ebd3a2db50c29ca2440d70f4bfd7e91a3cda')
makedepends=('patch')
source=(http://deb.debian.org/debian/pool/main/l/$pkgname/${pkgname}_${pkgver}.orig.tar.bz2
lbzip2-gnulib-build-fix.patch)
sha256sums=('eec4ff08376090494fa3710649b73e5412c3687b4b9b758c93f73aa7be27555b'
'5eca4665b147655ce99f9ae5eff50e7db2714ba957e41e20b50d80533aeb6bef')
prepare() {
cd "${srcdir}"/$pkgname-$pkgver
patch -Np1 -i ${srcdir}/lbzip2-gnulib-recent-libc.patch
patch -Np1 -i "${srcdir}"/lbzip2-gnulib-build-fix.patch
}
build() {

View File

@ -0,0 +1,30 @@
diff --git a/lib/fseterr.c b/lib/fseterr.c
index 82649c3ac..adb637256 100644
--- a/lib/fseterr.c
+++ b/lib/fseterr.c
@@ -29,7 +29,7 @@ fseterr (FILE *fp)
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_flags |= _IO_ERR_SEEN;
#elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
/* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h
index 78d896e9f..05c5752a2 100644
--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -18,6 +18,12 @@
the same implementation of stdio extension API, except that some fields
have different naming conventions, or their access requires some casts. */
+/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this
+ problem by defining it ourselves. FIXME: Do not rely on glibc
+ internals. */
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
+# define _IO_IN_BACKUP 0x100
+#endif
/* BSD stdio derived implementations. */

View File

@ -1,11 +0,0 @@
--- lbzip2-2.5/lib/fseterr.c.orig 2019-03-27 10:40:55.744743874 +0000
+++ lbzip2-2.5/lib/fseterr.c 2019-03-27 10:42:06.478261759 +0000
@@ -29,7 +29,7 @@
/* Most systems provide FILE as a struct and the necessary bitmask in
<stdio.h>, because they need it for implementing getc() and putc() as
fast macros. */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
fp->_flags |= _IO_ERR_SEEN;
#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
fp_->_flags |= __SERR;