dev-cpp/valijson: bump to 1.0

This also removes the test support since upstream has removed the vendored
test dependencies from the tarball in favor of git submodules.

Bug: https://bugs.gentoo.org/891683
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Closes: https://github.com/gentoo/gentoo/pull/29227
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
This commit is contained in:
Holger Hoffstätte
2023-02-08 14:19:40 +02:00
committed by Viorel Munteanu
parent 1a48f61a3b
commit 44f039de30
3 changed files with 102 additions and 0 deletions
+1
View File
@@ -1 +1,2 @@
DIST valijson-0.7.tar.gz 2060214 BLAKE2B d2e1c58e37213e44d7d6af173691cad3853e87648948c229ea683bfcba8b19256b0230852b0537c2dbdd7084fcf1ac068e320c5f59a69e446610390b82e76474 SHA512 662e53bf1cac4def19792392cda7cbfe2cbadf77b768eb69b2dec693b16f85f32fa2e9b97eae36569cfcc9ac45f1e6338967423cf415d6bcd90372bc49793a2d
DIST valijson-1.0.tar.gz 721078 BLAKE2B 74f4a061266a6ee8fba9d93b4e1df20dc828d85169f865bdb60ba9f5217ee422324a09788b02b4ddd18a92d906c64863a5bd7c1250f8bdb62fd9f00f3d73c7e7 SHA512 a206954b11e92cbebbebf094e6f0925a270ebd6bec49cbdb7adda5a4cec93587a5a61ebbce105846c3950cf5df74bfdd5f5bb1ffbf73315f45c7a6cda2b77db9
@@ -0,0 +1,77 @@
Patch from:
https://github.com/tristanpenman/valijson/commit/f1ff3518281fe347c97b78384d6bb645dbdd4788
From f1ff3518281fe347c97b78384d6bb645dbdd4788 Mon Sep 17 00:00:00 2001
From: Austin Haigh <austin.haigh@hach.com>
Date: Tue, 1 Nov 2022 13:29:16 -0600
Subject: [PATCH] fix typos in preprocessor macros
---
examples/valijson_nlohmann_bundled.hpp | 2 +-
include/valijson/utils/boost_json_utils.hpp | 4 ++--
include/valijson/utils/nlohmann_json_utils.hpp | 2 +-
include/valijson/utils/property_tree_utils.hpp | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/examples/valijson_nlohmann_bundled.hpp b/examples/valijson_nlohmann_bundled.hpp
index 806f329..915bebb 100644
--- a/examples/valijson_nlohmann_bundled.hpp
+++ b/examples/valijson_nlohmann_bundled.hpp
@@ -10561,7 +10561,7 @@ inline bool loadDocument(const std::string &path, nlohmann::json &document)
}
// Parse schema
-#if VALIJSON_USE_EXCEPTION
+#if VALIJSON_USE_EXCEPTIONS
try {
document = nlohmann::json::parse(file);
} catch (std::invalid_argument const& exception) {
diff --git a/include/valijson/utils/boost_json_utils.hpp b/include/valijson/utils/boost_json_utils.hpp
index 1168903..0fbd6c3 100644
--- a/include/valijson/utils/boost_json_utils.hpp
+++ b/include/valijson/utils/boost_json_utils.hpp
@@ -20,7 +20,7 @@ inline bool loadDocument(const std::string &path, boost::json::value &document)
}
// Parse schema
-#if VALIJSON_USE_EXCEPTION
+#if VALIJSON_USE_EXCEPTIONS
try {
#endif
boost::json::error_code errorCode;
@@ -30,7 +30,7 @@ inline bool loadDocument(const std::string &path, boost::json::value &document)
std::cerr << "Boost.JSON parsing error: " << errorCode.message();
return false;
}
-#if VALIJSON_USE_EXCEPTION
+#if VALIJSON_USE_EXCEPTIONS
} catch (std::exception const & exception) {
std::cerr << "Boost.JSON parsing exception: " << exception.what();
return false;
diff --git a/include/valijson/utils/nlohmann_json_utils.hpp b/include/valijson/utils/nlohmann_json_utils.hpp
index b3cbe20..77e5771 100644
--- a/include/valijson/utils/nlohmann_json_utils.hpp
+++ b/include/valijson/utils/nlohmann_json_utils.hpp
@@ -20,7 +20,7 @@ inline bool loadDocument(const std::string &path, nlohmann::json &document)
}
// Parse schema
-#if VALIJSON_USE_EXCEPTION
+#if VALIJSON_USE_EXCEPTIONS
try {
document = nlohmann::json::parse(file);
} catch (std::invalid_argument const& exception) {
diff --git a/include/valijson/utils/property_tree_utils.hpp b/include/valijson/utils/property_tree_utils.hpp
index 2317f12..7438980 100644
--- a/include/valijson/utils/property_tree_utils.hpp
+++ b/include/valijson/utils/property_tree_utils.hpp
@@ -24,7 +24,7 @@
#include <valijson/utils/file_utils.hpp>
#include <valijson/exceptions.hpp>
-#if !VALIJSON_USE_EXCEPTION
+#if !VALIJSON_USE_EXCEPTIONS
namespace boost {
+24
View File
@@ -0,0 +1,24 @@
# Copyright 1999-2023 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 Boost-1.0"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~x86"
RESTRICT="test"
PATCHES=(
"${FILESDIR}"/${PV}-fix-macro-typos.patch
)
src_install() {
# there is no target for installing headers, so do it manually
doheader -r include/*
}