commit: cc07fdfc6286c7066eacb8a73775337ec70fd130
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 12 20:57:47 2024 +0000
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Thu Sep 12 20:58:04 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc07fdfc
media-gfx/prusaslicer: partially fixed live for 2.8.1 rc1
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>
.../prusaslicer/files/prusaslicer-2.8.1-cgal.patch | 84 ++++++++++++++++++++++
.../files/prusaslicer-2.8.1-eigen3.patch | 11 +++
.../files/prusaslicer-2.8.1-fixed-linking.patch | 10 +++
.../prusaslicer-2.8.1-opencascade-7.8.0.patch | 20 ++++++
media-gfx/prusaslicer/prusaslicer-9999.ebuild | 14 +++-
5 files changed, 136 insertions(+), 3 deletions(-)
diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal.patch
b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal.patch
new file mode 100644
index 000000000000..53267f1243ff
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal.patch
@@ -0,0 +1,84 @@
+--- a/src/libslic3r/CutSurface.cpp
++++ b/src/libslic3r/CutSurface.cpp
+@@ -1437,8 +1437,8 @@ priv::CutAOIs priv::cut_from_model(CutMesh
&cgal_model,
+ // detect anomalities in visitor.
+ bool is_valid = true;
+ // NOTE: map are created when convert shapes to cgal model
+- const EdgeShapeMap& edge_shape_map = cgal_shape.property_map<EI,
IntersectingElement>(edge_shape_map_name).first;
+- const FaceShapeMap& face_shape_map = cgal_shape.property_map<FI,
IntersectingElement>(face_shape_map_name).first;
++ EdgeShapeMap& edge_shape_map = cgal_shape.property_map<EI,
IntersectingElement>(edge_shape_map_name).value();
++ FaceShapeMap& face_shape_map = cgal_shape.property_map<FI,
IntersectingElement>(face_shape_map_name).value();
+ Visitor visitor{cgal_model, cgal_shape, edge_shape_map, face_shape_map,
vert_shape_map, &is_valid};
+
+ // a property map containing the constrained-or-not status of each edge
+@@ -1587,8 +1587,8 @@ void priv::collect_surface_data(std::queue<FI> &process,
+
+ void priv::create_reduce_map(ReductionMap &reduction_map, const CutMesh &mesh)
+ {
+- const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const
IntersectingElement*>(vert_shape_map_name).first;
+- const EdgeBoolMap &ecm = mesh.property_map<EI,
bool>(is_constrained_edge_name).first;
++ VertexShapeMap &vert_shape_map = mesh.property_map<VI, const
IntersectingElement*>(vert_shape_map_name).value();
++ EdgeBoolMap &ecm = mesh.property_map<EI,
bool>(is_constrained_edge_name).value();
+
+ // check if vertex was made by edge_2 which is diagonal of quad
+ auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool {
+@@ -1772,11 +1772,11 @@ priv::VDistances priv::calc_distances(const
SurfacePatches &patches,
+ priv::VDistances result(count_shapes_points);
+ for (const SurfacePatch &patch : patches) {
+ // map is created during intersection by corefine visitor
+- const VertexShapeMap &vert_shape_map =
+- models[patch.model_id].property_map<VI, const IntersectingElement
*>(vert_shape_map_name).first;
++ VertexShapeMap &vert_shape_map =
++ models[patch.model_id].property_map<VI, const IntersectingElement
*>(vert_shape_map_name).value();
+ uint32_t patch_index = &patch - &patches.front();
+ // map is created during patch creation / dividing
+- const CvtVI2VI& cvt = patch.mesh.property_map<VI,
VI>(patch_source_name).first;
++ CvtVI2VI& cvt = patch.mesh.property_map<VI,
VI>(patch_source_name).value();
+ // for each point on outline
+ for (const Loop &loop : patch.loops)
+ for (const VI &vi_patch : loop) {
+@@ -2785,7 +2785,7 @@ using BBS = std::vector<BoundingBoxf3>;
+ BBS create_bbs(const VCutAOIs &cuts, const CutMeshes &cut_models);
+
+ using Primitive = CGAL::AABB_face_graph_triangle_primitive<CutMesh>;
+-using Traits = CGAL::AABB_traits<EpicKernel, Primitive>;
++using Traits = CGAL::AABB_traits_3<EpicKernel, Primitive>;
+ using Ray = EpicKernel::Ray_3;
+ using Tree = CGAL::AABB_tree<Traits>;
+ using Trees = std::vector<Tree>;
+@@ -2939,7 +2939,7 @@ bool priv::is_patch_inside_of_model(const SurfacePatch
&patch,
+ uint32_t priv::get_shape_point_index(const CutAOI &cut, const CutMesh &model)
+ {
+ // map is created during intersection by corefine visitor
+- const VertexShapeMap &vert_shape_map = model.property_map<VI, const
IntersectingElement *>(vert_shape_map_name).first;
++ VertexShapeMap &vert_shape_map = model.property_map<VI, const
IntersectingElement *>(vert_shape_map_name).value();
+ // for each half edge of outline
+ for (HI hi : cut.second) {
+ VI vi = model.source(hi);
+@@ -2964,7 +2964,7 @@ priv::SurfacePatch priv::separate_patch(const
std::vector<FI>& fis,
+ patch_new.model_id = patch.model_id;
+ patch_new.shape_id = patch.shape_id;
+ // fix cvt
+- CvtVI2VI cvt = patch_new.mesh.property_map<VI,
VI>(patch_source_name).first;
++ CvtVI2VI cvt = patch_new.mesh.property_map<VI,
VI>(patch_source_name).value();
+ for (VI &vi : cvt) {
+ if (!vi.is_valid()) continue;
+ vi = cvt_from[vi];
+@@ -2984,7 +2984,7 @@ void priv::divide_patch(size_t i, SurfacePatchesEx
&patches)
+ std::string patch_number_name = "f:patch_number";
+ CutMesh::Property_map<FI,bool> is_processed = cm.add_property_map<FI,
bool>(patch_number_name, false).first;
+
+- const CvtVI2VI& cvt_from = patch.mesh.property_map<VI,
VI>(patch_source_name).first;
++ CvtVI2VI& cvt_from = patch.mesh.property_map<VI,
VI>(patch_source_name).value();
+
+ std::vector<FI> fis;
+ fis.reserve(cm.faces().size());
+@@ -3171,7 +3171,7 @@ bool priv::is_over_whole_expoly(const CutAOI &cutAOI,
+ const CutMesh &mesh)
+ {
+ // NonInterupted contour is without other point and contain all from
shape
+- const VertexShapeMap &vert_shape_map = mesh.property_map<VI, const
IntersectingElement*>(vert_shape_map_name).first;
++ VertexShapeMap &vert_shape_map = mesh.property_map<VI, const
IntersectingElement*>(vert_shape_map_name).value();
+ for (HI hi : cutAOI.second) {
+ const IntersectingElement *ie_s = vert_shape_map[mesh.source(hi)];
+ const IntersectingElement *ie_t = vert_shape_map[mesh.target(hi)];
diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.1-eigen3.patch
b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-eigen3.patch
new file mode 100644
index 000000000000..e215125b1486
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-eigen3.patch
@@ -0,0 +1,11 @@
+--- a/src/libslic3r/CMakeLists.txt
++++ b/src/libslic3r/CMakeLists.txt
+@@ -629,7 +629,7 @@ target_link_libraries(libslic3r PRIVATE
+ int128
+ )
+ target_link_libraries(libslic3r PUBLIC
+- Eigen3::Eigen
++ Eigen3
+ semver
+ admesh
+ localesutils
diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.1-fixed-linking.patch
b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-fixed-linking.patch
new file mode 100644
index 000000000000..2c7ab74a4c87
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-fixed-linking.patch
@@ -0,0 +1,10 @@
+--- a/src/slic3r/CMakeLists.txt
++++ b/src/slic3r/CMakeLists.txt
+@@ -376,6 +376,7 @@ set(SLIC3R_GUI_SOURCES
+ )
+
+ find_package(NanoSVG REQUIRED)
++find_package(OpenSSL REQUIRED)
+
+ if (APPLE)
+ list(APPEND SLIC3R_GUI_SOURCES
diff --git
a/media-gfx/prusaslicer/files/prusaslicer-2.8.1-opencascade-7.8.0.patch
b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-opencascade-7.8.0.patch
new file mode 100644
index 000000000000..1e37ce9baa19
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-opencascade-7.8.0.patch
@@ -0,0 +1,20 @@
+--- a/src/occt_wrapper/CMakeLists.txt
++++ b/src/occt_wrapper/CMakeLists.txt
+@@ -19,14 +19,11 @@ include(GenerateExportHeader)
+
+ generate_export_header(OCCTWrapper)
+
+-find_package(OpenCASCADE 7.6.1 REQUIRED)
++find_package(OpenCASCADE REQUIRED)
+
+ set(OCCT_LIBS
+- TKXDESTEP
+- TKSTEP
+- TKSTEP209
+- TKSTEPAttr
+- TKSTEPBase
++ TKDESTEP
++ TKDESTL
+ TKXCAF
+ TKXSBase
+ TKVCAF
diff --git a/media-gfx/prusaslicer/prusaslicer-9999.ebuild
b/media-gfx/prusaslicer/prusaslicer-9999.ebuild
index 2bb72a7c183f..e1c44c35352b 100644
--- a/media-gfx/prusaslicer/prusaslicer-9999.ebuild
+++ b/media-gfx/prusaslicer/prusaslicer-9999.ebuild
@@ -62,18 +62,26 @@ DEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/${PN}-2.6.0-dont-force-link-to-wayland-and-x11.patch"
"${FILESDIR}/${PN}-2.8.0-missing-includes.patch"
- "${FILESDIR}/${PN}-2.8.0-fixed-linking.patch"
+ "${FILESDIR}/${PN}-2.8.1-fixed-linking.patch"
+ "${FILESDIR}/${PN}-2.8.1-eigen3.patch"
+ "${FILESDIR}/${PN}-2.8.1-cgal.patch"
)
src_prepare() {
if has_version ">=sci-libs/opencascade-7.8.0"; then
- eapply "${FILESDIR}/prusaslicer-2.7.2-opencascade-7.8.0.patch"
+ eapply "${FILESDIR}/prusaslicer-2.8.1-opencascade-7.8.0.patch"
fi
sed -i -e
's/PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN/PrusaSlicer-${SLIC3R_VERSION}+Gentoo/g'
version.inc || die
- sed -i -e 's/find_package(OpenCASCADE 7.6.2
REQUIRED)/find_package(OpenCASCADE REQUIRED)/g' \
+ sed -i -e 's/find_package(OpenCASCADE 7.6.[0-9]
REQUIRED)/find_package(OpenCASCADE REQUIRED)/g' \
src/occt_wrapper/CMakeLists.txt || die
+
+ find . -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.hpp' \)
-exec \
+ sed -i 's|#include <Eigen/|#include <eigen3/Eigen/|g' {} + ||
die
+ find . -type f \( -name '*.cpp' -o -name '*.h' -o -name '*.hpp' \)
-exec \
+ sed -i 's|#include <unsupported/Eigen/|#include
<eigen3/unsupported/Eigen/|g' {} + || die
+
cmake_src_prepare
}