1 |
commit: 482179d2615b2fd4daf84c7a03695dd5778ac845 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 17 05:06:29 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 17 05:33:59 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=482179d2 |
7 |
|
8 |
app-crypt/gnupg: [QA] conditionally build tests |
9 |
|
10 |
It's particularly important for @system and deps-of-@system to |
11 |
not build things unnecessarily given you can't avoid them and |
12 |
it makes builds on slower machines rather painful. |
13 |
|
14 |
But also, it's a waste of resources/time anyway. Do the same |
15 |
dance here as with the other gpg packages. |
16 |
|
17 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
18 |
|
19 |
app-crypt/gnupg/gnupg-2.2.35.ebuild | 18 +++++++++++------- |
20 |
app-crypt/gnupg/gnupg-2.3.6.ebuild | 17 ++++++++++------- |
21 |
2 files changed, 21 insertions(+), 14 deletions(-) |
22 |
|
23 |
diff --git a/app-crypt/gnupg/gnupg-2.2.35.ebuild b/app-crypt/gnupg/gnupg-2.2.35.ebuild |
24 |
index ee9470ef9e05..82ecb4aefb55 100644 |
25 |
--- a/app-crypt/gnupg/gnupg-2.2.35.ebuild |
26 |
+++ b/app-crypt/gnupg/gnupg-2.2.35.ebuild |
27 |
@@ -17,7 +17,8 @@ S="${WORKDIR}/${MY_P}" |
28 |
LICENSE="GPL-3" |
29 |
SLOT="0" |
30 |
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" |
31 |
-IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl tofu tools usb user-socket wks-server" |
32 |
+IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl test tofu tools usb user-socket wks-server" |
33 |
+RESTRICT="!test? ( test )" |
34 |
|
35 |
# Existence of executables is checked during configuration. |
36 |
# Note: On each bump, update dep bounds on each version from configure.ac! |
37 |
@@ -27,12 +28,12 @@ DEPEND=">=dev-libs/libassuan-2.5.0 |
38 |
>=dev-libs/libksba-1.3.5 |
39 |
>=dev-libs/npth-1.2 |
40 |
>=net-misc/curl-7.10 |
41 |
+ sys-libs/zlib |
42 |
bzip2? ( app-arch/bzip2 ) |
43 |
ldap? ( net-nds/openldap:= ) |
44 |
readline? ( sys-libs/readline:0= ) |
45 |
smartcard? ( usb? ( virtual/libusb:1 ) ) |
46 |
ssl? ( >=net-libs/gnutls-3.0:0= ) |
47 |
- sys-libs/zlib |
48 |
tofu? ( >=dev-db/sqlite-3.7 )" |
49 |
|
50 |
RDEPEND="${DEPEND} |
51 |
@@ -74,6 +75,8 @@ src_configure() { |
52 |
$(use_enable nls) |
53 |
$(use_enable smartcard scdaemon) |
54 |
$(use_enable ssl gnutls) |
55 |
+ $(use_enable test all-tests) |
56 |
+ $(use_enable test tests) |
57 |
$(use_enable tofu) |
58 |
$(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver') |
59 |
$(use_enable wks-server wks-tools) |
60 |
@@ -81,16 +84,17 @@ src_configure() { |
61 |
$(use_with readline) |
62 |
--with-mailprog=/usr/libexec/sendmail |
63 |
--disable-ntbtls |
64 |
- --enable-all-tests |
65 |
--enable-gpg |
66 |
--enable-gpgsm |
67 |
--enable-large-secmem |
68 |
+ |
69 |
CC_FOR_BUILD="$(tc-getBUILD_CC)" |
70 |
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" |
71 |
KSBA_CONFIG="${ESYSROOT}/usr/bin/ksba-config" |
72 |
LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config" |
73 |
LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config" |
74 |
NPTH_CONFIG="${ESYSROOT}/usr/bin/npth-config" |
75 |
+ |
76 |
$("${S}/configure" --help | grep -o -- '--without-.*-prefix') |
77 |
) |
78 |
|
79 |
@@ -99,14 +103,13 @@ src_configure() { |
80 |
append-cppflags -I"${EPREFIX}/usr/include/libusb-1.0" |
81 |
fi |
82 |
|
83 |
- #bug 663142 |
84 |
+ # bug #663142 |
85 |
if use user-socket; then |
86 |
myconf+=( --enable-run-gnupg-user-socket ) |
87 |
fi |
88 |
|
89 |
# glib fails and picks up clang's internal stdint.h causing weird errors |
90 |
- [[ ${CC} == *clang ]] && \ |
91 |
- export gl_cv_absolute_stdint_h=/usr/include/stdint.h |
92 |
+ tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h |
93 |
|
94 |
# Hardcode mailprog to /usr/libexec/sendmail even if it does not exist. |
95 |
# As of GnuPG 2.3, the mailprog substitution is used for the binary called |
96 |
@@ -127,8 +130,9 @@ src_compile() { |
97 |
} |
98 |
|
99 |
src_test() { |
100 |
- #Bug: 638574 |
101 |
+ # bug #638574 |
102 |
use tofu && export TESTFLAGS=--parallel |
103 |
+ |
104 |
default |
105 |
} |
106 |
|
107 |
|
108 |
diff --git a/app-crypt/gnupg/gnupg-2.3.6.ebuild b/app-crypt/gnupg/gnupg-2.3.6.ebuild |
109 |
index e3e7a5c34b64..f75d3200b5f5 100644 |
110 |
--- a/app-crypt/gnupg/gnupg-2.3.6.ebuild |
111 |
+++ b/app-crypt/gnupg/gnupg-2.3.6.ebuild |
112 |
@@ -29,6 +29,7 @@ DEPEND=">=dev-libs/libassuan-2.5.0 |
113 |
>=dev-libs/libksba-1.3.4 |
114 |
>=dev-libs/npth-1.2 |
115 |
>=net-misc/curl-7.10 |
116 |
+ sys-libs/zlib |
117 |
bzip2? ( app-arch/bzip2 ) |
118 |
ldap? ( net-nds/openldap:= ) |
119 |
readline? ( sys-libs/readline:0= ) |
120 |
@@ -36,7 +37,6 @@ DEPEND=">=dev-libs/libassuan-2.5.0 |
121 |
tofu? ( >=dev-db/sqlite-3.27 ) |
122 |
tpm? ( >=app-crypt/tpm2-tss-2.4.0:= ) |
123 |
ssl? ( >=net-libs/gnutls-3.0:0= ) |
124 |
- sys-libs/zlib |
125 |
" |
126 |
|
127 |
RDEPEND="${DEPEND} |
128 |
@@ -78,6 +78,8 @@ src_configure() { |
129 |
$(use_enable nls) |
130 |
$(use_enable smartcard scdaemon) |
131 |
$(use_enable ssl gnutls) |
132 |
+ $(use_enable test all-tests) |
133 |
+ $(use_enable test tests) |
134 |
$(use_enable tofu) |
135 |
$(use_enable tofu keyboxd) |
136 |
$(use_enable tofu sqlite) |
137 |
@@ -88,31 +90,31 @@ src_configure() { |
138 |
$(use_with readline) |
139 |
--with-mailprog=/usr/libexec/sendmail |
140 |
--disable-ntbtls |
141 |
- --enable-all-tests |
142 |
--enable-gpgsm |
143 |
--enable-large-secmem |
144 |
+ |
145 |
CC_FOR_BUILD="$(tc-getBUILD_CC)" |
146 |
GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" |
147 |
KSBA_CONFIG="${ESYSROOT}/usr/bin/ksba-config" |
148 |
LIBASSUAN_CONFIG="${ESYSROOT}/usr/bin/libassuan-config" |
149 |
LIBGCRYPT_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-libgcrypt-config" |
150 |
NPTH_CONFIG="${ESYSROOT}/usr/bin/npth-config" |
151 |
+ |
152 |
$("${S}/configure" --help | grep -o -- '--without-.*-prefix') |
153 |
) |
154 |
|
155 |
if use prefix && use usb; then |
156 |
# bug #649598 |
157 |
- append-cppflags -I"${EPREFIX}/usr/include/libusb-1.0" |
158 |
+ append-cppflags -I"${ESYSROOT}/usr/include/libusb-1.0" |
159 |
fi |
160 |
|
161 |
- #bug 663142 |
162 |
+ # bug #663142 |
163 |
if use user-socket; then |
164 |
myconf+=( --enable-run-gnupg-user-socket ) |
165 |
fi |
166 |
|
167 |
# glib fails and picks up clang's internal stdint.h causing weird errors |
168 |
- [[ ${CC} == *clang ]] && \ |
169 |
- export gl_cv_absolute_stdint_h=/usr/include/stdint.h |
170 |
+ tc-is-clang && export gl_cv_absolute_stdint_h="${ESYSROOT}"/usr/include/stdint.h |
171 |
|
172 |
# Hardcode mailprog to /usr/libexec/sendmail even if it does not exist. |
173 |
# As of GnuPG 2.3, the mailprog substitution is used for the binary called |
174 |
@@ -133,8 +135,9 @@ src_compile() { |
175 |
} |
176 |
|
177 |
src_test() { |
178 |
- #Bug: 638574 |
179 |
+ # bug #638574 |
180 |
use tofu && export TESTFLAGS=--parallel |
181 |
+ |
182 |
default |
183 |
} |