summaryrefslogtreecommitdiff
path: root/gui-wm
diff options
context:
space:
mode:
authorJulien Roy <julien@jroy.ca>2023-05-07 16:40:39 -0400
committerSam James <sam@gentoo.org>2023-05-07 23:14:52 +0100
commitff311818b547f48431f24d6d619f9a0fc7b3f241 (patch)
tree586d5e13badf707fdfdb12b6765c7bb1336f08ab /gui-wm
parentdev-libs/hyprland-protocols: new package, add 0.2 (diff)
downloadgentoo-ff311818b547f48431f24d6d619f9a0fc7b3f241.tar.gz
gentoo-ff311818b547f48431f24d6d619f9a0fc7b3f241.tar.bz2
gentoo-ff311818b547f48431f24d6d619f9a0fc7b3f241.zip
gui-wm/hyprland: new package, add 0.25.0
Signed-off-by: Julien Roy <julien@jroy.ca> Closes: https://github.com/gentoo/gentoo/pull/30921 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'gui-wm')
-rw-r--r--gui-wm/hyprland/Manifest1
-rw-r--r--gui-wm/hyprland/files/nvidia-0.25.0.patch43
-rw-r--r--gui-wm/hyprland/hyprland-0.25.0.ebuild85
-rw-r--r--gui-wm/hyprland/metadata.xml21
4 files changed, 150 insertions, 0 deletions
diff --git a/gui-wm/hyprland/Manifest b/gui-wm/hyprland/Manifest
new file mode 100644
index 000000000000..e260df187271
--- /dev/null
+++ b/gui-wm/hyprland/Manifest
@@ -0,0 +1 @@
+DIST hyprland-0.25.0.gh.tar.gz 1510798 BLAKE2B c146c57e5142666ff76188e870ea4d2dd9613e25a1d2c3320dc222fbe62651975a40fffffe9cc936ced0e86f919534d7a6c94a8b1596f912c3ad9750a35e4f13 SHA512 84d12ef7bfb25e69c4a707a8ffc99ca23eb58e73630e3df1f134cb610c6206e42917f76b54db0cc6d10e7b929514cbac06dfc99feba8ff81aea0dc7fcb340450
diff --git a/gui-wm/hyprland/files/nvidia-0.25.0.patch b/gui-wm/hyprland/files/nvidia-0.25.0.patch
new file mode 100644
index 000000000000..d9d2213607f4
--- /dev/null
+++ b/gui-wm/hyprland/files/nvidia-0.25.0.patch
@@ -0,0 +1,43 @@
+# From https://github.com/hyprwm/Hyprland/issues/2239#issuecomment-1536725235
+# This patch is recommended by the developer on systems running and Nvidia GPu
+diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c
+index 6a86b183..823fc318 100644
+--- a/render/gles2/renderer.c
++++ b/render/gles2/renderer.c
+@@ -165,7 +165,7 @@ static bool gles2_bind_buffer(struct wlr_renderer *wlr_renderer,
+ assert(wlr_egl_is_current(renderer->egl));
+
+ push_gles2_debug(renderer);
+- glFlush();
++ glFinish();
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ pop_gles2_debug(renderer);
+
+diff --git a/types/output/render.c b/types/output/render.c
+index ed1afa4a..ddc730c7 100644
+--- a/types/output/render.c
++++ b/types/output/render.c
+@@ -225,22 +225,7 @@ struct wlr_drm_format *output_pick_format(struct wlr_output *output,
+ }
+
+ 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,
diff --git a/gui-wm/hyprland/hyprland-0.25.0.ebuild b/gui-wm/hyprland/hyprland-0.25.0.ebuild
new file mode 100644
index 000000000000..923882538f0e
--- /dev/null
+++ b/gui-wm/hyprland/hyprland-0.25.0.ebuild
@@ -0,0 +1,85 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson toolchain-funcs
+
+DESCRIPTION="A dynamic tiling Wayland compositor that doesn't sacrifice on its looks"
+HOMEPAGE="https://github.com/hyprwm/Hyprland/releases"
+
+SRC_URI="https://github.com/hyprwm/${PN^}/releases/download/v${PV}/source-v${PV}.tar.gz -> ${PF}.gh.tar.gz"
+S="${WORKDIR}/${PN}-source"
+
+KEYWORDS="~amd64"
+LICENSE="BSD"
+SLOT="0"
+IUSE="X legacy-renderer systemd video_cards_nvidia"
+
+RDEPEND="
+ app-misc/jq
+ dev-libs/libevdev
+ dev-libs/libinput
+ dev-libs/wayland
+ dev-libs/wayland-protocols
+ dev-util/glslang
+ dev-util/vulkan-headers
+ gui-libs/gtk-layer-shell
+ media-libs/libdisplay-info
+ media-libs/libglvnd[X?]
+ media-libs/mesa[gles2,wayland,X?]
+ media-libs/vulkan-loader
+ x11-base/xcb-proto
+ x11-libs/cairo
+ x11-libs/libdrm
+ x11-libs/libxkbcommon
+ x11-libs/pixman
+ x11-misc/xkeyboard-config
+ virtual/libudev
+ X? (
+ gui-libs/wlroots[x11-backend]
+ x11-base/xwayland
+ x11-libs/libxcb
+ x11-libs/xcb-util-image
+ x11-libs/xcb-util-renderutil
+ x11-libs/xcb-util-wm
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ dev-libs/hyprland-protocols
+ dev-libs/libliftoff
+ >=dev-libs/wayland-1.22.0
+ dev-vcs/git
+ >=gui-libs/wlroots-0.16.0[X?]
+"
+
+src_prepare() {
+ STDLIBVER=$(echo '#include <string>' | $(tc-getCXX) -x c++ -dM -E - | \
+ grep GLIBCXX_RELEASE | sed 's/.*\([1-9][0-9]\)/\1/')
+ if ! [[ ${STDLIBVER} -ge 12 ]]; then
+ die "Hyprland requires >=sys-devel/gcc-12.1.0 to build"
+ fi
+
+ if use video_cards_nvidia; then
+ cd "${S}/subprojects/wlroots" || die
+ eapply "${FILESDIR}/nvidia-0.25.0.patch"
+ cd "${S}" || die
+ fi
+
+ eapply_user
+}
+
+src_configure() {
+ local emesonargs=(
+ $(meson_feature legacy-renderer legacy_renderer)
+ $(meson_feature X xwayland)
+ $(meson_feature systemd)
+ )
+
+ meson_src_configure
+}
+
+src_install() {
+ meson_src_install --skip-subprojects wlroots
+}
diff --git a/gui-wm/hyprland/metadata.xml b/gui-wm/hyprland/metadata.xml
new file mode 100644
index 000000000000..e894da71d007
--- /dev/null
+++ b/gui-wm/hyprland/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person" proxied="yes">
+ <email>julien@jroy.ca</email>
+ <name>Julien Roy</name>
+ </maintainer>
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <changelog>https://github.com/hyprwm/Hyprland/releases</changelog>
+ <doc>https://wiki.hyprland.org/</doc>
+ <bugs-to>https://github.com/hyprwm/Hyprland/issues</bugs-to>
+ <remote-id type="github">hyprwm/Hyprland</remote-id>
+ </upstream>
+ <use>
+ <flag name="legacy-renderer">Enable legacy renderer</flag>
+ </use>
+</pkgmetadata>