From 2754f0bb81f7c494a95dd02e4e3d958cc56643e2 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Tue, 22 Dec 2020 13:02:33 +0100 Subject: [PATCH] nlohmann_json, bump version, kudos to nephele (#5501) --- .../nlohmann_json/nlohmann_json-3.4.0.recipe | 32 -------------- .../nlohmann_json/nlohmann_json-3.9.1.recipe | 42 +++++++++++++++++++ 2 files changed, 42 insertions(+), 32 deletions(-) delete mode 100644 dev-libs/nlohmann_json/nlohmann_json-3.4.0.recipe create mode 100644 dev-libs/nlohmann_json/nlohmann_json-3.9.1.recipe diff --git a/dev-libs/nlohmann_json/nlohmann_json-3.4.0.recipe b/dev-libs/nlohmann_json/nlohmann_json-3.4.0.recipe deleted file mode 100644 index a2c252216..000000000 --- a/dev-libs/nlohmann_json/nlohmann_json-3.4.0.recipe +++ /dev/null @@ -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 -} diff --git a/dev-libs/nlohmann_json/nlohmann_json-3.9.1.recipe b/dev-libs/nlohmann_json/nlohmann_json-3.9.1.recipe new file mode 100644 index 000000000..4f7873a5d --- /dev/null +++ b/dev-libs/nlohmann_json/nlohmann_json-3.9.1.recipe @@ -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 +}