1 |
commit: 0094c528b4e54cb6f6096d68443c66a7e83c0d00 |
2 |
Author: Piotr Karbowski <slashbeast <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 2 10:18:34 2022 +0000 |
4 |
Commit: Piotr Karbowski <slashbeast <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 2 10:19:05 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0094c528 |
7 |
|
8 |
media-gfx/prusaslicer: 2.5.0_alpha2 added. |
9 |
|
10 |
Signed-off-by: Piotr Karbowski <slashbeast <AT> gentoo.org> |
11 |
|
12 |
media-gfx/prusaslicer/Manifest | 1 + |
13 |
.../prusaslicer-2.5.0_alpha2-boost-fixes.patch | 103 +++++++++++++++++++++ |
14 |
.../files/prusaslicer-boost-1.79.0-fixes.patch | 52 ----------- |
15 |
.../prusaslicer/prusaslicer-2.5.0_alpha2.ebuild | 83 +++++++++++++++++ |
16 |
4 files changed, 187 insertions(+), 52 deletions(-) |
17 |
|
18 |
diff --git a/media-gfx/prusaslicer/Manifest b/media-gfx/prusaslicer/Manifest |
19 |
index 665768040b96..cf0d605a0d71 100644 |
20 |
--- a/media-gfx/prusaslicer/Manifest |
21 |
+++ b/media-gfx/prusaslicer/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
+DIST prusaslicer-2.5.0_alpha2.tar.gz 48053741 BLAKE2B 161462ee4dc061ee1816c165b0e85688bcce1ee010451f3d6d724a71526ccea4eb006c9610124ec006ff19b030af2fcb74993016658069222d98152f29660c7e SHA512 8c29d79349e834df284374131659b863d1df592ee5304f2bae7cdbe1825feac465eaf78e0932d4184f4077a44d6add3194db31f12c5202cb064020fbaf4beecd |
24 |
DIST prusaslicer-2.6.0_pre20220601.tar.xz 29096924 BLAKE2B d1bb1733528a817384583c203fa84bd41daee97f24698fd421967838a8c4ec7a8705de39ad065ac1778c7e67289a491c298d063a4a53e5276256a3f230cba43c SHA512 d8581c292f4b6085992046a3063d90b151746690df9d7eea01bf68e72508f1b54e7547c1fcc0dd493712a752dcd158deed037559bd8825fc521e5b6aa5b199f8 |
25 |
DIST prusaslicer-2.6.0_pre20220620.tar.xz 29309256 BLAKE2B 2b2dda3f1efa05e674574812b50773b0f6c6d0c1dcfa0095deab7b80e62c5ed9f5837bc6141993ed41bcf985c598c11cf2741e17623309dbf8d7612c7af24a50 SHA512 7ad510b1e0db1774500049b76547e73b62976be897d47d118844c996939f843c9c0699c96bdf9569992a4d170a900e302566aa45ec8abee9ee4742104fb5deea |
26 |
|
27 |
diff --git a/media-gfx/prusaslicer/files/prusaslicer-2.5.0_alpha2-boost-fixes.patch b/media-gfx/prusaslicer/files/prusaslicer-2.5.0_alpha2-boost-fixes.patch |
28 |
new file mode 100644 |
29 |
index 000000000000..749f3c06289a |
30 |
--- /dev/null |
31 |
+++ b/media-gfx/prusaslicer/files/prusaslicer-2.5.0_alpha2-boost-fixes.patch |
32 |
@@ -0,0 +1,103 @@ |
33 |
+diff --git a/src/hints/HintsToPot.cpp b/src/hints/HintsToPot.cpp |
34 |
+index 7c8029c..d75f8c5 100644 |
35 |
+--- a/src/hints/HintsToPot.cpp |
36 |
++++ b/src/hints/HintsToPot.cpp |
37 |
+@@ -1,6 +1,7 @@ |
38 |
+ #include <iostream> |
39 |
+ #include <vector> |
40 |
+ #include <string> |
41 |
++#include <boost/nowide/fstream.hpp> |
42 |
+ #include <boost/filesystem.hpp> |
43 |
+ #include <boost/dll.hpp> |
44 |
+ #include <boost/property_tree/ini_parser.hpp> |
45 |
+@@ -9,7 +10,7 @@ |
46 |
+ |
47 |
+ bool write_to_pot(boost::filesystem::path path, const std::vector<std::pair<std::string, std::string>>& data) |
48 |
+ { |
49 |
+- boost::filesystem::ofstream file(std::move(path), std::ios_base::app); |
50 |
++ boost::nowide::ofstream file(std::move(path), std::ios_base::app); |
51 |
+ for (const auto& element : data) |
52 |
+ { |
53 |
+ //Example of .pot element |
54 |
+diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp |
55 |
+index 4664cff..41dd374 100644 |
56 |
+--- a/src/libslic3r/Preset.cpp |
57 |
++++ b/src/libslic3r/Preset.cpp |
58 |
+@@ -25,6 +25,7 @@ |
59 |
+ #include <stdexcept> |
60 |
+ #include <unordered_map> |
61 |
+ #include <boost/format.hpp> |
62 |
++#include <boost/nowide/fstream.hpp> |
63 |
+ #include <boost/filesystem.hpp> |
64 |
+ #include <boost/filesystem/fstream.hpp> |
65 |
+ #include <boost/algorithm/string.hpp> |
66 |
+@@ -84,7 +85,7 @@ ConfigFileType guess_config_file_type(const ptree &tree) |
67 |
+ VendorProfile VendorProfile::from_ini(const boost::filesystem::path &path, bool load_all) |
68 |
+ { |
69 |
+ ptree tree; |
70 |
+- boost::filesystem::ifstream ifs(path); |
71 |
++ boost::nowide::ifstream ifs(path); |
72 |
+ boost::property_tree::read_ini(ifs, tree); |
73 |
+ return VendorProfile::from_ini(tree, path, load_all); |
74 |
+ } |
75 |
+diff --git a/src/slic3r/GUI/DesktopIntegrationDialog.cpp b/src/slic3r/GUI/DesktopIntegrationDialog.cpp |
76 |
+index 81c681b..7f99a50 100644 |
77 |
+--- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp |
78 |
++++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp |
79 |
+@@ -10,6 +10,7 @@ |
80 |
+ #include "libslic3r/Platform.hpp" |
81 |
+ #include "libslic3r/Config.hpp" |
82 |
+ |
83 |
++#include <boost/nowide/fstream.hpp> |
84 |
+ #include <boost/filesystem.hpp> |
85 |
+ #include <boost/log/trivial.hpp> |
86 |
+ #include <boost/dll/runtime_symbol_info.hpp> |
87 |
+@@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegrationDialog() |
88 |
+ |
89 |
+ } // namespace GUI |
90 |
+ } // namespace Slic3r |
91 |
+-#endif // __linux__ |
92 |
+\ No newline at end of file |
93 |
++#endif // __linux__ |
94 |
+diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp |
95 |
+index 5bc770b..d566e91 100644 |
96 |
+--- a/src/slic3r/GUI/GUI_App.cpp |
97 |
++++ b/src/slic3r/GUI/GUI_App.cpp |
98 |
+@@ -13,6 +13,7 @@ |
99 |
+ #include <cstdlib> |
100 |
+ #include <regex> |
101 |
+ #include <string_view> |
102 |
++#include <boost/nowide/fstream.hpp> |
103 |
+ #include <boost/algorithm/string/predicate.hpp> |
104 |
+ #include <boost/algorithm/string.hpp> |
105 |
+ #include <boost/format.hpp> |
106 |
+diff --git a/src/slic3r/GUI/HintNotification.cpp b/src/slic3r/GUI/HintNotification.cpp |
107 |
+index 14ebbc6..2de896c 100644 |
108 |
+--- a/src/slic3r/GUI/HintNotification.cpp |
109 |
++++ b/src/slic3r/GUI/HintNotification.cpp |
110 |
+@@ -15,6 +15,7 @@ |
111 |
+ #include "libslic3r/PrintConfig.hpp" |
112 |
+ |
113 |
+ #include <boost/algorithm/string/replace.hpp> |
114 |
++#include <boost/nowide/fstream.hpp> |
115 |
+ #include <boost/filesystem.hpp> |
116 |
+ #include <boost/nowide/fstream.hpp> |
117 |
+ #include <boost/log/trivial.hpp> |
118 |
+@@ -65,7 +66,7 @@ inline void push_style_color(ImGuiCol idx, const ImVec4& col, bool fading_out, f |
119 |
+ |
120 |
+ void write_used_binary(const std::vector<std::string>& ids) |
121 |
+ { |
122 |
+- boost::filesystem::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary); |
123 |
++ boost::nowide::ofstream file((boost::filesystem::path(data_dir()) / "cache" / "hints.cereal"), std::ios::binary); |
124 |
+ cereal::BinaryOutputArchive archive(file); |
125 |
+ HintsCerealData cd { ids }; |
126 |
+ try |
127 |
+@@ -84,7 +85,7 @@ void read_used_binary(std::vector<std::string>& ids) |
128 |
+ BOOST_LOG_TRIVIAL(warning) << "Failed to load to hints.cereal. File does not exists. " << path.string(); |
129 |
+ return; |
130 |
+ } |
131 |
+- boost::filesystem::ifstream file(path); |
132 |
++ boost::nowide::ifstream file(path); |
133 |
+ cereal::BinaryInputArchive archive(file); |
134 |
+ HintsCerealData cd; |
135 |
+ try |
136 |
|
137 |
diff --git a/media-gfx/prusaslicer/files/prusaslicer-boost-1.79.0-fixes.patch b/media-gfx/prusaslicer/files/prusaslicer-boost-1.79.0-fixes.patch |
138 |
deleted file mode 100644 |
139 |
index 1026d1263552..000000000000 |
140 |
--- a/media-gfx/prusaslicer/files/prusaslicer-boost-1.79.0-fixes.patch |
141 |
+++ /dev/null |
142 |
@@ -1,52 +0,0 @@ |
143 |
-diff --git a/src/slic3r/GUI/DesktopIntegrationDialog.cpp b/src/slic3r/GUI/DesktopIntegrationDialog.cpp |
144 |
-index 81c681bc3..7f99a505c 100644 |
145 |
---- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp |
146 |
-+++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp |
147 |
-@@ -10,6 +10,7 @@ |
148 |
- #include "libslic3r/Platform.hpp" |
149 |
- #include "libslic3r/Config.hpp" |
150 |
- |
151 |
-+#include <boost/nowide/fstream.hpp> |
152 |
- #include <boost/filesystem.hpp> |
153 |
- #include <boost/log/trivial.hpp> |
154 |
- #include <boost/dll/runtime_symbol_info.hpp> |
155 |
-@@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegrationDialog() |
156 |
- |
157 |
- } // namespace GUI |
158 |
- } // namespace Slic3r |
159 |
--#endif // __linux__ |
160 |
-\ No newline at end of file |
161 |
-+#endif // __linux__ |
162 |
-diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp |
163 |
-index 8533854f4..4435f836b 100644 |
164 |
---- a/src/slic3r/GUI/GUI_App.cpp |
165 |
-+++ b/src/slic3r/GUI/GUI_App.cpp |
166 |
-@@ -13,6 +13,7 @@ |
167 |
- #include <cstdlib> |
168 |
- #include <regex> |
169 |
- #include <string_view> |
170 |
-+#include <boost/nowide/fstream.hpp> |
171 |
- #include <boost/algorithm/string/predicate.hpp> |
172 |
- #include <boost/algorithm/string.hpp> |
173 |
- #include <boost/format.hpp> |
174 |
-diff --git a/src/slic3r/Utils/AppUpdater.cpp b/src/slic3r/Utils/AppUpdater.cpp |
175 |
-index 60739ccb3..80f31f69f 100644 |
176 |
---- a/src/slic3r/Utils/AppUpdater.cpp |
177 |
-+++ b/src/slic3r/Utils/AppUpdater.cpp |
178 |
-@@ -5,6 +5,7 @@ |
179 |
- |
180 |
- #include <boost/filesystem.hpp> |
181 |
- #include <boost/log/trivial.hpp> |
182 |
-+#include <boost/nowide/fstream.hpp> |
183 |
- #include <boost/nowide/convert.hpp> |
184 |
- #include <boost/property_tree/ini_parser.hpp> |
185 |
- #include <curl/curl.h> |
186 |
-@@ -242,7 +243,7 @@ boost::filesystem::path AppUpdater::priv::download_file(const DownloadAppData& d |
187 |
- tmp_path += format(".%1%%2%", get_current_pid(), ".download"); |
188 |
- try |
189 |
- { |
190 |
-- boost::filesystem::fstream file(tmp_path, std::ios::out | std::ios::binary | std::ios::trunc); |
191 |
-+ boost::nowide::fstream file(tmp_path, std::ios::out | std::ios::binary | std::ios::trunc); |
192 |
- file.write(body.c_str(), body.size()); |
193 |
- file.close(); |
194 |
- boost::filesystem::rename(tmp_path, dest_path); |
195 |
|
196 |
diff --git a/media-gfx/prusaslicer/prusaslicer-2.5.0_alpha2.ebuild b/media-gfx/prusaslicer/prusaslicer-2.5.0_alpha2.ebuild |
197 |
new file mode 100644 |
198 |
index 000000000000..adcc79140a37 |
199 |
--- /dev/null |
200 |
+++ b/media-gfx/prusaslicer/prusaslicer-2.5.0_alpha2.ebuild |
201 |
@@ -0,0 +1,83 @@ |
202 |
+# Copyright 1999-2022 Gentoo Authors |
203 |
+# Distributed under the terms of the GNU General Public License v2 |
204 |
+ |
205 |
+EAPI=8 |
206 |
+ |
207 |
+WX_GTK_VER="3.0-gtk3" |
208 |
+MY_PN="PrusaSlicer" |
209 |
+MY_PV="${PV//_/-}" |
210 |
+ |
211 |
+inherit cmake wxwidgets xdg |
212 |
+ |
213 |
+DESCRIPTION="A mesh slicer to generate G-code for fused-filament-fabrication (3D printers)" |
214 |
+HOMEPAGE="https://www.prusa3d.com/prusaslicer/" |
215 |
+SRC_URI="https://github.com/prusa3d/PrusaSlicer/archive/refs/tags/version_2.5.0-alpha2.tar.gz -> ${P}.tar.gz" |
216 |
+ |
217 |
+LICENSE="AGPL-3 Boost-1.0 GPL-2 LGPL-3 MIT" |
218 |
+SLOT="0" |
219 |
+KEYWORDS="~amd64 ~x86" |
220 |
+IUSE="test" |
221 |
+ |
222 |
+RESTRICT="test" |
223 |
+ |
224 |
+RDEPEND=" |
225 |
+ dev-cpp/eigen:3 |
226 |
+ dev-cpp/tbb:= |
227 |
+ >=dev-libs/boost-1.73.0:=[nls,threads(+)] |
228 |
+ dev-libs/cereal |
229 |
+ dev-libs/expat |
230 |
+ dev-libs/glib:2 |
231 |
+ dev-libs/gmp:= |
232 |
+ dev-libs/mpfr:= |
233 |
+ dev-libs/imath:= |
234 |
+ >=media-gfx/openvdb-8.2:= |
235 |
+ net-misc/curl |
236 |
+ media-libs/glew:0= |
237 |
+ media-libs/libpng:0= |
238 |
+ media-libs/qhull:= |
239 |
+ sci-libs/libigl |
240 |
+ sci-libs/nlopt |
241 |
+ >=sci-mathematics/cgal-5.0:= |
242 |
+ sys-apps/dbus |
243 |
+ sys-libs/zlib:= |
244 |
+ virtual/glu |
245 |
+ virtual/opengl |
246 |
+ x11-libs/gtk+:3 |
247 |
+ x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] |
248 |
+" |
249 |
+DEPEND="${RDEPEND} |
250 |
+ media-libs/qhull[static-libs] |
251 |
+" |
252 |
+ |
253 |
+PATCHES=( |
254 |
+ "${FILESDIR}/${PN}-2.4.0-fix-build-with-cereal-1.3.1.patch" |
255 |
+ "${FILESDIR}/${PN}-2.5.0_alpha2-boost-fixes.patch" |
256 |
+) |
257 |
+ |
258 |
+S="${WORKDIR}/${MY_PN}-version_${MY_PV}" |
259 |
+ |
260 |
+src_prepare() { |
261 |
+ sed -i -e 's/PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN/PrusaSlicer-${SLIC3R_VERSION}+Gentoo/g' version.inc || die |
262 |
+ cmake_src_prepare |
263 |
+} |
264 |
+ |
265 |
+src_configure() { |
266 |
+ CMAKE_BUILD_TYPE="Release" |
267 |
+ |
268 |
+ setup-wxwidgets |
269 |
+ |
270 |
+ local mycmakeargs=( |
271 |
+ -DOPENVDB_FIND_MODULE_PATH="/usr/$(get_libdir)/cmake/OpenVDB" |
272 |
+ |
273 |
+ -DSLIC3R_BUILD_TESTS=$(usex test) |
274 |
+ -DSLIC3R_FHS=ON |
275 |
+ -DSLIC3R_GTK=3 |
276 |
+ -DSLIC3R_GUI=ON |
277 |
+ -DSLIC3R_PCH=OFF |
278 |
+ -DSLIC3R_STATIC=OFF |
279 |
+ -DSLIC3R_WX_STABLE=ON |
280 |
+ -Wno-dev |
281 |
+ ) |
282 |
+ |
283 |
+ cmake_src_configure |
284 |
+} |