From e7ab0a09c9d717d35bd8beb4f7e1aa7a65a9805c Mon Sep 17 00:00:00 2001 From: Jasper Chan Date: Mon, 25 Feb 2019 23:41:16 -0800 Subject: [PATCH] New package: Slic3rPE-1.42.0 closes #9185 Co-authored-by: maxice8 --- .../patches/fix-strerror_r-check.patch | 27 +++++++++++++++++++ srcpkgs/Slic3rPE/template | 22 +++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 srcpkgs/Slic3rPE/patches/fix-strerror_r-check.patch create mode 100644 srcpkgs/Slic3rPE/template diff --git a/srcpkgs/Slic3rPE/patches/fix-strerror_r-check.patch b/srcpkgs/Slic3rPE/patches/fix-strerror_r-check.patch new file mode 100644 index 00000000000..0380f333e85 --- /dev/null +++ b/srcpkgs/Slic3rPE/patches/fix-strerror_r-check.patch @@ -0,0 +1,27 @@ +diff --git src/png/error.hpp src/png/error.hpp +index c67f976..8ee2c87 100644 +--- src/png/error.hpp ++++ src/png/error.hpp +@@ -100,7 +100,7 @@ namespace png + strerror_s(buf, ERRBUF_SIZE, errnum); + return std::string(buf); + #else +-#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE ++#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE || !defined(__GLIBC__) + char buf[ERRBUF_SIZE] = { 0 }; + strerror_r(errnum, buf, ERRBUF_SIZE); + return std::string(buf); +diff --git src/slic3r/Utils/Serial.cpp src/slic3r/Utils/Serial.cpp +index 601719b..43dab23 100644 +--- src/slic3r/Utils/Serial.cpp ++++ src/slic3r/Utils/Serial.cpp +@@ -42,7 +42,7 @@ + #ifndef _WIN32 + #include + #include +- #include ++ #include + #include + #endif + + diff --git a/srcpkgs/Slic3rPE/template b/srcpkgs/Slic3rPE/template new file mode 100644 index 00000000000..e7aedf8e66b --- /dev/null +++ b/srcpkgs/Slic3rPE/template @@ -0,0 +1,22 @@ +# Template file for 'Slic3rPE' +pkgname=Slic3rPE +version=1.42.0 +revision=1 +_status="-alpha7" +wrksrc="Slic3r-version_${version}${_status}" +build_style=cmake +configure_args="-DSLIC3R_WX_STABLE=1 -DSLIC3R_FHS=1" +hostmakedepends="pkg-config" +makedepends="boost-devel tbb-devel libcurl-devel nlopt-devel gtest-devel + wxWidgets-devel glu-devel libpng-devel" +short_desc="G-code generator for 3D printers, Prusa Edition" +maintainer="Jasper Chan " +license="GPL-3.0-or-later" +homepage="https://www.prusa3d.com/slic3r-prusa-edition/" +distfiles="https://github.com/prusa3d/Slic3r/archive/version_${version}${_status}.tar.gz" +checksum=ebe991a3fbd2fc49560d59942353c5e32f2373365e903b7979a0312c2bf97ccf +nocross="tries to run avrdude-conf-gen which is compiled for target" + +post_install() { + mv ${DESTDIR}/usr/bin/slic3r-{gui,pe} +}