summaryrefslogtreecommitdiff
path: root/media-gfx/prusaslicer
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/prusaslicer')
-rw-r--r--media-gfx/prusaslicer/Manifest10
-rw-r--r--media-gfx/prusaslicer/files/prusaslicer-2.8.0-cgal-6.0.patch189
-rw-r--r--media-gfx/prusaslicer/files/prusaslicer-2.8.0-wxwidgets-3.2.4.patch28
-rw-r--r--media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal-6.0.patch191
-rw-r--r--media-gfx/prusaslicer/files/prusaslicer-2.8.1-fixed-linking.patch45
-rw-r--r--media-gfx/prusaslicer/files/prusaslicer-2.8.1-fstream.patch49
-rw-r--r--media-gfx/prusaslicer/files/prusaslicer-2.8.1-opencascade-7.8.0.patch20
-rw-r--r--media-gfx/prusaslicer/prusaslicer-2.8.0-r1.ebuild (renamed from media-gfx/prusaslicer/prusaslicer-2.8.0.ebuild)2
-rw-r--r--media-gfx/prusaslicer/prusaslicer-9999.ebuild13
9 files changed, 542 insertions, 5 deletions
diff --git a/media-gfx/prusaslicer/Manifest b/media-gfx/prusaslicer/Manifest
index 3216fac004b7..0dc1e5e32ae9 100644
--- a/media-gfx/prusaslicer/Manifest
+++ b/media-gfx/prusaslicer/Manifest
@@ -1,8 +1,14 @@
AUX prusaslicer-2.6.0-dont-force-link-to-wayland-and-x11.patch 448 BLAKE2B 1d4a96762ed6da41e5f4322d6ac6019fb3894321da206ea354d1d9b57e1892155a109c329590bad4393cffd748f9e27542a7cc468803329c8f493789a2b497b1 SHA512 71a3eb2bbe3766be555e94f32219edfb908bdd5f86c74971c1c9b2586306d70724c45b06edbd4ade232017259fe4a99e504447cbbbdd5d5c91f4df03f4d52140
AUX prusaslicer-2.7.2-opencascade-7.8.0.patch 323 BLAKE2B ee422c91800bf164098396dab448630174b2dd5444d55ff176f10b73e660a446006a0dadfcd2d3cde715b8b58023fe10dd41f6bddb6165fb405382b256eebc52 SHA512 408897cc09ad58e9828b5645553f948a0e0e1b6b07c0bca7bb3ab37789bd988a7076c6d2c79d16ee198f16fdacc59d408ea759e969c83787b2f4bc1161dd94b0
+AUX prusaslicer-2.8.0-cgal-6.0.patch 11085 BLAKE2B 459d6862ab6dceab56beaba58b15d91b398a16b7a8e2a25f0ed2e3f9a699f52d1408027501f4e29903ae50ef52a07555a63de370022de9bd4444e107c6c0df1f SHA512 b2339ab275600126a72a9eb60b805d72dc5101e140cfb31e713413ea2d3d96a5533ac058672d9c10df347ddd001597ec0af375b3eb429ad0f83e18386870497f
AUX prusaslicer-2.8.0-fixed-linking.patch 751 BLAKE2B d0a5593a2559514f68df6798fb9c4e5c0b9c4021ece74281311c2a19b8233914fcb16227b7aafa5ee222d41ac82c4d5c9c363c32029d13c44c7fe2cb02e60291 SHA512 5f2fdc0da5d979b8520d302549f42103f7e9b0588165430aff734d7d50d56e98c8c208394d9bfaf82f042c9ecac7a3ae72713bfe18341f0ba184cf313cec9206
AUX prusaslicer-2.8.0-missing-includes.patch 575 BLAKE2B aef794b75d180176f6ba4b1ec05e4ddfe740ced6000225ce51e3a15bd1143209a340af28dc91660d3f07696f19ad525ef86f5e84f3ff4c96ad77c90940059352 SHA512 65c2c8a2046bf39a9d0f5c073998ec93906efbeb8b2d3b7d835f1a65b2edc00c473fb2bed7396e35e45d00b9420f3942f2e16af2e2c6a1405e90341e41b16cf2
+AUX prusaslicer-2.8.0-wxwidgets-3.2.4.patch 1332 BLAKE2B a5e343f64e5f3c2150d170453579b87c3912b5bcb0a7cbd7d1076d2d1f1b10f4e586ed5237ef9faebdbfea23c0e8941a1d0c5f9c71fef2e0269c0120206f2155 SHA512 0fe1af19f8f55bbb11ca8b6685b73858f23b87e3785cb4babe4a8b5ae09694681df4d5f354af896ca1833be2d934da0cf8193285a25e8f28d588b52147ce96a2
+AUX prusaslicer-2.8.1-cgal-6.0.patch 11183 BLAKE2B 3d0b7729fd0a64eb335b1bb8fd4af547c71ddbaec1e589dc4aba2f608073b394c44012d18b127cc17a3b2d5ef8eaad31b21c00623326cc818ec953103ea6dd1c SHA512 a8a3e7c9e7d39519ae93f78b1c6b220f419ef0141a11e9d68c8a3f599a57e164221a572b6989a5b5285b61419cc207ed091834b4de1a442db5806402524e9885
+AUX prusaslicer-2.8.1-fixed-linking.patch 1220 BLAKE2B ef23b03e3fef11d7d1080a140af1085be748b5c0009084acd77f3596c8dffddbad0c612b6a0a2c0da12b130f325cf2798c3e7f41d99b75fd22c093b3e0747912 SHA512 9bdbbb76163549612157976e3770aae7c3b4644b4f9c29c17ca1420a9f7269e30db6556c5c0b06cb7475d6202346b69d21908e0847a7953fa6687ae58d8b0c8b
+AUX prusaslicer-2.8.1-fstream.patch 1862 BLAKE2B 872e9c5b035a3545e328c4d26504bbb4c64202d0d1a2c855ee1cda6e2a3923a7e12b7c9b7c3c236704a9f63ef6ca620744ba7264d08776ec6511b0c60aa9eb55 SHA512 8dea5eaba9e83cdfe8d0ede198fbc91d06619ffddc9ca8b950b9d1610fb4fa8d33778df184124dc31b787763caf335cb3ccc7aa5ab2ec9474653c725d8d7263f
+AUX prusaslicer-2.8.1-opencascade-7.8.0.patch 401 BLAKE2B e2d3a859e418be897d093fb499248d0dda8ab5e3be783cd653591923feb0c4808c7451f4f8e8f0907daa12bd8bd82350a12794c5c8f3136cc73b5ba28e8ba37e SHA512 feecf49443aac23a78c88127e08133f6a6989da93cc187c923aec347286e7cdc8425fc8e4e449f47547a4310a3572bb6391eeb8e7fb16b510db52d4f7f48fc49
DIST prusaslicer-2.8.0.tar.gz 69806919 BLAKE2B b87c63ae411814dbffc8ae96c243bf06018d600db732ef32f7c766ce6bdf156b0aca6da90868482f39b9c6421c6a386bccc9f69e23218dadc07f1bcdb21b9793 SHA512 d98b43e9e1a6da9cbab46b2564da02fc0f8521d84a4df915d0ffd0878ee1a25afebe7078e38b124ec8565782379c51a7f9564462652ef1a7d9819d29297c1937
-EBUILD prusaslicer-2.8.0.ebuild 2357 BLAKE2B 8802ef58761fa6d220836b97d70b0205614cc1f13383f1a33b07ccc3f36c219c21b235e04a6c2a402494bedc25e5a5afaaaeb10da96a67958e9b260865caa244 SHA512 d1eb4f621f967675bf1b86855db2246010098820d8ba2a0474c6a388122cbff7cdda5ed10854b118f7ad069ff10564989cd0e4364ee679a6be0474b9d9f5e09f
-EBUILD prusaslicer-9999.ebuild 2358 BLAKE2B 45a962647acce9d291eb1e9f45d4944dbd639b3533ff984919449218904c80d950d87df0070e7c597c2464a5603f044a0bfe4d556d02f6fef6fb68b798bd6e13 SHA512 88a8cb03f6a11239ba038579300793fe1323d023fe81195ebf810b524aad5eec17b408ab6c1c05312a6c37ada80bd4eff03c72677323361a5fd89d1bad994d66
+EBUILD prusaslicer-2.8.0-r1.ebuild 2448 BLAKE2B 500db712e5ea5911c11a50c757ac52cf1ac03675e97b365fd6089fe5ca483becd6ad1c8648ddd50ea1e2c29b6e47f06d7d907968a338f0b090128f5803bf6128 SHA512 95dd1d9d6e5cb6a97af18f1dd9b2bcbd2b23cbd69f402fe1893c2834c4388fb8655b0f711f5fada72b884feb8a85f616b8db151bc2340e3b8ee2818cb6e57520
+EBUILD prusaslicer-9999.ebuild 2710 BLAKE2B 3de57e6ef22c17c4f509c5556250ebeecd30f17e02db91bcf56cb2d26e4b2aeaaa4b3511c840551951eaef792143dd2c4f99b0ee61f0133d48b585269cb65c1b SHA512 f6fed2bc17acdf7c1ad6bd0d9f2da5ebe86e4d9cdc91eb0ae5f7bf02f3b6c2652fc8d3bc763b4f37057501e25901023fa5b3be5cb1527cb26ea9f3f825db7fc4
MISC metadata.xml 1028 BLAKE2B a267e6b0ee72a85b895046cc7d5f659cca379fd799a9ebb802dc1fafd7edfa1b989784b10eb93ac24f1ea6153153b892e28e20055b0a7d2021f6db7742e065b4 SHA512 5760ea954f5ccf09e5d69e101b6d68839a4517a9375adc3009b1bf846b98091ee0555e9c92bb0cf316670efec699cd24d04b4ebe7db5b65e363f83051d868512
diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.0-cgal-6.0.patch b/media-gfx/prusaslicer/files/prusaslicer-2.8.0-cgal-6.0.patch
new file mode 100644
index 000000000000..52013146b1c3
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.0-cgal-6.0.patch
@@ -0,0 +1,189 @@
+From a9283c62cec2b802aa2133c92b7ff5bf320c0bb6 Mon Sep 17 00:00:00 2001
+From: Laurent Rineau <laurent.rineau@cgal.org>
+Date: Sat, 13 Jul 2024 01:19:21 +0200
+Subject: [PATCH] compatibility with CGAL-6.0 (and 5.6.x)
+
+--- a/src/libslic3r/CutSurface.cpp
++++ b/src/libslic3r/CutSurface.cpp
+@@ -4,6 +4,14 @@
+ ///|/
+ #include "CutSurface.hpp"
+
++template <typename T>
++auto access_pmap(std::optional<T> opt) -> T {
++ return opt.value();
++}
++
++template <typename Pair>
++auto access_pmap(Pair pair) { return pair.first; }
++
+ /// models_input.obj - Check transormation of model to each others
+ /// projection_center.obj - circle representing center of projection with correct distance
+ /// {M} .. model index
+@@ -33,6 +41,7 @@ using namespace Slic3r;
+ #include <CGAL/Exact_integer.h>
+ #include <CGAL/Surface_mesh.h>
+ #include <CGAL/Cartesian_converter.h>
++#include <CGAL/AABB_traits.h>
+ #include <tbb/parallel_for.h>
+
+ // libslic3r
+@@ -997,8 +1006,8 @@ priv::CutMesh priv::to_cgal(const ExPolygons &shapes,
+ if (shapes.empty()) return {};
+
+ CutMesh result;
+- EdgeShapeMap edge_shape_map = result.add_property_map<EI, IntersectingElement>(edge_shape_map_name).first;
+- FaceShapeMap face_shape_map = result.add_property_map<FI, IntersectingElement>(face_shape_map_name).first;
++ EdgeShapeMap edge_shape_map = access_pmap((result.add_property_map<EI, IntersectingElement>(edge_shape_map_name)));
++ FaceShapeMap face_shape_map = access_pmap((result.add_property_map<FI, IntersectingElement>(face_shape_map_name)));
+
+ std::vector<VI> indices;
+ auto insert_contour = [&projection, &indices, &result,
+@@ -1408,17 +1417,17 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model,
+ const ExPolygonsIndices &s2i)
+ {
+ // pointer to edge or face shape_map
+- VertexShapeMap vert_shape_map = cgal_model.add_property_map<VI, const IntersectingElement*>(vert_shape_map_name, nullptr).first;
++ VertexShapeMap vert_shape_map = access_pmap((cgal_model.add_property_map<VI, const IntersectingElement*>(vert_shape_map_name, nullptr)));
+
+ // 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;
++ const EdgeShapeMap& edge_shape_map = access_pmap((cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name)));
++ const FaceShapeMap& face_shape_map = access_pmap((cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name)));
+ 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
+- EdgeBoolMap ecm = cgal_model.add_property_map<EI, bool>(is_constrained_edge_name, false).first;
++ EdgeBoolMap ecm = access_pmap((cgal_model.add_property_map<EI, bool>(is_constrained_edge_name, false)));
+ const auto &p = CGAL::parameters::visitor(visitor)
+ .edge_is_constrained_map(ecm)
+ .throw_on_self_intersection(false);
+@@ -1427,7 +1436,7 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model,
+
+ if (!is_valid) return {};
+
+- FaceTypeMap face_type_map = cgal_model.add_property_map<FI, FaceType>(face_type_map_name, FaceType::not_constrained).first;
++ FaceTypeMap face_type_map = access_pmap((cgal_model.add_property_map<FI, FaceType>(face_type_map_name, FaceType::not_constrained)));
+
+ // Select inside and outside face in model
+ set_face_type(face_type_map, cgal_model, vert_shape_map, ecm, cgal_shape, s2i);
+@@ -1563,8 +1572,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;
++ const VertexShapeMap &vert_shape_map = access_pmap((mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name)));
++ const EdgeBoolMap &ecm = access_pmap((mesh.property_map<EI, bool>(is_constrained_edge_name)));
+
+ // check if vertex was made by edge_2 which is diagonal of quad
+ auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool {
+@@ -1749,10 +1758,10 @@ priv::VDistances priv::calc_distances(const SurfacePatches &patches,
+ 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;
++ access_pmap((models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name)));
+ 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;
++ const CvtVI2VI& cvt = access_pmap((patch.mesh.property_map<VI, VI>(patch_source_name)));
+ // for each point on outline
+ for (const Loop &loop : patch.loops)
+ for (const VI &vi_patch : loop) {
+@@ -2640,7 +2649,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
+ /* const */ CutMesh &mesh,
+ const ReductionMap *rmap)
+ {
+- auto is_counted = mesh.add_property_map<VI, bool>("v:is_counted").first;
++ auto is_counted = access_pmap((mesh.add_property_map<VI, bool>("v:is_counted")));
+ uint32_t count_vertices = 0;
+ if (rmap == nullptr) {
+ for (FI fi : fis)
+@@ -2670,7 +2679,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
+ cm.reserve(count_vertices, count_edges, count_faces);
+
+ // vertex conversion function from mesh VI to result VI
+- CvtVI2VI mesh2result = mesh.add_property_map<VI,VI>("v:mesh2result").first;
++ CvtVI2VI mesh2result = access_pmap((mesh.add_property_map<VI,VI>("v:mesh2result")));
+
+ if (rmap == nullptr) {
+ for (FI fi : fis) {
+@@ -2722,7 +2731,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
+ assert(count_edges >= cm.edges().size());
+
+ // convert VI from this patch to source VI, when exist
+- CvtVI2VI cvt = cm.add_property_map<VI, VI>(patch_source_name).first;
++ CvtVI2VI cvt = access_pmap((cm.add_property_map<VI, VI>(patch_source_name)));
+ // vi_s .. VertexIndex into mesh (source)
+ // vi_d .. new VertexIndex in cm (destination)
+ for (VI vi_s : mesh.vertices()) {
+@@ -2913,7 +2922,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;
++ const VertexShapeMap &vert_shape_map = access_pmap((model.property_map<VI, const IntersectingElement *>(vert_shape_map_name)));
+ // for each half edge of outline
+ for (HI hi : cut.second) {
+ VI vi = model.source(hi);
+@@ -2938,7 +2947,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 = access_pmap((patch_new.mesh.property_map<VI, VI>(patch_source_name)));
+ for (VI &vi : cvt) {
+ if (!vi.is_valid()) continue;
+ vi = cvt_from[vi];
+@@ -2956,9 +2965,9 @@ void priv::divide_patch(size_t i, SurfacePatchesEx &patches)
+ CutMesh& cm = patch.mesh;
+ assert(!cm.faces().empty());
+ 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;
++ CutMesh::Property_map<FI,bool> is_processed = access_pmap((cm.add_property_map<FI, bool>(patch_number_name, false)));
+
+- const CvtVI2VI& cvt_from = patch.mesh.property_map<VI, VI>(patch_source_name).first;
++ const CvtVI2VI& cvt_from = access_pmap((patch.mesh.property_map<VI, VI>(patch_source_name)));
+
+ std::vector<FI> fis;
+ fis.reserve(cm.faces().size());
+@@ -3059,7 +3068,7 @@ priv::SurfacePatches priv::diff_models(VCutAOIs &cuts,
+ CutAOIs &model_cuts = cuts[model_index];
+ CutMesh &cut_model_ = cut_models[model_index];
+ const CutMesh &cut_model = cut_model_;
+- ReductionMap vertex_reduction_map = cut_model_.add_property_map<VI, VI>(vertex_reduction_map_name).first;
++ ReductionMap vertex_reduction_map = access_pmap((cut_model_.add_property_map<VI, VI>(vertex_reduction_map_name)));
+ create_reduce_map(vertex_reduction_map, cut_model);
+
+ for (size_t cut_index = 0; cut_index < model_cuts.size(); ++cut_index, ++index) {
+@@ -3145,7 +3154,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;
++ const VertexShapeMap &vert_shape_map = access_pmap((mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name)));
+ 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)];
+@@ -3682,7 +3691,7 @@ void priv::store(const CutMesh &mesh, const FaceTypeMap &face_type_map, const st
+ }
+
+ CutMesh &mesh_ = const_cast<CutMesh &>(mesh);
+- auto face_colors = mesh_.add_property_map<priv::FI, CGAL::Color>("f:color").first;
++ auto face_colors = access_pmap((mesh_.add_property_map<priv::FI, CGAL::Color>("f:color")));
+ for (FI fi : mesh.faces()) {
+ auto &color = face_colors[fi];
+ switch (face_type_map[fi]) {
+@@ -3708,7 +3717,7 @@ void priv::store(const CutMesh &mesh, const ReductionMap &reduction_map, const s
+ std::string off_file = dir + "model" + std::to_string(reduction_order++) + ".off";
+
+ CutMesh &mesh_ = const_cast<CutMesh &>(mesh);
+- auto vertex_colors = mesh_.add_property_map<priv::VI, CGAL::Color>("v:color").first;
++ auto vertex_colors = access_pmap((mesh_.add_property_map<priv::VI, CGAL::Color>("v:color")));
+ // initialize to gray color
+ for (VI vi: mesh.vertices())
+ vertex_colors[vi] = CGAL::Color{127, 127, 127};
diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.0-wxwidgets-3.2.4.patch b/media-gfx/prusaslicer/files/prusaslicer-2.8.0-wxwidgets-3.2.4.patch
new file mode 100644
index 000000000000..d7c700662b72
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.0-wxwidgets-3.2.4.patch
@@ -0,0 +1,28 @@
+From f67a877d583eba5472003f0ea4df3f7420d70734 Mon Sep 17 00:00:00 2001
+From: Gregor Riepl <onitake@gmail.com>
+Date: Mon, 27 Nov 2023 13:01:55 +0100
+Subject: [PATCH] Make initializers explicit to avoid ambiguous wxArrayString
+ overloads
+
+--- a/src/slic3r/GUI/PhysicalPrinterDialog.cpp
++++ b/src/slic3r/GUI/PhysicalPrinterDialog.cpp
+@@ -606,7 +606,7 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr
+ // Always fill in the "printhost_port" combo box from the config and select it.
+ {
+ Choice* choice = dynamic_cast<Choice*>(m_optgroup->get_field("printhost_port"));
+- choice->set_values({ m_config->opt_string("printhost_port") });
++ choice->set_values(std::vector<std::string>({ m_config->opt_string("printhost_port") }));
+ choice->set_selection();
+ }
+
+--- a/src/slic3r/GUI/Plater.cpp
++++ b/src/slic3r/GUI/Plater.cpp
+@@ -4048,7 +4048,7 @@ void Plater::load_project(const wxString& filename)
+
+ p->reset();
+
+- if (! load_files({ into_path(filename) }).empty()) {
++ if (! load_files(std::vector<boost::filesystem::path>({ into_path(filename) })).empty()) {
+ // At least one file was loaded.
+ p->set_project_filename(filename);
+ // Save the names of active presets and project specific config into ProjectDirtyStateManager.
diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal-6.0.patch b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal-6.0.patch
new file mode 100644
index 000000000000..3aac479197bb
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-cgal-6.0.patch
@@ -0,0 +1,191 @@
+From a9283c62cec2b802aa2133c92b7ff5bf320c0bb6 Mon Sep 17 00:00:00 2001
+From: Laurent Rineau <laurent.rineau@cgal.org>
+Date: Sat, 13 Jul 2024 01:19:21 +0200
+Subject: [PATCH] compatibility with CGAL-6.0 (and 5.6.x)
+
+updated for 2.8.1
+
+--- a/src/libslic3r/CutSurface.cpp
++++ b/src/libslic3r/CutSurface.cpp
+@@ -4,6 +4,14 @@
+ ///|/
+ #include "CutSurface.hpp"
+
++template <typename T>
++auto access_pmap(std::optional<T> opt) -> T {
++ return opt.value();
++}
++
++template <typename Pair>
++auto access_pmap(Pair pair) { return pair.first; }
++
+ /// models_input.obj - Check transormation of model to each others
+ /// projection_center.obj - circle representing center of projection with correct distance
+ /// {M} .. model index
+@@ -31,6 +39,7 @@ using namespace Slic3r;
+ #include <CGAL/Exact_integer.h>
+ #include <CGAL/Surface_mesh.h>
+ #include <CGAL/Cartesian_converter.h>
++#include <CGAL/AABB_traits.h>
+ #include <oneapi/tbb/blocked_range.h>
+ #include <oneapi/tbb/parallel_for.h>
+ #include <boost/property_map/property_map.hpp>
+@@ -1021,8 +1030,8 @@ priv::CutMesh priv::to_cgal(const ExPolygons &shapes,
+ if (shapes.empty()) return {};
+
+ CutMesh result;
+- EdgeShapeMap edge_shape_map = result.add_property_map<EI, IntersectingElement>(edge_shape_map_name).first;
+- FaceShapeMap face_shape_map = result.add_property_map<FI, IntersectingElement>(face_shape_map_name).first;
++ EdgeShapeMap edge_shape_map = access_pmap((result.add_property_map<EI, IntersectingElement>(edge_shape_map_name)));
++ FaceShapeMap face_shape_map = access_pmap((result.add_property_map<FI, IntersectingElement>(face_shape_map_name)));
+
+ std::vector<VI> indices;
+ auto insert_contour = [&projection, &indices, &result,
+@@ -1432,17 +1441,17 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model,
+ const ExPolygonsIndices &s2i)
+ {
+ // pointer to edge or face shape_map
+- VertexShapeMap vert_shape_map = cgal_model.add_property_map<VI, const IntersectingElement*>(vert_shape_map_name, nullptr).first;
++ VertexShapeMap vert_shape_map = access_pmap((cgal_model.add_property_map<VI, const IntersectingElement*>(vert_shape_map_name, nullptr)));
+
+ // 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;
++ const EdgeShapeMap& edge_shape_map = access_pmap((cgal_shape.property_map<EI, IntersectingElement>(edge_shape_map_name)));
++ const FaceShapeMap& face_shape_map = access_pmap((cgal_shape.property_map<FI, IntersectingElement>(face_shape_map_name)));
+ 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
+- EdgeBoolMap ecm = cgal_model.add_property_map<EI, bool>(is_constrained_edge_name, false).first;
++ EdgeBoolMap ecm = access_pmap((cgal_model.add_property_map<EI, bool>(is_constrained_edge_name, false)));
+ const auto &p = CGAL::parameters::visitor(visitor)
+ .edge_is_constrained_map(ecm)
+ .throw_on_self_intersection(false);
+@@ -1451,7 +1460,7 @@ priv::CutAOIs priv::cut_from_model(CutMesh &cgal_model,
+
+ if (!is_valid) return {};
+
+- FaceTypeMap face_type_map = cgal_model.add_property_map<FI, FaceType>(face_type_map_name, FaceType::not_constrained).first;
++ FaceTypeMap face_type_map = access_pmap((cgal_model.add_property_map<FI, FaceType>(face_type_map_name, FaceType::not_constrained)));
+
+ // Select inside and outside face in model
+ set_face_type(face_type_map, cgal_model, vert_shape_map, ecm, cgal_shape, s2i);
+@@ -1587,8 +1596,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;
++ const VertexShapeMap &vert_shape_map = access_pmap((mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name)));
++ const EdgeBoolMap &ecm = access_pmap((mesh.property_map<EI, bool>(is_constrained_edge_name)));
+
+ // check if vertex was made by edge_2 which is diagonal of quad
+ auto is_reducible_vertex = [&vert_shape_map](VI reduction_from) -> bool {
+@@ -1773,10 +1782,10 @@ priv::VDistances priv::calc_distances(const SurfacePatches &patches,
+ 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;
++ access_pmap((models[patch.model_id].property_map<VI, const IntersectingElement *>(vert_shape_map_name)));
+ 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;
++ const CvtVI2VI& cvt = access_pmap((patch.mesh.property_map<VI, VI>(patch_source_name)));
+ // for each point on outline
+ for (const Loop &loop : patch.loops)
+ for (const VI &vi_patch : loop) {
+@@ -2666,7 +2675,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
+ /* const */ CutMesh &mesh,
+ const ReductionMap *rmap)
+ {
+- auto is_counted = mesh.add_property_map<VI, bool>("v:is_counted").first;
++ auto is_counted = access_pmap((mesh.add_property_map<VI, bool>("v:is_counted")));
+ uint32_t count_vertices = 0;
+ if (rmap == nullptr) {
+ for (FI fi : fis)
+@@ -2696,7 +2705,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
+ cm.reserve(count_vertices, count_edges, count_faces);
+
+ // vertex conversion function from mesh VI to result VI
+- CvtVI2VI mesh2result = mesh.add_property_map<VI,VI>("v:mesh2result").first;
++ CvtVI2VI mesh2result = access_pmap((mesh.add_property_map<VI,VI>("v:mesh2result")));
+
+ if (rmap == nullptr) {
+ for (FI fi : fis) {
+@@ -2748,7 +2757,7 @@ priv::SurfacePatch priv::create_surface_patch(const std::vector<FI> &fis,
+ assert(count_edges >= cm.edges().size());
+
+ // convert VI from this patch to source VI, when exist
+- CvtVI2VI cvt = cm.add_property_map<VI, VI>(patch_source_name).first;
++ CvtVI2VI cvt = access_pmap((cm.add_property_map<VI, VI>(patch_source_name)));
+ // vi_s .. VertexIndex into mesh (source)
+ // vi_d .. new VertexIndex in cm (destination)
+ for (VI vi_s : mesh.vertices()) {
+@@ -2939,7 +2948,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;
++ const VertexShapeMap &vert_shape_map = access_pmap((model.property_map<VI, const IntersectingElement *>(vert_shape_map_name)));
+ // for each half edge of outline
+ for (HI hi : cut.second) {
+ VI vi = model.source(hi);
+@@ -2964,7 +2973,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 = access_pmap((patch_new.mesh.property_map<VI, VI>(patch_source_name)));
+ for (VI &vi : cvt) {
+ if (!vi.is_valid()) continue;
+ vi = cvt_from[vi];
+@@ -2982,9 +2991,9 @@ void priv::divide_patch(size_t i, SurfacePatchesEx &patches)
+ CutMesh& cm = patch.mesh;
+ assert(!cm.faces().empty());
+ 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;
++ CutMesh::Property_map<FI,bool> is_processed = access_pmap((cm.add_property_map<FI, bool>(patch_number_name, false)));
+
+- const CvtVI2VI& cvt_from = patch.mesh.property_map<VI, VI>(patch_source_name).first;
++ const CvtVI2VI& cvt_from = access_pmap((patch.mesh.property_map<VI, VI>(patch_source_name)));
+
+ std::vector<FI> fis;
+ fis.reserve(cm.faces().size());
+@@ -3085,7 +3094,7 @@ priv::SurfacePatches priv::diff_models(VCutAOIs &cuts,
+ CutAOIs &model_cuts = cuts[model_index];
+ CutMesh &cut_model_ = cut_models[model_index];
+ const CutMesh &cut_model = cut_model_;
+- ReductionMap vertex_reduction_map = cut_model_.add_property_map<VI, VI>(vertex_reduction_map_name).first;
++ ReductionMap vertex_reduction_map = access_pmap((cut_model_.add_property_map<VI, VI>(vertex_reduction_map_name)));
+ create_reduce_map(vertex_reduction_map, cut_model);
+
+ for (size_t cut_index = 0; cut_index < model_cuts.size(); ++cut_index, ++index) {
+@@ -3171,7 +3180,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;
++ const VertexShapeMap &vert_shape_map = access_pmap((mesh.property_map<VI, const IntersectingElement*>(vert_shape_map_name)));
+ 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)];
+@@ -3708,7 +3717,7 @@ void priv::store(const CutMesh &mesh, const FaceTypeMap &face_type_map, const st
+ }
+
+ CutMesh &mesh_ = const_cast<CutMesh &>(mesh);
+- auto face_colors = mesh_.add_property_map<priv::FI, CGAL::Color>("f:color").first;
++ auto face_colors = access_pmap((mesh_.add_property_map<priv::FI, CGAL::Color>("f:color")));
+ for (FI fi : mesh.faces()) {
+ auto &color = face_colors[fi];
+ switch (face_type_map[fi]) {
+@@ -3734,7 +3743,7 @@ void priv::store(const CutMesh &mesh, const ReductionMap &reduction_map, const s
+ std::string off_file = dir + "model" + std::to_string(reduction_order++) + ".off";
+
+ CutMesh &mesh_ = const_cast<CutMesh &>(mesh);
+- auto vertex_colors = mesh_.add_property_map<priv::VI, CGAL::Color>("v:color").first;
++ auto vertex_colors = access_pmap((mesh_.add_property_map<priv::VI, CGAL::Color>("v:color")));
+ // initialize to gray color
+ for (VI vi: mesh.vertices())
+ vertex_colors[vi] = CGAL::Color{127, 127, 127};
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..b7fc95554591
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-fixed-linking.patch
@@ -0,0 +1,45 @@
+--- a/bundled_deps/admesh/CMakeLists.txt
++++ b/bundled_deps/admesh/CMakeLists.txt
+@@ -13,4 +13,3 @@ add_library(admesh STATIC
+
+ target_include_directories(admesh PUBLIC .)
+ target_link_libraries(admesh PRIVATE boost_headeronly localesutils)
+-target_link_libraries(admesh PUBLIC Eigen3::Eigen)
+--- a/src/clipper/CMakeLists.txt
++++ b/src/clipper/CMakeLists.txt
+@@ -10,5 +10,4 @@ add_library(clipper STATIC
+ )
+
+ target_link_libraries(clipper PRIVATE TBB::tbb TBB::tbbmalloc int128)
+-target_link_libraries(clipper PUBLIC Eigen3::Eigen)
+ target_include_directories(clipper PUBLIC .)
+--- a/src/libslic3r/CMakeLists.txt
++++ b/src/libslic3r/CMakeLists.txt
+@@ -629,7 +629,6 @@ target_link_libraries(libslic3r PRIVATE
+ int128
+ )
+ target_link_libraries(libslic3r PUBLIC
+- Eigen3::Eigen
+ semver
+ admesh
+ localesutils
+--- a/src/slic3r/CMakeLists.txt
++++ b/src/slic3r/CMakeLists.txt
+@@ -383,6 +383,7 @@ set(SLIC3R_GUI_SOURCES
+ )
+
+ find_package(NanoSVG REQUIRED)
++find_package(OpenSSL REQUIRED)
+
+ if (APPLE)
+ list(APPEND SLIC3R_GUI_SOURCES
+@@ -438,6 +439,9 @@ target_link_libraries(
+ NanoSVG::nanosvgrast
+ stb_dxt
+ fastfloat
++ OpenSSL::SSL
++ OpenSSL::Crypto
++ Boost::log
+ )
+
+ if (MSVC)
diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.8.1-fstream.patch b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-fstream.patch
new file mode 100644
index 000000000000..b4a92de67ab6
--- /dev/null
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.8.1-fstream.patch
@@ -0,0 +1,49 @@
+--- a/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp
++++ b/src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp
+@@ -1595,7 +1595,7 @@ void GLGizmoSVG::draw_filename(){
+ if (dlg.ShowModal() == wxID_OK ){
+ last_used_directory = dlg.GetDirectory();
+ std::string out_path_str(into_u8(dlg.GetPath()));
+- boost::nowide::ofstream stream(out_path_str);
++ std::ofstream stream(out_path_str);
+ if (stream.is_open()){
+ stream << *svg.file_data;
+
+--- a/src/slic3r/GUI/PresetArchiveDatabase.cpp
++++ b/src/slic3r/GUI/PresetArchiveDatabase.cpp
+@@ -514,7 +514,7 @@ void PresetArchiveDatabase::load_app_manifest_json()
+ if (!fs::exists(path, ec) || ec) {
+ copy_initial_manifest();
+ }
+- boost::nowide::ifstream file(path.string());
++ std::ifstream file(path.string());
+ std::string data;
+ if (file.is_open()) {
+ std::string line;
+@@ -681,7 +681,7 @@ void PresetArchiveDatabase::save_app_manifest_json() const
+ data += "]";
+
+ std::string path = get_stored_manifest_path().string();
+- boost::nowide::ofstream file(path);
++ std::ofstream file(path);
+ if (file.is_open()) {
+ file << data;
+ file.close();
+@@ -916,4 +916,4 @@ void PresetArchiveDatabase::sync_blocking()
+ read_server_manifest(std::move(manifest));
+ }
+
+-}} // Slic3r::GUI
+\ No newline at end of file
++}} // Slic3r::GUI
+--- a/src/slic3r/Utils/Http.cpp
++++ b/src/slic3r/Utils/Http.cpp
+@@ -301,7 +301,7 @@ void Http::priv::form_add_file(const char *name, const fs::path &path, const cha
+ //FIXME may throw! Is the caller aware of it?
+ void Http::priv::set_post_body(const fs::path &path)
+ {
+- boost::nowide::ifstream file(path.string());
++ std::ifstream file(path.string());
+ std::string file_content { std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>() };
+ postfields = std::move(file_content);
+ }
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-2.8.0.ebuild b/media-gfx/prusaslicer/prusaslicer-2.8.0-r1.ebuild
index ed23b287f530..92c404bba643 100644
--- a/media-gfx/prusaslicer/prusaslicer-2.8.0.ebuild
+++ b/media-gfx/prusaslicer/prusaslicer-2.8.0-r1.ebuild
@@ -63,6 +63,8 @@ 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.0-wxwidgets-3.2.4.patch"
+ "${FILESDIR}/${PN}-2.8.0-cgal-6.0.patch"
)
src_prepare() {
diff --git a/media-gfx/prusaslicer/prusaslicer-9999.ebuild b/media-gfx/prusaslicer/prusaslicer-9999.ebuild
index 2bb72a7c183f..fbf13e9d7d66 100644
--- a/media-gfx/prusaslicer/prusaslicer-9999.ebuild
+++ b/media-gfx/prusaslicer/prusaslicer-9999.ebuild
@@ -62,18 +62,25 @@ 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.0-wxwidgets-3.2.4.patch"
+ "${FILESDIR}/${PN}-2.8.1-fixed-linking.patch"
+ "${FILESDIR}/${PN}-2.8.1-cgal-6.0.patch"
+ "${FILESDIR}/${PN}-2.8.1-fstream.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; s|#include <unsupported/Eigen/|#include <eigen3/unsupported/Eigen/|g' {} + || die
+
cmake_src_prepare
}