public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: gui-wm/hyprland/, gui-wm/hyprland/files/
@ 2023-01-31  1:12 Julien Roy
  0 siblings, 0 replies; 2+ messages in thread
From: Julien Roy @ 2023-01-31  1:12 UTC (permalink / raw
  To: gentoo-commits

commit:     feb04b9534db4886657316d519db700baf180880
Author:     Julien Roy <julien <AT> jroy <DOT> ca>
AuthorDate: Tue Jan 31 01:11:39 2023 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Tue Jan 31 01:12:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=feb04b95

gui-wm/hyprland: add patch for bug 891799
Also fix dependencies for USE="X"

Closes: https://bugs.gentoo.org/891799
Signed-off-by: Julien Roy <julien <AT> jroy.ca>

 gui-wm/hyprland/Manifest                                    |  2 +-
 gui-wm/hyprland/files/0.21.0-meson.patch                    | 13 +++++++++++++
 .../{hyprland-0.21.0.ebuild => hyprland-0.21.0-r1.ebuild}   | 12 ++++++++++--
 3 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/gui-wm/hyprland/Manifest b/gui-wm/hyprland/Manifest
index ce25b0cf3..007dad7cf 100644
--- a/gui-wm/hyprland/Manifest
+++ b/gui-wm/hyprland/Manifest
@@ -1,4 +1,4 @@
 DIST contrib.tar.gz 7408 BLAKE2B 03c3733a0b7b747f759b1b13f6fbd5342bc5cdea31f142730f69af85abf576f2c35bd7ea01e1aafba8ad7ae63505d7a9372279538ffb8cea3d61839e2bf4ea21 SHA512 671ea675b8f3de9b6ff8cce62297b5c14947b458de88ffa4bca5c51aafb66fc475782d0ed609a18e5281147f89aa531d4480ee46bb888f98651e4620f58318b4
-DIST hyprland-0.21.0.tar.gz 714570 BLAKE2B 6576765ec28e918be9aefa1252ad70019e2d77ae6f07b61161692ed1d0016d52376f1aae30b4200ae003585ca8ff907e810c635dc639d360f4f22be52d313b0d SHA512 a1fcd015be10267503d9ca529a538a0eebe8c197e91134de8377cca150efd99d0e51e7c9751ef8e81587fe04a497edff9d18b0e9dc5751a0f3eb4b3775c8ecad
+DIST hyprland-0.21.0-r1.tar.gz 715422 BLAKE2B b001e246c48d6f92a779abb1aaa41c03ca4154cdebf31b8916147f917e9ba020f39090d5d7476b54b1a63f29ede28da2dd7b6d20a0304826b73d4ca46d462f7c SHA512 cc4e917889afe0a2a9a3f7d508e9dc27c4a21ba2a4fc2e809c54102c2f1458ba5ccf7d29c28c37ac5b4eb75a51f460c39e1654a752d47c1120cb4cef0e65b98a
 DIST hyprland-protocols.tar.gz 4858 BLAKE2B 565532803fe6975efdba621c9ef69e4a7c18f040a65818e9f0f61d1dda15a3927f4aca25972989172554d5be5332f014d57dc8e1d0bb207ea5ba64aaec0e65f2 SHA512 03e176149fb0749f63fc58aea1175bfed92f0a30895d17e022ebdf9bb6f786e3a1018244379d0a6d205c590b25eccba0d7bea273bb389dd1031fad3d8467ef23
 DIST wlr.tar.bz2 448534 BLAKE2B 35ff3e316ce5fa5d444e623597fdc61f143aa07440b8821faecc131aa5376b4ed691e84511ef438dfe4d429941d09fe0ab2d403414fd6a91e54a5bef890a4d68 SHA512 98af3902be681b11989f7d0c3b147ef3e4ef27dd377dd74b4e2a5151be1eeb0ff99d7738f2be4050116a7233820b0bb4f581ae0229d44043bfbd0f6af59108d4

diff --git a/gui-wm/hyprland/files/0.21.0-meson.patch b/gui-wm/hyprland/files/0.21.0-meson.patch
new file mode 100644
index 000000000..30664610e
--- /dev/null
+++ b/gui-wm/hyprland/files/0.21.0-meson.patch
@@ -0,0 +1,13 @@
+diff --git a/protocols/meson.build b/protocols/meson.build
+index 9d47e0a..c082845 100644
+--- a/protocols/meson.build
++++ b/protocols/meson.build
+@@ -29,7 +29,7 @@ protocols = [
+   ['pointer-constraints-unstable-v1.xml'],
+   ['tablet-unstable-v2.xml'],
+   ['idle.xml'],
+-  [hl_protocol_dir, 'protocols/hyprland-toplevel-export-v1.xml']
++  ['hyprland-toplevel-export-v1.xml']
+ ]
+ wl_protos_src = []
+ wl_protos_headers = []

diff --git a/gui-wm/hyprland/hyprland-0.21.0.ebuild b/gui-wm/hyprland/hyprland-0.21.0-r1.ebuild
similarity index 87%
rename from gui-wm/hyprland/hyprland-0.21.0.ebuild
rename to gui-wm/hyprland/hyprland-0.21.0-r1.ebuild
index 3901b7500..3669168cc 100644
--- a/gui-wm/hyprland/hyprland-0.21.0.ebuild
+++ b/gui-wm/hyprland/hyprland-0.21.0-r1.ebuild
@@ -11,7 +11,7 @@ HOMEPAGE="https://github.com/hyprwm/Hyprland/releases"
 PROTOCOMMIT=301733ae466b229066ba15a53e6d8b91c5dcef5b
 WLRCOMMIT=dc7cc98cf21a8dc19ab8895505500e3700646af0
 CONTRIBCOMMIT=37c8121f98d76f57caa00dd7106877876e0d7483
-SRC_URI="https://github.com/hyprwm/${PN^}/archive/v${PV}beta.tar.gz -> ${P}.tar.gz
+SRC_URI="https://github.com/hyprwm/${PN^}/archive/v${PV}beta.tar.gz -> ${PF}.tar.gz
 	https://github.com/hyprwm/hyprland-protocols/archive/${PROTOCOMMIT}.tar.gz -> hyprland-protocols.tar.gz
 	https://github.com/hyprwm/contrib/archive/${CONTRIBCOMMIT}.tar.gz -> contrib.tar.gz
 	https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/${WLRCOMMIT}/wlroots-${WLRCOMMIT}.tar.bz2 -> wlr.tar.bz2"
@@ -48,9 +48,11 @@ RDEPEND="
 		 x11-libs/libnotify
 	)
 	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
 	)
 "
