* [gentoo-commits] repo/gentoo:master commit in: dev-libs/zthread/, dev-libs/zthread/files/
@ 2016-06-02 21:43 Austin English
0 siblings, 0 replies; 2+ messages in thread
From: Austin English @ 2016-06-02 21:43 UTC (permalink / raw
To: gentoo-commits
commit: 5f3562b328dcadeb4f73863bac2128a67df87eda
Author: Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 2 06:41:15 2016 +0000
Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Thu Jun 2 21:42:15 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f3562b3
dev-libs/zthread: fix building with clang
Gentoo-Bug: https://bugs.gentoo.org/506934
Reviewed-By: David Seifert <soap <AT> gentoo.org>
Package-Manager: portage-2.2.26
dev-libs/zthread/files/zthread-2.3.2-clang.patch | 16 ++++
.../files/zthread-2.3.2-no-fpermissive-r1.diff | 94 ++++++++++++++++++++++
dev-libs/zthread/zthread-2.3.2-r4.ebuild | 67 +++++++++++++++
3 files changed, 177 insertions(+)
diff --git a/dev-libs/zthread/files/zthread-2.3.2-clang.patch b/dev-libs/zthread/files/zthread-2.3.2-clang.patch
new file mode 100644
index 0000000..13dd91e
--- /dev/null
+++ b/dev-libs/zthread/files/zthread-2.3.2-clang.patch
@@ -0,0 +1,16 @@
+fix compile when using clang as $CC:
+
+Based on patch from https://bugs.launchpad.net/hugin/+bug/1213585 (rebased)
+
+diff -r 2a43e83684d5 src/foreign/zthread/include/zthread/Guard.h
+--- a/include/zthread/Guard.h Sat Aug 10 11:31:46 2013 +0200
++++ b/include/zthread/Guard.h Sun Aug 18 09:46:43 2013 +0200
+@@ -108,7 +108,7 @@
+ }
+
+ template <class LockType>
+- static void createScope(LockHolder<LockType>& l, unsigned long ms) {
++ static bool createScope(LockHolder<LockType>& l, unsigned long ms) {
+
+ if(Scope1::createScope(l, ms))
+ if(!Scope2::createScope(l, ms)) {
diff --git a/dev-libs/zthread/files/zthread-2.3.2-no-fpermissive-r1.diff b/dev-libs/zthread/files/zthread-2.3.2-no-fpermissive-r1.diff
new file mode 100644
index 0000000..94b42ee
--- /dev/null
+++ b/dev-libs/zthread/files/zthread-2.3.2-no-fpermissive-r1.diff
@@ -0,0 +1,94 @@
+--- a/include/zthread/Guard.h 2008-07-22 14:46:28.000000000 +0200
++++ b/include/zthread/Guard.h 2008-07-22 14:51:41.000000000 +0200
+@@ -491,7 +491,7 @@
+
+ try {
+
+- if(!isDisabled())
++ if(!LockHolder<LockType>::isDisabled())
+ LockingPolicy::destroyScope(*this);
+
+ } catch (...) { /* ignore */ }
+--- a/src/MutexImpl.h 2008-07-22 14:54:40.000000000 +0200
++++ b/src/MutexImpl.h 2008-07-22 15:03:30.000000000 +0200
+@@ -153,7 +153,7 @@
+
+ _owner = self;
+
+- ownerAcquired(self);
++ MutexImpl<List,Behavior>::ownerAcquired(self);
+
+ }
+
+@@ -164,7 +164,7 @@
+ _waiters.insert(self);
+ m.acquire();
+
+- waiterArrived(self);
++ MutexImpl<List, Behavior>::waiterArrived(self);
+
+ {
+
+@@ -173,7 +173,7 @@
+
+ }
+
+- waiterDeparted(self);
++ MutexImpl<List, Behavior>::waiterDeparted(self);
+
+ m.release();
+
+@@ -192,7 +192,7 @@
+ assert(_owner == 0);
+ _owner = self;
+
+- ownerAcquired(self);
++ MutexImpl<List, Behavior>::ownerAcquired(self);
+
+ break;
+
+@@ -236,7 +236,7 @@
+
+ _owner = self;
+
+- ownerAcquired(self);
++ MutexImpl<List, Behavior>::ownerAcquired(self);
+
+ }
+
+@@ -253,7 +253,7 @@
+
+ m.acquire();
+
+- waiterArrived(self);
++ MutexImpl<List, Behavior>:: waiterArrived(self);
+
+ {
+
+@@ -262,7 +262,7 @@
+
+ }
+
+- waiterDeparted(self);
++ MutexImpl<List, Behavior>::waiterDeparted(self);
+
+ m.release();
+
+@@ -284,7 +284,7 @@
+ assert(0 == _owner);
+ _owner = self;
+
+- ownerAcquired(self);
++ MutexImpl<List, Behavior>::ownerAcquired(self);
+
+ break;
+
+@@ -326,7 +326,7 @@
+
+ _owner = 0;
+
+- ownerReleased(impl);
++ MutexImpl<List, Behavior>::ownerReleased(impl);
+
+ // Try to find a waiter with a backoff & retry scheme
+ for(;;) {
diff --git a/dev-libs/zthread/zthread-2.3.2-r4.ebuild b/dev-libs/zthread/zthread-2.3.2-r4.ebuild
new file mode 100644
index 0000000..154f895
--- /dev/null
+++ b/dev-libs/zthread/zthread-2.3.2-r4.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools eutils
+
+MY_P="ZThread-${PV}"
+
+DESCRIPTION="platform-independent multi-threading and synchronization library for C++"
+HOMEPAGE="http://zthread.sourceforge.net/"
+SRC_URI="mirror://sourceforge/zthread/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~sparc ~x86"
+IUSE="debug doc kernel_linux static-libs"
+
+DEPEND="doc? ( app-doc/doxygen )"
+RDEPEND=""
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-no-fpermissive-r1.diff
+ "${FILESDIR}"/${P}-m4-quote.patch
+ "${FILESDIR}"/${P}-automake-r2.patch
+ "${FILESDIR}"/${P}-gcc47.patch
+ "${FILESDIR}"/${P}-clang.patch
+)
+
+src_prepare() {
+ default
+
+ rm -f include/zthread/{.Barrier.h.swp,Barrier.h.orig} || die
+
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die #467778
+
+ AT_M4DIR="share" eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable kernel_linux atomic-linux) \
+ $(use_enable static-libs static)
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ doxygen doc/zthread.doxygen || die
+ sed -i -e 's|href="html/|href="|' doc/documentation.html || die
+ cp doc/documentation.html doc/html/index.html || die
+ cp doc/{zthread.css,bugs.js} doc/html/ || die
+ fi
+}
+
+src_install() {
+ default
+
+ use doc && dodoc -r doc/html
+
+ prune_libtool_files
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/zthread/, dev-libs/zthread/files/
@ 2022-12-07 14:34 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-12-07 14:34 UTC (permalink / raw
To: gentoo-commits
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() {
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-07 14:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-07 14:34 [gentoo-commits] repo/gentoo:master commit in: dev-libs/zthread/, dev-libs/zthread/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2016-06-02 21:43 Austin English
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox