summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@gmx.de>2018-12-22 10:03:35 +0100
committerSven Eden <sven.eden@gmx.de>2018-12-22 10:16:02 +0100
commit07b1017076a2b12e5f68f9c1f9e4e74875456bb9 (patch)
tree78af78c5e63666d95fdb888510afd327fe196637 /dev-cpp/pwxlib/pwxlib-9999.ebuild
parentmedia-gfx/makeSimplexTexture: Hotfix live ebuild (diff)
downloadseden-07b1017076a2b12e5f68f9c1f9e4e74875456bb9.tar.gz
seden-07b1017076a2b12e5f68f9c1f9e4e74875456bb9.tar.bz2
seden-07b1017076a2b12e5f68f9c1f9e4e74875456bb9.zip
dev-cpp/pwxlib: Add live ebuild
Signed-Off-By: Sven Eden <sven.eden@gmx.de> Package-Manager: Portage-2.3.52, Repoman-2.3.12
Diffstat (limited to 'dev-cpp/pwxlib/pwxlib-9999.ebuild')
-rw-r--r--dev-cpp/pwxlib/pwxlib-9999.ebuild101
1 files changed, 101 insertions, 0 deletions
diff --git a/dev-cpp/pwxlib/pwxlib-9999.ebuild b/dev-cpp/pwxlib/pwxlib-9999.ebuild
new file mode 100644
index 0000000..336849e
--- /dev/null
+++ b/dev-cpp/pwxlib/pwxlib-9999.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit flag-o-matic git-r3 meson
+
+DESCRIPTION="The PrydeWorX library of C++ workers, tools and utilities"
+HOMEPAGE="https://pwxlib.prydeworx.com"
+EGIT_REPO_URI="https://github.com/Yamakuzure/pwxlib.git"
+EGIT_BRANCH="master"
+EGIT_SUBMODULES=()
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE="annotations asan debug debug-thread doc lsan profile +spinlocks test
+torture tsan +yielding"
+
+REQUIRED_USE="
+ ?? ( annotations debug-thread )
+ ?? ( asan lsan tsan )
+ annotations? ( !spinlocks !yielding )
+ asan? ( debug )
+ lsan? ( debug )
+ profile? ( !debug !debug-thread )
+ tsan? ( debug )
+ yielding? ( spinlocks )
+"
+COMMON_DEPEND="
+ debug-thread? ( dev-util/valgrind )
+"
+DEPEND="${COMMON_DEPEND}
+ doc? ( app-doc/doxygen )
+ >=sys-devel/gcc-8.2.0
+ virtual/pkgconfig
+"
+RDEPEND="${COMMON_DEPEND}"
+
+src_configure() {
+ local b_san
+
+ # Duplicating C[XX]FLAGS in LDFLAGS is deprecated and will become
+ # a hard error in future meson versions:
+ filter-ldflags $CFLAGS $CXXFLAGS
+
+ # See what kind of sanitization is wanted
+ if use asan; then
+ export ASAN_OPTIONS=detect_leaks=0
+ b_san="-Db_sanitize=address"
+ elif use lsan; then
+ export ASAN_OPTIONS=detect_leaks=1
+ b_san="-Db_sanitize=address"
+ elif use tsan; then
+ b_san="-Db_sanitize=thread"
+ fi
+
+ local emesonargs=(
+ -Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
+ --buildtype $(usex debug debug release)
+ --libdir="${EPREFIX}"/usr/$(get_libdir)
+ -Dannotations=$(usex annotations true false)
+ -Ddebug-extra=$(usex debug true false)
+ -Ddebug-thread=$(usex debug-thread true false)
+ -Dhtml=$(usex doc true false)
+ -Dinstall-tests=$(usex test true false)
+ -Dprofile=$(usex profile true false)
+ -Dspinlocks=$(usex spinlocks true false)
+ -Dtests=$(usex test true false)
+ -Dtorture=$(usex torture true false)
+ -Dyielding=$(usex yielding true false)
+ $b_san
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ DOCS=(
+ AUTHORS
+ ChangeLog
+ code_of_conduct.md
+ CONTRIBUTING.md
+ INSTALL.md
+ LICENSE
+ NEWS.md
+ README.md
+ TODO.md
+ )
+
+ meson_src_install
+}
+
+pkg_postinst() {
+ if use debug-thread; then
+ ewarn "You have enabled USE=\"debug-thread\""
+ ewarn "This flag enables an excessive amount of debug"
+ ewarn "messages, which are only useful if you work on"
+ ewarn "the multi-threading code of pwxlib itself."
+ fi
+}