summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGarrett Howard2022-06-18 17:39:20 -0500
committerGarrett Howard2022-06-18 17:39:20 -0500
commit03b6b999d582ff8a9b6504c2cfa61387599269aa (patch)
treeb6bfdde91b42c39f76d17709d2153d92439c0b4e
downloadaur-03b6b999d582ff8a9b6504c2cfa61387599269aa.tar.gz
initial commit
-rw-r--r--.SRCINFO39
-rw-r--r--PKGBUILD79
-rw-r--r--xrgb8888.patch25
3 files changed, 143 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..da1c2291ddb8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,39 @@
+pkgbase = wlroots-xrgb8888-git
+ pkgdesc = wlroots-git, with XRGB8888 format patches
+ pkgver = 0.16.0.r5590.d89285f78
+ pkgrel = 1
+ url = https://gitlab.freedesktop.org/wlroots/wlroots
+ arch = x86_64
+ license = custom:MIT
+ makedepends = git
+ makedepends = meson
+ makedepends = vulkan-headers
+ makedepends = wayland-protocols
+ makedepends = xorgproto
+ depends = glslang
+ depends = libinput
+ depends = libxcb
+ depends = libxkbcommon
+ depends = opengl-driver
+ depends = pixman
+ depends = wayland
+ depends = xcb-util-errors
+ depends = xcb-util-renderutil
+ depends = xcb-util-wm
+ depends = seatd
+ depends = vulkan-icd-loader
+ depends = vulkan-validation-layers
+ depends = xorg-xwayland
+ provides = libwlroots.so
+ provides = wlroots
+ provides = wlroots-git
+ provides = wlroots=0.16.0
+ conflicts = wlroots
+ conflicts = wlroots-git
+ options = debug
+ source = wlroots-xrgb8888-git::git+https://gitlab.freedesktop.org/wlroots/wlroots.git
+ source = xrgb8888.patch
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = wlroots-xrgb8888-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..796596290196
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,79 @@
+# Maintainer: Garrett Howard <garrett@mersh.com>
+# Contributor: Adrian Perez de Castro <aperez@igalia.com>
+# Contributor: Antonin Décimo <antonin dot decimo at gmail dot com>
+pkgname=wlroots-xrgb8888-git
+pkgver=0.16.0.r5590.d89285f78
+pkgrel=1
+license=(custom:MIT)
+pkgdesc='wlroots-git, with XRGB8888 format patches'
+url=https://gitlab.freedesktop.org/wlroots/wlroots
+arch=(x86_64)
+provides=("libwlroots.so" "wlroots" "wlroots-git" "wlroots=${pkgver%%.r*}")
+conflicts=(wlroots wlroots-git)
+options=(debug)
+depends=(
+ glslang
+ libinput
+ libxcb
+ libxkbcommon
+ opengl-driver
+ pixman
+ wayland
+ xcb-util-errors
+ xcb-util-renderutil
+ xcb-util-wm
+ seatd
+ vulkan-icd-loader
+ vulkan-validation-layers
+ xorg-xwayland)
+makedepends=(
+ git
+ meson
+ vulkan-headers
+ wayland-protocols
+ xorgproto)
+source=("${pkgname}::git+${url}.git"
+ "xrgb8888.patch")
+md5sums=('SKIP'
+ 'SKIP')
+
+_builddir="build"
+_builddir_pkgver="build-pkgver"
+
+_meson_setup () {
+ arch-meson \
+ --buildtype=debug \
+ -Dwerror=false \
+ -Dexamples=false \
+ "${pkgname}" "$1"
+}
+
+prepare () {
+ patch --directory="${pkgname}" --forward --strip=1 --input="${srcdir}/xrgb8888.patch"
+ _meson_setup "${_builddir_pkgver}"
+}
+
+pkgver () {
+ (
+ set -o pipefail
+ meson introspect --projectinfo "${_builddir_pkgver}" \
+ | awk 'match($0, /"version":\s*"([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)-dev"/, ret) {printf "%s",ret[1]}'
+ )
+ cd "${pkgname}"
+ printf ".r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build () {
+ _meson_setup "${_builddir}"
+ meson compile -C "${_builddir}"
+}
+
+package () {
+ DESTDIR="${pkgdir}" meson install -C build
+ install -Dm644 "${pkgname}/"LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+post_upgrade() {
+ echo "Make sure to upgrade wlroots-git and sway-git together."
+ echo "Upgrading one but not the other is unsupported."
+}
diff --git a/xrgb8888.patch b/xrgb8888.patch
new file mode 100644
index 000000000000..9c8a5b1721f2
--- /dev/null
+++ b/xrgb8888.patch
@@ -0,0 +1,25 @@
+diff --unified --recursive --text --color wlroots-git.orig/types/output/render.c wlroots-git.new/types/output/render.c
+--- wlroots-git.orig/types/output/render.c 2022-06-18 17:18:42.259951901 -0500
++++ wlroots-git.new/types/output/render.c 2022-06-18 17:19:33.441946419 -0500
+@@ -311,20 +311,5 @@
+ }
+
+ uint32_t wlr_output_preferred_read_format(struct wlr_output *output) {
+- struct wlr_renderer *renderer = output->renderer;
+- assert(renderer != NULL);
+-
+- if (!renderer->impl->preferred_read_format || !renderer->impl->read_pixels) {
+- return DRM_FORMAT_INVALID;
+- }
+-
+- if (!output_attach_back_buffer(output, &output->pending, NULL)) {
+- return false;
+- }
+-
+- uint32_t fmt = renderer->impl->preferred_read_format(renderer);
+-
+- output_clear_back_buffer(output);
+-
+- return fmt;
++ return DRM_FORMAT_XRGB8888;
+ }