summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnssi Jaatinen <hofnarr@hofnarr.fi>2020-05-08 09:58:30 +0300
committerJoonas Niilola <juippis@gentoo.org>2020-05-12 16:57:13 +0300
commit8f0f8e145c8d9f2cf52725ecc1d7b7a4f3977239 (patch)
tree50f7f285be68897ede532a9a3a9f23eda4f753d2
parentdev-libs/json-c: add patch for static-libs support (diff)
downloadgentoo-8f0f8e145c8d9f2cf52725ecc1d7b7a4f3977239.tar.gz
gentoo-8f0f8e145c8d9f2cf52725ecc1d7b7a4f3977239.tar.bz2
gentoo-8f0f8e145c8d9f2cf52725ecc1d7b7a4f3977239.zip
dev-libs/json-c: add live ebuild
Signed-off-by: Anssi Jaatinen <hofnarr@hofnarr.fi> Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: Luka Perkov <luka.perkov@sartura.hr> Closes: https://github.com/gentoo/gentoo/pull/15586 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--dev-libs/json-c/json-c-9999.ebuild47
1 files changed, 47 insertions, 0 deletions
diff --git a/dev-libs/json-c/json-c-9999.ebuild b/dev-libs/json-c/json-c-9999.ebuild
new file mode 100644
index 000000000000..eac441be4e78
--- /dev/null
+++ b/dev-libs/json-c/json-c-9999.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_ECLASS=cmake
+inherit cmake-multilib git-r3
+
+DESCRIPTION="A JSON implementation in C"
+HOMEPAGE="https://github.com/json-c/json-c/wiki"
+EGIT_REPO_URI="https://github.com/json-c/json-c.git"
+
+LICENSE="MIT"
+SLOT="0/5"
+IUSE="doc static-libs threads"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/json-c/config.h
+)
+
+src_prepare() {
+ cmake_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DBUILD_DOCUMENTATION=$(multilib_native_usex doc)
+ -DDISABLE_WERROR=ON
+ -DENABLE_THREADING=$(usex threads)
+ -DBUILD_STATIC_LIBS=$(usex static-libs)
+ )
+
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_src_compile
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && cmake_src_test
+}
+
+multilib_src_install_all() {
+ use doc && HTML_DOCS=( "${S}"/doc/html/. )
+ einstalldocs
+}