diff options
author | hafeoz | 2022-12-26 14:44:19 +0000 |
---|---|---|
committer | hafeoz | 2022-12-26 14:44:19 +0000 |
commit | b4c7406e00645c7d1ec6da0be291e0d126f9c77c (patch) | |
tree | 1ffcd2c126910cf451430221a3c763694ec9fb68 | |
download | aur-b4c7406e00645c7d1ec6da0be291e0d126f9c77c.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 61 | ||||
-rw-r--r-- | PKGBUILD | 108 | ||||
-rw-r--r-- | nvidia.patch | 39 |
3 files changed, 208 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..01adb7f96f59 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,61 @@ +pkgbase = hyprland-nvidia-hidpi-git + pkgdesc = A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks. (NVIDIA + HiDPI patch) + pkgver = r2042.ga7ed3a5 + 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-hidpi-xprop + provides = hyprland + conflicts = hyprland + options = !makeflags + options = !buildflags + options = !strip + source = hyprland::git+https://github.com/hyprwm/Hyprland.git + source = git+https://gitlab.freedesktop.org/wlroots/wlroots.git + source = git+https://github.com/hyprwm/hyprland-protocols.git + source = https://gitlab.freedesktop.org/lilydjwg/wlroots/-/commit/6c5ffcd1fee9e44780a6a8792f74ecfbe24a1ca7.patch + source = nvidia.patch + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = a37e441c309b35e5d9b5c5c637c96729c5348a523a7eaa25c6e24b1fcc3521a6 + sha256sums = 522b19656d7c1627ec615b6720182590570560e346c1670f9df002015707b340 + +pkgname = hyprland-nvidia-hidpi-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e89daf275166 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,108 @@ +# Maintainer: tohmais <callum.wishart@protonmail.com> +# Maintainer: hafeoz <hafeoz@kolabnow.com> + +_pkgname="hyprland" +pkgname="${_pkgname}-nvidia-hidpi-git" +pkgver=r2042.ga7ed3a5 +pkgrel=1 +pkgdesc="A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks. (NVIDIA + HiDPI 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-hidpi-xprop) +makedepends=( + git + cmake + ninja + gcc + gdb + meson + vulkan-headers + wayland-protocols + xorgproto) +source=("${_pkgname}::git+https://github.com/hyprwm/Hyprland.git" + "git+https://gitlab.freedesktop.org/wlroots/wlroots.git" + "git+https://github.com/hyprwm/hyprland-protocols.git" + "https://gitlab.freedesktop.org/lilydjwg/wlroots/-/commit/6c5ffcd1fee9e44780a6a8792f74ecfbe24a1ca7.patch" + "nvidia.patch") +conflicts=("${_pkgname}") +provides=(hyprland) +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + 'a37e441c309b35e5d9b5c5c637c96729c5348a523a7eaa25c6e24b1fcc3521a6' + '522b19656d7c1627ec615b6720182590570560e346c1670f9df002015707b340') +options=(!makeflags !buildflags !strip) + +pkgver() { + cd "$_pkgname" + ( + set -o pipefail + git describe --long 2> /dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +prepare() { + cd "${srcdir}/${_pkgname}" + rm -rf subprojects/wlroots subprojects/hyprland-protocols + git submodule init + git config submodule.wlroots.url "${srcdir}"/wlroots + git config submodule.subprojects/hyprland-protocols.url "${srcdir}"/hyprland-protocols + git -c protocol.file.allow=always submodule update subprojects/wlroots + git -c protocol.file.allow=always submodule update subprojects/hyprland-protocols + cd subprojects/wlroots + git revert -n 18595000f3a21502fd60bf213122859cc348f9af + patch --forward --strip=1 --input="${srcdir}"/6c5ffcd1fee9e44780a6a8792f74ecfbe24a1ca7.patch + patch --forward --strip=0 --input="${srcdir}"/nvidia.patch +} + +build() { + cd "${srcdir}/${_pkgname}" + make fixwlr + 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}/${_pkgname}" + mkdir -p "${pkgdir}/usr/share/wayland-sessions" + mkdir -p "${pkgdir}/usr/share/hyprland" + install -Dm755 build/Hyprland -t "${pkgdir}/usr/bin" + install -Dm755 hyprctl/hyprctl -t "${pkgdir}/usr/bin" + install -Dm644 assets/*.png -t "${pkgdir}/usr/share/hyprland" + install -Dm644 example/hyprland.desktop -t "${pkgdir}/usr/share/wayland-sessions" + install -Dm644 example/hyprland.conf -t "${pkgdir}/usr/share/hyprland" + install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}" + install -Dm755 ../tmpwlr/lib/libwlroots.so.* -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, |