commit:     8f03cd6c9fcc5b5e911cb3379fe0a17052c0a0d8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  7 07:36:35 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan  7 07:36:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f03cd6c

app-arch/lbzip2: fix compile w/ clang 16

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/lbzip2-2.5_p20181227-clang16.patch       | 27 ++++++++++++++++++++++
 ...27-r1.ebuild => lbzip2-2.5_p20181227-r2.ebuild} |  5 ++--
 2 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/app-arch/lbzip2/files/lbzip2-2.5_p20181227-clang16.patch 
b/app-arch/lbzip2/files/lbzip2-2.5_p20181227-clang16.patch
new file mode 100644
index 000000000000..7342b19cd027
--- /dev/null
+++ b/app-arch/lbzip2/files/lbzip2-2.5_p20181227-clang16.patch
@@ -0,0 +1,27 @@
+https://github.com/kjn/lbzip2/pull/33
+
+From 32b5167940ec817e454431956040734af405a9de Mon Sep 17 00:00:00 2001
+From: Florian Weimer <[email protected]>
+Date: Thu, 5 Jan 2023 18:02:26 +0100
+Subject: [PATCH] Define the GNULIB_XALLOC_DIE macro
+
+This avoids an implicit function declaration when building gnulib's
+xmalloc.c, addressing a build failure with future compiler version.
+
+Solution proposed by Bruno Haible here:
+
+  Re: xmalloc calling undeclared xalloc_die function
+  <https://lists.gnu.org/archive/html/bug-gnulib/2022-12/msg00038.html>
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,6 +31,9 @@ AC_PROG_LN_S
+ AC_PROG_RANLIB
+ AC_PROG_CC_C89
+ 
++AC_DEFINE(GNULIB_XALLOC_DIE, 1,
++  [This package is providing its own definition of the xalloc_die function.])
++
+ gl_ASSERT_NO_GNULIB_TESTS
+ gl_ASSERT_NO_GNULIB_POSIXCHECK
+ gl_EARLY
+

diff --git a/app-arch/lbzip2/lbzip2-2.5_p20181227-r1.ebuild 
b/app-arch/lbzip2/lbzip2-2.5_p20181227-r2.ebuild
similarity index 89%
rename from app-arch/lbzip2/lbzip2-2.5_p20181227-r1.ebuild
rename to app-arch/lbzip2/lbzip2-2.5_p20181227-r2.ebuild
index 1584b8dd8b07..4272c9ad02b3 100644
--- a/app-arch/lbzip2/lbzip2-2.5_p20181227-r1.ebuild
+++ b/app-arch/lbzip2/lbzip2-2.5_p20181227-r2.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="7"
+EAPI=8
 
 inherit autotools flag-o-matic
 
@@ -17,6 +17,7 @@ IUSE="debug static"
 PATCHES=(
        "${FILESDIR}"/${PN}-2.3-s_isreg.patch
        "${FILESDIR}"/${P}-fix-unaligned.patch
+       "${FILESDIR}"/${P}-clang16.patch
 )
 
 src_prepare() {

Reply via email to