modrinth-enhanced, modrinth-enhanced-bin: preload vblank shim for the full refresh rate on nvidia
This commit is contained in:
1 parent
7421d40fd2
commit
69d3249c8d
10 files changed
+519
-18
No files matched your search
@@ -4,13 +4,13 @@
|
||||
|
||||
pkgname=modrinth-enhanced-bin
|
||||
pkgver=0.21.2
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="Modrinth App without ads or telemetry, with offline and Ely.by accounts and Linux fixes (upstream binary)"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/Felitendo/Modrinth-Enhanced"
|
||||
license=('GPL-3.0-only')
|
||||
depends=('cairo' 'dbus' 'gdk-pixbuf2' 'glib2' 'glibc' 'gtk3' 'hicolor-icon-theme'
|
||||
'libgcc' 'libsoup3' 'webkit2gtk-4.1'
|
||||
'libdrm' 'libgcc' 'libsoup3' 'webkit2gtk-4.1'
|
||||
# loaded by Minecraft, not by the launcher
|
||||
'libgl' 'libpulse' 'libx11' 'libxcursor' 'libxext' 'libxxf86vm')
|
||||
optdepends=('xorg-xrandr: for older Minecraft versions')
|
||||
@@ -21,12 +21,30 @@ options=('!strip' '!debug')
|
||||
# v0.21.2-2, which pkgver spells 0.21.2.r2; see pkg.sh.
|
||||
_tag="v0.21.2"
|
||||
_asset="Modrinth.Enhanced_0.21.2_amd64.deb"
|
||||
source=("${pkgname}-${pkgver}.deb::https://github.com/Felitendo/Modrinth-Enhanced/releases/download/${_tag}/${_asset}")
|
||||
# With the NVIDIA driver WebKitGTK paces the app with a 60 fps timer whatever
|
||||
# the monitor's refresh rate. vblank-shim.c, preloaded by modrinth-enhanced.sh,
|
||||
# paces it at the monitor's rate instead and keeps the app on X11, the only
|
||||
# place that works; it is not part of upstream's release.
|
||||
source=("${pkgname}-${pkgver}.deb::https://github.com/Felitendo/Modrinth-Enhanced/releases/download/${_tag}/${_asset}"
|
||||
"vblank-shim.c"
|
||||
"modrinth-enhanced.sh")
|
||||
noextract=("${pkgname}-${pkgver}.deb")
|
||||
sha256sums=('32ed32575050b4ac1a990b54a894e82c17860a48d5a228ce0d1ce7fc2c9d5d6f')
|
||||
sha256sums=('32ed32575050b4ac1a990b54a894e82c17860a48d5a228ce0d1ce7fc2c9d5d6f' '0190921b8ff2fb1deec3209cba71c01541ca1f013e3ba41680f1636e185fd455' 'b24872f82645c52ee4804599cd678d138876fb193c754403fa9c5cf92bd745b9')
|
||||
|
||||
build() {
|
||||
# GLib for its headers only: the shim looks GTK and GLib up at run time
|
||||
gcc $CPPFLAGS $CFLAGS $LDFLAGS -shared -fPIC -o libwebkit-vblank-shim.so vblank-shim.c \
|
||||
$(pkg-config --cflags glib-2.0) $(pkg-config --cflags --libs libdrm)
|
||||
}
|
||||
|
||||
package() {
|
||||
bsdtar -xOf "$srcdir/${pkgname}-${pkgver}.deb" 'data.tar.*' \
|
||||
| bsdtar -xpf - -C "$pkgdir" usr
|
||||
|
||||
# the binary moves behind the script that preloads the shim
|
||||
install -d "$pkgdir/usr/lib/modrinth-enhanced"
|
||||
mv "$pkgdir/usr/bin/ModrinthEnhanced" "$pkgdir/usr/lib/modrinth-enhanced/"
|
||||
install -Dm755 libwebkit-vblank-shim.so -t "$pkgdir/usr/lib/modrinth-enhanced/"
|
||||
install -Dm755 modrinth-enhanced.sh "$pkgdir/usr/bin/ModrinthEnhanced"
|
||||
ln -s ModrinthEnhanced "$pkgdir/usr/bin/modrinth-enhanced"
|
||||
}
|
||||
Reference in new issue
Block a user