Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/valijson/
Date: Tue, 23 Aug 2022 05:34:46
Message-Id: 1661232858.928e7516633961347e996d8565560678995f7500.sam@gentoo
1 commit: 928e7516633961347e996d8565560678995f7500
2 Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
3 AuthorDate: Wed Jul 20 11:56:27 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 23 05:34:18 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=928e7516
7
8 dev-cpp/valijson: new package
9
10 Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 dev-cpp/valijson/Manifest | 1 +
14 dev-cpp/valijson/metadata.xml | 15 ++++++++++++++
15 dev-cpp/valijson/valijson-0.6.ebuild | 40 ++++++++++++++++++++++++++++++++++++
16 3 files changed, 56 insertions(+)
17
18 diff --git a/dev-cpp/valijson/Manifest b/dev-cpp/valijson/Manifest
19 new file mode 100644
20 index 000000000000..ab196e007f5b
21 --- /dev/null
22 +++ b/dev-cpp/valijson/Manifest
23 @@ -0,0 +1 @@
24 +DIST valijson-0.6.tar.gz 1881386 BLAKE2B 1dd7783e10f7d362673bd2b80920c911cca194068078ac1411897b212600032bc15ffe10dbb62c27e54d168a1c634d73ee40b394e4d534e72224694ec662e0a6 SHA512 a493d17159e479be7fe29d45c610c7d4fdd2c2f9ba897923129734fb07257dbb41fddde4c4263dbf0aa5c7101cd1555568a048beba2f60d2b32e625dd9690749
25
26 diff --git a/dev-cpp/valijson/metadata.xml b/dev-cpp/valijson/metadata.xml
27 new file mode 100644
28 index 000000000000..fbe60ab1e518
29 --- /dev/null
30 +++ b/dev-cpp/valijson/metadata.xml
31 @@ -0,0 +1,15 @@
32 +<?xml version="1.0" encoding="UTF-8"?>
33 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
34 +<pkgmetadata>
35 + <maintainer type="person" proxied="yes">
36 + <email>holger@××××××××××××××××××.com</email>
37 + <name>Holger Hoffstätte</name>
38 + </maintainer>
39 + <maintainer type="project" proxied="proxy">
40 + <email>proxy-maint@g.o</email>
41 + <name>Proxy Maintainers</name>
42 + </maintainer>
43 + <upstream>
44 + <remote-id type="github">tristanpenman/valijson</remote-id>
45 + </upstream>
46 +</pkgmetadata>
47
48 diff --git a/dev-cpp/valijson/valijson-0.6.ebuild b/dev-cpp/valijson/valijson-0.6.ebuild
49 new file mode 100644
50 index 000000000000..879b255f1760
51 --- /dev/null
52 +++ b/dev-cpp/valijson/valijson-0.6.ebuild
53 @@ -0,0 +1,40 @@
54 +# Copyright 1999-2022 Gentoo Authors
55 +# Distributed under the terms of the GNU General Public License v2
56 +
57 +EAPI=8
58 +
59 +inherit cmake
60 +
61 +DESCRIPTION="Header-only C++ library for JSON Schema validation"
62 +HOMEPAGE="https://github.com/tristanpenman/valijson"
63 +SRC_URI="https://github.com/tristanpenman/valijson/archive/v${PV}.tar.gz -> ${P}.tar.gz"
64 +
65 +LICENSE="BSD-2"
66 +SLOT="0"
67 +KEYWORDS="~amd64 ~arm64 ~x86"
68 +IUSE="test"
69 +RESTRICT="!test? ( test )"
70 +
71 +src_configure() {
72 + local mycmakeargs=(
73 + -Dvalijson_BUILD_TESTS=$(usex test)
74 + )
75 +
76 + if use test; then
77 + sed -i -e "s:../tests/data/documents/:../${P}/tests/data/documents/:" tests/test_adapter_comparison.cpp || die
78 + sed -i -e "s:../tests/data:../${P}/tests/data:" tests/test_validation_errors.cpp || die
79 + sed -i -e "s:../thirdparty/:../${P}/thirdparty/:" -e "s:../doc/schema/:../${P}/doc/schema/:" tests/test_validator.cpp || die
80 + fi
81 +
82 + cmake_src_configure
83 +}
84 +
85 +src_test() {
86 + cd "${BUILD_DIR}" || die
87 + ./test_suite || die
88 +}
89 +
90 +src_install() {
91 + # there is no target for installing headers, so do it manually
92 + doheader -r include/*
93 +}