You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-libs/json-c/json-c-0.15.ebuild

51 lines
1.1 KiB

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
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_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
}