commit:     3f91a048525b3dd1b74e78a36319d4d24ac1b575
Author:     Chris Mayo <aklhfex <AT> gmail <DOT> com>
AuthorDate: Fri Feb 21 19:27:29 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 21 19:37:08 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f91a048

dev-util/geany-plugins: Fix automagic enabling of tests

Signed-off-by: Chris Mayo <aklhfex <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/40689
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-util/geany-plugins/geany-plugins-2.0-r2.ebuild | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/dev-util/geany-plugins/geany-plugins-2.0-r2.ebuild 
b/dev-util/geany-plugins/geany-plugins-2.0-r2.ebuild
index 080c9323b9df..c985d2f2d33e 100644
--- a/dev-util/geany-plugins/geany-plugins-2.0-r2.ebuild
+++ b/dev-util/geany-plugins/geany-plugins-2.0-r2.ebuild
@@ -15,10 +15,12 @@ LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~riscv ~sparc ~x86"
 
-IUSE="ctags debugger enchant git gpg gtkspell lua markdown nls pretty-printer 
scope webhelper workbench"
+IUSE="ctags debugger enchant git gpg gtkspell lua markdown nls pretty-printer 
scope test webhelper workbench"
 REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )"
 
-DEPEND="
+RESTRICT="!test? ( test )"
+
+COMMON_DEPEND="
        dev-libs/glib:2
        >=dev-util/geany-2.0
        x11-libs/gtk+:3
@@ -38,7 +40,10 @@ DEPEND="
        webhelper? ( net-libs/webkit-gtk:4.1 )
        workbench? ( dev-libs/libgit2:= )
 "
-RDEPEND="${DEPEND}
+DEPEND="${COMMON_DEPEND}
+       test? ( dev-libs/check )
+"
+RDEPEND="${COMMON_DEPEND}
        scope? ( dev-debug/gdb )
 "
 BDEPEND="virtual/pkgconfig
@@ -57,6 +62,9 @@ pkg_setup() {
 
 src_prepare() {
        default
+       if ! use test; then
+               sed -i "s:gp_have_unittests=yes:gp_have_unittests=no:" 
build/unittests.m4 || die
+       fi
        eautoreconf
 }
 

Reply via email to