summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Hoffstätte <holger@applied-asynchrony.com>2022-07-20 13:56:27 +0200
committerSam James <sam@gentoo.org>2022-08-23 06:34:18 +0100
commit928e7516633961347e996d8565560678995f7500 (patch)
treef6af7b59d49bc4944821ad2ba6b80042978f6711 /dev-cpp
parentdev-util/peda: new package, add 1.2, 9999 (diff)
downloadgentoo-928e7516633961347e996d8565560678995f7500.tar.gz
gentoo-928e7516633961347e996d8565560678995f7500.tar.bz2
gentoo-928e7516633961347e996d8565560678995f7500.zip
dev-cpp/valijson: new package
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/valijson/Manifest1
-rw-r--r--dev-cpp/valijson/metadata.xml15
-rw-r--r--dev-cpp/valijson/valijson-0.6.ebuild40
3 files changed, 56 insertions, 0 deletions
diff --git a/dev-cpp/valijson/Manifest b/dev-cpp/valijson/Manifest
new file mode 100644
index 000000000000..ab196e007f5b
--- /dev/null
+++ b/dev-cpp/valijson/Manifest
@@ -0,0 +1 @@
+DIST valijson-0.6.tar.gz 1881386 BLAKE2B 1dd7783e10f7d362673bd2b80920c911cca194068078ac1411897b212600032bc15ffe10dbb62c27e54d168a1c634d73ee40b394e4d534e72224694ec662e0a6 SHA512 a493d17159e479be7fe29d45c610c7d4fdd2c2f9ba897923129734fb07257dbb41fddde4c4263dbf0aa5c7101cd1555568a048beba2f60d2b32e625dd9690749
diff --git a/dev-cpp/valijson/metadata.xml b/dev-cpp/valijson/metadata.xml
new file mode 100644
index 000000000000..fbe60ab1e518
--- /dev/null
+++ b/dev-cpp/valijson/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>holger@applied-asynchrony.com</email>
+ <name>Holger Hoffstätte</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">tristanpenman/valijson</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-cpp/valijson/valijson-0.6.ebuild b/dev-cpp/valijson/valijson-0.6.ebuild
new file mode 100644
index 000000000000..879b255f1760
--- /dev/null
+++ b/dev-cpp/valijson/valijson-0.6.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="Header-only C++ library for JSON Schema validation"
+HOMEPAGE="https://github.com/tristanpenman/valijson"
+SRC_URI="https://github.com/tristanpenman/valijson/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+src_configure() {
+ local mycmakeargs=(
+ -Dvalijson_BUILD_TESTS=$(usex test)
+ )
+
+ if use test; then
+ sed -i -e "s:../tests/data/documents/:../${P}/tests/data/documents/:" tests/test_adapter_comparison.cpp || die
+ sed -i -e "s:../tests/data:../${P}/tests/data:" tests/test_validation_errors.cpp || die
+ sed -i -e "s:../thirdparty/:../${P}/thirdparty/:" -e "s:../doc/schema/:../${P}/doc/schema/:" tests/test_validator.cpp || die
+ fi
+
+ cmake_src_configure
+}
+
+src_test() {
+ cd "${BUILD_DIR}" || die
+ ./test_suite || die
+}
+
+src_install() {
+ # there is no target for installing headers, so do it manually
+ doheader -r include/*
+}