diff options
author | MonstrousOgre | 2023-01-16 13:26:29 +0530 |
---|---|---|
committer | MonstrousOgre | 2023-01-16 13:26:29 +0530 |
commit | 9e649fb82b21dc9cabf72ae5c59619829c60c49f (patch) | |
tree | 772118e404d907054116703e44f271459d5b72d6 | |
download | aur-9e649fb82b21dc9cabf72ae5c59619829c60c49f.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 55 | ||||
-rw-r--r-- | PKGBUILD | 80 | ||||
-rw-r--r-- | nvidia.patch | 39 |
3 files changed, 174 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..d37a9142fcd7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,55 @@ +pkgbase = hyprland-nvidia + pkgdesc = A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks. (NVIDIA patch) + pkgver = 0.20.1beta + pkgrel = 1 + url = https://github.com/hyprwm/Hyprland + arch = any + license = BSD + makedepends = git + makedepends = cmake + makedepends = ninja + makedepends = gcc + makedepends = gdb + makedepends = meson + makedepends = vulkan-headers + makedepends = wayland-protocols + makedepends = xorgproto + depends = libxcb + depends = xcb-proto + depends = xcb-util + depends = xcb-util-keysyms + depends = libxfixes + depends = libx11 + depends = libxcomposite + depends = xorg-xinput + depends = libxrender + depends = pixman + depends = wayland-protocols + depends = cairo + depends = pango + depends = polkit + 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 = hyprland + conflicts = hyprland + options = !makeflags + options = !buildflags + options = !strip + source = hyprland-nvidia-0.20.1beta.tar.gz::https://github.com/hyprwm/Hyprland/releases/download/v0.20.1beta/source-v0.20.1beta.tar.gz + source = nvidia.patch + sha256sums = babc64cde2f56e4e77c02f81862a2879e097086b074ebaa533a1bcf0a87dfb23 + sha256sums = 522b19656d7c1627ec615b6720182590570560e346c1670f9df002015707b340 + +pkgname = hyprland-nvidia diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4fee342e008c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,80 @@ +# Maintainer: tohmais <callum.wishart@protonmail.com> + +_pkgname="hyprland" +pkgname="${_pkgname}-nvidia" +pkgver="0.20.1beta" +pkgrel=1 +pkgdesc="A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks. (NVIDIA patch)" +arch=(any) +url="https://github.com/hyprwm/Hyprland" +license=('BSD') +depends=( + libxcb + xcb-proto + xcb-util + xcb-util-keysyms + libxfixes + libx11 + libxcomposite + xorg-xinput + libxrender + pixman + wayland-protocols + cairo + pango + polkit + 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 + cmake + ninja + gcc + gdb + meson + vulkan-headers + wayland-protocols + xorgproto) +source=("${pkgname}-${pkgver}.tar.gz::https://github.com/hyprwm/Hyprland/releases/download/v${pkgver}/source-v${pkgver}.tar.gz" + "nvidia.patch") +conflicts=("${_pkgname}") +provides=(hyprland) +sha256sums=('babc64cde2f56e4e77c02f81862a2879e097086b074ebaa533a1bcf0a87dfb23' + '522b19656d7c1627ec615b6720182590570560e346c1670f9df002015707b340') +options=(!makeflags !buildflags !strip) + +build() { + cd "$srcdir/hyprland-source" + make fixwlr + patch --directory="$srcdir/hyprland-source/subprojects/wlroots/" --forward --strip=0 \ + --input="${srcdir}/../nvidia.patch" + cd "./subprojects/wlroots/" && meson build/ --prefix="${srcdir}/tmpwlr" --buildtype=release && ninja -C build/ && mkdir -p "${srcdir}/tmpwlr" && ninja -C build/ install && cd ../../ + make protocols + make release + cd ./hyprctl && make all && cd .. +} + +package() { + cd "$srcdir" + mkdir -p "${pkgdir}/usr/share/wayland-sessions" + mkdir -p "${pkgdir}/usr/share/hyprland" + install -Dm755 hyprland-source/build/Hyprland -t "${pkgdir}/usr/bin" + install -Dm755 hyprland-source/hyprctl/hyprctl -t "${pkgdir}/usr/bin" + install -Dm644 hyprland-source/assets/*.png -t "${pkgdir}/usr/share/hyprland" + install -Dm644 hyprland-source/example/hyprland.desktop -t "${pkgdir}/usr/share/wayland-sessions" + install -Dm644 hyprland-source/example/hyprland.conf -t "${pkgdir}/usr/share/hyprland" + install -Dm644 hyprland-source/LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}" + install -Dm755 "${srcdir}/tmpwlr/lib/libwlroots.so.12032" -t "${pkgdir}/usr/lib" +} diff --git a/nvidia.patch b/nvidia.patch new file mode 100644 index 000000000000..2f0103c8bad8 --- /dev/null +++ b/nvidia.patch @@ -0,0 +1,39 @@ +diff --unified --recursive --text hyprland-test/src/hyprland/subprojects/wlroots/render/gles2/renderer.c hyprland-git/src/hyprland/subprojects/wlroots/render/gles2/renderer.c +--- render/gles2/renderer.c 2022-10-23 11:18:56.598893482 +1000 ++++ render/gles2/renderer.c 2022-10-23 11:16:25.923036282 +1000 +@@ -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); + +diff --unified --recursive --text hyprland-test/src/hyprland/subprojects/wlroots/types/output/render.c hyprland-git/src/hyprland/subprojects/wlroots/types/output/render.c +--- types/output/render.c 2022-10-23 11:18:56.598893482 +1000 ++++ types/output/render.c 2022-10-23 11:15:15.110308366 +1000 +@@ -325,22 +325,7 @@ + } + + 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; + } + + bool output_is_direct_scanout(struct wlr_output *output, |