mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
media-gfx/prusaslicer: added new ebuild
Closes: https://bugs.gentoo.org/652100 Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/18668 Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
This commit is contained in:
1
media-gfx/prusaslicer/Manifest
Normal file
1
media-gfx/prusaslicer/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST prusaslicer-2.2.0.tar.gz 30811929 BLAKE2B cde004add53ee025728d566cb7331cb7b1eac5412e9ad3bee037d13277c24dcdc6024c91f09bb9ef0653a12a3ee7c5cb5cec21e2a00825d185472ea7036e08f5 SHA512 5c8dc5b581e04208a1ae53771ef2607da189ee85aadf501ce1480008f5a6ddb10bb528ddc2608d3f04acd26c583ff895ad4148d6a1397f002292e20098971e1d
|
||||
9
media-gfx/prusaslicer/files/PrusaGcodeviewer.desktop
Normal file
9
media-gfx/prusaslicer/files/PrusaGcodeviewer.desktop
Normal file
@@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=Prusa GCode viewer
|
||||
Exec=prusa-slicer --gcodeviewer %F
|
||||
Icon=PrusaSlicer
|
||||
Terminal=false
|
||||
Type=Application
|
||||
MimeType=text/x.gcode;
|
||||
Categories=Graphics;3DGraphics;
|
||||
Keywords=3D;Printing;Slicer;
|
||||
12
media-gfx/prusaslicer/files/PrusaSlicer.desktop
Normal file
12
media-gfx/prusaslicer/files/PrusaSlicer.desktop
Normal file
@@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Name=PrusaSlicer
|
||||
GenericName=3D Printing Software
|
||||
Icon=PrusaSlicer
|
||||
Exec=prusa-slicer %F
|
||||
Terminal=false
|
||||
Type=Application
|
||||
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
|
||||
Categories=Graphics;3DGraphics;Engineering;
|
||||
Keywords=3D;Printing;Slicer;slice;3D;printer;convert;gcode;stl;obj;amf;SLA
|
||||
StartupNotify=false
|
||||
StartupWMClass=prusa-slicer
|
||||
10
media-gfx/prusaslicer/files/prusaslicer-2.2.0-atomic.patch
Normal file
10
media-gfx/prusaslicer/files/prusaslicer-2.2.0-atomic.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/src/slic3r/GUI/Mouse3DController.hpp
|
||||
+++ b/src/slic3r/GUI/Mouse3DController.hpp
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "hidapi.h"
|
||||
|
||||
+#include <atomic>
|
||||
#include <queue>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
@@ -0,0 +1,60 @@
|
||||
--- a/src/admesh/stlinit.cpp
|
||||
+++ b/src/admesh/stlinit.cpp
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <boost/nowide/cstdio.hpp>
|
||||
-#include <boost/detail/endian.hpp>
|
||||
|
||||
#include "stl.h"
|
||||
|
||||
@@ -36,9 +35,9 @@
|
||||
#error "SEEK_SET not defined"
|
||||
#endif
|
||||
|
||||
-#ifndef BOOST_LITTLE_ENDIAN
|
||||
+#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
|
||||
extern void stl_internal_reverse_quads(char *buf, size_t cnt);
|
||||
-#endif /* BOOST_LITTLE_ENDIAN */
|
||||
+#endif /* __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ */
|
||||
|
||||
static FILE* stl_open_count_facets(stl_file *stl, const char *file)
|
||||
{
|
||||
@@ -89,10 +88,10 @@
|
||||
// Read the int following the header. This should contain # of facets.
|
||||
uint32_t header_num_facets;
|
||||
bool header_num_faces_read = fread(&header_num_facets, sizeof(uint32_t), 1, fp) != 0;
|
||||
-#ifndef BOOST_LITTLE_ENDIAN
|
||||
+#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
|
||||
// Convert from little endian to big endian.
|
||||
stl_internal_reverse_quads((char*)&header_num_facets, 4);
|
||||
-#endif /* BOOST_LITTLE_ENDIAN */
|
||||
+#endif /* __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ */
|
||||
if (! header_num_faces_read || num_facets != header_num_facets)
|
||||
BOOST_LOG_TRIVIAL(info) << "stl_open_count_facets: Warning: File size doesn't match number of facets in the header: " << file;
|
||||
}
|
||||
@@ -158,10 +157,10 @@
|
||||
// Read a single facet from a binary .STL file. We assume little-endian architecture!
|
||||
if (fread(&facet, 1, SIZEOF_STL_FACET, fp) != SIZEOF_STL_FACET)
|
||||
return false;
|
||||
-#ifndef BOOST_LITTLE_ENDIAN
|
||||
+#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
|
||||
// Convert the loaded little endian data to big endian.
|
||||
stl_internal_reverse_quads((char*)&facet, 48);
|
||||
-#endif /* BOOST_LITTLE_ENDIAN */
|
||||
+#endif /* __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__ */
|
||||
} else {
|
||||
// Read a single facet from an ASCII .STL file
|
||||
// skip solid/endsolid
|
||||
|
||||
--- a/CMakeLists.txt (revision 3b2c51fd5ab04a72592bfdba1cd39cd6298b66c2)
|
||||
+++ b/CMakeLists.txt (date 1607811414000)
|
||||
@@ -260,7 +260,7 @@
|
||||
# set(Boost_COMPILER "-mgw81")
|
||||
if(NOT WIN32)
|
||||
# boost::process was introduced first in version 1.64.0
|
||||
- set(MINIMUM_BOOST_VERSION "1.64.0")
|
||||
+ set(MINIMUM_BOOST_VERSION "1.72.0")
|
||||
endif()
|
||||
set(_boost_components "system;filesystem;thread;log;locale;regex;chrono;atomic;date_time")
|
||||
find_package(Boost ${MINIMUM_BOOST_VERSION} REQUIRED COMPONENTS ${_boost_components})
|
||||
19
media-gfx/prusaslicer/metadata.xml
Normal file
19
media-gfx/prusaslicer/metadata.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://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>
|
||||
<remote-id type="github">prusa3d/PrusaSlicer</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
79
media-gfx/prusaslicer/prusaslicer-2.2.0.ebuild
Normal file
79
media-gfx/prusaslicer/prusaslicer-2.2.0.ebuild
Normal file
@@ -0,0 +1,79 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
WX_GTK_VER="3.0-gtk3"
|
||||
|
||||
inherit cmake desktop wxwidgets xdg-utils
|
||||
|
||||
MY_PN="PrusaSlicer"
|
||||
|
||||
DESCRIPTION="A mesh slicer to generate G-code for fused-filament-fabrication (3D printers)"
|
||||
HOMEPAGE="https://www.prusa3d.com/prusaslicer/"
|
||||
SRC_URI="https://github.com/prusa3d/${MY_PN}/archive/version_${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="AGPL-3 CC-BY-3.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
IUSE="gui test"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
dev-cpp/eigen:3
|
||||
dev-cpp/tbb
|
||||
>=dev-libs/boost-1.73.0[threads]
|
||||
dev-libs/cereal
|
||||
dev-libs/expat
|
||||
dev-libs/miniz
|
||||
media-libs/glew:0=
|
||||
media-libs/qhull
|
||||
>=media-gfx/openvdb-5.0.0
|
||||
net-misc/curl
|
||||
>=sci-mathematics/cgal-5.0
|
||||
sci-libs/libigl
|
||||
sci-libs/nlopt
|
||||
sys-libs/zlib
|
||||
x11-libs/wxGTK:${WX_GTK_VER}[X]
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
S="${WORKDIR}/PrusaSlicer-version_${PV}"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-atomic.patch"
|
||||
"${FILESDIR}/${P}-boost-1.73.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
setup-wxwidgets
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
CMAKE_BUILD_TYPE=Release
|
||||
|
||||
local mycmakeargs=(
|
||||
-DSLIC3R_BUILD_TESTS=$(usex test)
|
||||
-DSLIC3R_FHS=1
|
||||
-DSLIC3R_GUI=$(usex gui)
|
||||
-DSLIC3R_PCH=0
|
||||
-SLIC3R_STATIC=0
|
||||
-DSLIC3R_WX_STABLE=1
|
||||
)
|
||||
|
||||
cmake_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
|
||||
doicon resources/icons/PrusaSlicer.png || die
|
||||
domenu "${FILESDIR}/PrusaGcodeviewer.desktop" || die
|
||||
domenu "${FILESDIR}/PrusaSlicer.desktop" || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_mimeinfo_database_update
|
||||
xdg_desktop_database_update
|
||||
}
|
||||
Reference in New Issue
Block a user