pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/cppcodec



Module Name:    pkgsrc
Committed By:   nros
Date:           Mon Jan 15 09:40:28 UTC 2024

Modified Files:
        pkgsrc/devel/cppcodec: Makefile distinfo
Added Files:
        pkgsrc/devel/cppcodec/patches: patch-test_CMakeLists.txt
            patch-test_test__cppcodec.cpp

Log Message:
cppcodec: adapt for catch2 version 3 api
Add pkg-config to tools, this is to make
sure that cppcodec uses pkgsrc catch2
and does not download its own copy.
Add patches to use catch2 version 3 api.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/cppcodec/Makefile \
    pkgsrc/devel/cppcodec/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/cppcodec/patches/patch-test_CMakeLists.txt \
    pkgsrc/devel/cppcodec/patches/patch-test_test__cppcodec.cpp

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

Modified files:

Index: pkgsrc/devel/cppcodec/Makefile
diff -u pkgsrc/devel/cppcodec/Makefile:1.1 pkgsrc/devel/cppcodec/Makefile:1.2
--- pkgsrc/devel/cppcodec/Makefile:1.1  Fri Apr 28 08:53:46 2023
+++ pkgsrc/devel/cppcodec/Makefile      Mon Jan 15 09:40:27 2024
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2023/04/28 08:53:46 nikita Exp $
+# $NetBSD: Makefile,v 1.2 2024/01/15 09:40:27 nros Exp $
 
 DISTNAME=      cppcodec-0.2
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=tplgy/}
 GITHUB_PROJECT=        cppcodec
@@ -11,8 +12,14 @@ HOMEPAGE=    https://github.com/tplgy/cppco
 COMMENT=       C++11 library to encode/decode various codes
 LICENSE=       mit
 
-USE_LANGUAGES= c c++11
+USE_TOOLS+=    pkg-config
+USE_LANGUAGES= c c++
 
+TEST_TARGET=   test
+
+USE_CXX_FEATURES+=     c++14
+
+CMAKE_CONFIGURE_ARGS+= -DCMAKE_CXX_STANDARD=14
 
 .include "../../devel/catch2/buildlink3.mk"
 .include "../../devel/cmake/build.mk"
Index: pkgsrc/devel/cppcodec/distinfo
diff -u pkgsrc/devel/cppcodec/distinfo:1.1 pkgsrc/devel/cppcodec/distinfo:1.2
--- pkgsrc/devel/cppcodec/distinfo:1.1  Fri Apr 28 08:53:46 2023
+++ pkgsrc/devel/cppcodec/distinfo      Mon Jan 15 09:40:27 2024
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.1 2023/04/28 08:53:46 nikita Exp $
+$NetBSD: distinfo,v 1.2 2024/01/15 09:40:27 nros Exp $
 
 BLAKE2s (cppcodec-0.2.tar.gz) = 39a0e95862f73d8de67c6a163b0e96d09adf1b0e437da39b794d8e46a7b2ef18
 SHA512 (cppcodec-0.2.tar.gz) = 50c9c81cdb12560c87e513e1fd22c1ad24ea37b7d20a0e3044d43fb887f4c6494c69468e4d0811cd2fc1ae8fdb01b01cfb9f3cfdd8611d4bb0221cbd38cbead3
 Size (cppcodec-0.2.tar.gz) = 33984 bytes
+SHA1 (patch-test_CMakeLists.txt) = 5a932a5fc2027338328c38d349c0429974461475
+SHA1 (patch-test_test__cppcodec.cpp) = 27c5d41375644b1ad46dbc88bf3cf92de97d27d6

Added files:

Index: pkgsrc/devel/cppcodec/patches/patch-test_CMakeLists.txt
diff -u /dev/null pkgsrc/devel/cppcodec/patches/patch-test_CMakeLists.txt:1.1
--- /dev/null   Mon Jan 15 09:40:28 2024
+++ pkgsrc/devel/cppcodec/patches/patch-test_CMakeLists.txt     Mon Jan 15 09:40:27 2024
@@ -0,0 +1,23 @@
+$NetBSD: patch-test_CMakeLists.txt,v 1.1 2024/01/15 09:40:27 nros Exp $
+
+Adapt for catch2 version 3
+
+--- test/CMakeLists.txt.orig   2018-08-20 14:56:28.000000000 +0000
++++ test/CMakeLists.txt
+@@ -3,7 +3,7 @@ include_directories(BEFORE ${PROJECT_SOU
+ 
+ find_package(PkgConfig)
+ if (PKG_CONFIG_FOUND)
+-    pkg_check_modules(CATCH2 catch2)
++    pkg_check_modules(CATCH2 IMPORTED_TARGET catch2-with-main)
+ endif()
+ 
+ if (CATCH2_FOUND)
+@@ -15,6 +15,7 @@ else()
+ endif()
+ 
+ add_executable(test_cppcodec test_cppcodec.cpp)
++target_link_libraries(test_cppcodec PkgConfig::CATCH2)
+ add_test(cppcodec test_cppcodec)
+ 
+ add_executable(benchmark_cppcodec benchmark_cppcodec.cpp)
Index: pkgsrc/devel/cppcodec/patches/patch-test_test__cppcodec.cpp
diff -u /dev/null pkgsrc/devel/cppcodec/patches/patch-test_test__cppcodec.cpp:1.1
--- /dev/null   Mon Jan 15 09:40:28 2024
+++ pkgsrc/devel/cppcodec/patches/patch-test_test__cppcodec.cpp Mon Jan 15 09:40:27 2024
@@ -0,0 +1,16 @@
+$NetBSD: patch-test_test__cppcodec.cpp,v 1.1 2024/01/15 09:40:27 nros Exp $
+
+Adapt for catch2 version 3
+
+--- test/test_cppcodec.cpp.orig        2018-08-20 14:56:28.000000000 +0000
++++ test/test_cppcodec.cpp
+@@ -21,8 +21,7 @@
+  *  IN THE SOFTWARE.
+  */
+ 
+-#define CATCH_CONFIG_MAIN
+-#include <catch2/catch.hpp>
++#include <catch2/catch_all.hpp>
+ 
+ #include <cppcodec/base32_crockford.hpp>
+ #include <cppcodec/base32_hex.hpp>



Home | Main Index | Thread Index | Old Index