# Maintainer: lod pkgname=orca-slicer pkgver=2.1.1 pkgrel=1 pkgdesc="G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.) " arch=('x86_64') url="https://github.com/SoftFever/OrcaSlicer" license=('AGPL-3.0-only') depends=('cairo' 'curl' 'dbus' 'expat' 'fontconfig' 'freetype2' 'gcc-libs' 'glib2' 'glibc' 'gtk3' 'gdk-pixbuf2' 'gstreamer' 'gst-plugins-bad-libs' 'hicolor-icon-theme' 'libglvnd' 'libjpeg-turbo' 'libpng' 'libspnav' 'libtiff' 'libx11' 'openssl' 'pango' 'python' 'wayland' 'webkit2gtk-4.1' 'zlib' 'opencv' 'freeimage' 'nlopt' 'opencascade') makedepends=('cmake' 'extra-cmake-modules' 'git' 'm4' 'ninja' 'pkgconf' 'wayland-protocols' 'glew') provides=("orca-slicer") source=("$pkgname::git+https://github.com/SoftFever/OrcaSlicer.git#tag=v$pkgver" "test.patch" "dont-link-opencv-world.patch") b2sums=('e5b0e0c15ac6418bed32ca144342acb5db37f55cf028b2f5ba32e0765e7e876786efa6f15e66e7b0e1ddef05eb22d2a5d390835fc584838f66d5f869df02eb32' 'SKIP' 'SKIP') prepare() { cd $srcdir/$pkgname patch -p1 -i ../test.patch patch -p1 -i ../dont-link-opencv-world.patch # C++20 disallows the use of the Point syntax in the constructor sed -i 's/explicit Point(/explicit Point(/' src/clipper2/Clipper2Lib/include/clipper2/clipper.core.h } build() { cd $srcdir/$pkgname export CXXFLAGS="${CXXFLAGS} -flto" cmake \ -G Ninja \ -S deps \ -B deps/build \ -DDEP_WX_GTK3=ON ninja -C deps/build cmake \ -G Ninja \ -S . \ -B build \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_FULL_DATAROOTDIR=/usr/share/ \ -DCMAKE_PREFIX_PATH=$srcdir/$pkgname/deps/build/destdir/usr/local \ -DSLIC3R_STATIC=1 \ -DORCA_TOOLS=1 \ -DSLIC3R_FHS=1 \ -DSLIC3R_GTK=3 ninja -C build } package() { cd $srcdir/$pkgname DESTDIR=$pkgdir ninja -C build install install -Dm644 doc/*.md -t $pkgdir/usr/share/doc/OrcaSlicer/ install -Dm644 $pkgdir/usr/LICENSE.txt $pkgdir/usr/share/licenses/OrcaSlicer/LICENSE rm -rf $pkgdir/usr/LICENSE.txt }