2020-06-10 21:48:10 +00:00
# Maintainer: Lukas1818 aur at lukas1818 dot de
2020-04-03 00:16:54 +00:00
2021-09-07 16:57:36 +00:00
pkgname=superslicer-prerelease
2021-12-12 12:47:01 +00:00
pkgver=2.3.57.7
2020-05-10 17:38:47 +00:00
_pkgtag=$pkgver
2021-12-12 12:47:01 +00:00
pkgrel=1
2021-04-12 16:56:00 +00:00
epoch=1
2020-04-03 00:16:54 +00:00
pkgdesc="G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)"
2021-03-31 11:36:41 +00:00
arch=("$CARCH")
2020-06-10 21:48:10 +00:00
url="https://github.com/supermerill/SuperSlicer"
2020-04-03 00:16:54 +00:00
license=('AGPL3')
2021-11-07 11:49:29 +00:00
options=(!emptydirs)
2021-11-12 22:10:06 +00:00
depends=('cgal' 'glew' 'imath' 'nlopt' 'openvdb' 'wxgtk3-dev-314-opt' 'boost-libs>=1.73.0' 'qhull>=2020.2-4')
2020-06-11 15:01:40 +00:00
replaces=('slic3r++')
2021-11-12 22:10:06 +00:00
makedepends=('cereal' 'cmake' 'ninja' 'eigen' 'libigl' 'openvdb' 'boost>=1.73.0' 'wxgtk2-dev-314-opt') # cmake doesn't detect wx if not both gtk2 and gtk3 are installed
2021-09-07 16:57:36 +00:00
optdepends=('superslicer-profiles: Predefined printer profiles')
2021-04-12 16:56:00 +00:00
provides=("superslicer=$epoch:$pkgver")
conflicts=('superslicer' 'superslicer-git')
2021-11-07 11:49:29 +00:00
source=("https://github.com/supermerill/SuperSlicer/archive/$_pkgtag.tar.gz"
2021-05-01 16:14:24 +00:00
"0001-wxgtk3-is-broken-on-wayland.patch"
2021-12-11 21:18:01 +00:00
"https://raw.githubusercontent.com/archlinux/svntogit-community/1dea61c0b581ff5001d073689f68b0323740be93/trunk/prusa-slicer-openexr3.patch"
"tbb-2021.patch"
"FindTBB.cmake")
2021-12-12 12:47:01 +00:00
sha512sums=('d9a92366ed426dab77a5d49cddd7c7f37f2a0e026574bcbff342e579c555aefb19aaea8de7b5180bb87ab2749ba0cef96e870d808914fdbc58f3ddf04e1a4a65'
2021-05-01 16:14:24 +00:00
'acf35ebe467e9fb30f1b77d15348f1a7b82dcf45a5b829e375e972b5d6b49968603b3fa090c4d1f56e8b5148e2b820e79afa269da60ace70de1ceadcf6e820c5'
2021-12-11 21:18:01 +00:00
'c33c2414746bc9d7dceb5af59ecb4aed2189211fc3c8b144d712a39d3677ba4d366eb9b4dd05fbc3811954d69cd1273d714dc4536489fe153ac1aee2919e5c98'
'6a00fa9eb13b2485aed493e96b49e1ef345d8fcf6adf2719c2336e4b07e4e7c1461ee288d77a9c45f3bac5e68507d54da00816817ef17023e6e0aa9d0fb36348'
'5a6426f7d5b1761923c83838b1b5c976529b7a4b5e8c5c98f34c6174d8636fbfca34e3a04ed5f5314c88db3261c454c9f4576f7cf58f6623a43cff08a0b5b105')
2020-04-03 00:16:54 +00:00
prepare()
{
2020-06-10 21:48:10 +00:00
cd "$srcdir/SuperSlicer-$_pkgtag"
2021-10-08 16:41:40 +00:00
[ ! -f build/Makefile ] || rm -rf build
mkdir -p build
2020-04-03 00:16:54 +00:00
# disabling tests is not enough, we need to remove them explicitly
sed -i 's,add_subdirectory(test),,g' src/CMakeLists.txt
2020-06-10 21:48:10 +00:00
2020-04-03 00:16:54 +00:00
# apply patches
2020-04-21 17:15:00 +00:00
patch --forward --strip=1 --input="$srcdir/0001-wxgtk3-is-broken-on-wayland.patch"
2021-05-27 10:08:27 +00:00
patch -p1 < "$srcdir/prusa-slicer-openexr3.patch" # Fix build with openEXR 3
2021-12-11 21:18:01 +00:00
patch -p1 < "$srcdir/tbb-2021.patch" # Fix build with TBB 2021
cp "$srcdir/FindTBB.cmake" "cmake/modules/FindTBB.cmake" # Fix build with TBB 2021
2020-04-03 00:16:54 +00:00
}
build()
{
2020-06-10 21:48:10 +00:00
cd "$srcdir/SuperSlicer-$_pkgtag"
2020-04-03 00:16:54 +00:00
cd build
2020-06-10 21:48:10 +00:00
2020-04-03 00:16:54 +00:00
cmake .. \
2021-10-08 16:41:40 +00:00
-G Ninja \
2020-04-03 00:16:54 +00:00
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DOpenGL_GL_PREFERENCE=GLVND \
-DSLIC3R_FHS=ON \
-DSLIC3R_STATIC=OFF \
-DSLIC3R_WX_STABLE=ON \
-DSLIC3R_GTK=3 \
2020-10-11 18:13:41 +00:00
-DSLIC3R_BUILD_TESTS=OFF \
2021-06-11 14:49:10 +00:00
-DSLIC3R_ALPHA=ON \
2021-10-08 16:41:40 +00:00
-DwxWidgets_CONFIG_EXECUTABLE=/opt/wxgtk-dev-314/bin/wx-config \
2021-11-07 11:49:29 +00:00
-DCMAKE_CXX_FLAGS="-Wno-unused-command-line-argument -Wl,-rpath=/opt/wxgtk-dev-314/lib"
2020-10-11 18:13:41 +00:00
2021-09-07 16:57:36 +00:00
ninja
2020-04-03 00:16:54 +00:00
}
package()
{
2020-06-10 21:48:10 +00:00
cd "$srcdir/SuperSlicer-$_pkgtag/build"
2021-09-07 16:57:36 +00:00
DESTDIR="$pkgdir" ninja install
2020-10-11 18:13:41 +00:00
test ! -h "$pkgdir/usr/share/SuperSlicer/resources" || rm "$pkgdir/usr/share/SuperSlicer/resources"
2020-04-03 00:16:54 +00:00
}