Please find below a diff to update jsoncpp to the latest stable version
on github. This version includes all patches and fixes some security
related bugs. I removed the include path patches. I see no conflicts in
the tree and all consumers are happy:
devel/cmake
games/minetest
graphics/orthanc/*
mail/kopano
multimedia/upplay (outdated port, tweak diff in another mail).
OK?
Rafael
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/jsoncpp/Makefile,v
retrieving revision 1.29
diff -u -p -u -p -r1.29 Makefile
--- Makefile 12 Jul 2019 20:44:36 -0000 1.29
+++ Makefile 1 Nov 2020 20:02:54 -0000
@@ -4,11 +4,10 @@ COMMENT = JSON parsing C++ API
GH_ACCOUNT = open-source-parsers
GH_PROJECT = jsoncpp
-GH_TAGNAME = 1.8.4
-REVISION = 2
+GH_TAGNAME = 1.9.4
# no upstream revision
-SHARED_LIBS = jsoncpp 4.0
+SHARED_LIBS = jsoncpp 5.0
CATEGORIES = devel
@@ -21,7 +20,13 @@ WANTLIB = m ${COMPILER_LIBCXX}
COMPILER = base-clang ports-gcc base-gcc
-MODULES = devel/meson
+MODULES = devel/meson \
+ lang/python
+
+CONFIGURE_STYLE = meson
+
+MODPY_RUNDEP = No
+MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
TEST_ENV += LD_PRELOAD=${WRKBUILD}/libjsoncpp.so.${LIBjsoncpp_VERSION}
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/jsoncpp/distinfo,v
retrieving revision 1.14
diff -u -p -u -p -r1.14 distinfo
--- distinfo 11 Feb 2018 09:05:59 -0000 1.14
+++ distinfo 1 Nov 2020 20:02:54 -0000
@@ -1,2 +1,2 @@
-SHA256 (jsoncpp-1.8.4.tar.gz) = xJ3qyeCTO8twRPCFFoYaLVYJiFQLI94qwa1EOyGa/bY=
-SIZE (jsoncpp-1.8.4.tar.gz) = 200226
+SHA256 (jsoncpp-1.9.4.tar.gz) = 40piioFCZDuXbHIz7zgUV++teUaMZ8sa4Lg6M9dJOZk=
+SIZE (jsoncpp-1.9.4.tar.gz) = 214057
Index: patches/patch-include_json_config_h
===================================================================
RCS file: patches/patch-include_json_config_h
diff -N patches/patch-include_json_config_h
--- patches/patch-include_json_config_h 18 Feb 2018 20:50:25 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,32 +0,0 @@
-$OpenBSD: patch-include_json_config_h,v 1.4 2018/02/18 20:50:25 jca Exp $
-
-"explicit" on non-constructors are a C++11 feature
-https://github.com/open-source-parsers/jsoncpp/commit/04abe38148d99b2a5270521935115d769a714adc
-
-Index: include/json/config.h
---- include/json/config.h.orig
-+++ include/json/config.h
-@@ -84,15 +84,23 @@
- #if __cplusplus >= 201103L
- # define JSONCPP_OVERRIDE override
- # define JSONCPP_NOEXCEPT noexcept
-+# define JSONCPP_OP_EXPLICIT explicit
- #elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900
- # define JSONCPP_OVERRIDE override
- # define JSONCPP_NOEXCEPT throw()
-+# if _MSC_VER >= 1800 // MSVC 2013
-+# define JSONCPP_OP_EXPLICIT explicit
-+# else
-+# define JSONCPP_OP_EXPLICIT
-+# endif
- #elif defined(_MSC_VER) && _MSC_VER >= 1900
- # define JSONCPP_OVERRIDE override
- # define JSONCPP_NOEXCEPT noexcept
-+# define JSONCPP_OP_EXPLICIT explicit
- #else
- # define JSONCPP_OVERRIDE
- # define JSONCPP_NOEXCEPT throw()
-+# define JSONCPP_OP_EXPLICIT
- #endif
-
- #ifndef JSON_HAS_RVALUE_REFERENCES
Index: patches/patch-include_json_value_h
===================================================================
RCS file: patches/patch-include_json_value_h
diff -N patches/patch-include_json_value_h
--- patches/patch-include_json_value_h 18 Feb 2018 20:50:25 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,48 +0,0 @@
-$OpenBSD: patch-include_json_value_h,v 1.3 2018/02/18 20:50:25 jca Exp $
-
-"explicit" on non-constructors are a C++11 feature
-https://github.com/open-source-parsers/jsoncpp/commit/04abe38148d99b2a5270521935115d769a714adc
-
-XXX Revert commit 23c44d9f9eed8a7ff95daca9bd44526067c144c0 to avoid
-undefined references when linking cmake.
-
-commit 23c44d9f9eed8a7ff95daca9bd44526067c144c0
-Author: Dhruv Paranjape <[email protected]>
-Date: Sat Jul 8 12:00:47 2017
-
-overload append function for R value references.
-
-Index: include/json/value.h
---- include/json/value.h.orig
-+++ include/json/value.h
-@@ -322,10 +322,6 @@ Json::Value obj_value(Json::objectValue); // {}
- Value(bool value);
- /// Deep copy.
- Value(const Value& other);
--#if JSON_HAS_RVALUE_REFERENCES
-- /// Move constructor
-- Value(Value&& other);
--#endif
- ~Value();
-
- /// Deep copy, then swap(other).
-@@ -401,7 +397,7 @@ Json::Value obj_value(Json::objectValue); // {}
- bool empty() const;
-
- /// Return !isNull()
-- explicit operator bool() const;
-+ JSONCPP_OP_EXPLICIT operator bool() const;
-
- /// Remove all object members and array elements.
- /// \pre type() is arrayValue, objectValue, or nullValue
-@@ -451,10 +447,6 @@ Json::Value obj_value(Json::objectValue); // {}
- ///
- /// Equivalent to jsonvalue[jsonvalue.size()] = value;
- Value& append(const Value& value);
--
--#if JSON_HAS_RVALUE_REFERENCES
-- Value& append(Value&& value);
--#endif
-
- /// Access an object value by name, create a null member if it does not
exist.
- /// \note Because of our implementation, keys are limited to 2^30 -1 chars.
Index: patches/patch-meson_build
===================================================================
RCS file: patches/patch-meson_build
diff -N patches/patch-meson_build
--- patches/patch-meson_build 11 Jun 2019 11:15:04 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,80 +0,0 @@
-$OpenBSD: patch-meson_build,v 1.6 2019/06/11 11:15:04 naddy Exp $
-
-implicit_include_directories : false
- Prevent libc++ headers from picking up <version> file; the header
- files are under include/
-
-Index: meson.build
---- meson.build.orig
-+++ meson.build
-@@ -25,7 +25,7 @@ jsoncpp_gen_sources = configure_file(
- output : 'version.h',
- configuration : jsoncpp_cdata,
- install : true,
-- install_dir : join_paths(get_option('prefix'), get_option('includedir'),
'json')
-+ install_dir : join_paths(get_option('prefix'), get_option('includedir'),
'jsoncpp', 'json')
- )
-
- jsoncpp_headers = [
-@@ -43,8 +43,11 @@ jsoncpp_include_directories = include_directories('inc
-
- install_headers(
- jsoncpp_headers,
-- subdir : 'json')
-+ subdir : 'jsoncpp/json')
-
-+thread_dep = dependency('threads')
-+no_asneeded = '-Wl,--no-as-needed'
-+
- jsoncpp_lib = library(
- 'jsoncpp',
- [ jsoncpp_gen_sources,
-@@ -55,12 +58,16 @@ jsoncpp_lib = library(
- 'src/lib_json/json_writer.cpp'],
- soversion : 20,
- install : true,
-+ dependencies : thread_dep,
-+ link_args : no_asneeded,
-+ implicit_include_directories : false,
- include_directories : jsoncpp_include_directories)
-
- import('pkgconfig').generate(
- libraries : jsoncpp_lib,
- version : meson.project_version(),
- name : 'jsoncpp',
-+ subdirs : 'jsoncpp',
- filebase : 'jsoncpp',
- description : 'A C++ library for interacting with JSON')
-
-@@ -68,6 +75,8 @@ import('pkgconfig').generate(
- jsoncpp_dep = declare_dependency(
- include_directories : jsoncpp_include_directories,
- link_with : jsoncpp_lib,
-+ dependencies : thread_dep,
-+ link_args : no_asneeded,
- version : meson.project_version(),
- sources : jsoncpp_gen_sources)
-
-@@ -79,8 +88,11 @@ jsoncpp_test = executable(
- [ 'src/test_lib_json/jsontest.cpp',
- 'src/test_lib_json/jsontest.h',
- 'src/test_lib_json/main.cpp'],
-+ implicit_include_directories : false,
- include_directories : jsoncpp_include_directories,
- link_with : jsoncpp_lib,
-+ dependencies : thread_dep,
-+ link_args : no_asneeded,
- install : false)
- test(
- 'unittest_jsoncpp_test',
-@@ -89,7 +101,10 @@ test(
- jsontestrunner = executable(
- 'jsontestrunner',
- 'src/jsontestrunner/main.cpp',
-+ implicit_include_directories : false,
- include_directories : jsoncpp_include_directories,
-+ dependencies : thread_dep,
-+ link_args : no_asneeded,
- link_with : jsoncpp_lib,
- install : false)
- test(
Index: patches/patch-src_lib_json_json_value_cpp
===================================================================
RCS file: patches/patch-src_lib_json_json_value_cpp
diff -N patches/patch-src_lib_json_json_value_cpp
--- patches/patch-src_lib_json_json_value_cpp 11 Feb 2018 09:05:59 -0000
1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,40 +0,0 @@
-$OpenBSD: patch-src_lib_json_json_value_cpp,v 1.2 2018/02/11 09:05:59
rsadowski Exp $
-
-XXX Revert commit 23c44d9f9eed8a7ff95daca9bd44526067c144c0 to avoid
-undefined references when linking cmake.
-
-commit 23c44d9f9eed8a7ff95daca9bd44526067c144c0
-Author: Dhruv Paranjape <[email protected]>
-Date: Sat Jul 8 12:00:47 2017
-
-overload append function for R value references.
-
-Index: src/lib_json/json_value.cpp
---- src/lib_json/json_value.cpp.orig
-+++ src/lib_json/json_value.cpp
-@@ -485,14 +485,6 @@ Value::Value(Value const& other)
- }
- }
-
--#if JSON_HAS_RVALUE_REFERENCES
--// Move constructor
--Value::Value(Value&& other) {
-- initBasic(nullValue);
-- swap(other);
--}
--#endif
--
- Value::~Value() {
- switch (type_) {
- case nullValue:
-@@ -1146,10 +1138,6 @@ Value const& Value::operator[](CppTL::ConstString cons
- #endif
-
- Value& Value::append(const Value& value) { return (*this)[size()] = value; }
--
--#if JSON_HAS_RVALUE_REFERENCES
-- Value& Value::append(Value&& value) { return (*this)[size()] =
std::move(value); }
--#endif
-
- Value Value::get(char const* key, char const* cend, Value const&
defaultValue) const
- {
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/devel/jsoncpp/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 PLIST
--- pkg/PLIST 29 Aug 2017 09:14:16 -0000 1.3
+++ pkg/PLIST 1 Nov 2020 20:02:54 -0000
@@ -1,17 +1,15 @@
@comment $OpenBSD: PLIST,v 1.3 2017/08/29 09:14:16 dcoppa Exp $
-include/jsoncpp/
-include/jsoncpp/json/
-include/jsoncpp/json/allocator.h
-include/jsoncpp/json/assertions.h
-include/jsoncpp/json/autolink.h
-include/jsoncpp/json/config.h
-include/jsoncpp/json/features.h
-include/jsoncpp/json/forwards.h
-include/jsoncpp/json/json.h
-include/jsoncpp/json/reader.h
-include/jsoncpp/json/value.h
-include/jsoncpp/json/version.h
-include/jsoncpp/json/writer.h
+include/json/
+include/json/allocator.h
+include/json/assertions.h
+include/json/config.h
+include/json/forwards.h
+include/json/json.h
+include/json/json_features.h
+include/json/reader.h
+include/json/value.h
+include/json/version.h
+include/json/writer.h
@lib lib/libjsoncpp.so.${LIBjsoncpp_VERSION}
lib/pkgconfig/jsoncpp.pc
share/doc/jsoncpp/