This commit is contained in:
lod 2024-09-07 01:09:19 +02:00
parent 74b5ac237d
commit 014040bdd8

View file

@ -5,7 +5,9 @@ pkgdesc="G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, C
arch=('x86_64') arch=('x86_64')
url="https://github.com/SoftFever/OrcaSlicer" url="https://github.com/SoftFever/OrcaSlicer"
license=('AGPL-3.0-only') license=('AGPL-3.0-only')
depends=('cairo' 'dbus' 'expat' 'fontconfig' 'gcc-libs' 'glib2' 'glibc' 'gtk3' 'gdk-pixbuf2' 'gstreamer' 'gst-plugins-bad-libs' 'hicolor-icon-theme' 'libglvnd' 'libjpeg-turbo' 'libspnav' 'libx11' 'pango' 'python' 'wayland' 'webkit2gtk-4.1' 'zlib') depends=('cairo' 'dbus' 'expat' 'fontconfig' 'gcc-libs' 'glib2' 'glibc' 'gtk3' 'gdk-pixbuf2' 'gstreamer'
'gst-plugins-bad-libs' 'hicolor-icon-theme' 'libglvnd' 'libjpeg-turbo' 'libspnav' 'libx11' 'pango'
'python' 'wayland' 'webkit2gtk-4.1' 'zlib')
makedepends=('cmake' 'extra-cmake-modules' 'git' 'm4' 'ninja' 'pkgconf' 'wayland-protocols' 'glew') makedepends=('cmake' 'extra-cmake-modules' 'git' 'm4' 'ninja' 'pkgconf' 'wayland-protocols' 'glew')
provides=("orca-slicer") provides=("orca-slicer")
source=("$pkgname::git+https://github.com/SoftFever/OrcaSlicer.git") source=("$pkgname::git+https://github.com/SoftFever/OrcaSlicer.git")
@ -19,30 +21,27 @@ pkgver() {
prepare() { prepare() {
cd $srcdir/$pkgname cd $srcdir/$pkgname
# Remove the <T> in the Constructor Definition # C++20 disallows the use of the Point<T> syntax in the constructor
sed -i 's/explicit Point<T>(/explicit Point(/' src/clipper2/Clipper2Lib/include/clipper2/clipper.core.h sed -i 's/explicit Point<T>(/explicit Point(/' src/clipper2/Clipper2Lib/include/clipper2/clipper.core.h
# Change installation path for resources
sed -i 's/${CMAKE_INSTALL_FULL_DATAROOTDIR}/\/usr\/share\//' CMakeLists.txt
} }
build() { build() {
cd $srcdir/$pkgname cd $srcdir/$pkgname
mkdir -p deps/build/release export CXXFLAGS="${CXXFLAGS} -flto"
cmake \ cmake \
-G Ninja \ -G Ninja \
-S deps \ -S deps \
-B deps/build \ -B deps/build \
-DCMAKE_BUILD_TYPE=Release \
-DDEP_WX_GTK3=ON -DDEP_WX_GTK3=ON
ninja -C deps/build ninja -C deps/build
cmake \ cmake \
-G Ninja \ -G Ninja \
-DCMAKE_CXX_FLAGS="$CXXFLAGS -flto" \
-S . \ -S . \
-B build \ -B build \
-DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_FULL_DATAROOTDIR=/usr\/share/ \
-DCMAKE_PREFIX_PATH=$srcdir/$pkgname/deps/build/destdir/usr/local \ -DCMAKE_PREFIX_PATH=$srcdir/$pkgname/deps/build/destdir/usr/local \
-DSLIC3R_STATIC=1 \ -DSLIC3R_STATIC=1 \
-DORCA_TOOLS=1 \ -DORCA_TOOLS=1 \
@ -53,6 +52,7 @@ build() {
package() { package() {
cd $srcdir/$pkgname cd $srcdir/$pkgname
DESTDIR=$pkgdir ninja -C build install DESTDIR=$pkgdir ninja -C build install
install -Dm644 doc/*.md -t $pkgdir/usr/share/doc/OrcaSlicer/ install -Dm644 doc/*.md -t $pkgdir/usr/share/doc/OrcaSlicer/
install -Dm644 $pkgdir/usr/LICENSE.txt $pkgdir/usr/share/licenses/OrcaSlicer/LICENSE install -Dm644 $pkgdir/usr/LICENSE.txt $pkgdir/usr/share/licenses/OrcaSlicer/LICENSE