summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Plant2022-08-20 11:26:24 -0400
committerKeith Plant2022-08-20 11:26:24 -0400
commitb09fc97198e07723cdf949c88d9238066c9484fc (patch)
treeeacf75934c95f251929da7299d64aa450d510178
downloadaur-b09fc97198e07723cdf949c88d9238066c9484fc.tar.gz
initial commit
-rw-r--r--.SRCINFO43
-rw-r--r--PKGBUILD75
-rw-r--r--nvidia.patch35
3 files changed, 153 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1aebd440cd30
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,43 @@
+pkgbase = wlroots-nvidia
+ pkgdesc = Modular Wayland compositor library, with fix for nvidia flickering
+ pkgver = 0.15.1
+ pkgrel = 1
+ url = https://gitlab.freedesktop.org/wlroots/wlroots
+ arch = x86_64
+ license = MIT
+ makedepends = glslang
+ makedepends = meson
+ makedepends = ninja
+ makedepends = systemd
+ makedepends = vulkan-headers
+ makedepends = wayland-protocols
+ makedepends = xorg-xwayland
+ depends = libglvnd
+ depends = libinput
+ depends = libpixman-1.so
+ depends = libseat.so
+ depends = libudev.so
+ depends = libvulkan.so
+ depends = libwayland-client.so
+ depends = libwayland-server.so
+ depends = libxcb
+ depends = libxkbcommon.so
+ depends = opengl-driver
+ depends = xcb-util-errors
+ depends = xcb-util-renderutil
+ depends = xcb-util-wm
+ optdepends = xorg-xwayland: Xwayland support
+ provides = libwlroots.so
+ conflicts = wlroots
+ conflicts = wlroots-git
+ source = wlroots-0.15.1.tar.gz::https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/0.15.1/downloads/wlroots-0.15.1.tar.gz
+ source = https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/0.15.1/downloads/wlroots-0.15.1.tar.gz.sig
+ source = nvidia.patch
+ validpgpkeys = 34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48
+ validpgpkeys = 9DDA3B9FA5D58DD5392C78E652CB6609B22DA89A
+ validpgpkeys = 4100929B33EEB0FD1DB852797BC79407090047CA
+ sha256sums = 5b92f11a52d978919ed1306e0d54c9d59f1762b28d44f0a2da3ef3b351305373
+ sha256sums = SKIP
+ sha256sums = 1d12d28e2dad7faaecb5f995144789b051c0e980917e6d90a9cd44501067379f
+
+pkgname = wlroots-nvidia
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ebb8e243f765
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,75 @@
+# Maintainer: Keith Plant <kplantjr at gmail dot com>
+
+pkgname="wlroots-nvidia"
+pkgver="0.15.1"
+pkgrel="1"
+pkgdesc="Modular Wayland compositor library, with fix for nvidia flickering"
+license=("MIT")
+
+wl_pkgname="wlroots"
+
+url="https://gitlab.freedesktop.org/wlroots/wlroots"
+arch=("x86_64")
+provides=("libwlroots.so")
+conflicts=(
+ "wlroots"
+ "wlroots-git"
+)
+depends=(
+ 'libglvnd'
+ 'libinput'
+ 'libpixman-1.so'
+ 'libseat.so'
+ 'libudev.so'
+ 'libvulkan.so'
+ 'libwayland-client.so'
+ 'libwayland-server.so'
+ 'libxcb'
+ 'libxkbcommon.so'
+ 'opengl-driver'
+ 'xcb-util-errors'
+ 'xcb-util-renderutil'
+ 'xcb-util-wm'
+)
+makedepends=(
+ 'glslang'
+ 'meson'
+ 'ninja'
+ 'systemd'
+ 'vulkan-headers'
+ 'wayland-protocols'
+ 'xorg-xwayland'
+)
+optdepends=(
+ 'xorg-xwayland: Xwayland support'
+)
+source=(
+ "$wl_pkgname-$pkgver.tar.gz::https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/$pkgver/downloads/wlroots-$pkgver.tar.gz"
+ "https://gitlab.freedesktop.org/wlroots/wlroots/-/releases/$pkgver/downloads/wlroots-$pkgver.tar.gz.sig"
+ "nvidia.patch"
+)
+sha256sums=(
+ '5b92f11a52d978919ed1306e0d54c9d59f1762b28d44f0a2da3ef3b351305373'
+ 'SKIP'
+ '1d12d28e2dad7faaecb5f995144789b051c0e980917e6d90a9cd44501067379f'
+)
+validpgpkeys=(
+ '34FF9526CFEF0E97A340E2E40FDE7BE0E88F5E48' # Simon Ser
+ '9DDA3B9FA5D58DD5392C78E652CB6609B22DA89A' # Drew DeVault
+ '4100929B33EEB0FD1DB852797BC79407090047CA' # Sway signing key
+)
+
+prepare() {
+ patch --directory="$wl_pkgname-$pkgver" --forward --strip=0 \
+ --input="$srcdir/nvidia.patch"
+}
+
+build() {
+ arch-meson "$wl_pkgname-$pkgver" build
+ ninja -C build
+}
+
+package() {
+ DESTDIR="$pkgdir" ninja -C build install
+ install -Dm644 "$wl_pkgname-$pkgver/LICENSE" -t "$pkgdir/usr/share/licenses/$wl_pkgname/"
+}
diff --git a/nvidia.patch b/nvidia.patch
new file mode 100644
index 000000000000..483757276de0
--- /dev/null
+++ b/nvidia.patch
@@ -0,0 +1,35 @@
+--- examples/dmabuf-capture.c 2022-02-03 16:19:54.000000000 -0500
++++ examples/dmabuf-capture.c 2022-08-20 09:29:17.031186547 -0400
+@@ -1,4 +1,5 @@
+ #define _POSIX_C_SOURCE 199309L
++#include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+ #include <libavutil/display.h>
+ #include <libavutil/hwcontext_drm.h>
+@@ -619,12 +620,12 @@
+ }
+
+ /* Find encoder */
+- AVCodec *out_codec = avcodec_find_encoder_by_name(ctx->encoder_name);
++ const AVCodec *out_codec = avcodec_find_encoder_by_name(ctx->encoder_name);
+ if (!out_codec) {
+ av_log(ctx, AV_LOG_ERROR, "Codec not found (not compiled in lavc?)!\n");
+ return AVERROR(EINVAL);
+ }
+- ctx->avf->oformat->video_codec = out_codec->id;
++ ctx->avf->oformat = av_guess_format(ctx->encoder_name, NULL, NULL);
+ ctx->is_software_encoder = !(out_codec->capabilities & AV_CODEC_CAP_HARDWARE);
+
+ ctx->avctx = avcodec_alloc_context3(out_codec);
+
+--- render/gles2/renderer.c 2022-02-03 16:19:54.000000000 -0500
++++ render/gles2/renderer.c 2022-08-20 09:29:26.937878381 -0400
+@@ -159,7 +159,7 @@
+ assert(wlr_egl_is_current(renderer->egl));
+
+ push_gles2_debug(renderer);
+- glFlush();
++ glFinish();
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ pop_gles2_debug(renderer);
+