From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1520386-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 91DA615806E
	for <garchives@archives.gentoo.org>; Sun, 21 May 2023 20:04:52 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id C08A2E0A89;
	Sun, 21 May 2023 20:04:51 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 9D376E0A89
	for <gentoo-commits@lists.gentoo.org>; Sun, 21 May 2023 20:04:51 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id ACA7C340D5E
	for <gentoo-commits@lists.gentoo.org>; Sun, 21 May 2023 20:04:50 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 4623F8E4
	for <gentoo-commits@lists.gentoo.org>; Sun, 21 May 2023 20:04:49 +0000 (UTC)
From: "Matthew Thode" <prometheanfire@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Matthew Thode" <prometheanfire@gentoo.org>
Message-ID: <1684699466.0beb6c75b6facf54b47ccb0585825e04d2f3aaed.prometheanfire@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: gui-libs/wlroots/
X-VCS-Repository: repo/gentoo
X-VCS-Files: gui-libs/wlroots/metadata.xml gui-libs/wlroots/wlroots-0.16.2-r1.ebuild gui-libs/wlroots/wlroots-0.16.2.ebuild gui-libs/wlroots/wlroots-9999.ebuild
X-VCS-Directories: gui-libs/wlroots/
X-VCS-Committer: prometheanfire
X-VCS-Committer-Name: Matthew Thode
X-VCS-Revision: 0beb6c75b6facf54b47ccb0585825e04d2f3aaed
X-VCS-Branch: master
Date: Sun, 21 May 2023 20:04:49 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 89615fc8-e958-4a9e-990e-f09d9388af4e
X-Archives-Hash: 643a7c4751413583a7440723b1dde277

commit:     0beb6c75b6facf54b47ccb0585825e04d2f3aaed
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 20:04:26 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0beb6c75

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} | 23 ++++++++-----
 gui-libs/wlroots/wlroots-0.16.2.ebuild             |  8 ++---
 gui-libs/wlroots/wlroots-9999.ebuild               | 39 +++++++++++++---------
 4 files changed, 46 insertions(+), 31 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 76%
copy from gui-libs/wlroots/wlroots-0.16.2.ebuild
copy to gui-libs/wlroots/wlroots-0.16.2-r1.ebuild
index c6aa61b39f4b..a82f1b899992 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,20 @@ BDEPEND="
 "
 
 src_configure() {
+	local backends=(
+		$(usev drm)
+		$(usev libinput)
+		$(usev x11-backend 'x11')
+	)
+	# Separate values with a comma with this evil floating point bit hack
+	local meson_backends=$(IFS=','; echo "${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' '')
+		$(meson_feature X xwayland)
+		-Dbackends=${meson_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..882576390063 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,22 @@ BDEPEND="
 "
 
 src_configure() {
+	local backends=(
+		$(usev drm)
+		$(usev libinput)
+		$(usev x11-backend 'x11')
+	)
+	# Separate values with a comma with this evil floating point bit hack
+	local meson_backends=$(IFS=','; echo "${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_feature xcb-errors)
 		$(meson_use tinywl examples)
 		-Drenderers=$(usex vulkan 'gles2,vulkan' gles2)
-		-Dxwayland=$(usex X enabled disabled)
-		-Dbackends=drm,libinput$(usex x11-backend ',x11' '')
+		$(meson_feature X xwayland)
+		-Dbackends=${meson_backends}
+		$(meson_feature session)
 	)
-	if use udev; then
-		emesonargs+=(-Dsession=$(usex seatd enabled disabled))
-	else
-		emesonargs+=(-Dsession=disabled)
-	fi
 
 	meson_src_configure
 }