Tue Nov 21 17:37:53 2023 UTC ()
nlohmann-json: Optionize tests to greatly cut down on build times.


(nia)
diff -r1.1 -r1.2 pkgsrc/textproc/nlohmann-json/Makefile
diff -r1.1 -r1.2 pkgsrc/textproc/nlohmann-json/PLIST
diff -r0 -r1.1 pkgsrc/textproc/nlohmann-json/options.mk

cvs diff -r1.1 -r1.2 pkgsrc/textproc/nlohmann-json/Makefile (expand / switch to unified diff)

--- pkgsrc/textproc/nlohmann-json/Makefile 2022/12/28 20:18:21 1.1
+++ pkgsrc/textproc/nlohmann-json/Makefile 2023/11/21 17:37:52 1.2
@@ -1,21 +1,18 @@ @@ -1,21 +1,18 @@
1# $NetBSD: Makefile,v 1.1 2022/12/28 20:18:21 nikita Exp $ 1# $NetBSD: Makefile,v 1.2 2023/11/21 17:37:52 nia Exp $
2 2
3DISTNAME= nlohmann-json-3.11.2 3DISTNAME= nlohmann-json-3.11.2
4CATEGORIES= textproc 4CATEGORIES= textproc
5MASTER_SITES= ${MASTER_SITE_GITHUB:=nlohmann/} 5MASTER_SITES= ${MASTER_SITE_GITHUB:=nlohmann/}
6GITHUB_PROJECT= json 6GITHUB_PROJECT= json
7GITHUB_TAG= v${PKGVERSION_NOREV} 7GITHUB_TAG= v${PKGVERSION_NOREV}
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://json.nlohmann.me/ 10HOMEPAGE= https://json.nlohmann.me/
11COMMENT= JSON library for Modern C++ 11COMMENT= JSON library for Modern C++
12LICENSE= mit 12LICENSE= mit
13 13
14USE_CMAKE= yes 
15USE_LANGUAGES= c c++11 14USE_LANGUAGES= c c++11
16# FIXME: Downloads test data from a fixed tag in a git repository, 
17# package https://github.com/nlohmann/json_test_data to prevent downloads. 
18# FIXME: A small number of tests assume that WRKSRC is a git checkout. 
19TEST_TARGET= test 
20 15
 16.include "options.mk"
 17.include "../../devel/cmake/build.mk"
21.include "../../mk/bsd.pkg.mk" 18.include "../../mk/bsd.pkg.mk"

cvs diff -r1.1 -r1.2 pkgsrc/textproc/nlohmann-json/PLIST (expand / switch to unified diff)

--- pkgsrc/textproc/nlohmann-json/PLIST 2022/12/28 20:18:21 1.1
+++ pkgsrc/textproc/nlohmann-json/PLIST 2023/11/21 17:37:52 1.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1@comment $NetBSD: PLIST,v 1.1 2022/12/28 20:18:21 nikita Exp $ 1@comment $NetBSD: PLIST,v 1.2 2023/11/21 17:37:52 nia Exp $
2include/nlohmann/adl_serializer.hpp 2include/nlohmann/adl_serializer.hpp
3include/nlohmann/byte_container_with_subtype.hpp 3include/nlohmann/byte_container_with_subtype.hpp
4include/nlohmann/detail/abi_macros.hpp 4include/nlohmann/detail/abi_macros.hpp
5include/nlohmann/detail/conversions/from_json.hpp 5include/nlohmann/detail/conversions/from_json.hpp
6include/nlohmann/detail/conversions/to_chars.hpp 6include/nlohmann/detail/conversions/to_chars.hpp
7include/nlohmann/detail/conversions/to_json.hpp 7include/nlohmann/detail/conversions/to_json.hpp
8include/nlohmann/detail/exceptions.hpp 8include/nlohmann/detail/exceptions.hpp
9include/nlohmann/detail/hash.hpp 9include/nlohmann/detail/hash.hpp
10include/nlohmann/detail/input/binary_reader.hpp 10include/nlohmann/detail/input/binary_reader.hpp
11include/nlohmann/detail/input/input_adapters.hpp 11include/nlohmann/detail/input/input_adapters.hpp
12include/nlohmann/detail/input/json_sax.hpp 12include/nlohmann/detail/input/json_sax.hpp
13include/nlohmann/detail/input/lexer.hpp 13include/nlohmann/detail/input/lexer.hpp
14include/nlohmann/detail/input/parser.hpp 14include/nlohmann/detail/input/parser.hpp
@@ -33,18 +33,18 @@ include/nlohmann/detail/meta/std_fs.hpp @@ -33,18 +33,18 @@ include/nlohmann/detail/meta/std_fs.hpp
33include/nlohmann/detail/meta/type_traits.hpp 33include/nlohmann/detail/meta/type_traits.hpp
34include/nlohmann/detail/meta/void_t.hpp 34include/nlohmann/detail/meta/void_t.hpp
35include/nlohmann/detail/output/binary_writer.hpp 35include/nlohmann/detail/output/binary_writer.hpp
36include/nlohmann/detail/output/output_adapters.hpp 36include/nlohmann/detail/output/output_adapters.hpp
37include/nlohmann/detail/output/serializer.hpp 37include/nlohmann/detail/output/serializer.hpp
38include/nlohmann/detail/string_concat.hpp 38include/nlohmann/detail/string_concat.hpp
39include/nlohmann/detail/string_escape.hpp 39include/nlohmann/detail/string_escape.hpp
40include/nlohmann/detail/value_t.hpp 40include/nlohmann/detail/value_t.hpp
41include/nlohmann/json.hpp 41include/nlohmann/json.hpp
42include/nlohmann/json_fwd.hpp 42include/nlohmann/json_fwd.hpp
43include/nlohmann/ordered_map.hpp 43include/nlohmann/ordered_map.hpp
44include/nlohmann/thirdparty/hedley/hedley.hpp 44include/nlohmann/thirdparty/hedley/hedley.hpp
45include/nlohmann/thirdparty/hedley/hedley_undef.hpp 45include/nlohmann/thirdparty/hedley/hedley_undef.hpp
46include/test_data.hpp 46${PLIST.tests}include/test_data.hpp
47share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake 47share/cmake/nlohmann_json/nlohmann_jsonConfig.cmake
48share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake 48share/cmake/nlohmann_json/nlohmann_jsonConfigVersion.cmake
49share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake 49share/cmake/nlohmann_json/nlohmann_jsonTargets.cmake
50share/pkgconfig/nlohmann_json.pc 50share/pkgconfig/nlohmann_json.pc

File Added: pkgsrc/textproc/nlohmann-json/options.mk
# $NetBSD: options.mk,v 1.1 2023/11/21 17:37:52 nia Exp $

PKG_OPTIONS_VAR=	PKG_OPTIONS.nlohmann-json

PKG_SUPPORTED_OPTIONS=	tests

.include "../../mk/bsd.options.mk"

PLIST_VARS+=	tests
.if !empty(PKG_OPTIONS:Mtests)
# 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.
PLIST.tests=	yes
TEST_TARGET=	test
CMAKE_ARGS+=	-DJSON_BuildTests=ON
.else
CMAKE_ARGS+=	-DJSON_BuildTests=OFF
.endif