commit:     0a4d9e09377bf103f34eb3ae945cd1e2d181df8b
Author:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  7 18:10:39 2018 +0000
Commit:     Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Sun Jan  7 18:10:55 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a4d9e09

app-crypt/gpgme: skip tests when WORKDIR is too long

Closes: https://bugs.gentoo.org/643696
Package-Manager: Portage-2.3.13, Repoman-2.3.3

 app-crypt/gpgme/gpgme-1.10.0.ebuild | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/app-crypt/gpgme/gpgme-1.10.0.ebuild 
b/app-crypt/gpgme/gpgme-1.10.0.ebuild
index 110e0e94550..ce5b9f1ca70 100644
--- a/app-crypt/gpgme/gpgme-1.10.0.ebuild
+++ b/app-crypt/gpgme/gpgme-1.10.0.ebuild
@@ -44,15 +44,14 @@ do_python() {
        fi
 }
 
-pkg_pretend() {
-       local MAX_WORKDIR=66
-
-       [[ "${#WORKDIR}" -le "${MAX_WORKDIR}" ]] ||
-               die "Cannot build package as WORKDIR '${WORKDIR}' is longer 
than ${MAX_WORKDIR} which will fail build"
-}
-
 pkg_setup() {
        addpredict /run/user/$(id -u)/gnupg
+
+       local MAX_WORKDIR=66
+       if [[ "${#WORKDIR}" -gt "${MAX_WORKDIR}" ]]; then
+               ewarn "Disabling tests as WORKDIR '${WORKDIR}' is longer than 
${MAX_WORKDIR} which will fail tests"
+               SKIP_TESTS=1
+       fi
 }
 
 src_prepare() {
@@ -76,6 +75,7 @@ src_configure() {
        fi
 
        econf \
+               $([[ -n "${SKIP_TESTS}" ]] && echo "--disable-gpg-test 
--disable-gpgsm-test") \
                --enable-languages="${languages[*]}" \
                $(use_enable static-libs static)
 
@@ -90,6 +90,8 @@ src_compile() {
 }
 
 src_test() {
+       [[ -z "${SKIP_TESTS}" ]] || return
+
        default
        if use python; then
                test_python() {

Reply via email to