pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc



Module Name:    pkgsrc
Committed By:   nikita
Date:           Wed Dec 28 20:18:21 UTC 2022

Modified Files:
        pkgsrc/textproc: Makefile
Added Files:
        pkgsrc/textproc/nlohmann-json: DESCR Makefile PLIST buildlink3.mk
            distinfo

Log Message:
nlohmann-json: Import as textproc/nlohmann-json version 3.11.2

import from wip, packaged by K.I.A.Derouiche and Adam Ciarciński.

JSON for Modern C++ is an open-source library consisting of a C++11-style
header-only JSON class.

Its stated goals are:
Intuitive syntax. In languages such as Python, JSON feels like a first class
data type. We used all the operator magic of modern C++ to achieve the same
feeling in your code.

Trivial integration. Our whole code consists of a single header file json.hpp.
The class is written in vanilla C++11. All in all, everything should require
no adjustment of your compiler flags or project settings.

Serious testing. Our code is heavily unit-tested and covers 100% of the code,
including all exceptional behavior. Furthermore, we checked with Valgrind and
the Clang Sanitizers that there are no memory leaks. Google OSS-Fuzz
additionally runs fuzz tests against all parsers 24/7, effectively executing
billions of tests so far. To maintain high quality, the project is following
the Core Infrastructure Initiative (CII) best practices.

Other aspects were not so important to us:
Memory efficiency. Each JSON object has an overhead of one pointer (the
maximal size of a union) and one enumeration element (1 byte). The default
generalization uses the following C++ data types: std::string for strings,
int64_t, uint64_t or double for numbers, std::map for objects, std::vector
for arrays, and bool for Booleans. However, you can template the generalized
class basic_json to your needs.

Speed. There are certainly faster JSON libraries out there. However, if your
goal is to speed up your development by adding JSON support with a single
header, then this library is the way to go. If you know how to use
a std::vector or std::map, you are already set.


To generate a diff of this commit:
cvs rdiff -u -r1.1338 -r1.1339 pkgsrc/textproc/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/nlohmann-json/DESCR \
    pkgsrc/textproc/nlohmann-json/Makefile \
    pkgsrc/textproc/nlohmann-json/PLIST \
    pkgsrc/textproc/nlohmann-json/buildlink3.mk \
    pkgsrc/textproc/nlohmann-json/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/Makefile
diff -u pkgsrc/textproc/Makefile:1.1338 pkgsrc/textproc/Makefile:1.1339
--- pkgsrc/textproc/Makefile:1.1338     Sun Dec 25 11:18:58 2022
+++ pkgsrc/textproc/Makefile    Wed Dec 28 20:18:21 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1338 2022/12/25 11:18:58 wiz Exp $
+# $NetBSD: Makefile,v 1.1339 2022/12/28 20:18:21 nikita Exp $
 #
 
 COMMENT=       Text processing utilities (does not include desktop publishing)
@@ -540,6 +540,7 @@ SUBDIR+=    mythes
 SUBDIR+=       namazu
 SUBDIR+=       nbsed
 SUBDIR+=       ndtpd
+SUBDIR+=       nlohmann-json
 SUBDIR+=       nltk_data-abc
 SUBDIR+=       nltk_data-alpino
 SUBDIR+=       nltk_data-averaged_perceptron_tagger

Added files:

