mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
libnest2d: fix for new catch2
This commit is contained in:
parent
9301b4c90a
commit
dbbd780a36
2 changed files with 32 additions and 1 deletions
32
srcpkgs/libnest2d/patches/new-catch2.patch
Normal file
32
srcpkgs/libnest2d/patches/new-catch2.patch
Normal file
|
@ -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 <catch2/catch.hpp>
|
||||||
|
+#include <catch2/catch_all.hpp>
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
|
@@ -29,6 +28,7 @@ template<> struct _NumTag<LargeInt> { us
|
||||||
|
template<class T> struct _NumTag<boost::rational<T>> { using Type = RationalTag; };
|
||||||
|
|
||||||
|
using RectangleItem = libnest2d::Rectangle;
|
||||||
|
+using Approx = Catch::Approx;
|
||||||
|
|
||||||
|
namespace nfp {
|
||||||
|
|
|
@ -6,7 +6,6 @@ build_style=cmake
|
||||||
configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF
|
configure_args="-DBUILD_SHARED_LIBS=ON -DLIBNEST2D_HEADER_ONLY=OFF
|
||||||
-DLIBNEST2D_BUILD_UNITTESTS=ON"
|
-DLIBNEST2D_BUILD_UNITTESTS=ON"
|
||||||
makedepends="clipper-devel nlopt-devel boost-devel catch2"
|
makedepends="clipper-devel nlopt-devel boost-devel catch2"
|
||||||
checkdepends="catch2"
|
|
||||||
short_desc="2D irregular bin packing and nesting library"
|
short_desc="2D irregular bin packing and nesting library"
|
||||||
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
|
maintainer="Karl Nilsson <karl.robert.nilsson@gmail.com>"
|
||||||
license="LGPL-3.0-or-later"
|
license="LGPL-3.0-or-later"
|
||||||
|
|
Loading…
Add table
Reference in a new issue