commit:     58edb6ac6707d73f5a9dc8de0eacf43a9e0600d8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri May  5 09:48:21 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May  5 10:13:44 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58edb6ac

sys-apps/usbredir: build tests conditionally, fix -Werror in some cases

-Werror would be added when WORKDIR is a git repo (which I do for testing).

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/usbredir/usbredir-0.13.0.ebuild | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/sys-apps/usbredir/usbredir-0.13.0.ebuild 
b/sys-apps/usbredir/usbredir-0.13.0.ebuild
index 0edea99661f3..14d387242d5d 100644
--- a/sys-apps/usbredir/usbredir-0.13.0.ebuild
+++ b/sys-apps/usbredir/usbredir-0.13.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -13,12 +13,25 @@ S="${WORKDIR}"/usbredir-${P}
 LICENSE="GPL-2 LGPL-2.1"
 SLOT="0"
 KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ppc ppc64 ~riscv ~sparc x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
 
-DEPEND="dev-libs/glib:2
-       virtual/libusb:1"
+DEPEND="
+       dev-libs/glib:2
+       virtual/libusb:1
+"
 RDEPEND="${DEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+src_configure() {
+       local emesonargs=(
+               -Dgit_werror=disabled
+               $(meson_feature test tests)
+       )
+
+       meson_src_configure
+}
+
 src_install() {
        meson_src_install
        dodoc -r docs/.

Reply via email to