1 |
commit: 0e03adc0a22f6e026474ed7bb252b630dbb20716 |
2 |
Author: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 19 10:32:08 2015 +0000 |
4 |
Commit: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 19 10:32:32 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e03adc0 |
7 |
|
8 |
app-crypt/gnupg-2.1.10-r1: Fix hkps support when TOFU is not enabled |
9 |
|
10 |
Bug: 567822 |
11 |
|
12 |
Package-Manager: portage-2.2.20.1 |
13 |
|
14 |
.../gnupg/files/gnupg-2.1.10-pkg-config.patch | 24 +++ |
15 |
app-crypt/gnupg/gnupg-2.1.10-r1.ebuild | 182 +++++++++++++++++++++ |
16 |
2 files changed, 206 insertions(+) |
17 |
|
18 |
diff --git a/app-crypt/gnupg/files/gnupg-2.1.10-pkg-config.patch b/app-crypt/gnupg/files/gnupg-2.1.10-pkg-config.patch |
19 |
new file mode 100644 |
20 |
index 0000000..3526c31 |
21 |
--- /dev/null |
22 |
+++ b/app-crypt/gnupg/files/gnupg-2.1.10-pkg-config.patch |
23 |
@@ -0,0 +1,24 @@ |
24 |
+X-Git-Url: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blobdiff_plain;f=configure.ac;h=77487b23c36599b4a41272608d2c3569cfce655b;hp=5a75e5080e5f9649e6c100224f8f428884a5e49c;hb=af142854a73567836a0ca44ad62900469c23d531;hpb=06436882c31ed6339b2bef2b59d24a1a8ba751fd |
25 |
+ |
26 |
+diff --git a/configure.ac b/configure.ac |
27 |
+index 5a75e50..77487b2 100644 |
28 |
+--- a/configure.ac |
29 |
++++ b/configure.ac |
30 |
+@@ -589,6 +589,7 @@ AC_ISC_POSIX |
31 |
+ AC_SYS_LARGEFILE |
32 |
+ GNUPG_CHECK_USTAR |
33 |
+ |
34 |
++ |
35 |
+ # We need to compile and run a program on the build machine. A |
36 |
+ # comment in libgpg-error says that the AC_PROG_CC_FOR_BUILD macro in |
37 |
+ # the AC archive is broken for autoconf 2.57. Given that there is no |
38 |
+@@ -604,6 +605,9 @@ fi |
39 |
+ AC_MSG_RESULT($CC_FOR_BUILD) |
40 |
+ AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler]) |
41 |
+ |
42 |
++# We need to call this macro because other pkg-config macros are |
43 |
++# not always used. |
44 |
++PKG_PROG_PKG_CONFIG |
45 |
+ |
46 |
+ |
47 |
+ try_gettext=yes |
48 |
|
49 |
diff --git a/app-crypt/gnupg/gnupg-2.1.10-r1.ebuild b/app-crypt/gnupg/gnupg-2.1.10-r1.ebuild |
50 |
new file mode 100644 |
51 |
index 0000000..023e23c |
52 |
--- /dev/null |
53 |
+++ b/app-crypt/gnupg/gnupg-2.1.10-r1.ebuild |
54 |
@@ -0,0 +1,182 @@ |
55 |
+# Copyright 1999-2015 Gentoo Foundation |
56 |
+# Distributed under the terms of the GNU General Public License v2 |
57 |
+# $Id$ |
58 |
+ |
59 |
+EAPI="5" |
60 |
+ |
61 |
+inherit eutils autotools flag-o-matic toolchain-funcs |
62 |
+ |
63 |
+DESCRIPTION="The GNU Privacy Guard, a GPL OpenPGP implementation" |
64 |
+HOMEPAGE="http://www.gnupg.org/" |
65 |
+MY_P="${P/_/-}" |
66 |
+SRC_URI="mirror://gnupg/gnupg/${MY_P}.tar.bz2" |
67 |
+ |
68 |
+LICENSE="GPL-3" |
69 |
+SLOT="0" |
70 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" |
71 |
+IUSE="bzip2 doc +gnutls ldap nls readline static selinux smartcard tofu tools usb" |
72 |
+ |
73 |
+COMMON_DEPEND_LIBS=" |
74 |
+ dev-libs/npth |
75 |
+ >=dev-libs/libassuan-2.4.1 |
76 |
+ >=dev-libs/libgcrypt-1.6.2[threads] |
77 |
+ >=dev-libs/libgpg-error-1.17 |
78 |
+ >=dev-libs/libksba-1.2.0 |
79 |
+ >=net-misc/curl-7.10 |
80 |
+ gnutls? ( >=net-libs/gnutls-3.0 ) |
81 |
+ sys-libs/zlib |
82 |
+ ldap? ( net-nds/openldap ) |
83 |
+ bzip2? ( app-arch/bzip2 ) |
84 |
+ readline? ( sys-libs/readline:0= ) |
85 |
+ smartcard? ( usb? ( virtual/libusb:0 ) ) |
86 |
+ tofu? ( >=dev-db/sqlite-3.7 ) |
87 |
+ " |
88 |
+COMMON_DEPEND_BINS="app-crypt/pinentry |
89 |
+ !app-crypt/dirmngr" |
90 |
+ |
91 |
+# Existence of executables is checked during configuration. |
92 |
+DEPEND="${COMMON_DEPEND_LIBS} |
93 |
+ ${COMMON_DEPEND_BINS} |
94 |
+ static? ( |
95 |
+ >=dev-libs/libassuan-2[static-libs] |
96 |
+ >=dev-libs/libgcrypt-1.6.2[static-libs] |
97 |
+ >=dev-libs/libgpg-error-1.17[static-libs] |
98 |
+ >=dev-libs/libksba-1.0.7[static-libs] |
99 |
+ dev-libs/npth[static-libs] |
100 |
+ >=net-misc/curl-7.10[static-libs] |
101 |
+ sys-libs/zlib[static-libs] |
102 |
+ bzip2? ( app-arch/bzip2[static-libs] ) |
103 |
+ ) |
104 |
+ nls? ( sys-devel/gettext ) |
105 |
+ doc? ( sys-apps/texinfo )" |
106 |
+ |
107 |
+RDEPEND="!static? ( ${COMMON_DEPEND_LIBS} ) |
108 |
+ ${COMMON_DEPEND_BINS} |
109 |
+ selinux? ( sec-policy/selinux-gpg ) |
110 |
+ nls? ( virtual/libintl )" |
111 |
+ |
112 |
+REQUIRED_USE="smartcard? ( !static )" |
113 |
+ |
114 |
+S="${WORKDIR}/${MY_P}" |
115 |
+ |
116 |
+src_prepare() { |
117 |
+ epatch "${FILESDIR}/${P}-pkg-config.patch" |
118 |
+ epatch_user |
119 |
+ eautoreconf |
120 |
+} |
121 |
+ |
122 |
+src_configure() { |
123 |
+ local myconf=() |
124 |
+ |
125 |
+ # 'USE=static' support was requested: |
126 |
+ # gnupg1: bug #29299 |
127 |
+ # gnupg2: bug #159623 |
128 |
+ use static && append-ldflags -static |
129 |
+ |
130 |
+ if use smartcard; then |
131 |
+ myconf+=( |
132 |
+ --enable-scdaemon |
133 |
+ $(use_enable usb ccid-driver) |
134 |
+ ) |
135 |
+ else |
136 |
+ myconf+=( --disable-scdaemon ) |
137 |
+ fi |
138 |
+ |
139 |
+ if use elibc_SunOS || use elibc_AIX; then |
140 |
+ myconf+=( --disable-symcryptrun ) |
141 |
+ else |
142 |
+ myconf+=( --enable-symcryptrun ) |
143 |
+ fi |
144 |
+ |
145 |
+ # glib fails and picks up clang's internal stdint.h causing weird errors |
146 |
+ [[ ${CC} == clang ]] && export gl_cv_absolute_stdint_h=/usr/include/stdint.h |
147 |
+ |
148 |
+ econf \ |
149 |
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \ |
150 |
+ --enable-gpg \ |
151 |
+ --enable-gpgsm \ |
152 |
+ --enable-large-secmem \ |
153 |
+ --without-adns \ |
154 |
+ "${myconf[@]}" \ |
155 |
+ $(use_enable bzip2) \ |
156 |
+ $(use_enable gnutls) \ |
157 |
+ $(use_with ldap) \ |
158 |
+ $(use_enable nls) \ |
159 |
+ $(use_with readline) \ |
160 |
+ $(use_enable tofu) \ |
161 |
+ CC_FOR_BUILD="$(tc-getBUILD_CC)" |
162 |
+ |
163 |
+ # The pkg-config patch specific to 2.1.10 is causing an eautoreconf |
164 |
+ # it shows up as being a developer version and with "unknown" suffix |
165 |
+ # we remove this explicitly for the 2.1.10 release as it does not contain |
166 |
+ # unstable code |
167 |
+ sed -i "s/#define IS_DEVELOPMENT_VERSION 1//" config.h || die |
168 |
+ sed -i "s/2.1.10-unknown/2.1.10/" config.h || die |
169 |
+} |
170 |
+ |
171 |
+src_compile() { |
172 |
+ default |
173 |
+ |
174 |
+ if use doc; then |
175 |
+ cd doc |
176 |
+ emake html |
177 |
+ fi |
178 |
+} |
179 |
+ |
180 |
+src_install() { |
181 |
+ default |
182 |
+ |
183 |
+ use tools && dobin tools/{convert-from-106,gpg-check-pattern} \ |
184 |
+ tools/{gpg-zip,gpgconf,gpgsplit,lspgpot,mail-signed-keys,make-dns-cert} |
185 |
+ |
186 |
+ emake DESTDIR="${D}" -f doc/Makefile uninstall-nobase_dist_docDATA |
187 |
+ # The help*txt files are read from the datadir by GnuPG directly. |
188 |
+ # They do not work if compressed or moved! |
189 |
+ #rm "${ED}"/usr/share/gnupg/help* || die |
190 |
+ |
191 |
+ dodoc ChangeLog NEWS README THANKS TODO VERSION doc/FAQ doc/DETAILS \ |
192 |
+ doc/HACKING doc/TRANSLATE doc/OpenPGP doc/KEYSERVER doc/help* |
193 |
+ |
194 |
+ dosym gpg2 /usr/bin/gpg |
195 |
+ dosym gpgv2 /usr/bin/gpgv |
196 |
+ echo ".so man1/gpg2.1" > "${ED}"/usr/share/man/man1/gpg.1 |
197 |
+ echo ".so man1/gpgv2.1" > "${ED}"/usr/share/man/man1/gpgv.1 |
198 |
+ |
199 |
+ dodir /etc/env.d |
200 |
+ echo "CONFIG_PROTECT=/usr/share/gnupg/qualified.txt" >> "${ED}"/etc/env.d/30gnupg |
201 |
+ |
202 |
+ if use doc; then |
203 |
+ dohtml doc/gnupg.html/* doc/*.png |
204 |
+ fi |
205 |
+} |
206 |
+ |
207 |
+pkg_postinst() { |
208 |
+ elog "If you wish to view images emerge:" |
209 |
+ elog "media-gfx/xloadimage, media-gfx/xli or any other viewer" |
210 |
+ elog "Remember to use photo-viewer option in configuration file to activate" |
211 |
+ elog "the right viewer." |
212 |
+ elog |
213 |
+ |
214 |
+ if use smartcard; then |
215 |
+ elog "To use your OpenPGP smartcard (or token) with GnuPG you need one of" |
216 |
+ use usb && elog " - a CCID-compatible reader, used directly through libusb;" |
217 |
+ elog " - sys-apps/pcsc-lite and a compatible reader device;" |
218 |
+ elog " - dev-libs/openct and a compatible reader device;" |
219 |
+ elog " - a reader device and drivers exporting either PC/SC or CT-API interfaces." |
220 |
+ elog "" |
221 |
+ elog "General hint: you probably want to try installing sys-apps/pcsc-lite and" |
222 |
+ elog "app-crypt/ccid first." |
223 |
+ fi |
224 |
+ |
225 |
+ ewarn "Please remember to restart gpg-agent if a different version" |
226 |
+ ewarn "of the agent is currently used. If you are unsure of the gpg" |
227 |
+ ewarn "agent you are using please run 'killall gpg-agent'," |
228 |
+ ewarn "and to start a fresh daemon just run 'gpg-agent --daemon'." |
229 |
+ |
230 |
+ if [[ -n ${REPLACING_VERSIONS} ]]; then |
231 |
+ elog "If upgrading from a version prior than 2.1 you might have to re-import" |
232 |
+ elog "secret keys after restarting the gpg-agent as the new version is using" |
233 |
+ elog "a new storage mechanism." |
234 |
+ elog "You can migrate the keys using gpg --import \$HOME/.gnupg/secring.gpg" |
235 |
+ fi |
236 |
+} |