70 lines
2.5 KiB
Bash
70 lines
2.5 KiB
Bash
# Maintainer: Lukas1818 aur at lukas1818 dot de
|
|
|
|
pkgname=superslicer-prerelease
|
|
pkgver=2.4.58.0
|
|
_pkgtag=$pkgver
|
|
pkgrel=1
|
|
epoch=1
|
|
pkgdesc="G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)"
|
|
arch=("$CARCH")
|
|
url="https://github.com/supermerill/SuperSlicer"
|
|
license=('AGPL3')
|
|
options=(!emptydirs)
|
|
depends=('boost-libs>=1.73.0' 'cgal' 'glew' 'imath' 'libspnav' 'nlopt' 'openvdb' 'qhull>=2020.2-4' 'wxgtk3-dev-314-opt')
|
|
makedepends=('boost>=1.73.0' 'cereal>=1.3.0' 'cmake' 'eigen' 'libigl' 'openvdb' 'samurai' 'wxgtk2-dev-314-opt') # cmake doesn't detect wx if not both gtk2 and gtk3 are installed
|
|
optdepends=('superslicer-profiles: Predefined printer profiles')
|
|
provides=("superslicer=$epoch:$pkgver")
|
|
conflicts=('superslicer' 'superslicer-git')
|
|
source=("https://github.com/supermerill/SuperSlicer/archive/$_pkgtag.tar.gz"
|
|
"0001-wxgtk3-is-broken-on-wayland.patch"
|
|
"0002-fix-cereal.patch"
|
|
"0003-openexr3.patch")
|
|
sha512sums=('11a025960b516d70b9936c777a2ea57fe1116330b2abc042d5ccd77b47e99140d353dc6b156b5a3fd412896dfb0d3595246d7966855ce4af5b17bb581828245d'
|
|
'acf35ebe467e9fb30f1b77d15348f1a7b82dcf45a5b829e375e972b5d6b49968603b3fa090c4d1f56e8b5148e2b820e79afa269da60ace70de1ceadcf6e820c5'
|
|
'c3ba2d16140d445168681ff442bda12e87de22f8b94d59c32576bd7079ffe5864cce8e62cddd1ed47458f9eddcbd3e1a02645b0645aad6f2e0cb08a876bf783f'
|
|
'840e51b8feb3568ff46d309ece063f7188018fcaa43d19ec50ede408fdf2c237a3b7eaa11ba24409d8c3f7d6f5fb270181508cc56e0b2b0fef68b766130ef1eb')
|
|
|
|
prepare()
|
|
{
|
|
cd "$srcdir/SuperSlicer-$_pkgtag"
|
|
[ ! -f build/Makefile ] || rm -rf build
|
|
mkdir -p build
|
|
|
|
# disabling tests is not enough, we need to remove them explicitly
|
|
sed -i 's,add_subdirectory(test),,g' src/CMakeLists.txt
|
|
|
|
# apply patches
|
|
patch -Np1 -i "$srcdir/0001-wxgtk3-is-broken-on-wayland.patch"
|
|
patch -Np1 -i "$srcdir/0002-fix-cereal.patch"
|
|
patch -Np1 -i "$srcdir/0003-openexr3.patch"
|
|
}
|
|
|
|
build()
|
|
{
|
|
cd "$srcdir/SuperSlicer-$_pkgtag"
|
|
cd build
|
|
|
|
cmake .. \
|
|
-G Ninja \
|
|
-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 \
|
|
-DSLIC3R_BUILD_TESTS=OFF \
|
|
-DSLIC3R_ALPHA=ON \
|
|
-DwxWidgets_CONFIG_EXECUTABLE=/opt/wxgtk-dev-314/bin/wx-config \
|
|
-DCMAKE_CXX_FLAGS="-Wno-unused-command-line-argument -Wl,-rpath=/opt/wxgtk-dev-314/lib"
|
|
|
|
samu
|
|
}
|
|
|
|
package()
|
|
{
|
|
cd "$srcdir/SuperSlicer-$_pkgtag/build"
|
|
|
|
DESTDIR="$pkgdir" samu install
|
|
test ! -h "$pkgdir/usr/share/SuperSlicer/resources" || rm "$pkgdir/usr/share/SuperSlicer/resources"
|
|
}
|