diff --git a/devel/xdispatch2/Portfile b/devel/xdispatch2/Portfile index 11ca62bd8715e..20798ad17b153 100644 --- a/devel/xdispatch2/Portfile +++ b/devel/xdispatch2/Portfile @@ -5,7 +5,7 @@ PortGroup cmake 1.1 PortGroup codeberg 1.0 PortGroup conflicts_build 1.0 -codeberg.setup emzeat xdispatch2 2.1.3 v +codeberg.setup emzeat xdispatch2 2.1.4 v revision 0 categories devel license Apache-2 @@ -14,9 +14,11 @@ description Grand Central Dispatch-like C++ threading library long_description {*}${description}, built around queues, thread pools \ and flexible backends. homepage https://emzeat.de/xdispatch2 -checksums rmd160 a9932cebcd42c04c3cbd0da8ac3cdd2ba451d01c \ - sha256 de7085d506630dc680205a46ec94b832ebaca87b942f795abc5d556b0df5a64a \ - size 122979 +checksums rmd160 84d03ffa9f18ef854943a19371644707e3b76ee6 \ + sha256 ede47fd751ae1bb4d680ff4cf60f210f6a73e5a4f1a73330251415377814a401 \ + size 125886 + +cmake.generator Ninja compiler.cxx_standard 2011 @@ -28,9 +30,6 @@ conflicts_build libunwind # See: https://github.com/emzeat/xdispatch2/issues/1 patchfiles-append 0001-Avoid-a-need-for-Conan.patch -# https://github.com/emzeat/xdispatch2/commit/d7805c0750b2ed30b92844c15f8a309d2d67c00c -patchfiles-append 0002-Add-missing-stdexcept-header.patch - post-patch { reinplace "s,@PREFIX@,${prefix}," ${worksrcpath}/CMakeLists.txt reinplace "s,@VERSION@,${version}," ${worksrcpath}/CMakeLists.txt @@ -47,7 +46,7 @@ configure.args-append \ -DBUILD_XDISPATCH2_STATIC=OFF \ -DBUILD_XDISPATCH2_TESTS=OFF -variant libdispatch description "Enable libdispatch back-end" { +variant libdispatch conflicts libdispatch_legacy description "Enable libdispatch back-end" { configure.args-replace \ -DBUILD_XDISPATCH2_BACKEND_LIBDISPATCH=OFF \ -DBUILD_XDISPATCH2_BACKEND_LIBDISPATCH=ON @@ -70,14 +69,19 @@ platform darwin { +libdispatch } -# variant libdispatch_legacy description "Enable libdispatch support for legacy systems" { -# depends_lib-append \ -# port:libdispatch-legacy -# configure.cppflags-append \ -# -I${prefix}/libexec/dispatch/usr/include -# configure.ldflags-append \ -# ${prefix}/libexec/dispatch/usr/lib/libdispatch.a -# } + # This builds now, but remains untested. Do not make the default one. + variant libdispatch_legacy conflicts libdispatch description "Enable libdispatch support for legacy systems" { + depends_lib-append \ + port:libdispatch-legacy + configure.args-replace \ + -DBUILD_XDISPATCH2_BACKEND_LIBDISPATCH=OFF \ + -DBUILD_XDISPATCH2_BACKEND_LIBDISPATCH=ON + configure.cppflags-append \ + -I${prefix}/libexec/dispatch/usr/include + # Should be passed via C++ flags: + configure.cxxflags-append \ + -Wl,${prefix}/libexec/dispatch/usr/lib/libdispatch.a + } } variant tests description "Enable testing" { @@ -91,8 +95,7 @@ variant tests description "Enable testing" { # MUnit_tools.h: error: 'vsprintf' is deprecated: This function is provided # for compatibility reasons only [-Werror,-Wdeprecated-declarations] patchfiles-append \ - 0003-Fix-tests.patch \ - 0004-Tests-no-qt5.patch + 0002-Fix-tests.patch test.run yes test.cmd ${cmake.build_dir}/bin/xdispatch2_tests diff --git a/devel/xdispatch2/files/0002-Add-missing-stdexcept-header.patch b/devel/xdispatch2/files/0002-Add-missing-stdexcept-header.patch deleted file mode 100644 index 0c8caf20b3870..0000000000000 --- a/devel/xdispatch2/files/0002-Add-missing-stdexcept-header.patch +++ /dev/null @@ -1,21 +0,0 @@ -From d7805c0750b2ed30b92844c15f8a309d2d67c00c Mon Sep 17 00:00:00 2001 -From: Sergey Fedorov -Date: Wed, 3 Apr 2024 20:57:13 +0800 -Subject: [PATCH] Add missing stdexcept header - ---- - include/xdispatch/signals_barrier.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git include/xdispatch/signals_barrier.h include/xdispatch/signals_barrier.h -index 474b546..303f9a9 100644 ---- include/xdispatch/signals_barrier.h -+++ include/xdispatch/signals_barrier.h -@@ -27,6 +27,7 @@ - * @{ - */ - -+#include - #include - - #include "xdispatch/signals.h" diff --git a/devel/xdispatch2/files/0003-Fix-tests.patch b/devel/xdispatch2/files/0002-Fix-tests.patch similarity index 100% rename from devel/xdispatch2/files/0003-Fix-tests.patch rename to devel/xdispatch2/files/0002-Fix-tests.patch diff --git a/devel/xdispatch2/files/0004-Tests-no-qt5.patch b/devel/xdispatch2/files/0004-Tests-no-qt5.patch deleted file mode 100644 index 5045cbaa95941..0000000000000 --- a/devel/xdispatch2/files/0004-Tests-no-qt5.patch +++ /dev/null @@ -1,30 +0,0 @@ -From f403af368fc77d305722dfd4e9e513e06379be36 Mon Sep 17 00:00:00 2001 -From: Sergey Fedorov -Date: Wed, 3 Apr 2024 14:40:57 +0800 -Subject: [PATCH] Fix tests2 - ---- - CMakeLists.txt | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git CMakeLists.txt CMakeLists.txt -index c53d718..7bcaa3c 100755 ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -286,12 +286,11 @@ mz_auto_format( xdispatch ) - if(BUILD_XDISPATCH2_TESTS) - mz_add_executable(xdispatch2_tests tests) - -- add_executable(xdispatch2_test_package test_package/test_package.cpp) -- target_link_libraries(xdispatch2_test_package -- xdispatch xdispatch_dummy_qt5 -- ) -- - if( BUILD_XDISPATCH2_BACKEND_QT5 ) -+ add_executable(xdispatch2_test_package test_package/test_package.cpp) -+ target_link_libraries(xdispatch2_test_package -+ xdispatch xdispatch_dummy_qt5 -+ ) - add_executable(xdispatch2_test_package_qt5 test_package/test_package_qt5.cpp) - target_link_libraries(xdispatch2_test_package_qt5 - xdispatch xdispatch_qt5