Gentoo Archives: gentoo-commits

From: Yahor Berdnikau <egorr.berd@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: media-gfx/superslicer/files/, media-gfx/superslicer/
Date: Sun, 06 Feb 2022 20:14:49
Message-Id: 1644178466.0a88e99cbe3b38ebc08a21744bbf5fb874c14857.egorr.berd@gentoo
1 commit: 0a88e99cbe3b38ebc08a21744bbf5fb874c14857
2 Author: Yahor Berdnikau <egorr.berd <AT> gmail <DOT> com>
3 AuthorDate: Sun Feb 6 20:14:26 2022 +0000
4 Commit: Yahor Berdnikau <egorr.berd <AT> gmail <DOT> com>
5 CommitDate: Sun Feb 6 20:14:26 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0a88e99c
7
8 media-gfx/superslicer: new version 2.3.57.10
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Yahor Berdnikau <egorr.berd <AT> gmail.com>
12
13 media-gfx/superslicer/Manifest | 2 +
14 .../files/missing-imports-2.3.57.10.patch | 10 ++
15 .../files/version-suffix-2.3.57.10.patch | 38 ++++++++
16 media-gfx/superslicer/superslicer-2.3.57.10.ebuild | 108 +++++++++++++++++++++
17 4 files changed, 158 insertions(+)
18
19 diff --git a/media-gfx/superslicer/Manifest b/media-gfx/superslicer/Manifest
20 index 598043981..ae10bbf82 100644
21 --- a/media-gfx/superslicer/Manifest
22 +++ b/media-gfx/superslicer/Manifest
23 @@ -1,4 +1,6 @@
24 DIST superslicer-2.2.53.4.tar.gz 33791161 BLAKE2B c8454ac66a5d75f5bbcd1c29f600897c697f03ad581c97539033758942eac1d4ba0d2acbac43e75307a06e565d25a39b192e6cde522cce6b728afc04c42f82bb SHA512 f883cca3eb2575186c5077e2c1f9ca37e497ff6ed9aeae45a58c1db4de1c52db36fc0f14e7fdcd95aaf375b340932674014614cdab8c6995c56b9988fe5baa06
25 +DIST superslicer-2.3.57.10-profiles.zip 12193950 BLAKE2B c61be0190345bf886cbe60495f95266ec0b07824c803eaca7a29853a3465ab3d631d794899aebb9ef5f7660cb9341c70e9c38d6f8247a58655ed720deebbc584 SHA512 6beab170ae7e50e9880288673fd482f2903d5e9b87a0ddd6549098fa35f9b87e4891f015d0a26aedfac9736c3f55dcd1794d8abb3f9cc072bcdbb7e87f42a9fa
26 +DIST superslicer-2.3.57.10.tar.gz 32466957 BLAKE2B 7c5fff6ba8139a9bf66d931e6e48e6a9201e7911e90ce2e822ded7ae713f0b8fdf86b9cd317ded4802146c24758148ec989c213b5992c323a2fd442e17a4e228 SHA512 4d20078e11f5f99993220409bee54ca0a3f2a6fff04febfc09b5f1bc445ceaabc3a359f8f7f478127aa1504e8ba8a121a682c991adf2c45cb2ff1598ed2e3445
27 DIST superslicer-2.3.57.7-profiles.zip 12193950 BLAKE2B c61be0190345bf886cbe60495f95266ec0b07824c803eaca7a29853a3465ab3d631d794899aebb9ef5f7660cb9341c70e9c38d6f8247a58655ed720deebbc584 SHA512 6beab170ae7e50e9880288673fd482f2903d5e9b87a0ddd6549098fa35f9b87e4891f015d0a26aedfac9736c3f55dcd1794d8abb3f9cc072bcdbb7e87f42a9fa
28 DIST superslicer-2.3.57.7.tar.gz 32400355 BLAKE2B bcacf218ad18146327a9f7005d2c2217cf859d2793e8f74bfd453e2b8b12bf83d224f0325f6908b806735fb94c476b87c5dfe35c16026006bf5bd38de26e5f36 SHA512 d9a92366ed426dab77a5d49cddd7c7f37f2a0e026574bcbff342e579c555aefb19aaea8de7b5180bb87ab2749ba0cef96e870d808914fdbc58f3ddf04e1a4a65
29 DIST superslicer-2.3.57.9-profiles.zip 12193950 BLAKE2B c61be0190345bf886cbe60495f95266ec0b07824c803eaca7a29853a3465ab3d631d794899aebb9ef5f7660cb9341c70e9c38d6f8247a58655ed720deebbc584 SHA512 6beab170ae7e50e9880288673fd482f2903d5e9b87a0ddd6549098fa35f9b87e4891f015d0a26aedfac9736c3f55dcd1794d8abb3f9cc072bcdbb7e87f42a9fa
30
31 diff --git a/media-gfx/superslicer/files/missing-imports-2.3.57.10.patch b/media-gfx/superslicer/files/missing-imports-2.3.57.10.patch
32 new file mode 100644
33 index 000000000..009a4892a
34 --- /dev/null
35 +++ b/media-gfx/superslicer/files/missing-imports-2.3.57.10.patch
36 @@ -0,0 +1,10 @@
37 +--- a/src/slic3r/Utils/PresetUpdater.cpp
38 ++++ b/src/slic3r/Utils/PresetUpdater.cpp
39 +@@ -6,6 +6,7 @@
40 + #include <ostream>
41 + #include <utility>
42 + #include <stdexcept>
43 ++#include <regex>
44 +
45 + #include <boost/algorithm/string.hpp>
46 + #include <boost/filesystem.hpp>
47
48 diff --git a/media-gfx/superslicer/files/version-suffix-2.3.57.10.patch b/media-gfx/superslicer/files/version-suffix-2.3.57.10.patch
49 new file mode 100644
50 index 000000000..ddbda92ac
51 --- /dev/null
52 +++ b/media-gfx/superslicer/files/version-suffix-2.3.57.10.patch
53 @@ -0,0 +1,38 @@
54 +--- a/version.inc
55 ++++ b/version.inc
56 +@@ -4,9 +4,9 @@
57 + # name of the slicer
58 + set(SLIC3R_APP_NAME "SuperSlicer")
59 + # Key fo the slicer, must only contains ascii chars and no spaces (be valid in all filesystems)
60 +-set(SLIC3R_APP_KEY "SuperSlicer")
61 ++set(SLIC3R_APP_KEY "SuperSlicer2.3")
62 + # exe name of the slicer, should be lowercase and valid in all os
63 +-set(SLIC3R_APP_CMD "superslicer")
64 ++set(SLIC3R_APP_CMD "superslicer-2.3")
65 + # versions
66 + set(SLIC3R_VERSION "2.3.57")
67 + set(SLIC3R_VERSION_FULL "2.3.57.10")
68 +--- a/src/platform/unix/Slic3r.desktop.in
69 ++++ b/src/platform/unix/Slic3r.desktop.in
70 +@@ -1,5 +1,5 @@
71 + [Desktop Entry]
72 +-Name=@SLIC3R_APP_NAME@
73 ++Name=@SLIC3R_APP_KEY@
74 + GenericName=3D Printing Software
75 + Comment=G-code generator for 3D printers
76 + Icon=@SLIC3R_APP_KEY@
77 +@@ -10,4 +10,4 @@ MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;
78 + Categories=Graphics;3DGraphics;Engineering;
79 + Keywords=3D;Printing;Slicer;slice;3D;printer;convert;gcode;stl;obj;amf;SLA
80 + StartupNotify=false
81 +-StartupWMClass=@SLIC3R_APP_KEY@
82 ++StartupWMClass=@SLIC3R_APP_NAME@
83 +--- a/src/platform/unix/Gcodeviewer.desktop.in
84 ++++ b/src/platform/unix/Gcodeviewer.desktop.in
85 +@@ -1,5 +1,5 @@
86 + [Desktop Entry]
87 +-Name=@GCODEVIEWER_APP_NAME@
88 ++Name=@GCODEVIEWER_APP_KEY@
89 + Comment=G-code viewer of Slic3r
90 + Exec=@SLIC3R_APP_CMD@ --gcodeviewer %F
91 + Icon=@GCODEVIEWER_APP_KEY@
92
93 diff --git a/media-gfx/superslicer/superslicer-2.3.57.10.ebuild b/media-gfx/superslicer/superslicer-2.3.57.10.ebuild
94 new file mode 100644
95 index 000000000..f7182ba82
96 --- /dev/null
97 +++ b/media-gfx/superslicer/superslicer-2.3.57.10.ebuild
98 @@ -0,0 +1,108 @@
99 +# Copyright 2022 Gentoo Authors
100 +# Distributed under the terms of the GNU General Public License v2
101 +
102 +EAPI=8
103 +
104 +WX_GTK_VER="3.0-gtk3"
105 +
106 +inherit xdg cmake desktop wxwidgets
107 +
108 +MY_PN="SuperSlicer"
109 +DESCRIPTION="A mesh slicer to generated G-Code for fused-filament fabrication"
110 +HOMEPAGE="https://github.com/supermerill/SuperSlicer"
111 +SRC_URI="https://github.com/supermerill/SuperSlicer/archive/${PV}.tar.gz -> ${P}.tar.gz
112 + profiles? ( https://github.com/slic3r/slic3r-profiles/archive/118aa919c16837eb2ff6ba97e2934fa4144ef806.zip -> ${P}-profiles.zip )"
113 +S="${WORKDIR}/${MY_PN}-${PV}"
114 +
115 +LICENSE="AGPL-3"
116 +SLOT="23"
117 +KEYWORDS="~amd64"
118 +IUSE="gui test profiles"
119 +
120 +# tests fail to link with USE=-gui, bug #760096
121 +REQUIRED_USE="test? ( gui )"
122 +RESTRICT="!test? ( test )"
123 +
124 +BDEPEND="profiles? ( app-arch/unzip )"
125 +RDEPEND="
126 + dev-cpp/eigen:3
127 + dev-cpp/tbb
128 + >=dev-libs/boost-1.73.0:=[nls,threads(+)]
129 + dev-libs/cereal
130 + dev-libs/expat
131 + dev-libs/c-blosc
132 + dev-libs/gmp:=
133 + >=dev-libs/miniz-2.1.0-r2
134 + dev-libs/mpfr:=
135 + >=media-gfx/openvdb-5.0.0
136 + media-libs/ilmbase:=
137 + media-libs/libpng:0=
138 + media-libs/openexr:0=
139 + media-libs/qhull:=
140 + sci-libs/libigl
141 + sci-libs/nlopt
142 + >=sci-mathematics/cgal-5.0:=
143 + sys-apps/dbus
144 + sys-libs/zlib:=
145 + gui? (
146 + dev-libs/glib:2
147 + media-libs/glew:0=
148 + net-misc/curl
149 + virtual/glu
150 + virtual/opengl
151 + x11-libs/gtk+:3
152 + >=x11-libs/wxGTK-3.0.5.1:=[X,opengl]
153 + )
154 +"
155 +DEPEND="${RDEPEND}
156 + media-libs/qhull[static-libs]
157 + test? ( dev-cpp/gtest )
158 +"
159 +
160 +PATCHES=(
161 + "${FILESDIR}/miniz-zip-header-2.2.53.4.patch"
162 + "${FILESDIR}/freecad-dialog-2.2.53.4.patch"
163 + "${FILESDIR}/missing-imports-${PV}.patch"
164 + "${FILESDIR}/version-suffix-${PV}.patch"
165 +)
166 +
167 +src_unpack() {
168 + unpack ${P}.tar.gz
169 + mv "${S}/resources/icons/SuperSlicer_192px.png" "${S}/resources/icons/SuperSlicer2.3_192px.png" || die "Failed to rename icons"
170 + mv "${S}/resources/icons/SuperSlicer_192px_transparent.png" "${S}/resources/icons/SuperSlicer2.3_192px_transparent.png" || die "Failed to rename icons"
171 + mv "${S}/resources/icons/SuperSlicer_128px.png" "${S}/resources/icons/SuperSlicer2.3_128px.png" || die "Failed to rename icons"
172 + mv "${S}/resources/icons/SuperSlicer-gcodeviewer_128px.png" "${S}/resources/icons/SuperSlicer2.3-gcodeviewer_128px.png" || die "Failed to rename icons"
173 + mv "${S}/resources/icons/SuperSlicer-gcodeviewer_192px.png" "${S}/resources/icons/SuperSlicer2.3-gcodeviewer_192px.png" || die "Failed to rename icons"
174 + cp "${S}/resources/icons/SuperSlicer.png" "${S}/resources/icons/SuperSlicer2.3_logo.png" || die "Failed to make logo icon"
175 +
176 + use profiles && unpack ${P}-profiles.zip &&
177 + if use profiles ; then
178 + cp -r "${WORKDIR}/slic3r-profiles-118aa919c16837eb2ff6ba97e2934fa4144ef806/"* "${S}/resources/profiles" || die "Failed to copy profiles"
179 + fi
180 +}
181 +
182 +src_configure() {
183 + use gui && setup-wxwidgets
184 +
185 + CMAKE_BUILD_TYPE=Release
186 + local mycmakeargs=(
187 + -DSLIC3R_BUILD_TESTS=$(usex test)
188 + -DSLIC3R_FHS=ON
189 + -DSLIC3R_GTK=3
190 + -DSLIC3R_GUI=$(usex gui)
191 + -DSLIC3R_PCH=OFF
192 + -DSLIC3R_WX_STABLE=ON
193 + -Wno-dev
194 + )
195 +
196 + cmake_src_configure
197 +}
198 +
199 +src_install() {
200 + cmake_src_install
201 +
202 + if use gui; then
203 + newicon -s 128 resources/icons/SuperSlicer2.3_128px.png SuperSlicer2.3.png
204 + dosym superslicer-2.3 /usr/bin/superslicer-2.3-gcodeviewer
205 + fi
206 +}