add upstream wrapper to Use Zink bypassing the problematic NVIDIA OpenGL stack while retaining hardware acceleration
This commit is contained in:
parent
f7483c78ae
commit
f23f04c99b
3 changed files with 48 additions and 5 deletions
10
.SRCINFO
10
.SRCINFO
|
@ -1,7 +1,7 @@
|
|||
pkgbase = orca-slicer-git
|
||||
pkgdesc = G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)
|
||||
pkgver = 2.3.1.r24828.933b282
|
||||
pkgrel = 2
|
||||
pkgver = 2.3.1.r24908.32efc17
|
||||
pkgrel = 1
|
||||
url = https://github.com/SoftFever/OrcaSlicer
|
||||
arch = x86_64
|
||||
license = AGPL-3.0-only
|
||||
|
@ -14,6 +14,7 @@ pkgbase = orca-slicer-git
|
|||
makedepends = ninja
|
||||
makedepends = pkgconf
|
||||
makedepends = wayland-protocols
|
||||
depends = bash
|
||||
depends = cairo
|
||||
depends = dbus
|
||||
depends = expat
|
||||
|
@ -37,14 +38,19 @@ pkgbase = orca-slicer-git
|
|||
depends = wayland
|
||||
depends = webkit2gtk-4.1
|
||||
depends = zlib
|
||||
optdepends = mesa: Enables Zink fallback workaround for NVIDIA on Wayland
|
||||
optdepends = mesa-utils: for detecting renderer
|
||||
optdepends = nvidia-utils: for querying driver version
|
||||
provides = orca-slicer
|
||||
options = !debug
|
||||
options = !emptydirs
|
||||
source = orca-slicer-git::git+https://github.com/SoftFever/OrcaSlicer.git
|
||||
source = orca-slicer-wrapper.sh
|
||||
source = https://github.com/Open-Cascade-SAS/OCCT/commit/7236e83dcc1e7284e66dc61e612154617ef715d6.patch
|
||||
source = cmake-min-version.patch
|
||||
source = wxWidgets-cmake-min-version.patch
|
||||
b2sums = SKIP
|
||||
b2sums = aa8f847eef062b7999d33ec23e9abb5dd666221ee31aae4d94117eba96038da069d43be5e65321820172fc1c82ce9c674e8c4f833d01bb87d4e5db284c159156
|
||||
b2sums = cc7791841533e07787a4921b688fdd885782a67320936d445ad04102a68e8e044b5bf52a58d987d158ae522ae4f02a56a3525ccfd1831ef6a3b6459be14bd408
|
||||
b2sums = 562dcd07530faef0d9fdddf1e009075f67105c8239e4b1402cd890f7a89be8b11671dd6ecc7b55a155f2d05247070bb0b8ff84f2170ce2454ab818018be80e48
|
||||
b2sums = 1459ce126dd80a891006d2c40a001e75dc146ac9eb6ad8e975a3e4672ebb914baabecd8a4048742fab03e2820242f614449dd23a8e721bd5c945c8765e986a5a
|
||||
|
|
14
PKGBUILD
14
PKGBUILD
|
@ -1,23 +1,28 @@
|
|||
# Maintainer: lod <aur@cyber-anlage.de>
|
||||
|
||||
pkgname=orca-slicer-git
|
||||
pkgver=2.3.1.r24828.933b282
|
||||
pkgrel=2
|
||||
pkgver=2.3.1.r24908.32efc17
|
||||
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' 'dbus' 'expat' 'fontconfig' 'freetype2' 'gcc-libs' 'gdk-pixbuf2' 'glib2' 'glibc'
|
||||
depends=('bash' 'cairo' 'dbus' 'expat' 'fontconfig' 'freetype2' 'gcc-libs' 'gdk-pixbuf2' 'glib2' 'glibc'
|
||||
'gst-plugins-base-libs' 'gstreamer' 'gtk3' 'hicolor-icon-theme' 'libglvnd' 'libjpeg-turbo'
|
||||
'libspnav' 'libtiff' 'libx11' 'pango' 'python' 'wayland' 'webkit2gtk-4.1' 'zlib')
|
||||
makedepends=('cmake' 'extra-cmake-modules' 'git' 'glew' 'libigl' 'm4' 'ninja' 'pkgconf' 'wayland-protocols')
|
||||
optdepends=('mesa: Enables Zink fallback workaround for NVIDIA on Wayland'
|
||||
'mesa-utils: for detecting renderer'
|
||||
'nvidia-utils: for querying driver version')
|
||||
options=('!debug' '!emptydirs')
|
||||
provides=("orca-slicer")
|
||||
source=("$pkgname::git+https://github.com/SoftFever/OrcaSlicer.git"
|
||||
"orca-slicer-wrapper.sh"
|
||||
"https://github.com/Open-Cascade-SAS/OCCT/commit/7236e83dcc1e7284e66dc61e612154617ef715d6.patch"
|
||||
"cmake-min-version.patch"
|
||||
"wxWidgets-cmake-min-version.patch")
|
||||
b2sums=('SKIP'
|
||||
'aa8f847eef062b7999d33ec23e9abb5dd666221ee31aae4d94117eba96038da069d43be5e65321820172fc1c82ce9c674e8c4f833d01bb87d4e5db284c159156'
|
||||
'cc7791841533e07787a4921b688fdd885782a67320936d445ad04102a68e8e044b5bf52a58d987d158ae522ae4f02a56a3525ccfd1831ef6a3b6459be14bd408'
|
||||
'562dcd07530faef0d9fdddf1e009075f67105c8239e4b1402cd890f7a89be8b11671dd6ecc7b55a155f2d05247070bb0b8ff84f2170ce2454ab818018be80e48'
|
||||
'1459ce126dd80a891006d2c40a001e75dc146ac9eb6ad8e975a3e4672ebb914baabecd8a4048742fab03e2820242f614449dd23a8e721bd5c945c8765e986a5a')
|
||||
|
@ -79,6 +84,9 @@ package() {
|
|||
cd $pkgname
|
||||
|
||||
DESTDIR="$pkgdir" ninja -C build install
|
||||
install -d "$pkgdir/usr/lib/orca-slicer/"
|
||||
mv "$pkgdir/usr/bin/orca-slicer" "$pkgdir/usr/lib/orca-slicer/"
|
||||
install -Dm755 "$srcdir/orca-slicer-wrapper.sh" "$pkgdir/usr/bin/orca-slicer"
|
||||
install -Dm644 doc/*.md -t "$pkgdir/usr/share/doc/OrcaSlicer/"
|
||||
install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/OrcaSlicer/LICENSE"
|
||||
rm -rf "$pkgdir/usr/LICENSE.txt"
|
||||
|
|
29
orca-slicer-wrapper.sh
Normal file
29
orca-slicer-wrapper.sh
Normal file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
DIR="/usr/lib/orca-slicer"
|
||||
export LD_LIBRARY_PATH="$DIR/bin:$LD_LIBRARY_PATH"
|
||||
|
||||
# OrcaSlicer will segfault on systems where locale info is not as expected
|
||||
export LC_ALL=C
|
||||
|
||||
#Use Zink to run OpenGL on top of Vulkan bypassing the problematic NVIDIA OpenGL stack while retaining hardware acceleration.
|
||||
if [ "$XDG_SESSION_TYPE" = "wayland" ] && [ "$ZINK_DISABLE_OVERRIDE" != "1" ]; then
|
||||
if command -v glxinfo >/dev/null 2>&1; then
|
||||
RENDERER=$(glxinfo | grep "OpenGL renderer string:" | sed 's/.*: //')
|
||||
if echo "$RENDERER" | grep -qi "NVIDIA"; then
|
||||
if command -v nvidia-smi >/dev/null 2>&1; then
|
||||
DRIVER_VERSION=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader | head -n1)
|
||||
DRIVER_MAJOR=$(echo "$DRIVER_VERSION" | cut -d. -f1)
|
||||
[ "$DRIVER_MAJOR" -gt 555 ] && ZINK_FORCE_OVERRIDE=1
|
||||
fi
|
||||
if [ "$ZINK_FORCE_OVERRIDE" = "1" ]; then
|
||||
export __GLX_VENDOR_LIBRARY_NAME=mesa
|
||||
export __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
|
||||
export MESA_LOADER_DRIVER_OVERRIDE=zink
|
||||
export GALLIUM_DRIVER=zink
|
||||
export WEBKIT_DISABLE_DMABUF_RENDERER=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$DIR/orca-slicer" "$@"
|
Loading…
Add table
Reference in a new issue