Added prusaslicer as slic3r replacement

This commit is contained in:
layman 2022-03-21 13:38:20 +01:00
parent 390a1de937
commit 6788c92580
4 changed files with 159 additions and 0 deletions

View File

@ -0,0 +1,3 @@
AUX prusaslicer-2.4.0-fix-build-with-cereal-1.3.1.patch 1601 BLAKE2B 0c30817c51c1cf2a914b1faad9923109cbae111e8538d6c7257885ab29b5944bdb97b0927ced972133ffd8fe12d2fe36f0826bb9839e3cbedd716719b0d26881 SHA512 21377080026fa43bf23dc06c4925decd6c6e7827599caebc2ba2e7b3f4f4428fcd6fe4044f3bc3d0f059cf2ede043cafe2928622046bf9443bdd3f21f1ff6c59
EBUILD prusaslicer-9999.ebuild 1800 BLAKE2B a736b4456a7c6678c73966f39500a636e804f7898bed74aab10e0df57c54d013d37cf5e0ba66ac304cab56ccc11abdb16d48c4e633cb898f54f0ccdb3a7ce2c2 SHA512 5c60460ec8dad88d764ab8500dd3b0c61549c6414b0f49c7ae33751a963cd807a4527d2278d9bbc8846440c830c9e038c18b64e40bf63679da4fe9f96201ea02
MISC metadata.xml 1028 BLAKE2B a267e6b0ee72a85b895046cc7d5f659cca379fd799a9ebb802dc1fafd7edfa1b989784b10eb93ac24f1ea6153153b892e28e20055b0a7d2021f6db7742e065b4 SHA512 5760ea954f5ccf09e5d69e101b6d68839a4517a9375adc3009b1bf846b98091ee0555e9c92bb0cf316670efec699cd24d04b4ebe7db5b65e363f83051d868512

View File

@ -0,0 +1,47 @@
https://bugs.gentoo.org/834005
https://github.com/prusa3d/PrusaSlicer/commit/0ffcfd8393457fd035576436752267c9a1e6bbcc
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -506,6 +506,9 @@ endif ()
# Find the Cereal serialization library
find_package(cereal REQUIRED)
+if (NOT TARGET cereal::cereal)
+ add_library(cereal::cereal ALIAS cereal)
+endif ()
# l10n
set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -126,7 +126,7 @@ if (NOT WIN32 AND NOT APPLE)
set_target_properties(PrusaSlicer PROPERTIES OUTPUT_NAME "prusa-slicer")
endif ()
-target_link_libraries(PrusaSlicer libslic3r cereal)
+target_link_libraries(PrusaSlicer libslic3r cereal::cereal)
if (APPLE)
# add_compile_options(-stdlib=libc++)
# add_definitions(-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_NO_CXX11_RVALUE_REFERENCES -DBOOST_THREAD_USES_MOVE)
--- a/src/libslic3r/CMakeLists.txt
+++ b/src/libslic3r/CMakeLists.txt
@@ -358,7 +358,7 @@ find_package(JPEG REQUIRED)
target_link_libraries(libslic3r
libnest2d
admesh
- cereal
+ cereal::cereal
libigl
miniz
boost_libs
--- a/src/slic3r/CMakeLists.txt
+++ b/src/slic3r/CMakeLists.txt
@@ -270,7 +270,7 @@ endforeach()
encoding_check(libslic3r_gui)
-target_link_libraries(libslic3r_gui libslic3r avrdude cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
+target_link_libraries(libslic3r_gui libslic3r avrdude cereal::cereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES})
if (MSVC)
target_link_libraries(libslic3r_gui Setupapi.lib)

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>3dprint@gentoo.org</email>
<name>Gentoo 3D Printer Project</name>
</maintainer>
<longdescription>
PrusaSlicer takes 3D models (STL, OBJ, AMF) and converts them into G-code instructions for FFF printers or PNG
layers for mSLA 3D printers. It's compatible with any modern printer based on the RepRap toolchain, including
all those based on the Marlin, Prusa, Sprinter and Repetier firmware. It also works with Mach3, LinuxCNC and
Machinekit controllers.
PrusaSlicer is based on Slic3r by Alessandro Ranellucci and the RepRap community.
</longdescription>
<upstream>
<bugs-to>https://github.com/prusa3d/PrusaSlicer/issues</bugs-to>
<doc>https://help.prusa3d.com/en/article/general-info_1910</doc>
<remote-id type="cpe">cpe:/a:prusa3d:prusaslicer</remote-id>
<remote-id type="github">prusa3d/PrusaSlicer</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,87 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
WX_GTK_VER="3.0-gtk3"
inherit cmake desktop wxwidgets xdg
MY_PN="PrusaSlicer"
DESCRIPTION="A mesh slicer to generate G-code for fused-filament-fabrication (3D printers)"
HOMEPAGE="https://www.prusa3d.com/prusaslicer/"
if [ "${PV}" == "9999" ] ; then
KEYWORDS=""
SRC_URI=""
EGIT_REPO_URI="https://github.com/prusa3d/PrusaSlicer.git"
else
KEYWORDS="~amd64 ~x86"
SRC_URI="https://github.com/prusa3d/${MY_PN}/archive/version_${PV}.tar.gz -> ${P}.tar.gz"
PATCHES=(
"${FILESDIR}"/${PN}-2.4.0-fix-build-with-cereal-1.3.1.patch
)
S="${WORKDIR}/${MY_PN}-version_${PV}"
fi
LICENSE="AGPL-3 Boost-1.0 GPL-2 LGPL-3 MIT"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-cpp/eigen:3
>=dev-cpp/tbb-2021.4.0:=
>=dev-libs/boost-1.73.0:=[nls,threads(+)]
dev-libs/cereal
dev-libs/expat
dev-libs/glib:2
dev-libs/gmp:=
dev-libs/mpfr:=
dev-libs/imath:=
>=media-gfx/openvdb-8.2:=
net-misc/curl
media-libs/glew:0=
media-libs/libpng:0=
media-libs/qhull:=
sci-libs/libigl
sci-libs/nlopt
>=sci-mathematics/cgal-5.0:=
sys-apps/dbus
sys-libs/zlib:=
virtual/glu
virtual/opengl
x11-libs/gtk+:3
x11-libs/wxGTK:${WX_GTK_VER}[X,opengl]
"
DEPEND="${RDEPEND}
media-libs/qhull[static-libs]
"
src_prepare() {
sed -i -e 's/PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN/PrusaSlicer-${SLIC3R_VERSION}+Gentoo/g' version.inc || die
cmake_src_prepare
}
src_configure() {
CMAKE_BUILD_TYPE="Release"
setup-wxwidgets
local mycmakeargs=(
-DOPENVDB_FIND_MODULE_PATH="/usr/$(get_libdir)/cmake/OpenVDB"
-DSLIC3R_BUILD_TESTS=$(usex test)
-DSLIC3R_FHS=ON
-DSLIC3R_GTK=3
-DSLIC3R_GUI=ON
-DSLIC3R_PCH=OFF
-DSLIC3R_STATIC=OFF
-DSLIC3R_WX_STABLE=ON
-Wno-dev
)
cmake_src_configure
}