@@ -60,6 +62,10 @@ BDEPEND="
 	shellevents? ( app-text/scdoc )
 "
 
+PATCHES=(
+	"${FILESDIR}/0.21.0-meson.patch"
+)
+
 src_unpack() {
 	default
 
@@ -67,6 +73,8 @@ src_unpack() {
 	rmdir "${S}/subprojects/hyprland-protocols"
 	mv "${WORKDIR}/wlroots-${WLRCOMMIT}" "${S}/subprojects/wlroots" || die
 	mv "${WORKDIR}/hyprland-protocols-${PROTOCOMMIT}" "${S}/subprojects/hyprland-protocols" || die
+	# Workaround for https://github.com/hyprwm/Hyprland/issues/1207
+	cp "${S}/subprojects/hyprland-protocols/protocols/hyprland-toplevel-export-v1.xml" "${S}/protocols" || die
 }
 
 src_prepare() {
@@ -89,7 +97,7 @@ src_configure() {
 }
 
 src_install() {
-	meson_src_install --skip-subprojects wlroots
+	meson_src_install --skip-subprojects
 
 	use grimblast && emake PREFIX="${ED}/usr" -C "${WORKDIR}/contrib-${CONTRIBCOMMIT}/grimblast" install
 	use shellevents && emake PREFIX="${ED}/usr" -C "${WORKDIR}/contrib-${CONTRIBCOMMIT}/shellevents" install


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: gui-wm/hyprland/, gui-wm/hyprland/files/
@ 2023-05-07 20:29 Julien Roy
  0 siblings, 0 replies; 2+ messages in thread
From: Julien Roy @ 2023-05-07 20:29 UTC (permalink / raw
  To: gentoo-commits

commit:     0067859eefa40b1f2b58faaa2a053df48787e7ef
Author:     Julien Roy <julien <AT> jroy <DOT> ca>
AuthorDate: Sun May  7 18:14:54 2023 +0000
Commit:     Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Sun May  7 18:15:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0067859e

gui-wm/hyprland: add nvidia patch

Signed-off-by: Julien Roy <julien <AT> jroy.ca>

 gui-wm/hyprland/files/0.21.0-meson.patch  | 13 ----------
 gui-wm/hyprland/files/nvidia-0.25.0.patch | 41 +++++++++++++++++++++++++++++++
 gui-wm/hyprland/hyprland-0.25.0.ebuild    | 10 ++++++--
 3 files changed, 49 insertions(+), 15 deletions(-)

diff --git a/gui-wm/hyprland/files/0.21.0-meson.patch b/gui-wm/hyprland/files/0.21.0-meson.patch
deleted file mode 100644
index 30664610e..000000000
--- a/gui-wm/hyprland/files/0.21.0-meson.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/protocols/meson.build b/protocols/meson.build
-index 9d47e0a..c082845 100644
---- a/protocols/meson.build
-+++ b/protocols/meson.build
-@@ -29,7 +29,7 @@ protocols = [
-   ['pointer-constraints-unstable-v1.xml'],
-   ['tablet-unstable-v2.xml'],
-   ['idle.xml'],
--  [hl_protocol_dir, 'protocols/hyprland-toplevel-export-v1.xml']
-+  ['hyprland-toplevel-export-v1.xml']
- ]
- wl_protos_src = []
- wl_protos_headers = []

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 000000000..f83258b3c
--- /dev/null
+++ b/gui-wm/hyprland/files/nvidia-0.25.0.patch
@@ -0,0 +1,41 @@
+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
index 07e6cfa72..cc7d5b63d 100644
--- a/gui-wm/hyprland/hyprland-0.25.0.ebuild
+++ b/gui-wm/hyprland/hyprland-0.25.0.ebuild
@@ -18,7 +18,7 @@ S="${WORKDIR}/${PN}-source"
 KEYWORDS="~amd64"
 LICENSE="BSD"
 SLOT="0"
-IUSE="X grimblast hyprprop legacy-renderer scratchpad shellevents systemd"
+IUSE="X grimblast hyprprop legacy-renderer scratchpad shellevents systemd video_cards_nvidia"
 
 RDEPEND="
 	app-misc/jq
@@ -75,7 +75,13 @@ src_prepare() {
 		die "Hyprland requires >=sys-devel/gcc-12.1.0 to build"
 	fi
 
-	default
+	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() {


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-07 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-07 20:29 [gentoo-commits] repo/proj/guru:dev commit in: gui-wm/hyprland/, gui-wm/hyprland/files/ Julien Roy
  -- strict thread matches above, loose matches on Subject: below --
2023-01-31  1:12 Julien Roy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox