commit:     eccbaa58e0c21cc6df13f6028244158f144145a0
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 13 22:43:33 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 13 22:44:50 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eccbaa58

media-libs/id3lib: fix build with Clang, EAPI 8

Thanks to Jannik2099 for spotting the problem in configure.

Closes: https://bugs.gentoo.org/871087
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../id3lib/files/id3lib-3.8.3-configure-clang.patch | 21 +++++++++++++++++++++
 ...3lib-3.8.3-r9.ebuild => id3lib-3.8.3-r10.ebuild} | 17 +++++++++--------
 2 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/media-libs/id3lib/files/id3lib-3.8.3-configure-clang.patch 
b/media-libs/id3lib/files/id3lib-3.8.3-configure-clang.patch
new file mode 100644
index 000000000000..730a00b62dbf
--- /dev/null
+++ b/media-libs/id3lib/files/id3lib-3.8.3-configure-clang.patch
@@ -0,0 +1,21 @@
+https://bugs.gentoo.org/871087
+--- a/m4/id3_cxx.m4
++++ b/m4/id3_cxx.m4
+@@ -81,7 +81,7 @@ AC_DEFUN(ID3_CXX_PORTABILITY,[
+ 
+   dnl Check whether we have bool
+   AC_MSG_CHECKING(whether C++ has bool)
+-  AC_TRY_RUN([main() { bool b1=true; bool b2=false; }],
++  AC_TRY_RUN([int main() { bool b1=true; bool b2=false; }],
+              [ AC_MSG_RESULT(yes) ],
+              [ AC_MSG_RESULT(no)
+                AC_DEFINE(CXX_HAS_NO_BOOL) ],
+@@ -90,7 +90,7 @@ AC_DEFUN(ID3_CXX_PORTABILITY,[
+ 
+   dnl Test whether C++ has buggy for-loops
+   AC_MSG_CHECKING(whether C++ has correct scoping in for-loops)
+-  AC_TRY_COMPILE([#include <iostream.h>], [
++  AC_TRY_COMPILE([#include <iostream>], [
+    for (int i=0;i<10;i++) { }
+    for (int i=0;i<10;i++) { }
+ ], [ AC_MSG_RESULT(yes) ],

diff --git a/media-libs/id3lib/id3lib-3.8.3-r9.ebuild 
b/media-libs/id3lib/id3lib-3.8.3-r10.ebuild
similarity index 86%
rename from media-libs/id3lib/id3lib-3.8.3-r9.ebuild
rename to media-libs/id3lib/id3lib-3.8.3-r10.ebuild
index 79e0b20e88b2..1a5880aba94a 100644
--- a/media-libs/id3lib/id3lib-3.8.3-r9.ebuild
+++ b/media-libs/id3lib/id3lib-3.8.3-r10.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=6
+EAPI=8
 
 inherit autotools
 
@@ -13,16 +13,15 @@ LICENSE="LGPL-2.1"
 SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 
~amd64-linux ~x86-linux ~x86-solaris"
 IUSE="doc static-libs"
+RESTRICT="test"
 
 RDEPEND="sys-libs/zlib:="
-DEPEND="${RDEPEND}
-       doc? ( app-doc/doxygen )"
-
-RESTRICT="test"
+DEPEND="${RDEPEND}"
+BDEPEND="doc? ( app-doc/doxygen )"
 
 DOCS=( AUTHORS ChangeLog HISTORY README THANKS TODO )
 
-S=${WORKDIR}/${P/_}
+S="${WORKDIR}"/${P/_}
 
 PATCHES=(
        "${FILESDIR}"/${P}-zlib.patch
@@ -34,6 +33,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-missing_nullpointer_check.patch
        "${FILESDIR}"/${P}-security.patch
        "${FILESDIR}"/${P}-vbr-stack-smashing.patch # bug 398571
+       "${FILESDIR}"/${P}-configure-clang.patch
 )
 
 src_prepare() {
@@ -41,7 +41,7 @@ src_prepare() {
 
        sed -i 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' {.,zlib}/configure.in || 
die
 
-       AT_M4DIR=${S}/m4 eautoreconf
+       AT_M4DIR="${S}"/m4 eautoreconf
 }
 
 src_configure() {
@@ -50,6 +50,7 @@ src_configure() {
 
 src_compile() {
        default
+
        if use doc; then
                pushd doc >/dev/null || die
                doxygen Doxyfile || die

Reply via email to