valijson: Add recipe
PATCH v2 1/1 valijson: Add recipe
valijson is a header only c++ library for JSON
schema validation.
Signed-off-by James Feist <[email protected]>
---
Changes since v1:
- Fixed license
- Simplified symlink
- Removed extra whitespace
.../recipes-devtools/valijson/valijson_git.bb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 meta-oe/recipes-devtools/valijson/valijson_git.bb
meta-oe/recipes-devtools/valijson/valijson_git.bb new file +26 -0
@@ -0,0 +1,26 @@ +SUMMARY = "Header-only C++ library for JSON Schema validation" +HOMEPAGE = "https://github.com/tristanpenman/valijson" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=015106c62262b2383f6c72063f0998f2" + +SRC_URI = "git://github.com/tristanpenman/valijson.git" +PV = "0.1+git${SRCPV}" + +SRCREV = "c2f22fddf599d04dc33fcd7ed257c698a05345d9" + +S = "${WORKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE = "-DINSTALL_HEADERS=1 -DBUILD_TESTS=0" + +# valijson is a header only C++ library, so the main package will be empty. +RDEPENDS_${PN}-dev = "" + +BBCLASSEXTEND = "native nativesdk" + +# valijson expects json.hpp where nlohmann-json_git.bb installs +# nlohmann/json.hpp, this allows usage via json.hpp +do_install_append() { + ln -s nlohmann/json.hpp ${D}${includedir}/json.hpp +}
Signature · 1 line
2.17.1
Hi James
Quoted 37 lines · James Feist
valijson is a header only c++ library for JSON
schema validation.Signed-off-by James Feist <[email protected]>---
Changes since v1:
- Fixed license
- Simplified symlink
- Removed extra whitespace.../recipes-devtools/valijson/valijson_git.bb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 meta-oe/recipes-devtools/valijson/valijson_git.bbmeta-oe/recipes-devtools/valijson/valijson_git.bb new file +16
-0@@ -0,0 +1,26 @@ +SUMMARY = "Header-only C++ library for JSON Schema validation" +HOMEPAGE = "https://github.com/tristanpenman/valijson" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=015106c62262b2383f6c72063f0998f2" + +SRC_URI = "git://github.com/tristanpenman/valijson.git" +PV = "0.1+git${SRCPV}" + +SRCREV = "c2f22fddf599d04dc33fcd7ed257c698a05345d9" + +S = "${WORKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE = "-DINSTALL_HEADERS=1 -DBUILD_TESTS=0" +
meta-oe/recipes-devtools/valijson/valijson_git.bb line 26
Quoted 10 lines
meta-oe/recipes-devtools/valijson/valijson_git.bb new file +10
-0+# valijson is a header only C++ library, so the main package will be empty. +RDEPENDS_${PN}-dev = "" + +BBCLASSEXTEND = "native nativesdk" + +# valijson expects json.hpp where nlohmann-json_git.bb installs +# nlohmann/json.hpp, this allows usage via json.hpp +do_install_append() { + ln -s nlohmann/json.hpp ${D}${includedir}/json.hpp +}
its better to install this symlink in nlohmann-json package recipe since that will make sure that we do not have dangling symlinks in cases where this dependencies are not together.