git: 2f27ce4f425b - main - cad/PrusaSlicer: Try to fix libdbus
Date: Fri, 14 Mar 2025 13:53:46 UTC
The branch main has been updated by mr:
URL: https://cgit.FreeBSD.org/ports/commit/?id=2f27ce4f425b3d324a16b69a5c73ceb11b57046a
commit 2f27ce4f425b3d324a16b69a5c73ceb11b57046a
Author: Michael Reifenberger <mr@FreeBSD.org>
AuthorDate: 2025-03-14 13:49:55 +0000
Commit: Michael Reifenberger <mr@FreeBSD.org>
CommitDate: 2025-03-14 13:49:55 +0000
cad/PrusaSlicer: Try to fix libdbus
---
cad/PrusaSlicer/Makefile | 4 +++-
cad/PrusaSlicer/files/patch-CMakeLists.txt | 19 ++++++++++++++++---
cad/PrusaSlicer/files/patch-src_CMakeLists.txt | 11 ++++++++++-
3 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/cad/PrusaSlicer/Makefile b/cad/PrusaSlicer/Makefile
index 08352f6c206d..492e4e137c5b 100644
--- a/cad/PrusaSlicer/Makefile
+++ b/cad/PrusaSlicer/Makefile
@@ -1,6 +1,7 @@
PORTNAME= PrusaSlicer
DISTVERSIONPREFIX=version_
DISTVERSION= 2.9.0
+PORTREVISION= 1
CATEGORIES= cad
DIST_SUBDIR= PrusaSlicer
@@ -57,7 +58,8 @@ USE_GNOME= gtk30 pango atk cairo gdkpixbuf2 glib20
USE_WX= 3.2
USE_XORG= x11
-CMAKE_ARGS+= -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \
+CMAKE_ARGS+= -DCMAKE_FIND_DEBUG_MODE=TRUE \
+ -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \
-DSLIC3R_GTK=3 \
-DSLIC3R_FHS=1 \
-DSLIC3R_PCH=OFF \
diff --git a/cad/PrusaSlicer/files/patch-CMakeLists.txt b/cad/PrusaSlicer/files/patch-CMakeLists.txt
index 297a2a5d44b8..8c84aa8b960d 100644
--- a/cad/PrusaSlicer/files/patch-CMakeLists.txt
+++ b/cad/PrusaSlicer/files/patch-CMakeLists.txt
@@ -1,4 +1,4 @@
---- CMakeLists.txt.orig 2025-02-14 18:17:10 UTC
+--- CMakeLists.txt.orig 2024-12-20 11:54:34 UTC
+++ CMakeLists.txt
@@ -233,7 +233,7 @@ endif ()
endif ()
@@ -9,7 +9,20 @@
find_package(PkgConfig REQUIRED)
if (CMAKE_VERSION VERSION_LESS "3.1")
-@@ -635,8 +635,14 @@ elseif (SLIC3R_FHS)
+@@ -245,7 +245,11 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(THREADS_PREFER_PTHREAD_FLAG ON)
+ find_package(Threads REQUIRED)
+
+- find_package(DBus1 REQUIRED)
++ # find_package(DBus1 REQUIRED)
++ pkg_check_modules(DBUS REQUIRED dbus-1)
++ include_directories(${DBUS_INCLUDE_DIRS})
++ link_directories(${DBUS_LIBRARY_DIRS})
++
+ endif()
+
+ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUXX)
+@@ -635,8 +639,14 @@ elseif (SLIC3R_FHS)
install(DIRECTORY ${SLIC3R_RESOURCES_DIR}/ DESTINATION ${SLIC3R_FHS_RESOURCES}
PATTERN "*/udev" EXCLUDE
)
@@ -24,7 +37,7 @@
foreach(SIZE 32 128 192)
install(FILES ${SLIC3R_RESOURCES_DIR}/icons/PrusaSlicer_${SIZE}px.png
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME PrusaSlicer.png
-@@ -645,7 +651,10 @@ elseif (SLIC3R_FHS)
+@@ -645,7 +655,10 @@ elseif (SLIC3R_FHS)
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME PrusaSlicer-gcodeviewer.png
)
endforeach()
diff --git a/cad/PrusaSlicer/files/patch-src_CMakeLists.txt b/cad/PrusaSlicer/files/patch-src_CMakeLists.txt
index e9a16c47e89d..63009ba196c6 100644
--- a/cad/PrusaSlicer/files/patch-src_CMakeLists.txt
+++ b/cad/PrusaSlicer/files/patch-src_CMakeLists.txt
@@ -1,4 +1,4 @@
---- src/CMakeLists.txt.orig 2025-02-14 18:46:38 UTC
+--- src/CMakeLists.txt.orig 2024-12-20 11:54:34 UTC
+++ src/CMakeLists.txt
@@ -48,7 +48,7 @@ if (SLIC3R_GUI)
endif()
@@ -9,3 +9,12 @@
string(REGEX MATCH "wxpng" WX_PNG_BUILTIN ${wxWidgets_LIBRARIES})
if (PNG_FOUND AND NOT WX_PNG_BUILTIN)
+@@ -100,6 +100,8 @@ endif ()
+ else ()
+ add_executable(PrusaSlicer PrusaSlicer.cpp PrusaSlicer.hpp)
+ endif ()
++
++target_link_libraries(PrusaSlicer ${DBUS_LIBRARIES})
+
+ if (MINGW)
+ target_link_options(PrusaSlicer PUBLIC "-Wl,-allow-multiple-definition")