diff --git a/srcpkgs/libnest2d/patches/new-catch2.patch b/srcpkgs/libnest2d/patches/new-catch2.patch new file mode 100644 index 00000000000..d2dbd3d8b11 --- /dev/null +++ b/srcpkgs/libnest2d/patches/new-catch2.patch @@ -0,0 +1,32 @@ +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -1,4 +1,4 @@ +-require_package(Catch2 2.9.1 REQUIRED NO_EXPORT) ++require_package(Catch2 "" REQUIRED NO_EXPORT) + + add_executable(tests_clipper_nlopt + test.cpp +@@ -14,5 +14,5 @@ if (MSVC) + target_compile_options(tests_clipper_nlopt PRIVATE /bigobj) + endif () + +-target_link_libraries(tests_clipper_nlopt libnest2d Catch2::Catch2) ++target_link_libraries(tests_clipper_nlopt libnest2d Catch2::Catch2WithMain) + add_test(libnest2d_tests tests_clipper_nlopt) +--- a/tests/test.cpp ++++ b/tests/test.cpp +@@ -1,5 +1,4 @@ +-#define CATCH_CONFIG_MAIN +-#include ++#include + + #include + +@@ -29,6 +28,7 @@ template<> struct _NumTag { us + template struct _NumTag> { using Type = RationalTag; }; + + using RectangleItem = libnest2d::Rectangle; ++using Approx = Catch::Approx; + + namespace nfp { + diff --git a/srcpkgs/libnest2d/template b/srcpkgs/libnest2d/template index 62fc492badb..7e8f2d7cb12 100644 --- a/srcpkgs/libnest2d/template +++ b/srcpkgs/libnest2d/template @@ -6,7 +6,6 @@ build_style=cmake configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF -DLIBNEST2D_BUILD_UNITTESTS=ON" makedepends="clipper-devel nlopt-devel boost-devel catch2" -checkdepends="catch2" short_desc="2D irregular bin packing and nesting library" maintainer="Karl Nilsson " license="LGPL-3.0-or-later"