pkgsrc-Changes archive

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

CVS commit: pkgsrc/textproc/nlohmann-json



Module Name:    pkgsrc
Committed By:   nia
Date:           Tue Nov 21 17:37:53 UTC 2023

Modified Files:
        pkgsrc/textproc/nlohmann-json: Makefile PLIST
Added Files:
        pkgsrc/textproc/nlohmann-json: options.mk

Log Message:
nlohmann-json: Optionize tests to greatly cut down on build times.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/textproc/nlohmann-json/Makefile \
    pkgsrc/textproc/nlohmann-json/PLIST
cvs rdiff -u -r0 -r1.1 pkgsrc/textproc/nlohmann-json/options.mk

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

Modified files:

Index: pkgsrc/textproc/nlohmann-json/Makefile
diff -u pkgsrc/textproc/nlohmann-json/Makefile:1.1 pkgsrc/textproc/nlohmann-json/Makefile:1.2
--- pkgsrc/textproc/nlohmann-json/Makefile:1.1  Wed Dec 28 20:18:21 2022
+++ pkgsrc/textproc/nlohmann-json/Makefile      Tue Nov 21 17:37:52 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2022/12/28 20:18:21 nikita Exp $
+# $NetBSD: Makefile,v 1.2 2023/11/21 17:37:52 nia Exp $
 
 DISTNAME=      nlohmann-json-3.11.2
 CATEGORIES=    textproc
@@ -11,11 +11,8 @@ 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 "options.mk"
+.include "../../devel/cmake/build.mk"
 .include "../../mk/bsd.pkg.mk"
Index: pkgsrc/textproc/nlohmann-json/PLIST
diff -u pkgsrc/textproc/nlohmann-json/PLIST:1.1 pkgsrc/textproc/nlohmann-json/PLIST:1.2
--- pkgsrc/textproc/nlohmann-json/PLIST:1.1     Wed Dec 28 20:18:21 2022
+++ pkgsrc/textproc/nlohmann-json/PLIST Tue Nov 21 17:37:52 2023
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2022/12/28 20:18:21 nikita Exp $
+@comment $NetBSD: PLIST,v 1.2 2023/11/21 17:37:52 nia Exp $
 include/nlohmann/adl_serializer.hpp
 include/nlohmann/byte_container_with_subtype.hpp
 include/nlohmann/detail/abi_macros.hpp
@@ -43,7 +43,7 @@ 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
+${PLIST.tests}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

Added files:

Index: pkgsrc/textproc/nlohmann-json/options.mk
diff -u /dev/null pkgsrc/textproc/nlohmann-json/options.mk:1.1
--- /dev/null   Tue Nov 21 17:37:53 2023
+++ pkgsrc/textproc/nlohmann-json/options.mk    Tue Nov 21 17:37:52 2023
@@ -0,0 +1,19 @@
+# $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



Home | Main Index | Thread Index | Old Index