dev-libs/cJSON: Sync with Gentoo

It's from Gentoo commit 9a76946471fb12725e061dc3ab5a7c7c63988cc0.

Signed-off-by: Flatcar Buildbot <buildbot@flatcar-linux.org>
This commit is contained in:
Flatcar Buildbot 2025-09-22 07:06:38 +00:00 committed by Krzesimir Nowak
parent f9d714a774
commit aa23aba608
2 changed files with 35 additions and 0 deletions

View File

@ -1 +1,2 @@
DIST cJSON-1.7.18.tar.gz 354726 BLAKE2B 293c483ed39028a23a49994698be69de16274500298893711d5767c381f51802c52f4981e074b26fd9174c186f9874fdc1811f49272c1b90f8fb82a1a315db60 SHA512 2accb507c6b97222eb5f0232c015b356cf6d248d1247049928731aa8e897378245e62395c232b1ec57d28d1e53ac72c849be85e59c33616a382d40473649f66b
DIST cJSON-1.7.19.tar.gz 356247 BLAKE2B d668290f2a9de4a5a38ddfee3999f5d49947e79bfb0a8701cbad836b131bb29f2ddc8ea00a10956bcd81d8bf25d0fc7b4ec46beaed185dfbd053c685db213bd8 SHA512 7b22bdd05b8e0bf8b24ab79db128dbab9f8c2c167f4b1d3073922b8ff1e0f0e8917322283d6d4091002f014f42692984f4f641761f05965d3b66fb3eca14dc46

View File

@ -0,0 +1,34 @@
# Copyright 2021-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="Ultralightweight JSON parser in ANSI C"
HOMEPAGE="https://github.com/DaveGamble/cJSON"
SRC_URI="https://github.com/DaveGamble/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
PATCHES=(
"${FILESDIR}"/1.7.18-cmake4.patch
)
src_prepare() {
cmake_src_prepare
sed -i -e '/-Werror/d' CMakeLists.txt || die
}
src_configure() {
local mycmakeargs=(
-DENABLE_CJSON_TEST=$(usex test)
)
cmake_src_configure
}