Skip to content

Commit

Permalink
cad/PrusaSlicer: update to 2.7.2
Browse files Browse the repository at this point in the history
Reported by: Teodor Sigaev <teodorsigaev@gmail.com>
Reviewed by: lwhsu (mentor)
Sponsored by: Postgres Professional
Differential Revision: https://reviews.freebsd.org/D44315
  • Loading branch information
mizhka committed Mar 28, 2024
1 parent 9784fb2 commit c4fa8a7
Show file tree
Hide file tree
Showing 67 changed files with 369 additions and 240 deletions.
17 changes: 11 additions & 6 deletions cad/PrusaSlicer/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
PORTNAME= PrusaSlicer
DISTVERSIONPREFIX=version_
DISTVERSION= 2.6.0
PORTREVISION= 9
DISTVERSION= 2.7.2
CATEGORIES= cad
DIST_SUBDIR= PrusaSlicer

Expand All @@ -14,9 +13,13 @@ LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= cereal>=1.3.0.10:devel/cereal \
cgal>=5.0.2:math/cgal \
opencascade>=7.7.0:cad/opencascade
opencascade>=7.7.0:cad/opencascade \
libbgcode>=0.2.0:cad/libbgcode

LIB_DEPENDS= libtbb.so:devel/onetbb \
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 \
Expand All @@ -38,7 +41,8 @@ LIB_DEPENDS= libtbb.so:devel/onetbb \
libharfbuzz.so:print/harfbuzz \
libwayland-egl.so:graphics/wayland

USES= cmake cpe desktop-file-utils eigen:3 gettext gl pkgconfig jpeg iconv gnome xorg
USES= cmake cpe desktop-file-utils eigen:3 gettext gl gnome iconv \
jpeg pkgconfig xorg
CPE_VENDOR= prusa3d
USE_GITHUB= yes
GH_ACCOUNT= prusa3d
Expand All @@ -50,7 +54,8 @@ USE_XORG= x11
CMAKE_ARGS+= -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \
-DSLIC3R_GTK=3 \
-DSLIC3R_FHS=1 \
-DSLIC3R_PCH=OFF
-DSLIC3R_PCH=OFF \
-DSLIC3R_BUILD_TESTS=OFF

PORTDATA= *

Expand Down
6 changes: 3 additions & 3 deletions cad/PrusaSlicer/distinfo
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TIMESTAMP = 1690319127
SHA256 (PrusaSlicer/prusa3d-PrusaSlicer-version_2.6.0_GH0.tar.gz) = a15f68e3b18a047c8c9a18a9d91629d2c777be1932087684cf6d2332d0888e77
SIZE (PrusaSlicer/prusa3d-PrusaSlicer-version_2.6.0_GH0.tar.gz) = 56430180
TIMESTAMP = 1709292528
SHA256 (PrusaSlicer/prusa3d-PrusaSlicer-version_2.7.2_GH0.tar.gz) = 0af8ab83ad33cdebc1d13d37d8ed3b2125d84532eb4bca7618c422bf7648ebee
SIZE (PrusaSlicer/prusa3d-PrusaSlicer-version_2.7.2_GH0.tar.gz) = 64915607
21 changes: 15 additions & 6 deletions cad/PrusaSlicer/files/patch-CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
--- CMakeLists.txt.orig 2023-06-19 12:07:14 UTC
--- CMakeLists.txt.orig 2024-02-29 13:03:32 UTC
+++ CMakeLists.txt
@@ -4,6 +4,7 @@ include(CMakeDependentOption)
@@ -14,6 +14,7 @@ include(CMakeDependentOption)
include("version.inc")
include(GNUInstallDirs)
include(CMakeDependentOption)
+add_compile_options(-DNDEBUG)

