From 5ce4c24527ca0617f31705b6036c19272c47db96 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sat, 8 Mar 2025 11:55:48 +1000 Subject: [PATCH] SuperSlicer: fix build for beta5 --- .../patches/superslicer-2.5.60.0.patchset | 59 ++++++++++++++++++- .../superslicer/superslicer-2.5.60.0.recipe | 2 +- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/media-gfx/superslicer/patches/superslicer-2.5.60.0.patchset b/media-gfx/superslicer/patches/superslicer-2.5.60.0.patchset index d620628fd..3ec33aa99 100644 --- a/media-gfx/superslicer/patches/superslicer-2.5.60.0.patchset +++ b/media-gfx/superslicer/patches/superslicer-2.5.60.0.patchset @@ -1,4 +1,4 @@ -From e2f32187454f65589c6a2503548c96a3ab719f31 Mon Sep 17 00:00:00 2001 +From 9cc06c442e40499988b15302d00154b59760c3c3 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sat, 8 Mar 2025 00:05:18 +1000 Subject: Fixes for Haiku @@ -1272,3 +1272,60 @@ index 4db1acc..ac96361 100644 -- 2.48.1 + +From 6b5ed8503f6d5d4bf761658279e912ed13e7db8c Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Sat, 8 Mar 2025 11:46:27 +1000 +Subject: Implement set_thread_name for Haiku + + +diff --git a/src/libslic3r/Thread.cpp b/src/libslic3r/Thread.cpp +index 6f5efda..33bb3b5 100644 +--- a/src/libslic3r/Thread.cpp ++++ b/src/libslic3r/Thread.cpp +@@ -6,6 +6,10 @@ + #include + #endif + ++#ifdef __HAIKU__ ++#include ++#endif ++ + #include + #include + #include +@@ -157,6 +161,31 @@ std::optional get_current_thread_name() + return std::nullopt; + } + ++#elif defined(__HAIKU__) ++ ++bool set_thread_name(std::thread &thread, const char *thread_name) ++{ ++ return rename_thread(get_pthread_thread_id(thread.native_handle()), thread_name) == B_OK; ++} ++ ++bool set_thread_name(boost::thread &thread, const char *thread_name) ++{ ++ return rename_thread(get_pthread_thread_id(thread.native_handle()), thread_name) == B_OK; ++} ++ ++bool set_current_thread_name(const char *thread_name) ++{ ++ return rename_thread(find_thread(NULL), thread_name) == B_OK; ++} ++ ++std::optional get_current_thread_name() ++{ ++ thread_info info; ++ if (get_thread_info(find_thread(NULL), &info) == B_OK) ++ return std::string(info.name); ++ return std::string(""); ++} ++ + #else + + // posix +-- +2.48.1 + diff --git a/media-gfx/superslicer/superslicer-2.5.60.0.recipe b/media-gfx/superslicer/superslicer-2.5.60.0.recipe index bcd9d5142..497018f60 100644 --- a/media-gfx/superslicer/superslicer-2.5.60.0.recipe +++ b/media-gfx/superslicer/superslicer-2.5.60.0.recipe @@ -25,7 +25,7 @@ What are SuperSlicer main features? main new features/differences? HOMEPAGE="https://github.com/supermerill/SuperSlicer" COPYRIGHT="Merill" LICENSE="GNU AGPL v3" -REVISION="1" +REVISION="2" SOURCE_URI="https://github.com/supermerill/SuperSlicer/archive/refs/tags/$portVersion.tar.gz" CHECKSUM_SHA256="47ddf0dcf2d428e483011a74d32fe56a75fbe55dc8a3187956d5dd5758279dcb" SOURCE_DIR="SuperSlicer-$portVersion"