superslicer-prerelease/PKGBUILD

61 lines
1.9 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
2020-06-10 21:48:10 +00:00
pkgname=superslicer
2020-06-11 15:01:40 +00:00
pkgver=2.2.51.1
2020-05-10 17:38:47 +00:00
_pkgtag=$pkgver
pkgrel=1
2020-04-03 00:16:54 +00:00
pkgdesc="G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)"
arch=('x86_64')
2020-06-10 21:48:10 +00:00
url="https://github.com/supermerill/SuperSlicer"
2020-04-03 00:16:54 +00:00
license=('AGPL3')
depends=('cgal' 'glew' 'nlopt' 'openvdb' 'qhull' 'wxgtk3')
2020-06-10 21:48:10 +00:00
conflicts=('slic3r++')
2020-06-11 15:01:40 +00:00
replaces=('slic3r++')
2020-04-03 00:16:54 +00:00
makedepends=('boost' 'cereal' 'cmake' 'eigen' 'libigl' 'openvdb' 'wxgtk2') # cmake doesn't detect wx if not both gtk2 and gtk3 are installed
2020-06-10 21:48:10 +00:00
source=("https://github.com/supermerill//SuperSlicer/archive/$_pkgtag.tar.gz"
"superslicer.desktop"
2020-04-21 17:15:00 +00:00
"0001-wxgtk3-is-broken-on-wayland.patch")
2020-06-11 15:01:40 +00:00
sha512sums=('8bb2de525ad67a5a4a0821d631bab33a8a9d6f0ce3e7a604b409427752ba854dec0bd55798e812fa4ab83b1e749f0c11e55aa95405a318a5c3fd9a87f4d7ae62'
2020-06-10 21:48:10 +00:00
'18b39d66b12453686ac0b411bac4a7c3000c541aeb0de2cacf37552a0e2435858c9ce2d3da10fa05ab6ab0e5e714f78f6a011f894435ab7195ae5f3ed8bc5623'
2020-04-03 00:16:54 +00:00
'acf35ebe467e9fb30f1b77d15348f1a7b82dcf45a5b829e375e972b5d6b49968603b3fa090c4d1f56e8b5148e2b820e79afa269da60ace70de1ceadcf6e820c5')
prepare()
{
2020-06-10 21:48:10 +00:00
cd "$srcdir/SuperSlicer-$_pkgtag"
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"
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
mkdir -p build
cd build
2020-06-10 21:48:10 +00:00
2020-04-03 00:16:54 +00:00
cmake .. \
-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
make
}
package()
{
2020-06-10 21:48:10 +00:00
cd "$srcdir/SuperSlicer-$_pkgtag/build"
2020-04-03 00:16:54 +00:00
make DESTDIR="$pkgdir" install
2020-04-04 15:21:34 +00:00
test ! -h "$pkgdir/usr/share/slic3r++/resources" || rm "$pkgdir/usr/share/slic3r++/resources"
2020-06-10 21:48:10 +00:00
2020-04-03 00:16:54 +00:00
install -d "$pkgdir/usr/share/applications"
2020-06-10 21:48:10 +00:00
install -m 644 "$srcdir/superslicer.desktop" "$pkgdir/usr/share/applications/"
2020-04-03 00:16:54 +00:00
}