summaryrefslogtreecommitdiff
path: root/dev-libs/json-c/json-c-0.14-r2.ebuild
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2020-05-12 16:58:39 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-05-14 23:43:36 +0200
commitbff018bc9e26a181b25250edd90192b22736fd02 (patch)
tree2b941b424781c7924b5fd89245e9060f4c7665d1 /dev-libs/json-c/json-c-0.14-r2.ebuild
parent77d172cb5dc95ab4748cb7d071b193322a566f15 (diff)
downloadgentoo-bff018bc9e26a181b25250edd90192b22736fd02.tar.gz
gentoo-bff018bc9e26a181b25250edd90192b22736fd02.tar.bz2
gentoo-bff018bc9e26a181b25250edd90192b22736fd02.zip
dev-libs/json-c: fix security vulnerabilities
Prevent integer overflow and out of boundary write on malicious input. Closes: https://bugs.gentoo.org/722150 Package-Manager: Portage-2.3.89, Repoman-2.3.20 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/15767 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-libs/json-c/json-c-0.14-r2.ebuild')
-rw-r--r--dev-libs/json-c/json-c-0.14-r2.ebuild53
1 files changed, 53 insertions, 0 deletions
diff --git a/dev-libs/json-c/json-c-0.14-r2.ebuild b/dev-libs/json-c/json-c-0.14-r2.ebuild
new file mode 100644
index 000000000000..19454d4c9406
--- /dev/null
+++ b/dev-libs/json-c/json-c-0.14-r2.ebuild
@@ -0,0 +1,53 @@
+# 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 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="doc static-libs threads"
+
+PATCHES=(
+ "${FILESDIR}/${P}_cmake-static-libs.patch"
+ "${FILESDIR}/${P}_security-fix.patch"
+)
+
+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)
+ -DBUILD_STATIC_LIBS=$(usex static-libs)
+ -DDISABLE_WERROR=ON
+ -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
+}