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
2024-11-20 12:13:09 +00:00
pkgver=nightly_dev
2020-05-10 17:38:47 +00:00
_pkgtag=$pkgver
2022-02-24 14:20:27 +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')
2024-11-20 12:13:09 +00:00
options=(!emptydirs debug !strip)
depends=('boost-libs>=1.73.0' 'cgal' 'glew' 'imath' 'libspnav' 'nlopt' 'openvdb' 'qhull>=2020.2-4' 'wxgtk3-dev-opt')
makedepends=('boost>=1.73.0' 'cereal>=1.3.0' 'cmake' 'eigen' 'libigl' 'openvdb' 'samurai' 'wxgtk2-dev-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')
2024-11-20 12:13:09 +00:00
source=("https://github.com/supermerill/SuperSlicer/archive/refs/heads/nightly_dev.tar.gz"
2022-02-24 14:20:27 +00:00
"0002-fix-cereal.patch"
"0003-openexr3.patch")
2024-11-20 12:13:09 +00:00
sha512sums=(SKIP
2022-02-24 14:20:27 +00:00
'c3ba2d16140d445168681ff442bda12e87de22f8b94d59c32576bd7079ffe5864cce8e62cddd1ed47458f9eddcbd3e1a02645b0645aad6f2e0cb08a876bf783f'
'840e51b8feb3568ff46d309ece063f7188018fcaa43d19ec50ede408fdf2c237a3b7eaa11ba24409d8c3f7d6f5fb270181508cc56e0b2b0fef68b766130ef1eb')
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
2022-02-24 14:20:27 +00:00
patch -Np1 -i "$srcdir/0002-fix-cereal.patch"
patch -Np1 -i "$srcdir/0003-openexr3.patch"
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 \
2024-11-20 12:13:09 +00:00
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
2020-04-03 00:16:54 +00:00
-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 \
2024-11-20 12:13:09 +00:00
-DwxWidgets_CONFIG_EXECUTABLE=/opt/wxgtk-dev/bin/wx-config \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-unused-command-line-argument -Wl,-rpath=/opt/wxgtk-dev/lib"
2020-10-11 18:13:41 +00:00
2022-02-24 14:20:27 +00:00
samu
2020-04-03 00:16:54 +00:00
}
package()
{
2020-06-10 21:48:10 +00:00
cd "$srcdir/SuperSlicer-$_pkgtag/build"
2022-02-24 14:20:27 +00:00
DESTDIR="$pkgdir" samu 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
}