diff options
author | Sam James <sam@gentoo.org> | 2022-05-17 05:06:29 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-05-17 05:33:59 +0000 |
commit | 482179d2615b2fd4daf84c7a03695dd5778ac845 (patch) | |
tree | 1e1f8f1abf7dcc7019ad8dcbe587ce49ae51f034 /app-crypt | |
parent | app-crypt/gpgme: conditionally build tests; die if tests can't be run (diff) | |
download | gentoo-482179d2615b2fd4daf84c7a03695dd5778ac845.tar.gz gentoo-482179d2615b2fd4daf84c7a03695dd5778ac845.tar.bz2 gentoo-482179d2615b2fd4daf84c7a03695dd5778ac845.zip |
app-crypt/gnupg: [QA] conditionally build tests
It's particularly important for @system and deps-of-@system to
not build things unnecessarily given you can't avoid them and
it makes builds on slower machines rather painful.
But also, it's a waste of resources/time anyway. Do the same
dance here as with the other gpg packages.
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-crypt')
-rw-r--r-- | app-crypt/gnupg/gnupg-2.2.35.ebuild | 18 | ||||
-rw-r--r-- | app-crypt/gnupg/gnupg-2.3.6.ebuild | 17 |
2 files changed, 21 insertions, 14 deletions
diff --git a/app-crypt/gnupg/gnupg-2.2.35.ebuild b/app-crypt/gnupg/gnupg-2.2.35.ebuild index ee9470ef9e05..82ecb4aefb55 100644 --- a/app-crypt/gnupg/gnupg-2.2.35.ebuild +++ b/app-crypt/gnupg/gnupg-2.2.35.ebuild @@ -17,7 +17,8 @@ S="${WORKDIR}/${MY_P}" LICENSE="GPL-3" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl tofu tools usb user-socket wks-server" +IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test tofu tools usb user-socket wks-server" +RESTRICT="!test? ( test )" # Existence of executables is checked during configuration. # Note: On each bump, update dep bounds on each version from configure.ac! @@ -27,12 +28,12 @@ DEPEND=">=dev-libs/libassuan-2.5.0 >=dev-libs/libksba-1.3.5 >=dev-libs/npth-1.2 >=net-misc/curl-7.10 + sys-libs/zlib bzip2? ( app-arch/bzip2 ) ldap? ( net-nds/openldap:= ) readline? ( sys-libs/readline:0= ) smartcard? ( usb? ( virtual/libusb:1 ) ) ssl? ( >=net-libs/gnutls-3.0:0= ) - sys-libs/zlib tofu? ( >=dev-db/sqlite-3.7 )" RDEPEND="${DEPEND} @@ -74,6 +75,8 @@ src_configure() { $(use_enable nls) $(use_enable smartcard scdaemon) $(use_enable ssl gnutls) + $(use_enable test all-tests) + $(use_enable test tests) $(use_enable tofu) $(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver') $(use_enable wks-server wks-tools) @@ -81,16 +84,17 @@ src_configure() { $(use_with readline) --with-mailprog=/usr/libexec/sendmail --disable-ntbtls - --enable-all-tests --enable-gpg --enable-gpgsm --enable-large-secmem + CC_FOR_BUILD="$(tc-getBUILD_CC)" GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" KSBA_CONFIG="${ESYSROOT}/usr/bin/ksba-config" LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config" LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config" NPTH_CONFIG="${ESYSROOT}/usr/bin/npth-config" + $("${S}/configure" --help | grep -o -- '--without-.*-prefix') ) @@ -99,14 +103,13 @@ src_configure() { append-cppflags -I"${EPREFIX}/usr/include/libusb-1.0" fi - #bug 663142 + # bug #663142 if use user-socket; then myconf+=( --enable-run-gnupg-user-socket ) fi # glib fails and picks up clang's internal stdint.h causing weird errors - [[ ${CC} == *clang ]] && \ - export gl_cv_absolute_stdint_h=/usr/include/stdint.h + tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h # Hardcode mailprog to /usr/libexec/sendmail even if it does not exist. # As of GnuPG 2.3, the mailprog substitution is used for the binary called @@ -127,8 +130,9 @@ src_compile() { } src_test() { - #Bug: 638574 + # bug #638574 use tofu && export TESTFLAGS=--parallel + default } diff --git a/app-crypt/gnupg/gnupg-2.3.6.ebuild b/app-crypt/gnupg/gnupg-2.3.6.ebuild index e3e7a5c34b64..f75d3200b5f5 100644 --- a/app-crypt/gnupg/gnupg-2.3.6.ebuild +++ b/app-crypt/gnupg/gnupg-2.3.6.ebuild @@ -29,6 +29,7 @@ DEPEND=">=dev-libs/libassuan-2.5.0 >=dev-libs/libksba-1.3.4 >=dev-libs/npth-1.2 >=net-misc/curl-7.10 + sys-libs/zlib bzip2? ( app-arch/bzip2 ) ldap? ( net-nds/openldap:= ) readline? ( sys-libs/readline:0= ) @@ -36,7 +37,6 @@ DEPEND=">=dev-libs/libassuan-2.5.0 tofu? ( >=dev-db/sqlite-3.27 ) tpm? ( >=app-crypt/tpm2-tss-2.4.0:= ) ssl? ( >=net-libs/gnutls-3.0:0= ) - sys-libs/zlib " RDEPEND="${DEPEND} @@ -78,6 +78,8 @@ src_configure() { $(use_enable nls) $(use_enable smartcard scdaemon) $(use_enable ssl gnutls) + $(use_enable test all-tests) + $(use_enable test tests) $(use_enable tofu) $(use_enable tofu keyboxd) $(use_enable tofu sqlite) @@ -88,31 +90,31 @@ src_configure() { $(use_with readline) --with-mailprog=/usr/libexec/sendmail --disable-ntbtls - --enable-all-tests --enable-gpgsm --enable-large-secmem + CC_FOR_BUILD="$(tc-getBUILD_CC)" GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" KSBA_CONFIG="${ESYSROOT}/usr/bin/ksba-config" LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config" LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config" NPTH_CONFIG="${ESYSROOT}/usr/bin/npth-config" + $("${S}/configure" --help | grep -o -- '--without-.*-prefix') ) if use prefix && use usb; then # bug #649598 - append-cppflags -I"${EPREFIX}/usr/include/libusb-1.0" + append-cppflags -I"${ESYSROOT}/usr/include/libusb-1.0" fi - #bug 663142 + # bug #663142 if use user-socket; then myconf+=( --enable-run-gnupg-user-socket ) fi # glib fails and picks up clang's internal stdint.h causing weird errors - [[ ${CC} == *clang ]] && \ - export gl_cv_absolute_stdint_h=/usr/include/stdint.h + tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h # Hardcode mailprog to /usr/libexec/sendmail even if it does not exist. # As of GnuPG 2.3, the mailprog substitution is used for the binary called @@ -133,8 +135,9 @@ src_compile() { } src_test() { - #Bug: 638574 + # bug #638574 use tofu && export TESTFLAGS=--parallel + default } |