Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/gnupg/
Date: Fri, 28 Aug 2020 16:12:44
Message-Id: 1598631159.e909c720c82ad8045c022c43c4f3074a390d12db.zlogene@gentoo
1 commit: e909c720c82ad8045c022c43c4f3074a390d12db
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 28 16:10:43 2020 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 28 16:12:39 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e909c720
7
8 app-crypt/gnupg: Version bump (v2.2.22)
9
10 Package-Manager: Portage-2.3.103, Repoman-2.3.23
11 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
12
13 app-crypt/gnupg/Manifest | 1 +
14 app-crypt/gnupg/gnupg-2.2.22.ebuild | 165 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 166 insertions(+)
16
17 diff --git a/app-crypt/gnupg/Manifest b/app-crypt/gnupg/Manifest
18 index 2eaa97cae3d..4adaaa9f921 100644
19 --- a/app-crypt/gnupg/Manifest
20 +++ b/app-crypt/gnupg/Manifest
21 @@ -1,2 +1,3 @@
22 DIST gnupg-2.2.20.tar.bz2 6786913 BLAKE2B 43cf9402a26e67d6c7c2444eb2faaee3f06ea0bf6c07708a50834c5d7424db2f9c38e1f0046dd3a35082abc08d401b2951655e7e068f0873db297560b87d2667 SHA512 3e69f102366ec3415f439ab81aae2458182fa1a18dfb86565b1d9dc638f3fc4c179a5947f0042b7c5a813345676285a662793664a1803ea9ad8328f0548e0edc
23 DIST gnupg-2.2.21.tar.bz2 6813160 BLAKE2B b4708fd34c23dec8ec5be0740a502d155b649b4c88a89e5cc6f3cb99a15f7c6e31c50247ccacfedad55600dac3e7f91a8567424d335ab5e537082261dc98aceb SHA512 b4eac75253d4a1cac341c8a1ba7bb275e849a88d5377035497777c7bcd49b5a4c91b77000311695eb7d4083856975b2b2d14518f24ab94846027280bd8c301f9
24 +DIST gnupg-2.2.22.tar.bz2 7098444 BLAKE2B b5f306485032acadc852f4f71f2e968795843faacd5dda24ed2b20df78a3d38a364c2feade7ef8389a203e8b037fbb92129207cbc6d60b89cfb0945dded56a97 SHA512 3e5a8bb91c122f97acee2a93e3233db89bff9b96c6ec052c95bd2fe7e46c79a8afaac536c05675a7129e332272d62c677722a12cb05386b54a8d12ef82b6c5fa
25
26 diff --git a/app-crypt/gnupg/gnupg-2.2.22.ebuild b/app-crypt/gnupg/gnupg-2.2.22.ebuild
27 new file mode 100644
28 index 00000000000..04e7c40e9b7
29 --- /dev/null
30 +++ b/app-crypt/gnupg/gnupg-2.2.22.ebuild
31 @@ -0,0 +1,165 @@
32 +# Copyright 1999-2020 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +inherit flag-o-matic systemd toolchain-funcs
38 +
39 +MY_P="${P/_/-}"
40 +
41 +DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation"
42 +HOMEPAGE="https://gnupg.org/"
43 +SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2"
44 +
45 +LICENSE="GPL-3"
46 +SLOT="0"
47 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
48 +IUSE="bzip2 doc ldap nls readline selinux +smartcard ssl tofu tools usb user-socket wks-server"
49 +
50 +# Existence of executables is checked during configuration.
51 +DEPEND="!app-crypt/dirmngr
52 + >=dev-libs/libassuan-2.5.0
53 + >=dev-libs/libgcrypt-1.7.3
54 + >=dev-libs/libgpg-error-1.29
55 + >=dev-libs/libksba-1.3.4
56 + >=dev-libs/npth-1.2
57 + >=net-misc/curl-7.10
58 + bzip2? ( app-arch/bzip2 )
59 + ldap? ( net-nds/openldap )
60 + readline? ( sys-libs/readline:0= )
61 + smartcard? ( usb? ( virtual/libusb:1 ) )
62 + ssl? ( >=net-libs/gnutls-3.0:0= )
63 + sys-libs/zlib
64 + tofu? ( >=dev-db/sqlite-3.7 )"
65 +
66 +RDEPEND="${DEPEND}
67 + app-crypt/pinentry
68 + nls? ( virtual/libintl )
69 + selinux? ( sec-policy/selinux-gpg )
70 + wks-server? ( virtual/mta )"
71 +
72 +BDEPEND="virtual/pkgconfig
73 + doc? ( sys-apps/texinfo )
74 + nls? ( sys-devel/gettext )"
75 +
76 +S="${WORKDIR}/${MY_P}"
77 +
78 +DOCS=(
79 + ChangeLog NEWS README THANKS TODO VERSION
80 + doc/FAQ doc/DETAILS doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER
81 +)
82 +
83 +PATCHES=(
84 + "${FILESDIR}/${PN}-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch"
85 +)
86 +
87 +src_prepare() {
88 + default
89 +
90 + # Inject SSH_AUTH_SOCK into user's sessions after enabling gpg-agent-ssh.socket in systemctl --user mode,
91 + # idea borrowed from libdbus, see
92 + # https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/bus/systemd-user/dbus.socket.in#L6
93 + #
94 + # This cannot be upstreamed, as it requires determining the exact prefix of 'systemctl',
95 + # which in turn requires discovery in Autoconf, something that upstream deeply resents.
96 + sed -e "/DirectoryMode=/a ExecStartPost=-${EPREFIX}/bin/systemctl --user set-environment SSH_AUTH_SOCK=%t/gnupg/S.gpg-agent.ssh" \
97 + -i doc/examples/systemd-user/gpg-agent-ssh.socket || die
98 +}
99 +
100 +src_configure() {
101 + local myconf=()
102 +
103 + if use prefix && use usb; then
104 + # bug #649598
105 + append-cppflags -I"${EPREFIX}/usr/include/libusb-1.0"
106 + fi
107 +
108 + if use elibc_SunOS || use elibc_AIX; then
109 + myconf+=( --disable-symcryptrun )
110 + else
111 + myconf+=( --enable-symcryptrun )
112 + fi
113 +
114 + #bug 663142
115 + if use user-socket; then
116 + myconf+=( --enable-run-gnupg-user-socket )
117 + fi
118 +
119 + # glib fails and picks up clang's internal stdint.h causing weird errors
120 + [[ ${CC} == *clang ]] && \
121 + export gl_cv_absolute_stdint_h=/usr/include/stdint.h
122 +
123 + # Hardcode mailprog to /usr/libexec/sendmail even if it does not exist.
124 + # As of GnuPG 2.3, the mailprog substitution is used for the binary called
125 + # by wks-client & wks-server; and if it's autodetected but not not exist at
126 + # build time, then then 'gpg-wks-client --send' functionality will not
127 + # work. This has an unwanted side-effect in stage3 builds: there was a
128 + # [R]DEPEND on virtual/mta, which also brought in virtual/logger, bloating
129 + # the build where the install guide previously make the user chose the
130 + # logger & mta early in the install.
131 +
132 + econf \
133 + "${myconf[@]}" \
134 + $(use_enable bzip2) \
135 + $(use_enable nls) \
136 + $(use_enable smartcard scdaemon) \
137 + $(use_enable ssl gnutls) \
138 + $(use_enable tofu) \
139 + $(use smartcard && use_enable usb ccid-driver || echo '--disable-ccid-driver') \
140 + $(use_enable wks-server wks-tools) \
141 + $(use_with ldap) \
142 + $(use_with readline) \
143 + --with-mailprog=/usr/libexec/sendmail \
144 + --disable-ntbtls \
145 + --enable-all-tests \
146 + --enable-gpg \
147 + --enable-gpgsm \
148 + --enable-large-secmem \
149 + CC_FOR_BUILD="$(tc-getBUILD_CC)" \
150 + GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config" \
151 + KSBA_CONFIG="${EROOT}/usr/bin/ksba-config" \
152 + LIBASSUAN_CONFIG="${EROOT}/usr/bin/libassuan-config" \
153 + LIBGCRYPT_CONFIG="${EROOT}/usr/bin/${CHOST}-libgcrypt-config" \
154 + NPTH_CONFIG="${EROOT}/usr/bin/npth-config" \
155 + $("${S}/configure" --help | grep -- '--without-.*-prefix' | sed -e 's/^ *\([^ ]*\) .*/\1/g')
156 +}
157 +
158 +src_compile() {
159 + default
160 +
161 + use doc && emake -C doc html
162 +}
163 +
164 +src_test() {
165 + #Bug: 638574
166 + use tofu && export TESTFLAGS=--parallel
167 + default
168 +}
169 +
170 +src_install() {
171 + default
172 +
173 + use tools &&
174 + dobin \
175 + tools/{convert-from-106,gpg-check-pattern} \
176 + tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys} \
177 + tools/make-dns-cert
178 +
179 + dosym gpg /usr/bin/gpg2
180 + dosym gpgv /usr/bin/gpgv2
181 + echo ".so man1/gpg.1" > "${ED}"/usr/share/man/man1/gpg2.1 || die
182 + echo ".so man1/gpgv.1" > "${ED}"/usr/share/man/man1/gpgv2.1 || die
183 +
184 + dodir /etc/env.d
185 + echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg || die
186 +
187 + use doc && dodoc doc/gnupg.html/* doc/*.png
188 +
189 + systemd_douserunit doc/examples/systemd-user/*.{service,socket}
190 +}
191 +
192 +pkg_postinst() {
193 + elog "See https://wiki.gentoo.org/wiki/GnuPG for documentation on gnupg"
194 + elog
195 + elog "If you wish to use 'gpg-wks-client --send', you must install an MTA!"
196 +}