superslicer-prerelease/PKGBUILD

71 lines
2.5 KiB
Text
Raw Normal View History

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
2022-04-01 17:39:49 +00:00
pkgver=2.4.58.2
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')
2021-11-07 11:49:29 +00:00
options=(!emptydirs)
2022-02-24 14:20:27 +00:00
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
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"
2022-02-24 14:20:27 +00:00
"0002-fix-cereal.patch"
"0003-openexr3.patch")
2022-04-01 17:39:49 +00:00
sha512sums=('c5038bd13482a2a164ce7f3b126b9f0183b4220b2d46d84e86a0ad29624eb9e000c5b8ad876506e4042a80c7c57b7f34bbf2bf5affc385334e00da416c22fd27'
2021-05-01 16:14:24 +00:00
'acf35ebe467e9fb30f1b77d15348f1a7b82dcf45a5b829e375e972b5d6b49968603b3fa090c4d1f56e8b5148e2b820e79afa269da60ace70de1ceadcf6e820c5'
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"
[ ! -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/0001-wxgtk3-is-broken-on-wayland.patch"
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 .. \
-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 \
-DSLIC3R_BUILD_TESTS=OFF \
2021-06-11 14:49:10 +00:00
-DSLIC3R_ALPHA=ON \
-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"
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
test ! -h "$pkgdir/usr/share/SuperSlicer/resources" || rm "$pkgdir/usr/share/SuperSlicer/resources"
2020-04-03 00:16:54 +00:00
}