commit:     995e865328fc3e9682061f2e37cb7f6879a2a9b7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 11 01:28:41 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Aug 11 02:05:14 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=995e8653

net-im/dino: [QA] use test USE flag to control building, not FEATURES

FEATURES isn't defined by PMS, so conditional building of tests
(or conditional dependencie) should be done with a USE flag +
RESTRICT.

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

 net-im/dino/dino-0.2.1.ebuild | 9 ++++-----
 net-im/dino/dino-9999.ebuild  | 9 ++++-----
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/net-im/dino/dino-0.2.1.ebuild b/net-im/dino/dino-0.2.1.ebuild
index bdb86b5b322..b9cbc662d43 100644
--- a/net-im/dino/dino-0.2.1.ebuild
+++ b/net-im/dino/dino-0.2.1.ebuild
@@ -9,9 +9,11 @@ inherit cmake vala xdg
 
 DESCRIPTION="Modern Jabber/XMPP Client using GTK+/Vala"
 HOMEPAGE="https://dino.im";
+
 LICENSE="GPL-3"
 SLOT="0"
-IUSE="+gpg +http +omemo +notification-sound"
+IUSE="+gpg +http +omemo +notification-sound test"
+RESTRICT="!test? ( test )"
 
 MY_REPO_URI="https://github.com/dino/dino";
 if [[ ${PV} == "9999" ]]; then
@@ -66,12 +68,9 @@ src_configure() {
                "-DENABLED_PLUGINS=$(local IFS=";"; echo 
"${enabled_plugins[*]}")"
                "-DDISABLED_PLUGINS=$(local IFS=";"; echo 
"${disabled_plugins[*]}")"
                "-DVALA_EXECUTABLE=${VALAC}"
+               "-DBUILD_TESTS=$(usex test)"
        )
 
-       if has test ${FEATURES}; then
-               mycmakeargs+=("-DBUILD_TESTS=yes")
-       fi
-
        cmake_src_configure
 }
 

diff --git a/net-im/dino/dino-9999.ebuild b/net-im/dino/dino-9999.ebuild
index 0decbb057e1..408e90c2968 100644
--- a/net-im/dino/dino-9999.ebuild
+++ b/net-im/dino/dino-9999.ebuild
@@ -9,9 +9,11 @@ inherit cmake vala xdg
 
 DESCRIPTION="Modern Jabber/XMPP Client using GTK+/Vala"
 HOMEPAGE="https://dino.im";
+
 LICENSE="GPL-3"
 SLOT="0"
-IUSE="+gpg +http +omemo +notification-sound"
+IUSE="+gpg +http +omemo +notification-sound test"
+RESTRICT="!test? ( test )"
 
 MY_REPO_URI="https://github.com/dino/dino";
 if [[ ${PV} == "9999" ]]; then
@@ -68,12 +70,9 @@ src_configure() {
                "-DENABLED_PLUGINS=$(local IFS=";"; echo 
"${enabled_plugins[*]}")"
                "-DDISABLED_PLUGINS=$(local IFS=";"; echo 
"${disabled_plugins[*]}")"
                "-DVALA_EXECUTABLE=${VALAC}"
+               "-DBUILD_TESTS=$(usex test)"
        )
 
-       if has test ${FEATURES}; then
-               mycmakeargs+=("-DBUILD_TESTS=yes")
-       fi
-
        cmake_src_configure
 }
 

Reply via email to