jsoncpp, revbump disable not used cmd:python (#10131)

This commit is contained in:
Schrijvers Luc
2024-02-22 11:23:44 +00:00
committed by GitHub
parent ec60527f20
commit e890d96585
4 changed files with 8 additions and 100 deletions

View File

@@ -6,7 +6,7 @@ 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="2"
REVISION="3"
SOURCE_URI="https://github.com/open-source-parsers/jsoncpp/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="f409856e5920c18d0c2fb85276e24ee607d2a09b5e7d5f0a371368903c275da2"
SOURCE_FILENAME="jsoncpp-$portVersion.tar.gz"
@@ -42,7 +42,7 @@ BUILD_PREREQUIRES="
cmd:meson
cmd:ninja
cmd:pkg_config$secondaryArchSuffix
cmd:python2
# cmd:python3
"
BUILD()

View File

@@ -1,67 +0,0 @@
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="77a402fb577b2e0e5d0bdc1cf9c65278915cdb25171e3452c68b6da8a561f8f0"
SOURCE_DIR="jsoncpp-$portVersion"
SOURCE_FILENAME="jsoncpp-$portVersion.tar.gz"
PATCHES="jsoncpp-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86"
libVersion="22"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
jsoncpp22$secondaryArchSuffix = $portVersion
lib:libjsoncpp$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
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
rm -rf $developDir
}
TEST()
{
LIBRARY_PATH="$sourceDir/build-shared${LIBRARY_PATH:+:$LIBRARY_PATH}" \
ninja -C build-shared test
}

View File

@@ -6,7 +6,7 @@ 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"
REVISION="2"
SOURCE_URI="https://github.com/open-source-parsers/jsoncpp/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="e34a628a8142643b976c7233ef381457efad79468c67cb1ae0b83a33d7493999"
SOURCE_DIR="jsoncpp-$portVersion"
@@ -37,23 +37,20 @@ BUILD_PREREQUIRES="
cmd:meson
cmd:ninja
cmd:pkg_config$secondaryArchSuffix
cmd:python2
# cmd:python3
"
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
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
ninja -C build-static install
prepareInstalledDevelLib libjsoncpp
fixPkgconfig

View File

@@ -1,22 +0,0 @@
From bb65fc8bc61a9af3063f3bbb9cc55ed8313d4b1c Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 20 Mar 2020 17:54:32 +0100
Subject: protect EOF
diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp
index 0c1e88d..a8957a8 100644
--- a/src/lib_json/json_reader.cpp
+++ b/src/lib_json/json_reader.cpp
@@ -107,7 +107,7 @@ bool Reader::parse(std::istream& is, Value& root, bool collectComments) {
// Since String is reference-counted, this at least does not
// create an extra copy.
String doc;
- std::getline(is, doc, static_cast<char> EOF);
+ std::getline(is, doc, static_cast<char> (EOF));
return parse(doc.data(), doc.data() + doc.size(), root, collectComments);
}
--
2.24.0