nlohmann_json, bump version, kudos to nephele (#5501)

This commit is contained in:
Schrijvers Luc
2020-12-22 13:02:33 +01:00
committed by GitHub
parent 6c4d8da541
commit 2754f0bb81
2 changed files with 42 additions and 32 deletions

View File

@@ -1,32 +0,0 @@
SUMMARY="JSON library for Modern C++"
DESCRIPTION="One-header JSON library with intuitive syntax."
HOMEPAGE="https://github.com/nlohmann/json"
COPYRIGHT="2013-2018 Niels Lohmann"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/nlohmann/json/releases/download/v$portVersion/json.hpp#noarchive"
CHECKSUM_SHA256="63da6d1f22b2a7bb9e4ff7d6b255cf691a161ff49532dcc45d398a53e295835f"
ARCHITECTURES="any"
PROVIDES="
nlohmann_json = $portVersion
devel:nlohmann_json = $portVersion
"
REQUIRES="
haiku_devel
"
BUILD_REQUIRES=""
BUILD_PREREQUIRES=""
BUILD()
{
true
}
INSTALL()
{
mkdir -p $includeDir/nlohmann
cp json.hpp $includeDir/nlohmann/json.hpp
}

View File

@@ -0,0 +1,42 @@
SUMMARY="JSON library for Modern C++"
DESCRIPTION="One-header JSON library with intuitive syntax."
HOMEPAGE="https://github.com/nlohmann/json"
COPYRIGHT="2013-2020 Niels Lohmann"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/nlohmann/json/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="4cf0df69731494668bdd6460ed8cb269b68de9c19ad8c27abc24cd72605b2d5b"
SOURCE_FILENAME="nlohmann-json.v$portVersion.tar.gz"
SOURCE_DIR="json-$portVersion/"
ARCHITECTURES="any"
PROVIDES="
nlohmann_json = $portVersion
devel:nlohmann_json = $portVersion
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:make
"
BUILD()
{
cmake $cmakeDirArgs -S. -Bbuild \
-DJSON_MultipleHeaders=ON \
-DJSON_BuildTests=OFF \
-DBUILD_TESTING=OFF \
-DCMAKE_CXX_COMPILER=/bin/true
}
INSTALL()
{
cmake --build build --target install
fixPkgconfig
#fix cmake
sed -i 's,\/include,/'${relativeIncludeDir}',g' \
$libDir/cmake/nlohmann_json/nlohmann_jsonTargets.cmake
}