commit:     3807e953a8eec7d5e64b2397b903400d98c9e21b
Author:     Zurab Kvachadze <zurabid2016 <AT> gmail <DOT> com>
AuthorDate: Thu May 18 07:51:48 2023 +0000
Commit:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Sun May 21 19:58:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3807e953

gui-libs/wlroots: fix building with seatd, revbump to wlroots-0.16.2-r1

Previous ebuild would conditionally, based on the USE flags, pull
mandatory dependencies (that is udev, hwdata, seatd), which in the
absense of such would result in a build failure. USE flags have been
removed, which does not affect users who managed to build the package
successfully, therefore keywords were not dropped.

It is possible to disable/enable certain backends including their
dependencies, so ability to control this behaviour was added in 0.16.1-r1
and 9999 versions.

Bug: https://bugs.gentoo.org/883781
Closes: https://bugs.gentoo.org/883781
Signed-off-by: Zurab Kvachadze <zurabid2016 <AT> gmail.com>
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>

 gui-libs/wlroots/metadata.xml                      |  7 +++--
 ...oots-0.16.2.ebuild => wlroots-0.16.2-r1.ebuild} | 19 ++++++++-----
 gui-libs/wlroots/wlroots-0.16.2.ebuild             |  8 +++---
 gui-libs/wlroots/wlroots-9999.ebuild               | 33 +++++++++++++---------
 4 files changed, 39 insertions(+), 28 deletions(-)

diff --git a/gui-libs/wlroots/metadata.xml b/gui-libs/wlroots/metadata.xml
index 69cb7d4fc088..10ac1444ba24 100644
--- a/gui-libs/wlroots/metadata.xml
+++ b/gui-libs/wlroots/metadata.xml
@@ -21,9 +21,10 @@
                wlroots is developed under the direction of the 
<pkg>gui-wm/sway</pkg> project.
        </longdescription>
        <use>
-               <flag name="hwdata">Use system hwdata</flag>
-               <flag name="liftoff">Enable support for libliftoff kms plane 
backend</flag>
-               <flag name="seatd">Enable libseatd session support</flag>
+               <flag name="drm">Enable Direct Rendering Management</flag>
+               <flag name="liftoff">Enable support for libliftoff KMS plane 
backend</flag>
+               <flag name="libinput">Enable support for input devices via 
<pkg>dev-libs/libinput</pkg></flag>
+               <flag name="session">Enable session support (is required for 
DRM and libinput)</flag>
                <flag name="tinywl">Install the minimal wayland client, 
tinywl</flag>
                <flag name="vulkan">Enable support for the vulkan backend 
renderer</flag>
                <flag name="x11-backend">Enable support for handling 
input/output devices through <pkg>x11-libs/libxcb</pkg></flag>

diff --git a/gui-libs/wlroots/wlroots-0.16.2.ebuild 
b/gui-libs/wlroots/wlroots-0.16.2-r1.ebuild
similarity index 79%
copy from gui-libs/wlroots/wlroots-0.16.2.ebuild
copy to gui-libs/wlroots/wlroots-0.16.2-r1.ebuild
index c6aa61b39f4b..f1999ee681bf 100644
--- a/gui-libs/wlroots/wlroots-0.16.2.ebuild
+++ b/gui-libs/wlroots/wlroots-0.16.2-r1.ebuild
@@ -14,21 +14,21 @@ if [[ ${PV} == 9999 ]]; then
        SLOT="0/9999"
 else
        
SRC_URI="https://gitlab.freedesktop.org/${PN}/${PN}/-/archive/${PV}/${P}.tar.gz";
-       KEYWORDS="amd64 arm64 ~loong ~ppc64 ~riscv x86"
+       KEYWORDS="~amd64 ~arm64 ~loong ~ppc64 ~riscv ~x86"
        SLOT="0/$(ver_cut 2)"
 fi
 
 LICENSE="MIT"
-IUSE="+hwdata +seatd tinywl +udev vulkan x11-backend X"
+IUSE="+drm +libinput tinywl vulkan x11-backend X"
 
 DEPEND="
-       >=dev-libs/libinput-1.14.0:0=
        >=dev-libs/wayland-1.21.0
        >=dev-libs/wayland-protocols-1.28
+       drm? ( sys-apps/hwdata:= )
+       libinput? ( >=dev-libs/libinput-1.14.0:0= )
        media-libs/mesa[egl(+),gles2]
