From 98b960ad4e2e9ba2fcf4ff10a26f00f89019202e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 1 Oct 2023 22:11:03 +0700 Subject: [PATCH] cppcodec: fix for new catch2 --- srcpkgs/cppcodec/patches/new-catch2.patch | 22 ++++++++++++++++++++++ srcpkgs/cppcodec/template | 1 + 2 files changed, 23 insertions(+) create mode 100644 srcpkgs/cppcodec/patches/new-catch2.patch diff --git a/srcpkgs/cppcodec/patches/new-catch2.patch b/srcpkgs/cppcodec/patches/new-catch2.patch new file mode 100644 index 00000000000..3615ae6191d --- /dev/null +++ b/srcpkgs/cppcodec/patches/new-catch2.patch @@ -0,0 +1,22 @@ +--- a/test/test_cppcodec.cpp ++++ b/test/test_cppcodec.cpp +@@ -22,7 +22,7 @@ + */ + + #define CATCH_CONFIG_MAIN +-#include ++#include + + #include + #include +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -15,6 +15,8 @@ else() + endif() + + add_executable(test_cppcodec test_cppcodec.cpp) ++find_package(Catch2) ++target_link_libraries(test_cppcodec Catch2::Catch2WithMain) + add_test(cppcodec test_cppcodec) + + add_executable(benchmark_cppcodec benchmark_cppcodec.cpp) diff --git a/srcpkgs/cppcodec/template b/srcpkgs/cppcodec/template index 927fae91cbe..b7ca3fdd20c 100644 --- a/srcpkgs/cppcodec/template +++ b/srcpkgs/cppcodec/template @@ -3,6 +3,7 @@ pkgname=cppcodec version=0.2 revision=1 build_style=cmake +configure_args="-DCMAKE_CXX_STANDARD=17" hostmakedepends="pkg-config" makedepends="catch2" short_desc="Header-only C++11 library to encode/decode base64*, base32* and hex"