Files
haikuports/dev-libs/json_c/json_c-0.15.recipe
Alexander von Gluck 47ea51f320 cmake/meson: Mass fix packages with broken debuginfo (#12822)
* cmake/debuginfo: Mass fix packages with broken debuginfo

* rtl_sdr: Fix trailing whitespace

* meson/debuginfo: Mass fix packages with broken debuginfo

* clean up conflicts

---------

Co-authored-by: Luc Schrijvers <begasus@gmail.com>
2026-01-07 17:36:21 +01:00

83 lines
1.9 KiB
Bash

SUMMARY="A JSON implementation in C"
DESCRIPTION="JSON-C implements a reference counting object model that allows \
you to easily construct JSON objects in C, output them as JSON formatted \
strings and parse JSON formatted strings back into the C representation of \
JSON objects."
HOMEPAGE="https://github.com/json-c/json-c/wiki"
COPYRIGHT="2009-2012, 2016-2017 Eric Haszlakiewicz
2004-2005, 2013 Metaparadigm Pte. Ltd.
2009-2012 Hewlett-Packard Development Company, L.P.
2008-2009 Yahoo! Inc.
2016 Alexandru Ardelean"
LICENSE="MIT"
REVISION="4"
SOURCE_URI="https://s3.amazonaws.com/json-c_releases/releases/json-c-$portVersion.tar.gz"
CHECKSUM_SHA256="b8d80a1ddb718b3ba7492916237bbf86609e9709fb007e7f7d4322f02341a4c6"
SOURCE_DIR="json-c-$portVersion"
PATCHES="json_c-$portVersion.patchset"
ARCHITECTURES="all ?x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="5.1.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
json_c$secondaryArchSuffix = $portVersion
lib:libjson_c$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
json_c${secondaryArchSuffix}_devel = $portVersion
devel:libjson_c$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
json_c$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
TEST_REQUIRES="
cmd:cmp
"
defineDebugInfoPackage json_c$secondaryArchSuffix \
$libDir/libjson-c.so.$libVersion
BUILD()
{
cmake -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo \
$cmakeDirArgs . \
-DENABLE_THREADING=ON \
-DENABLE_RDRAND=OFF \
-DBUILD_STATIC_LIBS=OFF
cmake --build build $jobArgs
}
INSTALL()
{
cmake --build build --target install
prepareInstalledDevelLib libjson-c
fixPkgconfig
packageEntries devel $developDir $libDir/cmake
}
TEST()
{
cmake --build build --target test
}