-       hwdata? ( sys-apps/hwdata:= )
-       seatd? ( sys-auth/seatd:= )
-       udev? ( virtual/libudev )
+       sys-auth/seatd:=
+       virtual/libudev
        vulkan? (
                dev-util/glslang:0=
                dev-util/vulkan-headers:0=
@@ -57,13 +57,18 @@ BDEPEND="
 "
 
 src_configure() {
+       local backends="$(usex drm 'drm,' '')"
+       backends+="$(usex libinput 'libinput,' '')"
+       backends+="$(usex x11-backend 'x11,' '')"
+       # Get rid of a trailing comma
+       backends="${backends%,}"
        # xcb-util-errors is not on Gentoo Repository (and upstream seems 
inactive?)
        local emesonargs=(
                "-Dxcb-errors=disabled"
                $(meson_use tinywl examples)
                -Drenderers=$(usex vulkan 'gles2,vulkan' gles2)
                -Dxwayland=$(usex X enabled disabled)
-               -Dbackends=drm,libinput$(usex x11-backend ',x11' '')
+               -Dbackends="${backends}"
        )
 
        meson_src_configure

diff --git a/gui-libs/wlroots/wlroots-0.16.2.ebuild 
b/gui-libs/wlroots/wlroots-0.16.2.ebuild
index c6aa61b39f4b..0e57c5f6342e 100644
--- a/gui-libs/wlroots/wlroots-0.16.2.ebuild
+++ b/gui-libs/wlroots/wlroots-0.16.2.ebuild
@@ -19,16 +19,16 @@ else
 fi
 
 LICENSE="MIT"
-IUSE="+hwdata +seatd tinywl +udev vulkan x11-backend X"
+IUSE="tinywl vulkan x11-backend X"
 
 DEPEND="
        >=dev-libs/libinput-1.14.0:0=
        >=dev-libs/wayland-1.21.0
        >=dev-libs/wayland-protocols-1.28
        media-libs/mesa[egl(+),gles2]
-       hwdata? ( sys-apps/hwdata:= )
-       seatd? ( sys-auth/seatd:= )
-       udev? ( virtual/libudev )
+       sys-apps/hwdata:=
+       sys-auth/seatd:=
+       virtual/libudev
        vulkan? (
                dev-util/glslang:0=
                dev-util/vulkan-headers:0=

diff --git a/gui-libs/wlroots/wlroots-9999.ebuild 
b/gui-libs/wlroots/wlroots-9999.ebuild
index ec3331b0dc80..23e9b35403bd 100644
--- a/gui-libs/wlroots/wlroots-9999.ebuild
+++ b/gui-libs/wlroots/wlroots-9999.ebuild
@@ -19,18 +19,23 @@ else
 fi
 
 LICENSE="MIT"
-IUSE="+hwdata liftoff +seatd tinywl +udev vulkan x11-backend xcb-errors X"
+IUSE="liftoff +libinput +drm +session tinywl vulkan x11-backend xcb-errors X"
+REQUIRED_USE="drm? ( session ) libinput? ( session )"
 
 DEPEND="
-       >=dev-libs/libinput-1.14.0:0=
        >=dev-libs/wayland-1.22.0
        >=dev-libs/wayland-protocols-1.28
+       drm? (
+               liftoff? ( dev-libs/libliftoff )
+               media-libs/libdisplay-info
+               sys-apps/hwdata:=
+       )
+       libinput? ( >=dev-libs/libinput-1.14.0:0= )
        media-libs/mesa[egl(+),gles2]
-       media-libs/libdisplay-info
-       hwdata? ( sys-apps/hwdata:= )
-       liftoff? ( dev-libs/libliftoff )
-       seatd? ( sys-auth/seatd:= )
-       udev? ( virtual/libudev )
+       session? (
+               sys-auth/seatd:=
+               virtual/libudev
+       )
        vulkan? (
                dev-util/glslang:0=
                dev-util/vulkan-headers:0=
@@ -60,20 +65,20 @@ BDEPEND="
 "
 
 src_configure() {
+       local backends="$(usex drm 'drm,' '')"
+       backends+="$(usex libinput 'libinput,' '')"
+       backends+="$(usex x11-backend 'x11,' '')"
+       # Get rid of a trailing comma
+       backends="${backends%,}"
        # xcb-util-errors is not on Gentoo Repository (and upstream seems 
inactive?)
        local emesonargs=(
-               "-Dxcb-errors=disabled"
                -Dxcb-errors=$(usex xcb-errors enabled disabled)
                $(meson_use tinywl examples)
                -Drenderers=$(usex vulkan 'gles2,vulkan' gles2)
                -Dxwayland=$(usex X enabled disabled)
-               -Dbackends=drm,libinput$(usex x11-backend ',x11' '')
+               -Dbackends="${backends}"
+               -Dsession=$(usex session enabled disabled)
        )
-       if use udev; then
-               emesonargs+=(-Dsession=$(usex seatd enabled disabled))
-       else
-               emesonargs+=(-Dsession=disabled)
-       fi
 
        meson_src_configure
 }

Reply via email to