Index: pkgsrc/textproc/nlohmann-json/DESCR
diff -u /dev/null pkgsrc/textproc/nlohmann-json/DESCR:1.1
--- /dev/null   Wed Dec 28 20:18:21 2022
+++ pkgsrc/textproc/nlohmann-json/DESCR Wed Dec 28 20:18:21 2022
@@ -0,0 +1,31 @@
+JSON for Modern C++ is an open-source library consisting of a C++11-style
+header-only JSON class.
+
+Its stated goals are:
+Intuitive syntax. In languages such as Python, JSON feels like a first class
+data type. We used all the operator magic of modern C++ to achieve the same
+feeling in your code.
+
+Trivial integration. Our whole code consists of a single header file json.hpp.
+The class is written in vanilla C++11. All in all, everything should require
+no adjustment of your compiler flags or project settings.
+
+Serious testing. Our code is heavily unit-tested and covers 100% of the code,
+including all exceptional behavior. Furthermore, we checked with Valgrind and
+the Clang Sanitizers that there are no memory leaks. Google OSS-Fuzz
+additionally runs fuzz tests against all parsers 24/7, effectively executing
+billions of tests so far. To maintain high quality, the project is following
+the Core Infrastructure Initiative (CII) best practices.
+
+Other aspects were not so important to us:
+Memory efficiency. Each JSON object has an overhead of one pointer (the
+maximal size of a union) and one enumeration element (1 byte). The default
+generalization uses the following C++ data types: std::string for strings,
+int64_t, uint64_t or double for numbers, std::map for objects, std::vector
+for arrays, and bool for Booleans. However, you can template the generalized
+class basic_json to your needs.
+
+Speed. There are certainly faster JSON libraries out there. However, if your
+goal is to speed up your development by adding JSON support with a single
+header, then this library is the way to go. If you know how to use
+a std::vector or std::map, you are already set.
Index: pkgsrc/textproc/nlohmann-json/Makefile
diff -u /dev/null pkgsrc/textproc/nlohmann-json/Makefile:1.1
--- /dev/null   Wed Dec 28 20:18:21 2022
+++ pkgsrc/textproc/nlohmann-json/Makefile      Wed Dec 28 20:18:21 2022
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1 2022/12/28 20:18:21 nikita Exp $
+
+DISTNAME=      nlohmann-json-3.11.2
+CATEGORIES=    textproc
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=nlohmann/}
+GITHUB_PROJECT=        json
+GITHUB_TAG=    v${PKGVERSION_NOREV}
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://json.nlohmann.me/
+COMMENT=       JSON library for Modern C++
+LICENSE=       mit
+
+USE_CMAKE=     yes
+USE_LANGUAGES= c c++11
+# FIXME: Downloads test data from a fixed tag in a git repository,
+# package https://github.com/nlohmann/json_test_data to prevent downloads.
+# FIXME: A small number of tests assume that WRKSRC is a git checkout.
+TEST_TARGET=   test
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/textproc/nlohmann-json/PLIST
diff -u /dev/null pkgsrc/textproc/nlohmann-json/PLIST:1.1
--- /dev/null   Wed Dec 28 20:18:21 2022
+++ pkgsrc/textproc/nlohmann-json/PLIST Wed Dec 28 20:18:21 2022
@@ -0,0 +1,50 @@
+@comment $NetBSD: PLIST,v 1.1 2022/12/28 20:18:21 nikita Exp $
+include/nlohmann/adl_serializer.hpp
+include/nlohmann/byte_container_with_subtype.hpp
+include/nlohmann/detail/abi_macros.hpp
+include/nlohmann/detail/conversions/from_json.hpp
+include/nlohmann/detail/conversions/to_chars.hpp
+include/nlohmann/detail/conversions/to_json.hpp
+include/nlohmann/detail/exceptions.hpp
+include/nlohmann/detail/hash.hpp
+include/nlohmann/detail/input/binary_reader.hpp
+include/nlohmann/detail/input/input_adapters.hpp
+include/nlohmann/detail/input/json_sax.hpp
+include/nlohmann/detail/input/lexer.hpp
+include/nlohmann/detail/input/parser.hpp
+include/nlohmann/detail/input/position_t.hpp
+include/nlohmann/detail/iterators/internal_iterator.hpp
+include/nlohmann/detail/iterators/iter_impl.hpp
+include/nlohmann/detail/iterators/iteration_proxy.hpp
+include/nlohmann/detail/iterators/iterator_traits.hpp
+include/nlohmann/detail/iterators/json_reverse_iterator.hpp
+include/nlohmann/detail/iterators/primitive_iterator.hpp
+include/nlohmann/detail/json_pointer.hpp
+include/nlohmann/detail/json_ref.hpp
+include/nlohmann/detail/macro_scope.hpp
+include/nlohmann/detail/macro_unscope.hpp
+include/nlohmann/detail/meta/call_std/begin.hpp
+include/nlohmann/detail/meta/call_std/end.hpp
+include/nlohmann/detail/meta/cpp_future.hpp
+include/nlohmann/detail/meta/detected.hpp
+include/nlohmann/detail/meta/identity_tag.hpp
+include/nlohmann/detail/meta/is_sax.hpp
+include/nlohmann/detail/meta/std_fs.hpp
+include/nlohmann/detail/meta/type_traits.hpp
+include/nlohmann/detail/meta/void_t.hpp
+include/nlohmann/detail/output/binary_writer.hpp
+include/nlohmann/detail/output/output_adapters.hpp
+include/nlohmann/detail/output/serializer.hpp
+include/nlohmann/detail/string_concat.hpp
+include/nlohmann/detail/string_escape.hpp
+include/nlohmann/detail/value_t.hpp
+include/nlohmann/json.hpp
+include/nlohmann/json_fwd.hpp
+include/nlohmann/ordered_map.hpp
+include/nlohmann/thirdparty/hedley/hedley.hpp
+include/nlohmann/thirdparty/hedley/hedley_undef.hpp
+include/test_data.hpp
+share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake
+share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake
+share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake
+share/pkgconfig/nlohmann_json.pc
Index: pkgsrc/textproc/nlohmann-json/buildlink3.mk
diff -u /dev/null pkgsrc/textproc/nlohmann-json/buildlink3.mk:1.1
--- /dev/null   Wed Dec 28 20:18:21 2022
+++ pkgsrc/textproc/nlohmann-json/buildlink3.mk Wed Dec 28 20:18:21 2022
@@ -0,0 +1,13 @@
+# $NetBSD: buildlink3.mk,v 1.1 2022/12/28 20:18:21 nikita Exp $
+
+BUILDLINK_TREE+=       nlohmann-json
+
+.if !defined(NLOHMANN_JSON_BUILDLINK3_MK)
+NLOHMANN_JSON_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.nlohmann-json+=  nlohmann-json>=3.7.0
+BUILDLINK_DEPMETHOD.nlohmann-json?=    build
+BUILDLINK_PKGSRCDIR.nlohmann-json?=    ../../textproc/nlohmann-json
+.endif # NLOHMANN_JSON_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -nlohmann-json
Index: pkgsrc/textproc/nlohmann-json/distinfo
diff -u /dev/null pkgsrc/textproc/nlohmann-json/distinfo:1.1
--- /dev/null   Wed Dec 28 20:18:21 2022
+++ pkgsrc/textproc/nlohmann-json/distinfo      Wed Dec 28 20:18:21 2022
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2022/12/28 20:18:21 nikita Exp $
+
+BLAKE2s (nlohmann-json-3.11.2.tar.gz) = c5caa9520466579cdee11e0831375f974b1be581ce764a41fc15979cd779aaba
+SHA512 (nlohmann-json-3.11.2.tar.gz) = 70097c9bcd7a91254acbd41b8b68a6aaa371fc2dd7011f472917f69f1e2d2986155a0339dad791699d542e4a3be44dc49ae72ff73d0ee0ea4b34183296ce19a0
+Size (nlohmann-json-3.11.2.tar.gz) = 8097673 bytes



Home | Main Index | Thread Index | Old Index