commit:     536705035512808ac19addaf703e23bb55adfc71
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 11 10:29:12 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Oct 11 10:39:35 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53670503

dev-util/cutils: EAPI7->8, fix direct AR and build w/ clang16

Closes: https://bugs.gentoo.org/724270
Closes: https://bugs.gentoo.org/871402
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../{cutils-1.6-r4.ebuild => cutils-1.6-r5.ebuild}    | 18 +++++++++++++-----
 dev-util/cutils/files/cutils-1.6-ar.patch             |  8 ++++++++
 dev-util/cutils/files/cutils-1.6-clang16.patch        | 19 +++++++++++++++++++
 3 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/dev-util/cutils/cutils-1.6-r4.ebuild 
b/dev-util/cutils/cutils-1.6-r5.ebuild
similarity index 81%
rename from dev-util/cutils/cutils-1.6-r4.ebuild
rename to dev-util/cutils/cutils-1.6-r5.ebuild
index a7b7e983a7b2..8f45dcfd811b 100644
--- a/dev-util/cutils/cutils-1.6-r4.ebuild
+++ b/dev-util/cutils/cutils-1.6-r5.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-inherit toolchain-funcs
+inherit autotools toolchain-funcs
 
 DESCRIPTION="C language utilities"
 HOMEPAGE="http://www.sigala.it/sandro/software.php#cutils";
@@ -13,11 +13,15 @@ LICENSE="BSD-2"
 SLOT="0"
 KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
 
-BDEPEND="sys-devel/flex"
+BDEPEND="
+       sys-devel/flex
+       virtual/yacc"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-infopage.patch
        "${FILESDIR}"/${P}-case-insensitive.patch
+       "${FILESDIR}"/${P}-ar.patch
+       "${FILESDIR}"/${P}-clang16.patch
 )
 
 src_prepare() {
@@ -39,10 +43,14 @@ src_prepare() {
                -i src/cundecl/cundecl.1 || die
        sed -e "/Nm/s/cdecl/cutils-cdecl/" \
                -i src/cdecl/cutils-cdecl.1 || die
+
+       eautoreconf #871402
 }
 
 src_compile() {
-       emake CC="$(tc-getCC)" -j1
+       tc-export AR #724270
+
+       emake -j1
 }
 
 src_install() {

diff --git a/dev-util/cutils/files/cutils-1.6-ar.patch 
b/dev-util/cutils/files/cutils-1.6-ar.patch
new file mode 100644
index 000000000000..68a3372e3b01
--- /dev/null
+++ b/dev-util/cutils/files/cutils-1.6-ar.patch
@@ -0,0 +1,8 @@
+https://bugs.gentoo.org/724270
+--- a/lib/Makefile.in
++++ b/lib/Makefile.in
+@@ -21,3 +21,3 @@
+       rm -f $(LIB)
+-      ar rc $(LIB) $(OBJS)
++      $(AR) rc $(LIB) $(OBJS)
+       $(RANLIB) $(LIB)

diff --git a/dev-util/cutils/files/cutils-1.6-clang16.patch 
b/dev-util/cutils/files/cutils-1.6-clang16.patch
new file mode 100644
index 000000000000..3c40b4ccf3c0
--- /dev/null
+++ b/dev-util/cutils/files/cutils-1.6-clang16.patch
@@ -0,0 +1,19 @@
+https://bugs.gentoo.org/871402
+--- a/src/cdecl/parser.y
++++ b/src/cdecl/parser.y
+@@ -46,2 +46,3 @@
+ extern FILE *output_file;
++extern int yylex(void);
+ 
+--- a/src/cundecl/parser.y
++++ b/src/cundecl/parser.y
+@@ -47,2 +47,3 @@
+ extern FILE *output_file;
++extern int yylex(void);
+ 
+--- a/src/yyref/parser.y
++++ b/src/yyref/parser.y
+@@ -50,2 +50,3 @@
+ extern int lineno;
++extern int yylex(void);
+ 

Reply via email to