commit:     516e9c97a29bdf072d9317cc1a0e04c5c73611f5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 27 10:32:27 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jul 27 10:32:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=516e9c97

sys-libs/ldb: allow running tests w/o USE=python

We want to be able to run tests w/o Python as it makes
automated testing much easier (as USE=python isn't default-enabled).

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

 sys-libs/ldb/ldb-2.5.3.ebuild | 9 ++++++++-
 sys-libs/ldb/ldb-2.6.2.ebuild | 8 +++++++-
 sys-libs/ldb/ldb-2.7.2.ebuild | 8 +++++++-
 3 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/sys-libs/ldb/ldb-2.5.3.ebuild b/sys-libs/ldb/ldb-2.5.3.ebuild
index fdd942221644..dfec3a428473 100644
--- a/sys-libs/ldb/ldb-2.5.3.ebuild
+++ b/sys-libs/ldb/ldb-2.5.3.ebuild
@@ -17,7 +17,7 @@ KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips 
~ppc ~ppc64 ~riscv ~
 IUSE="doc ldap +lmdb python test"
 
 REQUIRED_USE="${PYTHON_REQUIRED_USE}
-       test? ( lmdb python )"
+       test? ( lmdb )"
 
 RESTRICT="!test? ( test )"
 
@@ -67,6 +67,13 @@ pkg_setup() {
 
 src_prepare() {
        default
+
+       if use test && ! use python ; then
+               # We want to be able to run tests w/o Python as it makes
+               # automated testing much easier (as USE=python isn't 
default-enabled).
+               truncate -s0 tests/python/{repack,index,api,crash}.py || die
+       fi
+
        multilib_copy_sources
 }
 

diff --git a/sys-libs/ldb/ldb-2.6.2.ebuild b/sys-libs/ldb/ldb-2.6.2.ebuild
index 318abf8bb390..12c6ba830153 100644
--- a/sys-libs/ldb/ldb-2.6.2.ebuild
+++ b/sys-libs/ldb/ldb-2.6.2.ebuild
@@ -17,7 +17,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips 
~ppc ~ppc64 ~riscv
 IUSE="doc ldap +lmdb python test"
 
 REQUIRED_USE="${PYTHON_REQUIRED_USE}
-       test? ( lmdb python )"
+       test? ( lmdb )"
 
 RESTRICT="!test? ( test )"
 
@@ -99,6 +99,12 @@ src_prepare() {
 
        check_samba_dep_versions
 
+       if use test && ! use python ; then
+               # We want to be able to run tests w/o Python as it makes
+               # automated testing much easier (as USE=python isn't 
default-enabled).
+               truncate -s0 tests/python/{repack,index,api,crash}.py || die
+       fi
+
        multilib_copy_sources
 }
 

diff --git a/sys-libs/ldb/ldb-2.7.2.ebuild b/sys-libs/ldb/ldb-2.7.2.ebuild
index 76e28c619894..68ed096f1575 100644
--- a/sys-libs/ldb/ldb-2.7.2.ebuild
+++ b/sys-libs/ldb/ldb-2.7.2.ebuild
@@ -17,7 +17,7 @@ KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips 
~ppc ~ppc64 ~riscv ~
 IUSE="doc ldap +lmdb python test"
 
 REQUIRED_USE="${PYTHON_REQUIRED_USE}
-       test? ( lmdb python )"
+       test? ( lmdb )"
 
 RESTRICT="!test? ( test )"
 
@@ -99,6 +99,12 @@ src_prepare() {
 
        check_samba_dep_versions
 
+       if use test && ! use python ; then
+               # We want to be able to run tests w/o Python as it makes
+               # automated testing much easier (as USE=python isn't 
default-enabled).
+               truncate -s0 tests/python/{repack,index,api,crash}.py || die
+       fi
+
        multilib_copy_sources
 }
 

Reply via email to