set(SLIC3R_RESOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/resources")
file(TO_NATIVE_PATH "${SLIC3R_RESOURCES_DIR}" SLIC3R_RESOURCES_DIR_WIN)
@@ -207,7 +208,7 @@ endif ()
@@ -218,7 +219,7 @@ endif ()
endif ()
endif ()

Expand All @@ -17,7 +17,16 @@
find_package(PkgConfig REQUIRED)

if (CMAKE_VERSION VERSION_LESS "3.1")
@@ -446,7 +447,7 @@ find_package(EXPAT REQUIRED)
@@ -248,6 +249,8 @@ if (NOT MSVC AND ("${CMAKE_CXX_COMPILER_ID}" STREQUAL
# On GCC and Clang, no return from a non-void function is a warning only. Here, we make it an error.
add_compile_options(-Werror=return-type)

+ add_compile_options(-Wno-enum-constexpr-conversion -Wno-implicit-const-int-float-conversion)
+
# removes LOTS of extraneous Eigen warnings (GCC only supports it since 6.1)
# https://eigen.tuxfamily.org/bz/show_bug.cgi?id=1221
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0)
@@ -457,7 +460,7 @@ find_package(EXPAT REQUIRED)
# no matter what.
find_package(EXPAT REQUIRED)

Expand All @@ -26,7 +35,7 @@

if (TARGET EXPAT::EXPAT )
target_link_libraries(libexpat INTERFACE EXPAT::EXPAT)
@@ -627,8 +628,8 @@ elseif (SLIC3R_FHS)
@@ -631,8 +634,8 @@ elseif (SLIC3R_FHS)
install(DIRECTORY ${SLIC3R_RESOURCES_DIR}/ DESTINATION ${SLIC3R_FHS_RESOURCES}
PATTERN "*/udev" EXCLUDE
)
Expand All @@ -37,7 +46,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
@@ -637,7 +638,8 @@ elseif (SLIC3R_FHS)
@@ -641,7 +644,8 @@ elseif (SLIC3R_FHS)
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME PrusaSlicer-gcodeviewer.png
)
endforeach()
Expand Down
12 changes: 6 additions & 6 deletions cad/PrusaSlicer/files/patch-src_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
--- src/CMakeLists.txt.orig 2023-06-19 12:07:14 UTC
--- src/CMakeLists.txt.orig 2023-12-12 14:21:21 UTC
+++ src/CMakeLists.txt
@@ -78,7 +78,7 @@ if (SLIC3R_GUI)
@@ -62,7 +62,7 @@ if (SLIC3R_GUI)

find_package(JPEG QUIET)
find_package(TIFF QUIET)
find_package(JPEG MODULE QUIET)
find_package(TIFF MODULE QUIET) # Tiff exported config is broken for static build
- find_package(NanoSVG REQUIRED)
+ # 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)
@@ -147,7 +147,7 @@ endif ()
@@ -131,7 +131,7 @@ if (NOT WIN32 AND NOT APPLE)
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
endif ()

Expand Down
2 changes: 1 addition & 1 deletion cad/PrusaSlicer/files/patch-src_libnanosvg_nanosvg.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- src/libnanosvg/nanosvg.h.orig 2024-03-17 16:57:39 UTC
--- src/libnanosvg/nanosvg.h.orig 2024-01-12 13:12:38 UTC
+++ src/libnanosvg/nanosvg.h
@@ -0,0 +1,3106 @@
+/*
Expand Down
2 changes: 1 addition & 1 deletion cad/PrusaSlicer/files/patch-src_libnanosvg_nanosvgrast.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--- src/libnanosvg/nanosvgrast.h.orig 2024-03-17 16:57:40 UTC
--- src/libnanosvg/nanosvgrast.h.orig 2024-01-12 13:12:38 UTC
+++ src/libnanosvg/nanosvgrast.h
@@ -0,0 +1,1482 @@
+/*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- src/libslic3r/Arrange/Core/NFP/NFPConcave_CGAL.cpp.orig 2024-03-01 12:13:10 UTC
+++ src/libslic3r/Arrange/Core/NFP/NFPConcave_CGAL.cpp
@@ -5,6 +5,8 @@
#include "NFP.hpp"
#include "NFPConcave_CGAL.hpp"

+#include <boost/next_prior.hpp>
+
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/partition_2.h>
#include <CGAL/Partition_traits_2.h>
4 changes: 2 additions & 2 deletions cad/PrusaSlicer/files/patch-src_libslic3r_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- src/libslic3r/CMakeLists.txt.orig 2023-06-19 12:07:14 UTC
--- src/libslic3r/CMakeLists.txt.orig 2024-02-29 13:03:32 UTC
+++ src/libslic3r/CMakeLists.txt
@@ -490,7 +490,6 @@ target_link_libraries(libslic3r
@@ -575,7 +575,6 @@ target_link_libraries(libslic3r
target_link_libraries(libslic3r
libnest2d
admesh
Expand Down
10 changes: 10 additions & 0 deletions cad/PrusaSlicer/files/patch-src_libslic3r_CutSurface.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- src/libslic3r/CutSurface.cpp.orig 2024-03-01 11:43:14 UTC
+++ src/libslic3r/CutSurface.cpp
@@ -29,6 +29,7 @@ using namespace Slic3r;
using namespace Slic3r;
#include "ExPolygonsIndex.hpp"

+#include <boost/next_prior.hpp>
#include <CGAL/Polygon_mesh_processing/corefinement.h>
#include <CGAL/Exact_integer.h>
#include <CGAL/Surface_mesh.h>
11 changes: 11 additions & 0 deletions cad/PrusaSlicer/files/patch-src_libslic3r_EmbossShape.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- src/libslic3r/EmbossShape.hpp.orig 2024-01-12 13:37:33 UTC
+++ src/libslic3r/EmbossShape.hpp
@@ -12,7 +12,7 @@
#include "Point.hpp" // Transform3d
#include "ExPolygon.hpp"
#include "ExPolygonSerialize.hpp"
-#include "nanosvg/nanosvg.h" // NSVGimage
+#include "libnanosvg/nanosvg.h" // NSVGimage

namespace Slic3r {

4 changes: 2 additions & 2 deletions cad/PrusaSlicer/files/patch-src_libslic3r_Format_SL1__SVG.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- src/libslic3r/Format/SL1_SVG.cpp.orig 2023-07-21 14:55:56 UTC
--- src/libslic3r/Format/SL1_SVG.cpp.orig 2023-12-12 14:21:21 UTC
+++ src/libslic3r/Format/SL1_SVG.cpp
@@ -6,7 +6,8 @@
@@ -10,7 +10,8 @@
#include "libslic3r/Format/ZipperArchiveImport.hpp"

#define NANOSVG_IMPLEMENTATION
Expand Down
6 changes: 3 additions & 3 deletions cad/PrusaSlicer/files/patch-src_libslic3r_GCodeSender.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- src/libslic3r/GCodeSender.cpp.orig 2023-07-24 22:05:38 UTC
--- src/libslic3r/GCodeSender.cpp.orig 2023-12-12 14:21:21 UTC
+++ src/libslic3r/GCodeSender.cpp
@@ -8,7 +8,7 @@
@@ -14,7 +14,7 @@
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/lexical_cast.hpp>

Expand All @@ -9,7 +9,7 @@
#include <termios.h>
#endif
#ifdef __APPLE__
@@ -146,7 +146,7 @@ GCodeSender::set_baud_rate(unsigned int baud_rate)
@@ -152,7 +152,7 @@ GCodeSender::set_baud_rate(unsigned int baud_rate)
if (ioctl(handle, TCSETS2, &ios))
printf("Error in TCSETS2: %s\n", strerror(errno));

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--- src/libslic3r/Geometry/VoronoiUtilsCgal.cpp.orig 2024-03-01 11:50:11 UTC
+++ src/libslic3r/Geometry/VoronoiUtilsCgal.cpp
@@ -2,6 +2,7 @@
///|/
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/
+#include <boost/next_prior.hpp>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Arr_segment_traits_2.h>
#include <CGAL/Surface_sweep_2_algorithms.h>
@@ -325,4 +326,4 @@ VoronoiUtilsCgal::is_voronoi_diagram_planar_angle(cons
return true;
}

-} // namespace Slic3r::Geometry
\ No newline at end of file
+} // namespace Slic3r::Geometry
11 changes: 11 additions & 0 deletions cad/PrusaSlicer/files/patch-src_libslic3r_MeshBoolean.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- src/libslic3r/MeshBoolean.cpp.orig 2024-03-01 11:44:05 UTC
+++ src/libslic3r/MeshBoolean.cpp
@@ -8,6 +8,8 @@
#include "libslic3r/TryCatchSignal.hpp"
#undef PI

+#include <boost/next_prior.hpp>
+
// Include igl first. It defines "L" macro which then clashes with our localization
#include <igl/copyleft/cgal/mesh_boolean.h>
#undef L
8 changes: 4 additions & 4 deletions cad/PrusaSlicer/files/patch-src_libslic3r_NSVGUtils.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--- src/libslic3r/NSVGUtils.hpp.orig 2023-07-25 16:16:15 UTC
--- src/libslic3r/NSVGUtils.hpp.orig 2023-12-12 14:21:21 UTC
+++ src/libslic3r/NSVGUtils.hpp
@@ -3,7 +3,7 @@

@@ -11,7 +11,7 @@
#include "Polygon.hpp"
#include "ExPolygon.hpp"
#include "EmbossShape.hpp" // ExPolygonsWithIds
-#include "nanosvg/nanosvg.h" // load SVG file
+#include "libnanosvg/nanosvg.h" // load SVG file

// Helper function to work with nano svg
namespace Slic3r {

4 changes: 2 additions & 2 deletions cad/PrusaSlicer/files/patch-src_libslic3r_Platform.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- src/libslic3r/Platform.cpp.orig 2022-09-06 07:09:19 UTC
--- src/libslic3r/Platform.cpp.orig 2023-12-12 14:21:21 UTC
+++ src/libslic3r/Platform.cpp
@@ -86,6 +86,10 @@ void detect_platform()
@@ -90,6 +90,10 @@ void detect_platform()
BOOST_LOG_TRIVIAL(info) << "Platform: OpenBSD";
s_platform = Platform::BSDUnix;
s_platform_flavor = PlatformFlavor::OpenBSD;
Expand Down
4 changes: 2 additions & 2 deletions cad/PrusaSlicer/files/patch-src_libslic3r_Platform.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- src/libslic3r/Platform.hpp.orig 2022-09-06 07:09:19 UTC
--- src/libslic3r/Platform.hpp.orig 2023-12-12 14:21:21 UTC
+++ src/libslic3r/Platform.hpp
@@ -25,6 +25,7 @@ enum class PlatformFlavor
@@ -29,6 +29,7 @@ enum class PlatformFlavor
WSL, // Microsoft's Windows on Linux (Linux kernel simulated on NTFS kernel)
WSL2, // Microsoft's Windows on Linux, version 2 (virtual machine)
OpenBSD, // For Platform::BSDUnix
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
--- src/libslic3r/SupportSpotsGenerator.cpp.orig 2023-07-25 08:36:31 UTC
--- src/libslic3r/SupportSpotsGenerator.cpp.orig 2024-02-29 13:03:32 UTC
+++ src/libslic3r/SupportSpotsGenerator.cpp
@@ -849,7 +849,7 @@ std::tuple<SupportPoints, PartialObjects> check_stabil
}
}
@@ -1054,7 +1054,7 @@ SliceMappings update_active_object_parts(const Layer
}
- auto estimate_conn_strength = [bottom_z](const SliceConnection &conn) {
+ auto estimate_conn_strength = [bottom_z](const SliceConnection &conn) -> float {
if (conn.area < EPSILON) { // connection is empty, does not exists. Return max strength so that it is not picked as the
// weakest connection.
return INFINITY;
}
const float bottom_z = layer->bottom_z();
- auto estimate_conn_strength = [bottom_z](const SliceConnection &conn) {
+ auto estimate_conn_strength = [bottom_z](const SliceConnection &conn) -> float {
if (conn.area < EPSILON) { // connection is empty, does not exists. Return max strength so that it is not picked as the
// weakest connection.
return INFINITY;
12 changes: 12 additions & 0 deletions cad/PrusaSlicer/files/patch-src_libslic3r_Triangulation.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- src/libslic3r/Triangulation.cpp.orig 2024-03-01 11:48:14 UTC
+++ src/libslic3r/Triangulation.cpp
@@ -2,6 +2,9 @@
///|/
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
///|/
+
+#include <boost/next_prior.hpp>
+
#include "Triangulation.hpp"
#include "IntersectionPoints.hpp"
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
10 changes: 5 additions & 5 deletions cad/PrusaSlicer/files/patch-src_slic3r_CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
--- src/slic3r/CMakeLists.txt.orig 2023-06-19 12:07:14 UTC
--- src/slic3r/CMakeLists.txt.orig 2023-12-12 14:21:21 UTC
+++ src/slic3r/CMakeLists.txt
@@ -293,7 +293,7 @@ set(SLIC3R_GUI_SOURCES
Utils/WxFontUtils.hpp
@@ -333,7 +333,7 @@ set(SLIC3R_GUI_SOURCES
Utils/WifiScanner.cpp
)

-find_package(NanoSVG REQUIRED)
+# find_package(NanoSVG REQUIRED)

if (APPLE)
list(APPEND SLIC3R_GUI_SOURCES
@@ -319,11 +319,12 @@ encoding_check(libslic3r_gui)
@@ -362,11 +362,12 @@ endforeach()

encoding_check(libslic3r_gui)

Expand All @@ -23,4 +23,4 @@
+elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
target_link_libraries(libslic3r_gui ${DBUS_LIBRARIES})
elseif (APPLE)
target_link_libraries(libslic3r_gui ${DISKARBITRATION_LIBRARY})
target_link_libraries(libslic3r_gui ${DISKARBITRATION_LIBRARY} ${COREWLAN_LIBRARY})
8 changes: 4 additions & 4 deletions cad/PrusaSlicer/files/patch-src_slic3r_GUI_BitmapCache.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- src/slic3r/GUI/BitmapCache.cpp.orig 2023-07-21 12:45:35 UTC
--- src/slic3r/GUI/BitmapCache.cpp.orig 2023-12-12 14:21:21 UTC
+++ src/slic3r/GUI/BitmapCache.cpp
@@ -15,8 +15,9 @@
@@ -20,8 +20,9 @@
#include <wx/rawbmp.h>
#endif /* __WXGTK2__ */

Expand All @@ -12,7 +12,7 @@

namespace Slic3r { namespace GUI {

@@ -68,7 +69,7 @@ wxBitmapBundle* BitmapCache::insert_bndl(const std::st
@@ -73,7 +74,7 @@ wxBitmapBundle* BitmapCache::insert_bndl(const std::st
wxVector<wxBitmap> bitmaps;

std::set<double> scales = {1.0};
Expand All @@ -21,7 +21,7 @@

#ifdef __APPLE__
scales.emplace(m_scale);
@@ -547,7 +548,7 @@ wxBitmapBundle BitmapCache::mksolid(size_t width_in, s
@@ -554,7 +555,7 @@ wxBitmapBundle BitmapCache::mksolid(size_t width_in, s
wxVector<wxBitmap> bitmaps;

std::set<double> scales = { 1.0 };
Expand Down
Loading

0 comments on commit c4fa8a7

Please sign in to comment.