commit:     fba65ffab4bf1f7310dc28f0249db4a234ff7f6c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  7 14:17:56 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec  7 14:18:02 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fba65ffa

dev-libs/zthread: EAPI 8, fix configure w/ clang 16

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

 .../files/zthread-2.3.2-configure-clang16.patch    | 22 ++++++++++++++++++++++
 ...ead-2.3.2-r4.ebuild => zthread-2.3.2-r5.ebuild} |  6 +++---
 2 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/dev-libs/zthread/files/zthread-2.3.2-configure-clang16.patch 
b/dev-libs/zthread/files/zthread-2.3.2-configure-clang16.patch
new file mode 100644
index 000000000000..998dc36c2976
--- /dev/null
+++ b/dev-libs/zthread/files/zthread-2.3.2-configure-clang16.patch
@@ -0,0 +1,22 @@
+pthread_yield needs GNU_SOURCE (missing in the test here), but pthread_yield
+is both deprecated and also not actually used (even conditionally!) in zthread,
+so let's just drop the test.
+
+(zthread uses sched_yield conditionally, however.)
+--- a/share/pthread.m4
++++ b/share/pthread.m4
+@@ -128,14 +128,6 @@ pthread_explicit="no"
+       AC_DEFINE(HAVE_SCHED_YIELD,,[Defined if sched_yield() is available]) ], 
 
+     [ AC_MSG_RESULT(no) ])
+ 
+-  dnl Check for pthread_yield
+-  AC_MSG_CHECKING(for pthread_yield);
+-  AC_TRY_LINK([#include <pthread.h>],
+-    [ pthread_yield(); ], 
+-    [ AC_MSG_RESULT(yes)
+-      AC_DEFINE(HAVE_PTHREAD_YIELD,,[Defined if pthread_yield() is 
available]) ],  
+-    [ AC_MSG_RESULT(no) ])
+-
+   dnl Check for pthread_key_create
+   AC_MSG_CHECKING(for pthread_key_create)
+   AC_TRY_LINK([#include <pthread.h>],

diff --git a/dev-libs/zthread/zthread-2.3.2-r4.ebuild 
b/dev-libs/zthread/zthread-2.3.2-r5.ebuild
similarity index 93%
rename from dev-libs/zthread/zthread-2.3.2-r4.ebuild
rename to dev-libs/zthread/zthread-2.3.2-r5.ebuild
index 96e7f7294154..87af37d2ba8d 100644
--- a/dev-libs/zthread/zthread-2.3.2-r4.ebuild
+++ b/dev-libs/zthread/zthread-2.3.2-r5.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit autotools
 
@@ -25,6 +25,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-automake-r2.patch
        "${FILESDIR}"/${P}-gcc47.patch
        "${FILESDIR}"/${P}-clang.patch
+       "${FILESDIR}"/${P}-configure-clang16.patch
 )
 
 src_prepare() {
@@ -41,8 +42,7 @@ src_prepare() {
 src_configure() {
        econf \
                $(use_enable debug) \
-               $(use_enable kernel_linux atomic-linux) \
-               --disable-static
+               $(use_enable kernel_linux atomic-linux)
 }
 
 src_compile() {

Reply via email to