mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 13:20:08 +02:00
x86_64 is used as a baseline: the "x86_64" entry, whatever status it has, is transformed into "all", and then the other entries in ARCHITECTURES either dropped or rearranged appropriately.
77 lines
1.9 KiB
Bash
77 lines
1.9 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="1"
|
|
SOURCE_URI="https://github.com/open-source-parsers/jsoncpp/archive/$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="e34a628a8142643b976c7233ef381457efad79468c67cb1ae0b83a33d7493999"
|
|
SOURCE_FILENAME="jsoncpp-$portVersion.tar.gz"
|
|
PATCHES="jsoncpp-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="all !x86_gcc2 ?x86"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
libVersion="24"
|
|
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:python2
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
for i in shared static; do
|
|
meson --prefix="$prefix" --libdir="$libDir" --includedir="$includeDir" \
|
|
--buildtype release \
|
|
--default-library $i . build-$i
|
|
ninja -C build-$i $jobArgs
|
|
done
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
ninja -C build-shared install
|
|
ninja -C build-static install
|
|
|
|
prepareInstalledDevelLib libjsoncpp
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
LIBRARY_PATH="$sourceDir/build-shared${LIBRARY_PATH:+:$LIBRARY_PATH}" \
|
|
ninja -C build-shared test
|
|
}
|