Gentoo Archives: gentoo-commits

From: Piotr Karbowski <slashbeast@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/prusaslicer/, media-gfx/prusaslicer/files/
Date: Mon, 09 May 2022 08:44:55
Message-Id: 1652085889.2d3635b05d63dd83c51b18be613effb415f549ff.slashbeast@gentoo
1 commit: 2d3635b05d63dd83c51b18be613effb415f549ff
2 Author: Piotr Karbowski <slashbeast <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 9 08:42:53 2022 +0000
4 Commit: Piotr Karbowski <slashbeast <AT> gentoo <DOT> org>
5 CommitDate: Mon May 9 08:44:49 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d3635b0
7
8 media-gfx/prusaslicer: 20220506 snapshot with Boost 1.79.0 patch.
9
10 Bug: https://github.com/prusa3d/PrusaSlicer/issues/8302
11 Fixes: https://bugs.gentoo.org/843284
12 Signed-off-by: Piotr Karbowski <slashbeast <AT> gentoo.org>
13
14 media-gfx/prusaslicer/Manifest | 1 +
15 .../files/prusaslicer-boost-1.79.0-fixes.patch | 52 ++++++++++++++
16 .../prusaslicer/prusaslicer-2.4.2_p20220506.ebuild | 80 ++++++++++++++++++++++
17 3 files changed, 133 insertions(+)
18
19 diff --git a/media-gfx/prusaslicer/Manifest b/media-gfx/prusaslicer/Manifest
20 index 7244483c429b..3066ed61a1a7 100644
21 --- a/media-gfx/prusaslicer/Manifest
22 +++ b/media-gfx/prusaslicer/Manifest
23 @@ -1,3 +1,4 @@
24 DIST prusaslicer-2.4.0.tar.gz 46397442 BLAKE2B 686232fddd3e2105db1325ab085b49f6f7a028a24ab90120daf94c53255f09b19411e0ff075bfe7abff138d3c276e8b5341ff6d59e267087bcd4568ac1113c47 SHA512 e923e4e6273dbcfc3e2bc0e28f9eb8cda8530747c0a834f48aea715d75ba1d02be9cfee043689efccdaee40de00114f7964e43accad245b9acd801b997868e3c
25 DIST prusaslicer-2.4.1.tar.gz 55572739 BLAKE2B 8c6030560926e53c780847e7b8a0582055b59c6b8355a2bfff19552d730cc31fc929437aa6ed93fd38d024699129bd550a1b250523387658117d1f2764cfd2b7 SHA512 895388ec39e46e30ea7bdecba42793e898ceb6c6b331dad815a726ed2f7e2e8719c71c32c6ce7fff1781fa06aac8e9afb615784d3b2001bd0d6e24ba23f0866a
26 DIST prusaslicer-2.4.2.tar.gz 47752224 BLAKE2B 27b00b766890f8675246eded75c51a671832a3abf518adf7b825dbe8396cbfd2d4b48f76d646675634af49ddbe4cd48ea8e533d66a131d14bff4e76bdd357545 SHA512 d480c608eadb58b53ee220317a749c0363db580759322ed7a9aebe2ea5c1acc30dbd3bdf9ed9849c23ba5c125ee6f923de6ac01987bf85abf7aeb3f91c2ae23f
27 +DIST prusaslicer-2.4.2_p20220506.tar.xz 29109336 BLAKE2B c8430b355a3d161c1aa9ab421edf1f291a7898d4fd2831fe924dc2d742bdb611d58d4e9f581c00fc37f18b6c54df2d82ca063091958ccb0859254014972a9477 SHA512 bf525e12fbc5a471fc28ffa048ec8628de892bfc7e65cb708266ef5d05692cf9c0755eae879b8fad0572d6af7368e2c251361941157ab2c9be73cb38c8962f72
28
29 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
30 new file mode 100644
31 index 000000000000..1026d1263552
32 --- /dev/null
33 +++ b/media-gfx/prusaslicer/files/prusaslicer-boost-1.79.0-fixes.patch
34 @@ -0,0 +1,52 @@
35 +diff --git a/src/slic3r/GUI/DesktopIntegrationDialog.cpp b/src/slic3r/GUI/DesktopIntegrationDialog.cpp
36 +index 81c681bc3..7f99a505c 100644
37 +--- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp
38 ++++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp
39 +@@ -10,6 +10,7 @@
40 + #include "libslic3r/Platform.hpp"
41 + #include "libslic3r/Config.hpp"
42 +
43 ++#include <boost/nowide/fstream.hpp>
44 + #include <boost/filesystem.hpp>
45 + #include <boost/log/trivial.hpp>
46 + #include <boost/dll/runtime_symbol_info.hpp>
47 +@@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegrationDialog()
48 +
49 + } // namespace GUI
50 + } // namespace Slic3r
51 +-#endif // __linux__
52 +\ No newline at end of file
53 ++#endif // __linux__
54 +diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
55 +index 8533854f4..4435f836b 100644
56 +--- a/src/slic3r/GUI/GUI_App.cpp
57 ++++ b/src/slic3r/GUI/GUI_App.cpp
58 +@@ -13,6 +13,7 @@
59 + #include <cstdlib>
60 + #include <regex>
61 + #include <string_view>
62 ++#include <boost/nowide/fstream.hpp>
63 + #include <boost/algorithm/string/predicate.hpp>
64 + #include <boost/algorithm/string.hpp>
65 + #include <boost/format.hpp>
66 +diff --git a/src/slic3r/Utils/AppUpdater.cpp b/src/slic3r/Utils/AppUpdater.cpp
67 +index 60739ccb3..80f31f69f 100644
68 +--- a/src/slic3r/Utils/AppUpdater.cpp
69 ++++ b/src/slic3r/Utils/AppUpdater.cpp
70 +@@ -5,6 +5,7 @@
71 +
72 + #include <boost/filesystem.hpp>
73 + #include <boost/log/trivial.hpp>
74 ++#include <boost/nowide/fstream.hpp>
75 + #include <boost/nowide/convert.hpp>
76 + #include <boost/property_tree/ini_parser.hpp>
77 + #include <curl/curl.h>
78 +@@ -242,7 +243,7 @@ boost::filesystem::path AppUpdater::priv::download_file(const DownloadAppData& d
79 + tmp_path += format(".%1%%2%", get_current_pid(), ".download");
80 + try
81 + {
82 +- boost::filesystem::fstream file(tmp_path, std::ios::out | std::ios::binary | std::ios::trunc);
83 ++ boost::nowide::fstream file(tmp_path, std::ios::out | std::ios::binary | std::ios::trunc);
84 + file.write(body.c_str(), body.size());
85 + file.close();
86 + boost::filesystem::rename(tmp_path, dest_path);
87
88 diff --git a/media-gfx/prusaslicer/prusaslicer-2.4.2_p20220506.ebuild b/media-gfx/prusaslicer/prusaslicer-2.4.2_p20220506.ebuild
89 new file mode 100644
90 index 000000000000..26052c4ee910
91 --- /dev/null
92 +++ b/media-gfx/prusaslicer/prusaslicer-2.4.2_p20220506.ebuild
93 @@ -0,0 +1,80 @@
94 +# Copyright 1999-2022 Gentoo Authors
95 +# Distributed under the terms of the GNU General Public License v2
96 +
97 +EAPI=8
98 +
99 +WX_GTK_VER="3.0-gtk3"
100 +
101 +inherit cmake desktop wxwidgets xdg
102 +
103 +DESCRIPTION="A mesh slicer to generate G-code for fused-filament-fabrication (3D printers)"
104 +HOMEPAGE="https://www.prusa3d.com/prusaslicer/"
105 +SRC_URI="https://dev.gentoo.org/~slashbeast/distfiles/${PN}/${P}.tar.xz"
106 +
107 +LICENSE="AGPL-3 Boost-1.0 GPL-2 LGPL-3 MIT"
108 +SLOT="0"
109 +KEYWORDS="~amd64 ~x86"
110 +IUSE="test"
111 +
112 +RESTRICT="!test? ( test )"
113 +
114 +RDEPEND="
115 + dev-cpp/eigen:3
116 + >=dev-cpp/tbb-2021.4.0:=
117 + >=dev-libs/boost-1.73.0:=[nls,threads(+)]
118 + dev-libs/cereal
119 + dev-libs/expat
120 + dev-libs/glib:2
121 + dev-libs/gmp:=
122 + dev-libs/mpfr:=
123 + dev-libs/imath:=
124 + >=media-gfx/openvdb-8.2:=
125 + net-misc/curl
126 + media-libs/glew:0=
127 + media-libs/libpng:0=
128 + media-libs/qhull:=
129 + sci-libs/libigl
130 + sci-libs/nlopt
131 + >=sci-mathematics/cgal-5.0:=
132 + sys-apps/dbus
133 + sys-libs/zlib:=
134 + virtual/glu
135 + virtual/opengl
136 + x11-libs/gtk+:3
137 + x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
138 +"
139 +DEPEND="${RDEPEND}
140 + media-libs/qhull[static-libs]
141 +"
142 +
143 +PATCHES=(
144 + "${FILESDIR}"/${PN}-boost-1.79.0-fixes.patch
145 +)
146 +
147 +S="${WORKDIR}"
148 +
149 +src_prepare() {
150 + sed -i -e 's/PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN/PrusaSlicer-${SLIC3R_VERSION}+Gentoo/g' version.inc || die
151 + cmake_src_prepare
152 +}
153 +
154 +src_configure() {
155 + CMAKE_BUILD_TYPE="Release"
156 +
157 + setup-wxwidgets
158 +
159 + local mycmakeargs=(
160 + -DOPENVDB_FIND_MODULE_PATH="/usr/$(get_libdir)/cmake/OpenVDB"
161 +
162 + -DSLIC3R_BUILD_TESTS=$(usex test)
163 + -DSLIC3R_FHS=ON
164 + -DSLIC3R_GTK=3
165 + -DSLIC3R_GUI=ON
166 + -DSLIC3R_PCH=OFF
167 + -DSLIC3R_STATIC=OFF
168 + -DSLIC3R_WX_STABLE=ON
169 + -Wno-dev
170 + )
171 +
172 + cmake_src_configure
173 +}