Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/gnupg/
Date: Mon, 23 Nov 2015 18:59:11
Message-Id: 1448305138.eaeb3137a34a5c306c958c6353f815af708e60e5.robbat2@gentoo
1 commit: eaeb3137a34a5c306c958c6353f815af708e60e5
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 23 18:58:34 2015 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 23 18:58:58 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eaeb3137
7
8 app-crypt/gnupg: Make the interactive help work again; requires uncompressed help*txt files installed in datadir
9
10 Package-Manager: portage-2.2.24
11
12 app-crypt/gnupg/gnupg-2.0.29-r1.ebuild | 169 ++++++++++++++++++++++++++++++++
13 app-crypt/gnupg/gnupg-2.1.9-r1.ebuild | 171 +++++++++++++++++++++++++++++++++
14 2 files changed, 340 insertions(+)
15
16 diff --git a/app-crypt/gnupg/gnupg-2.0.29-r1.ebuild b/app-crypt/gnupg/gnupg-2.0.29-r1.ebuild
17 new file mode 100644
18 index 0000000..523b884
19 --- /dev/null
20 +++ b/app-crypt/gnupg/gnupg-2.0.29-r1.ebuild
21 @@ -0,0 +1,169 @@
22 +# Copyright 1999-2015 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +# $Id$
25 +
26 +EAPI="5"
27 +
28 +inherit eutils flag-o-matic toolchain-funcs
29 +
30 +DESCRIPTION="The GNU Privacy Guard, a GPL pgp replacement"
31 +HOMEPAGE="http://www.gnupg.org/"
32 +SRC_URI="mirror://gnupg/gnupg/${P}.tar.bz2"
33 +# SRC_URI="ftp://ftp.gnupg.org/gcrypt/${PN}/${P}.tar.bz2"
34 +
35 +LICENSE="GPL-3"
36 +SLOT="0"
37 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
38 +IUSE="bzip2 doc ldap nls mta readline static selinux smartcard tools usb"
39 +
40 +COMMON_DEPEND_LIBS="
41 + >=dev-libs/libassuan-2
42 + >=dev-libs/libgcrypt-1.5:0=
43 + >=dev-libs/libgpg-error-1.19
44 + >=dev-libs/libksba-1.0.7
45 + >=dev-libs/pth-1.3.7
46 + >=net-misc/curl-7.10
47 + sys-libs/zlib
48 + bzip2? ( app-arch/bzip2 )
49 + readline? ( sys-libs/readline )
50 + smartcard? ( usb? ( virtual/libusb:0 ) )
51 + ldap? ( net-nds/openldap )"
52 +COMMON_DEPEND_BINS="app-crypt/pinentry"
53 +
54 +# Existence of executables is checked during configuration.
55 +DEPEND="${COMMON_DEPEND_LIBS}
56 + ${COMMON_DEPEND_BINS}
57 + static? (
58 + >=dev-libs/libassuan-2[static-libs]
59 + >=dev-libs/libgcrypt-1.4:0=[static-libs]
60 + >=dev-libs/libgpg-error-1.11[static-libs]
61 + >=dev-libs/libksba-1.0.7[static-libs]
62 + >=dev-libs/pth-1.3.7[static-libs]
63 + >=net-misc/curl-7.10[static-libs]
64 + sys-libs/zlib[static-libs]
65 + bzip2? ( app-arch/bzip2[static-libs] )
66 + )
67 + nls? ( sys-devel/gettext )
68 + doc? ( sys-apps/texinfo )"
69 +
70 +RDEPEND="!static? ( ${COMMON_DEPEND_LIBS} )
71 + ${COMMON_DEPEND_BINS}
72 + mta? ( virtual/mta )
73 + !<=app-crypt/gnupg-2.0.1
74 + selinux? ( sec-policy/selinux-gpg )
75 + nls? ( virtual/libintl )"
76 +
77 +REQUIRED_USE="smartcard? ( !static )"
78 +
79 +src_prepare() {
80 + epatch "${FILESDIR}/${PN}-2.0.17-gpgsm-gencert.patch"
81 + epatch_user
82 +}
83 +
84 +src_configure() {
85 + local myconf=()
86 +
87 + # 'USE=static' support was requested:
88 + # gnupg1: bug #29299
89 + # gnupg2: bug #159623
90 + use static && append-ldflags -static
91 +
92 + if use smartcard; then
93 + myconf+=(
94 + --enable-scdaemon
95 + $(use_enable usb ccid-driver)
96 + )
97 + else
98 + myconf+=( --disable-scdaemon )
99 + fi
100 +
101 + if use elibc_SunOS || use elibc_AIX; then
102 + myconf+=( --disable-symcryptrun )
103 + else
104 + myconf+=( --enable-symcryptrun )
105 + fi
106 +
107 + # glib fails and picks up clang's internal stdint.h causing weird errors
108 + [[ ${CC} == clang ]] && export gl_cv_absolute_stdint_h=/usr/include/stdint.h
109 +
110 + econf \
111 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
112 + --enable-gpg \
113 + --enable-gpgsm \
114 + --enable-agent \
115 + --enable-large-secmem \
116 + --without-adns \
117 + "${myconf[@]}" \
118 + $(use_enable bzip2) \
119 + $(use_enable nls) \
120 + $(use_enable mta mailto) \
121 + $(use_enable ldap) \
122 + $(use_with readline) \
123 + CC_FOR_BUILD="$(tc-getBUILD_CC)"
124 +}
125 +
126 +src_compile() {
127 + default
128 +
129 + if use doc; then
130 + cd doc
131 + emake html
132 + fi
133 +}
134 +
135 +src_install() {
136 + default
137 +
138 + use tools && dobin tools/{convert-from-106,gpg-check-pattern} \
139 + tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys,make-dns-cert}
140 +
141 + emake DESTDIR="${D}" -f doc/Makefile uninstall-nobase_dist_docDATA
142 + # The help*txt files are read from the datadir by GnuPG directly.
143 + # They do not work if compressed or moved!
144 + #rm "${ED}"/usr/share/gnupg/help* || die
145 +
146 + dodoc ChangeLog NEWS README THANKS TODO VERSION doc/FAQ doc/DETAILS \
147 + doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER doc/help*
148 +
149 + dosym gpg2 /usr/bin/gpg
150 + dosym gpgv2 /usr/bin/gpgv
151 + dosym gpg2keys_hkp /usr/libexec/gpgkeys_hkp
152 + dosym gpg2keys_finger /usr/libexec/gpgkeys_finger
153 + dosym gpg2keys_curl /usr/libexec/gpgkeys_curl
154 + if use ldap; then
155 + dosym gpg2keys_ldap /usr/libexec/gpgkeys_ldap
156 + fi
157 + echo ".so man1/gpg2.1" > "${ED}"/usr/share/man/man1/gpg.1
158 + echo ".so man1/gpgv2.1" > "${ED}"/usr/share/man/man1/gpgv.1
159 +
160 + dodir /etc/env.d
161 + echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg
162 +
163 + if use doc; then
164 + dohtml doc/gnupg.html/* doc/*.png
165 + fi
166 +}
167 +
168 +pkg_postinst() {
169 + elog "If you wish to view images emerge:"
170 + elog "media-gfx/xloadimage, media-gfx/xli or any other viewer"
171 + elog "Remember to use photo-viewer option in configuration file to activate"
172 + elog "the right viewer."
173 + elog
174 +
175 + if use smartcard; then
176 + elog "To use your OpenPGP smartcard (or token) with GnuPG you need one of"
177 + use usb && elog " - a CCID-compatible reader, used directly through libusb;"
178 + elog " - sys-apps/pcsc-lite and a compatible reader device;"
179 + elog " - dev-libs/openct and a compatible reader device;"
180 + elog " - a reader device and drivers exporting either PC/SC or CT-API interfaces."
181 + elog ""
182 + elog "General hint: you probably want to try installing sys-apps/pcsc-lite and"
183 + elog "app-crypt/ccid first."
184 + fi
185 +
186 + ewarn "Please remember to restart gpg-agent if a different version"
187 + ewarn "of the agent is currently used. If you are unsure of the gpg"
188 + ewarn "agent you are using please run 'killall gpg-agent',"
189 + ewarn "and to start a fresh daemon just run 'gpg-agent --daemon'."
190 +}
191
192 diff --git a/app-crypt/gnupg/gnupg-2.1.9-r1.ebuild b/app-crypt/gnupg/gnupg-2.1.9-r1.ebuild
193 new file mode 100644
194 index 0000000..c146f75
195 --- /dev/null
196 +++ b/app-crypt/gnupg/gnupg-2.1.9-r1.ebuild
197 @@ -0,0 +1,171 @@
198 +# Copyright 1999-2015 Gentoo Foundation
199 +# Distributed under the terms of the GNU General Public License v2
200 +# $Id$
201 +
202 +EAPI="5"
203 +
204 +inherit eutils flag-o-matic toolchain-funcs
205 +
206 +DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
207 +HOMEPAGE="http://www.gnupg.org/"
208 +MY_P="${P/_/-}"
209 +SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
210 +
211 +LICENSE="GPL-3"
212 +SLOT="0"
213 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
214 +IUSE="bzip2 doc +gnutls ldap nls readline static selinux smartcard tools usb"
215 +
216 +COMMON_DEPEND_LIBS="
217 + dev-libs/npth
218 + >=dev-libs/libassuan-2
219 + >=dev-libs/libgcrypt-1.6.2[threads]
220 + >=dev-libs/libgpg-error-1.17
221 + >=dev-libs/libksba-1.0.7
222 + >=net-misc/curl-7.10
223 + gnutls? ( >=net-libs/gnutls-3.0 )
224 + sys-libs/zlib
225 + ldap? ( net-nds/openldap )
226 + bzip2? ( app-arch/bzip2 )
227 + readline? ( sys-libs/readline:= )
228 + smartcard? ( usb? ( virtual/libusb:0 ) )
229 + "
230 +COMMON_DEPEND_BINS="app-crypt/pinentry
231 + !app-crypt/dirmngr"
232 +
233 +# Existence of executables is checked during configuration.
234 +DEPEND="${COMMON_DEPEND_LIBS}
235 + ${COMMON_DEPEND_BINS}
236 + static? (
237 + >=dev-libs/libassuan-2[static-libs]
238 + >=dev-libs/libgcrypt-1.6.2[static-libs]
239 + >=dev-libs/libgpg-error-1.17[static-libs]
240 + >=dev-libs/libksba-1.0.7[static-libs]
241 + dev-libs/npth[static-libs]
242 + >=net-misc/curl-7.10[static-libs]
243 + sys-libs/zlib[static-libs]
244 + bzip2? ( app-arch/bzip2[static-libs] )
245 + )
246 + nls? ( sys-devel/gettext )
247 + doc? ( sys-apps/texinfo )"
248 +
249 +RDEPEND="!static? ( ${COMMON_DEPEND_LIBS} )
250 + ${COMMON_DEPEND_BINS}
251 + selinux? ( sec-policy/selinux-gpg )
252 + nls? ( virtual/libintl )"
253 +
254 +REQUIRED_USE="smartcard? ( !static )"
255 +
256 +S="${WORKDIR}/${MY_P}"
257 +
258 +src_prepare() {
259 + epatch_user
260 +}
261 +
262 +src_configure() {
263 + local myconf=()
264 +
265 + # 'USE=static' support was requested:
266 + # gnupg1: bug #29299
267 + # gnupg2: bug #159623
268 + use static && append-ldflags -static
269 +
270 + if use smartcard; then
271 + myconf+=(
272 + --enable-scdaemon
273 + $(use_enable usb ccid-driver)
274 + )
275 + else
276 + myconf+=( --disable-scdaemon )
277 + fi
278 +
279 + if use elibc_SunOS || use elibc_AIX; then
280 + myconf+=( --disable-symcryptrun )
281 + else
282 + myconf+=( --enable-symcryptrun )
283 + fi
284 +
285 + # glib fails and picks up clang's internal stdint.h causing weird errors
286 + [[ ${CC} == clang ]] && export gl_cv_absolute_stdint_h=/usr/include/stdint.h
287 +
288 + econf \
289 + --docdir="${EPREFIX}/usr/share/doc/${PF}" \
290 + --enable-gpg \
291 + --enable-gpgsm \
292 + --enable-large-secmem \
293 + --without-adns \
294 + "${myconf[@]}" \
295 + $(use_enable bzip2) \
296 + $(use_enable gnutls) \
297 + $(use_with ldap) \
298 + $(use_enable nls) \
299 + $(use_with readline) \
300 + CC_FOR_BUILD="$(tc-getBUILD_CC)"
301 +}
302 +
303 +src_compile() {
304 + default
305 +
306 + if use doc; then
307 + cd doc
308 + emake html
309 + fi
310 +}
311 +
312 +src_install() {
313 + default
314 +
315 + use tools && dobin tools/{convert-from-106,gpg-check-pattern} \
316 + tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys,make-dns-cert}
317 +
318 + emake DESTDIR="${D}" -f doc/Makefile uninstall-nobase_dist_docDATA
319 + # The help*txt files are read from the datadir by GnuPG directly.
320 + # They do not work if compressed or moved!
321 + #rm "${ED}"/usr/share/gnupg/help* || die
322 +
323 + dodoc ChangeLog NEWS README THANKS TODO VERSION doc/FAQ doc/DETAILS \
324 + doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER doc/help*
325 +
326 + dosym gpg2 /usr/bin/gpg
327 + dosym gpgv2 /usr/bin/gpgv
328 + echo ".so man1/gpg2.1" > "${ED}"/usr/share/man/man1/gpg.1
329 + echo ".so man1/gpgv2.1" > "${ED}"/usr/share/man/man1/gpgv.1
330 +
331 + dodir /etc/env.d
332 + echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg
333 +
334 + if use doc; then
335 + dohtml doc/gnupg.html/* doc/*.png
336 + fi
337 +}
338 +
339 +pkg_postinst() {
340 + elog "If you wish to view images emerge:"
341 + elog "media-gfx/xloadimage, media-gfx/xli or any other viewer"
342 + elog "Remember to use photo-viewer option in configuration file to activate"
343 + elog "the right viewer."
344 + elog
345 +
346 + if use smartcard; then
347 + elog "To use your OpenPGP smartcard (or token) with GnuPG you need one of"
348 + use usb && elog " - a CCID-compatible reader, used directly through libusb;"
349 + elog " - sys-apps/pcsc-lite and a compatible reader device;"
350 + elog " - dev-libs/openct and a compatible reader device;"
351 + elog " - a reader device and drivers exporting either PC/SC or CT-API interfaces."
352 + elog ""
353 + elog "General hint: you probably want to try installing sys-apps/pcsc-lite and"
354 + elog "app-crypt/ccid first."
355 + fi
356 +
357 + ewarn "Please remember to restart gpg-agent if a different version"
358 + ewarn "of the agent is currently used. If you are unsure of the gpg"
359 + ewarn "agent you are using please run 'killall gpg-agent',"
360 + ewarn "and to start a fresh daemon just run 'gpg-agent --daemon'."
361 +
362 + if [[ -n ${REPLACING_VERSIONS} ]]; then
363 + elog "If upgrading from a version prior than 2.1 you might have to re-import"
364 + elog "secret keys after restarting the gpg-agent as the new version is using"
365 + elog "a new storage mechanism."
366 + elog "You can migrate the keys using gpg --import \$HOME/.gnupg/secring.gpg"
367 + fi
368 +}