commit:     21f07887b141ab22aff8aaa32b993883409aa781
Author:     Leonardo Hernández Hernández <leohdz172 <AT> proton <DOT> me>
AuthorDate: Thu Jun  6 17:50:26 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Tue Jun 11 05:44:04 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21f07887

gui-libs/wlroots: fix automagic of libliftoff

Closes: https://bugs.gentoo.org/933600
Signed-off-by: Leonardo Hernández Hernández <leohdz172 <AT> proton.me>
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 .../wlroots-0.17-fix-automagic-libliftoff.patch    | 43 ++++++++++++++++++++++
 ...s-0.17.3-r2.ebuild => wlroots-0.17.3-r3.ebuild} |  6 +++
 gui-libs/wlroots/wlroots-9999.ebuild               |  2 +
 3 files changed, 51 insertions(+)

diff --git a/gui-libs/wlroots/files/wlroots-0.17-fix-automagic-libliftoff.patch 
b/gui-libs/wlroots/files/wlroots-0.17-fix-automagic-libliftoff.patch
new file mode 100644
index 000000000000..86dd42521e43
--- /dev/null
+++ b/gui-libs/wlroots/files/wlroots-0.17-fix-automagic-libliftoff.patch
@@ -0,0 +1,43 @@
+https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/385c9ade5f7a8ce9e5c13f762d56e6bd1c8d1b0a
+From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
+ <[email protected]>
+Date: Wed, 5 Jun 2024 22:33:05 -0600
+Subject: [PATCH] add an option to enable/disable libliftoff
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+instead of always using it if found
+
+Signed-off-by: Leonardo Hernández Hernández <[email protected]>
+--- a/backend/drm/meson.build
++++ b/backend/drm/meson.build
+@@ -16,7 +16,7 @@ libliftoff = dependency(
+       'libliftoff',
+       version: '>=0.4.0',
+       fallback: 'libliftoff',
+-      required: false,
++      required: get_option('libliftoff'),
+ )
+
+ if not (hwdata.found() and libdisplay_info.found() and features['session'])
+--- a/meson.build
++++ b/meson.build
+@@ -98,6 +98,7 @@ features = {
+ internal_features = {
+       'xcb-errors': false,
+       'egl': false,
++      'libliftoff': false,
+ }
+ internal_config = configuration_data()
+
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -7,3 +7,4 @@ option('backends', type: 'array', choices: ['auto', 'drm', 
'libinput', 'x11'], v
+ option('allocators', type: 'array', choices: ['auto', 'gbm'], value: ['auto'],
+       description: 'Select built-in allocators')
+ option('session', type: 'feature', value: 'auto', description: 'Enable 
session support')
++option('libliftoff', type: 'feature', value: 'auto', description: 'Enable 
support for libliftoff')
+--
+2.45.2
+

diff --git a/gui-libs/wlroots/wlroots-0.17.3-r2.ebuild 
b/gui-libs/wlroots/wlroots-0.17.3-r3.ebuild
similarity index 92%
rename from gui-libs/wlroots/wlroots-0.17.3-r2.ebuild
rename to gui-libs/wlroots/wlroots-0.17.3-r3.ebuild
index 8dc3bc02f4a2..d9dee7d3ca13 100644
--- a/gui-libs/wlroots/wlroots-0.17.3-r2.ebuild
+++ b/gui-libs/wlroots/wlroots-0.17.3-r3.ebuild
@@ -23,9 +23,12 @@ IUSE="liftoff +libinput +drm +session tinywl vulkan 
x11-backend xcb-errors X"
 REQUIRED_USE="
        drm? ( session )
        libinput? ( session )
+       liftoff? ( drm )
        xcb-errors? ( || ( x11-backend X ) )
 "
 
+PATCHES=( "${FILESDIR}/${PN}-0.17-fix-automagic-libliftoff.patch" )
+
 RDEPEND="
        >=dev-libs/wayland-1.22.0
        media-libs/libglvnd
@@ -62,6 +65,8 @@ RDEPEND="
                x11-base/xwayland
        )
 "
+
+# TODO: 0.17.4 will add support for libliftoff-0.5
 DEPEND="
        ${RDEPEND}
        liftoff? (
@@ -89,6 +94,7 @@ src_configure() {
                $(meson_feature X xwayland)
                -Dbackends=${meson_backends}
                $(meson_feature session)
+               $(meson_feature liftoff libliftoff)
        )
 
        meson_src_configure

diff --git a/gui-libs/wlroots/wlroots-9999.ebuild 
b/gui-libs/wlroots/wlroots-9999.ebuild
index e2f9010afd44..32f3a4f0b961 100644
--- a/gui-libs/wlroots/wlroots-9999.ebuild
+++ b/gui-libs/wlroots/wlroots-9999.ebuild
@@ -23,6 +23,7 @@ IUSE="liftoff +libinput +drm +session tinywl lcms vulkan 
x11-backend xcb-errors
 REQUIRED_USE="
        drm? ( session )
        libinput? ( session )
+       liftoff? ( drm )
        xcb-errors? ( || ( x11-backend X ) )
 "
 
@@ -87,6 +88,7 @@ src_configure() {
                -Dbackends=${meson_backends}
                $(meson_feature session)
                $(meson_feature lcms color-management)
+               $(meson_feature liftoff libliftoff)
        )
 
        meson_src_configure

Reply via email to