diff --git a/cad/PrusaSlicer/Makefile b/cad/PrusaSlicer/Makefile index 57911f4861a9..f2940ab7b3db 100644 --- a/cad/PrusaSlicer/Makefile +++ b/cad/PrusaSlicer/Makefile @@ -1,72 +1,70 @@ PORTNAME= PrusaSlicer DISTVERSIONPREFIX=version_ DISTVERSION= 2.9.0 -PORTREVISION= 1 CATEGORIES= cad DIST_SUBDIR= PrusaSlicer MAINTAINER= teodorsigaev@gmail.com COMMENT= Slicing application for 3D printers WWW= https://www.prusa3d.com/prusaslicer/ LICENSE= AGPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE #BROKEN= fails to build with Boost>=1.87 BUILD_DEPENDS= cereal>=1.3.0.10:devel/cereal \ cgal>=5.0.2:math/cgal \ opencascade>=7.7.0:cad/opencascade \ libbgcode>=0.2.0_1:cad/libbgcode \ hidapi>=0.14.0:comms/hidapi LIB_DEPENDS+= libbgcode_convert.so:cad/libbgcode \ libbgcode_binarize.so:cad/libbgcode \ libbgcode_core.so:cad/libbgcode \ libtbb.so:devel/onetbb \ libboost_log.so:devel/boost-libs \ libImath.so:math/Imath \ libnlopt.so:math/nlopt \ libqhull_r.so:math/qhull \ libcurl.so:ftp/curl \ libexpat.so:textproc/expat2 \ libiconv.so:converters/libiconv \ libopenvdb.so:misc/openvdb \ libgmp.so:math/gmp \ libmpfr.so:math/mpfr \ libdbus-1.so:devel/dbus \ libpng.so:graphics/png \ libTKXSDRAWSTEP.so:cad/opencascade \ libtiff.so:graphics/tiff \ libfontconfig.so:x11-fonts/fontconfig \ libfreeimage.so:graphics/freeimage \ libfreetype.so:print/freetype2 \ libavcodec.so:multimedia/ffmpeg4 \ libharfbuzz.so:print/harfbuzz \ libwayland-egl.so:graphics/wayland \ libwebkit2gtk-4.0.so:www/webkit2-gtk@40 \ libsoup-2.4.so:devel/libsoup \ libjavascriptcoregtk-4.0.so:www/webkit2-gtk@40 USES= cmake cpe desktop-file-utils eigen:3 gettext gl gnome iconv \ jpeg pkgconfig xorg ssl tcl tk CPE_VENDOR= prusa3d USE_GITHUB= yes GH_ACCOUNT= prusa3d USE_GL= gl glu glew USE_GNOME= gtk30 pango atk cairo gdkpixbuf glib20 USE_WX= 3.2 USE_XORG= x11 -CMAKE_ARGS+= -DCMAKE_FIND_DEBUG_MODE=TRUE \ - -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \ +CMAKE_ARGS+= -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \ -DSLIC3R_GTK=3 \ -DSLIC3R_FHS=1 \ -DSLIC3R_PCH=OFF \ -DSLIC3R_BUILD_TESTS=OFF PORTDATA= * post-patch: ${MKDIR} ${WRKSRC}/bundled_deps/hidapi/libusb ${CP} ${FILESDIR}/hid.c ${WRKSRC}/bundled_deps/hidapi/libusb/hid.c .include diff --git a/cad/PrusaSlicer/files/patch-CMakeLists.txt b/cad/PrusaSlicer/files/patch-CMakeLists.txt index 8c84aa8b960d..297a2a5d44b8 100644 --- a/cad/PrusaSlicer/files/patch-CMakeLists.txt +++ b/cad/PrusaSlicer/files/patch-CMakeLists.txt @@ -1,50 +1,37 @@ ---- CMakeLists.txt.orig 2024-12-20 11:54:34 UTC +--- CMakeLists.txt.orig 2025-02-14 18:17:10 UTC +++ CMakeLists.txt @@ -233,7 +233,7 @@ endif () endif () endif () -if (CMAKE_SYSTEM_NAME STREQUAL "Linux") +if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") find_package(PkgConfig REQUIRED) if (CMAKE_VERSION VERSION_LESS "3.1") -@@ -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) +@@ -635,8 +635,14 @@ elseif (SLIC3R_FHS) install(DIRECTORY ${SLIC3R_RESOURCES_DIR}/ DESTINATION ${SLIC3R_FHS_RESOURCES} PATTERN "*/udev" EXCLUDE ) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") install(FILES src/platform/unix/PrusaSlicer.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) install(FILES src/platform/unix/PrusaGcodeviewer.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications) +endif() +if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + install(FILES src/platform/unix/PrusaSlicer.desktop DESTINATION share/applications) + install(FILES src/platform/unix/PrusaGcodeviewer.desktop DESTINATION share/applications) +endif() 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 +655,10 @@ elseif (SLIC3R_FHS) +@@ -645,7 +651,10 @@ elseif (SLIC3R_FHS) DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME PrusaSlicer-gcodeviewer.png ) endforeach() +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") install(DIRECTORY ${SLIC3R_RESOURCES_DIR}/udev/ DESTINATION lib/udev/rules.d) +endif() + else () install(FILES src/platform/unix/PrusaSlicer.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications) install(FILES src/platform/unix/PrusaGcodeviewer.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications) diff --git a/cad/PrusaSlicer/files/patch-src_CMakeLists.txt b/cad/PrusaSlicer/files/patch-src_CMakeLists.txt index 63009ba196c6..e9a16c47e89d 100644 --- a/cad/PrusaSlicer/files/patch-src_CMakeLists.txt +++ b/cad/PrusaSlicer/files/patch-src_CMakeLists.txt @@ -1,20 +1,11 @@ ---- src/CMakeLists.txt.orig 2024-12-20 11:54:34 UTC +--- src/CMakeLists.txt.orig 2025-02-14 18:46:38 UTC +++ src/CMakeLists.txt @@ -48,7 +48,7 @@ if (SLIC3R_GUI) endif() find_package(JPEG MODULE QUIET) - find_package(NanoSVG REQUIRED) + #find_package(NanoSVG REQUIRED) 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") diff --git a/cad/PrusaSlicer/files/patch-src_slic3r-arrange_include_arrange_DataStoreTraits.hpp b/cad/PrusaSlicer/files/patch-src_slic3r-arrange_include_arrange_DataStoreTraits.hpp new file mode 100644 index 000000000000..53673b209d6c --- /dev/null +++ b/cad/PrusaSlicer/files/patch-src_slic3r-arrange_include_arrange_DataStoreTraits.hpp @@ -0,0 +1,10 @@ +--- src/slic3r-arrange/include/arrange/DataStoreTraits.hpp.orig 2025-03-14 14:06:59 UTC ++++ src/slic3r-arrange/include/arrange/DataStoreTraits.hpp +@@ -71,7 +71,7 @@ void set_data(ArrItem &itm, const std::string &key, T + template + void set_data(ArrItem &itm, const std::string &key, T &&data) + { +- WritableDataStoreTraits::template set(itm, key, std::forward(data)); ++ WritableDataStoreTraits::template set<>(itm, key, std::forward(data)); + } +