From a4170f2b128a1fbbac821f772908b6be8358aa48 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 23:07:08 +0700 Subject: [PATCH] nuspell: fix for new catch2 --- srcpkgs/nuspell/patches/new-catch2.patch | 40 ++++++++++++++++++++++++ srcpkgs/nuspell/template | 3 +- 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/nuspell/patches/new-catch2.patch diff --git a/srcpkgs/nuspell/patches/new-catch2.patch b/srcpkgs/nuspell/patches/new-catch2.patch new file mode 100644 index 00000000000..14246dddfdd --- /dev/null +++ b/srcpkgs/nuspell/patches/new-catch2.patch @@ -0,0 +1,40 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,7 +58,7 @@ endfunction() + + if (BUILD_TESTING) + enable_testing() +- find_package(Catch2 2.3.0 QUIET) ++ find_package(Catch2 QUIET) + if (NOT Catch2_FOUND) + find_catch2_from_source() + endif() +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -1,5 +1,5 @@ + add_executable(unit_test unit_test.cxx catch_main.cxx) +-target_link_libraries(unit_test PRIVATE nuspell Catch2::Catch2) ++target_link_libraries(unit_test PRIVATE nuspell Catch2::Catch2WithMain) + if (MSVC) + target_compile_options(unit_test PRIVATE "/utf-8") + # Consider doing this for all the other targets by setting this flag +--- a/tests/catch_main.cxx ++++ b/tests/catch_main.cxx +@@ -16,5 +16,4 @@ + * along with Nuspell. If not, see . + */ + +-#define CATCH_CONFIG_MAIN +-#include ++#include +--- a/tests/unit_test.cxx ++++ b/tests/unit_test.cxx +@@ -16,7 +16,7 @@ + * along with Nuspell. If not, see . + */ + +-#include ++#include + #include + #include + diff --git a/srcpkgs/nuspell/template b/srcpkgs/nuspell/template index 57e5acd5868..80584198354 100644 --- a/srcpkgs/nuspell/template +++ b/srcpkgs/nuspell/template @@ -4,8 +4,7 @@ version=5.1.2 revision=3 build_style=cmake configure_args="-DBUILD_SHARED_LIBS=ON" -makedepends="icu-devel" -checkdepends="catch2" +makedepends="icu-devel catch2" short_desc="C++ spell checking library" maintainer="John " license="LGPL-3.0-or-later"