summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin English <wizardedit@gentoo.org>2016-06-02 01:41:15 -0500
committerAustin English <wizardedit@gentoo.org>2016-06-02 16:42:15 -0500
commit5f3562b328dcadeb4f73863bac2128a67df87eda (patch)
tree7b22be6941fbb6bf500df8eef8f1c01dd8419391 /dev-libs/zthread
parentgames-util/nml: remove python_3_5 for now until dev-python/ply has a python_3... (diff)
downloadgentoo-5f3562b328dcadeb4f73863bac2128a67df87eda.tar.gz
gentoo-5f3562b328dcadeb4f73863bac2128a67df87eda.tar.bz2
gentoo-5f3562b328dcadeb4f73863bac2128a67df87eda.zip
dev-libs/zthread: fix building with clang
Gentoo-Bug: https://bugs.gentoo.org/506934 Reviewed-By: David Seifert <soap@gentoo.org> Package-Manager: portage-2.2.26
Diffstat (limited to 'dev-libs/zthread')
-rw-r--r--dev-libs/zthread/files/zthread-2.3.2-clang.patch16
-rw-r--r--dev-libs/zthread/files/zthread-2.3.2-no-fpermissive-r1.diff94
-rw-r--r--dev-libs/zthread/zthread-2.3.2-r4.ebuild67
3 files changed, 177 insertions, 0 deletions
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 000000000000..13dd91ea2ca5
--- /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 000000000000..94b42eedfbf3
--- /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 000000000000..154f895fe359
--- /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
+}