Files
haikuports/dev-libs/jsoncpp/jsoncpp-1.9.5.recipe
2024-02-22 12:23:44 +01:00

73 lines
1.8 KiB
Bash

SUMMARY="A C++ library for interacting with JSON"
DESCRIPTION="JsonCpp is a C++ library that allows manipulating JSON values, \
including serialization and deserialization to and from strings. It can also \
preserve existing comment in unserialization/serialization steps, making it a \
convenient format to store user input files."
HOMEPAGE="https://github.com/open-source-parsers/jsoncpp"
COPYRIGHT="2007-2018 Baptiste Lepilleur and The JsonCpp Authors"
LICENSE="MIT"
REVISION="3"
SOURCE_URI="https://github.com/open-source-parsers/jsoncpp/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="f409856e5920c18d0c2fb85276e24ee607d2a09b5e7d5f0a371368903c275da2"
SOURCE_FILENAME="jsoncpp-$portVersion.tar.gz"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
libVersion="25"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
jsoncpp$secondaryArchSuffix = $portVersion
lib:libjsoncpp$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
jsoncpp${secondaryArchSuffix}_devel = $portVersion
devel:libjsoncpp$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
jsoncpp$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:meson
cmd:ninja
cmd:pkg_config$secondaryArchSuffix
# cmd:python3
"
BUILD()
{
meson --prefix="$prefix" --libdir="$libDir" --includedir="$includeDir" \
--buildtype release \
--default-library shared . build-shared
ninja -C build-shared $jobArgs
}
INSTALL()
{
ninja -C build-shared install
prepareInstalledDevelLib libjsoncpp
fixPkgconfig
# devel package
packageEntries devel \
$developDir
}
TEST()
{
LIBRARY_PATH="$sourceDir/build-shared${LIBRARY_PATH:+:$LIBRARY_PATH}" \
ninja -C build-shared test
}