# Maintainer: Lukas1818 aur at lukas1818 dot de pkgname=superslicer pkgver=2.2.51.1 _pkgtag=$pkgver pkgrel=1 pkgdesc="G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)" arch=('x86_64') url="https://github.com/supermerill/SuperSlicer" license=('AGPL3') depends=('cgal' 'glew' 'nlopt' 'openvdb' 'qhull' 'wxgtk3') conflicts=('slic3r++') replaces=('slic3r++') makedepends=('boost' 'cereal' 'cmake' 'eigen' 'libigl' 'openvdb' 'wxgtk2') # cmake doesn't detect wx if not both gtk2 and gtk3 are installed source=("https://github.com/supermerill//SuperSlicer/archive/$_pkgtag.tar.gz" "superslicer.desktop" "0001-wxgtk3-is-broken-on-wayland.patch") sha512sums=('8bb2de525ad67a5a4a0821d631bab33a8a9d6f0ce3e7a604b409427752ba854dec0bd55798e812fa4ab83b1e749f0c11e55aa95405a318a5c3fd9a87f4d7ae62' '18b39d66b12453686ac0b411bac4a7c3000c541aeb0de2cacf37552a0e2435858c9ce2d3da10fa05ab6ab0e5e714f78f6a011f894435ab7195ae5f3ed8bc5623' 'acf35ebe467e9fb30f1b77d15348f1a7b82dcf45a5b829e375e972b5d6b49968603b3fa090c4d1f56e8b5148e2b820e79afa269da60ace70de1ceadcf6e820c5') prepare() { cd "$srcdir/SuperSlicer-$_pkgtag" # disabling tests is not enough, we need to remove them explicitly sed -i 's,add_subdirectory(test),,g' src/CMakeLists.txt # apply patches patch --forward --strip=1 --input="$srcdir/0001-wxgtk3-is-broken-on-wayland.patch" } build() { cd "$srcdir/SuperSlicer-$_pkgtag" mkdir -p build cd build 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() { cd "$srcdir/SuperSlicer-$_pkgtag/build" make DESTDIR="$pkgdir" install test ! -h "$pkgdir/usr/share/slic3r++/resources" || rm "$pkgdir/usr/share/slic3r++/resources" install -d "$pkgdir/usr/share/applications" install -m 644 "$srcdir/superslicer.desktop" "$pkgdir/usr/share/applications/" }