commit:     928e7516633961347e996d8565560678995f7500
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Wed Jul 20 11:56:27 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Aug 23 05:34:18 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=928e7516

dev-cpp/valijson: new package

Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-cpp/valijson/Manifest            |  1 +
 dev-cpp/valijson/metadata.xml        | 15 ++++++++++++++
 dev-cpp/valijson/valijson-0.6.ebuild | 40 ++++++++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+)

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>hol...@applied-asynchrony.com</email>
+               <name>Holger Hoffstätte</name>
+       </maintainer>
+       <maintainer type="project" proxied="proxy">
+               <email>proxy-ma...@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/*
+}

Reply via email to