summaryrefslogtreecommitdiff
path: root/dev-libs/json-c/json-c-0.16-r1.ebuild
diff options
context:
space:
mode:
authorJakov Smolić <jsmolic@gentoo.org>2022-04-28 08:50:06 +0200
committerJakov Smolić <jsmolic@gentoo.org>2022-04-28 08:53:58 +0200
commit88b6a5ef36144818e4376da7dd8e7a368d995aff (patch)
treee17fdd201385b9f8b2cb23863e42561cc4aa8efb /dev-libs/json-c/json-c-0.16-r1.ebuild
parent9e61f94f5b32ca9adb0cd0dab130dd79b5680a34 (diff)
downloadgentoo-88b6a5ef36144818e4376da7dd8e7a368d995aff.tar.gz
gentoo-88b6a5ef36144818e4376da7dd8e7a368d995aff.tar.bz2
gentoo-88b6a5ef36144818e4376da7dd8e7a368d995aff.zip
dev-libs/json-c: Drop automagic libbsd dependency
The only use of libbsd seems to be for additional arc4random function, so let's entirely avoid depending on libbsd. Closes: https://bugs.gentoo.org/841401 Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
Diffstat (limited to 'dev-libs/json-c/json-c-0.16-r1.ebuild')
-rw-r--r--dev-libs/json-c/json-c-0.16-r1.ebuild51
1 files changed, 51 insertions, 0 deletions
diff --git a/dev-libs/json-c/json-c-0.16-r1.ebuild b/dev-libs/json-c/json-c-0.16-r1.ebuild
new file mode 100644
index 000000000000..fc5db4844302
--- /dev/null
+++ b/dev-libs/json-c/json-c-0.16-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+CMAKE_ECLASS=cmake
+inherit cmake-multilib
+
+DESCRIPTION="A JSON implementation in C"
+HOMEPAGE="https://github.com/json-c/json-c/wiki"
+SRC_URI="https://s3.amazonaws.com/json-c_releases/releases/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/5"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="cpu_flags_x86_rdrand doc static-libs threads"
+
+BDEPEND="doc? ( >=app-doc/doxygen-1.8.13 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/json-c/config.h
+)
+
+src_prepare() {
+ cmake_src_prepare
+}
+
+multilib_src_configure() {
+ local mycmakeargs=(
+ -DBUILD_STATIC_LIBS=$(usex static-libs)
+ -DDISABLE_EXTRA_LIBS=ON
+ -DDISABLE_WERROR=ON
+ -DENABLE_RDRAND=$(usex cpu_flags_x86_rdrand)
+ -DENABLE_THREADING=$(usex threads)
+ )
+
+ 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
+}