commit:     d2bf161e24a6e2f193ff0adc36cfbb6e539bc31e
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  9 05:17:51 2022 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sun Oct  9 05:31:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2bf161e

x11-plugins/asmem: fix configure further with upcoming clang16

autoconf/ seems like a mess, so just adding a rough addition to
the earlier direct configure patch.

Also replace CC= by tc-export CC pre-configure, or it fails
with -native-symlinks if CC is unset (due to old autoconf).

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

 x11-plugins/asmem/asmem-1.12-r2.ebuild             |  6 ++++--
 .../files/configure-implicit-func-decls.patch      | 14 ------------
 x11-plugins/asmem/files/configure-implicits.patch  | 25 ++++++++++++++++++++++
 3 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/x11-plugins/asmem/asmem-1.12-r2.ebuild 
b/x11-plugins/asmem/asmem-1.12-r2.ebuild
index 47c255eede9c..02804f6c2ddb 100644
--- a/x11-plugins/asmem/asmem-1.12-r2.ebuild
+++ b/x11-plugins/asmem/asmem-1.12-r2.ebuild
@@ -29,15 +29,17 @@ DEPEND="
 
 PATCHES=(
        "${FILESDIR}"/respect-ldflags.patch
-       "${FILESDIR}"/configure-implicit-func-decls.patch
+       "${FILESDIR}"/configure-implicits.patch
 )
 
 src_configure() {
+       tc-export CC # old autoconf
+
        econf $(use_enable jpeg)
 }
 
 src_compile() {
-       emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}"
+       emake LDFLAGS="${LDFLAGS}"
 }
 
 src_install() {

diff --git a/x11-plugins/asmem/files/configure-implicit-func-decls.patch 
b/x11-plugins/asmem/files/configure-implicit-func-decls.patch
deleted file mode 100644
index 0361c3e6e9b4..000000000000
--- a/x11-plugins/asmem/files/configure-implicit-func-decls.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-https://bugs.gentoo.org/870679
-
-Generated file and configure.in is written for autoconf 2.13.
---- a/configure
-+++ b/configure
-@@ -751,7 +751,7 @@ cat > conftest.$ac_ext << EOF
- #line 752 "configure"
- #include "confdefs.h"
- 
--main(){return(0);}
-+int main(){return(0);}
- EOF
- if { (eval echo configure:757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
-   ac_cv_prog_cc_works=yes

diff --git a/x11-plugins/asmem/files/configure-implicits.patch 
b/x11-plugins/asmem/files/configure-implicits.patch
new file mode 100644
index 000000000000..14eff8f58e3a
--- /dev/null
+++ b/x11-plugins/asmem/files/configure-implicits.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/870679
+https://bugs.gentoo.org/871279
+
+Generated file and configure.in is written for autoconf 2.13.
+--- a/configure
++++ b/configure
+@@ -752,5 +752,5 @@
+ #include "confdefs.h"
+ 
+-main(){return(0);}
++int main(void){return(0);}
+ EOF
+ if { (eval echo configure:757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
+@@ -1356,4 +1356,5 @@
+ #include "confdefs.h"
+ 
++void ${x_direct_test_function}(void);
+ int main() {
+ ${x_direct_test_function}()
+@@ -2440,4 +2441,5 @@
+ #include "confdefs.h"
+ 
++void XpmReadFileToPixmap(void);
+ int main() {
+ XpmReadFileToPixmap()

Reply via email to