Gentoo Archives: gentoo-commits

From: Alon Bar-Lev <alonbl@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgcrypt/, dev-libs/libgcrypt/files/
Date: Tue, 01 Dec 2015 06:48:40
Message-Id: 1448952398.e2228cca960e4bbb1d292192c66426f3c9e4a2fc.alonbl@gentoo
1 commit: e2228cca960e4bbb1d292192c66426f3c9e4a2fc
2 Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 1 06:46:38 2015 +0000
4 Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 1 06:46:38 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2228cca
7
8 Revert "dev-libs/libgcrypt: cleanup"
9
10 This reverts commit 1519f072b810c69428badbe5fc54960f1a2a12b3.
11
12 dev-libs/libgcrypt/Manifest | 1 +
13 .../libgcrypt/files/libgcrypt-1.5.0-uscore.patch | 33 +++++++++
14 .../files/libgcrypt-1.5.4-clang-arm.patch | 84 ++++++++++++++++++++++
15 dev-libs/libgcrypt/libgcrypt-1.5.4-r1.ebuild | 57 +++++++++++++++
16 dev-libs/libgcrypt/libgcrypt-1.5.4-r100.ebuild | 58 +++++++++++++++
17 5 files changed, 233 insertions(+)
18
19 diff --git a/dev-libs/libgcrypt/Manifest b/dev-libs/libgcrypt/Manifest
20 index 79bf1a4..608b99b 100644
21 --- a/dev-libs/libgcrypt/Manifest
22 +++ b/dev-libs/libgcrypt/Manifest
23 @@ -1,2 +1,3 @@
24 +DIST libgcrypt-1.5.4.tar.bz2 1512982 SHA256 d5f88d9f41a46953dc250cdb8575129b37ee2208401b7fa338c897f667c7fb33 SHA512 fe7e1d07eb10ee4ea8054bc955c35dc4b2109db645a08a6fa7757bf1e77a612e03c0838f9766086f04270b3621f34ccae0d6333f117cff204ccad9018c8a7908 WHIRLPOOL 221082d028a90235a3ddcc774b1772a8b8daec989a24b341491849e653e2ecb5cb0e3c8989a3f426524e39b28ebbe1b48532d5d9de7c54f4bdc19b450e22e4dc
25 DIST libgcrypt-1.6.3.tar.bz2 2494052 SHA256 41b4917b93ae34c6a0e2127378d7a4d66d805a2a86a09911d4f9bd871db7025f SHA512 09a84fcc4d3d755df21f46302a549af4ba788d829ff7fa0cf65eeec033bc3744503f8fe3f4be55a51cc17b1b1b487736c328d7d7bc909f13139600236298c549 WHIRLPOOL dd331afed5c8116df8a55742a7b559791c554a97c32983d64ab196a6d47c2d6bd7e15f8a63dda43947961bb269963185b98927ff0695c3f6d3b939face41e450
26 DIST libgcrypt-1.6.4.tar.bz2 2549820 SHA256 c9bc2c7fe2e5f4ea13b0c74f9d24bcbb1ad889bb39297d8082aebf23f4336026 SHA512 d2abc81fc3e3acf58f3bf18db449bfb4bdbc28fe62f695276ddd35f34434996b0d686bb48a4724e5134c80ea6cab08ce04f4a0989cb9a72f2497ec833bb24df1 WHIRLPOOL 708de5d55845177aa38dc227920dd64eeef8105427d5c88b8196ca47978f577d57f3cd85cd4627af6574e6ab780b815c1cbc8c8ad02aaba72ef176810f7a8865
27
28 diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch b/dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch
29 new file mode 100644
30 index 0000000..1d4f650
31 --- /dev/null
32 +++ b/dev-libs/libgcrypt/files/libgcrypt-1.5.0-uscore.patch
33 @@ -0,0 +1,33 @@
34 +The version taken from GnuPG 1.4 assumes any cross-compiled package have
35 +prefixed underscores, which is not the case; by using libtool's own macro,
36 +we can avoid the whole issue.
37 +
38 +diff --git a/configure.ac b/configure.ac
39 +index ab160c3..6df49bf 100644
40 +--- a/configure.ac
41 ++++ b/configure.ac
42 +@@ -886,7 +886,7 @@ fi
43 + #
44 + # Setup assembler stuff.
45 + #
46 +-GNUPG_SYS_SYMBOL_UNDERSCORE()
47 ++LT_SYS_SYMBOL_USCORE
48 + AC_ARG_ENABLE(mpi-path,
49 + AC_HELP_STRING([--enable-mpi-path=EXTRA_PATH],
50 + [prepend EXTRA_PATH to list of CPU specific optimizations]),
51 +diff --git a/mpi/config.links b/mpi/config.links
52 +index 7e910ee..9696828 100644
53 +--- a/mpi/config.links
54 ++++ b/mpi/config.links
55 +@@ -291,7 +291,7 @@ fi
56 +
57 + # Make sysdep.h
58 + echo '/* created by config.links - do not edit */' >./mpi/sysdep.h
59 +-if test x$ac_cv_sys_symbol_underscore = xyes; then
60 ++if test x$sys_symbol_underscore = xyes; then
61 + cat <<EOF >>./mpi/sysdep.h
62 + #if __STDC__
63 + #define C_SYMBOL_NAME(name) _##name
64 +--
65 +1.7.6.1
66 +
67
68 diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.5.4-clang-arm.patch b/dev-libs/libgcrypt/files/libgcrypt-1.5.4-clang-arm.patch
69 new file mode 100644
70 index 0000000..ab5d844
71 --- /dev/null
72 +++ b/dev-libs/libgcrypt/files/libgcrypt-1.5.4-clang-arm.patch
73 @@ -0,0 +1,84 @@
74 +fix from upstream
75 +
76 +From e67c67321ce240c93dd0fa2b21c649c0a8e233f7 Mon Sep 17 00:00:00 2001
77 +From: Jussi Kivilinna <jussi.kivilinna@×××.fi>
78 +Date: Tue, 22 Oct 2013 17:07:53 +0300
79 +Subject: [PATCH] mpi: allow building with clang on ARM
80 +
81 +* mpi/longlong.h [__arm__] (add_ssaaaa, sub_ddmmss, umul_ppmm)
82 +(count_leading_zeros): Do not cast assembly output arguments.
83 +[__arm__] (umul_ppmm): Remove the extra '%' ahead of assembly comment.
84 +[_ARM_ARCH >= 4] (umul_ppmm): Use correct inputs and outputs instead of
85 +registers.
86 +--
87 +
88 +Signed-off-by: Jussi Kivilinna <jussi.kivilinna@×××.fi>
89 +---
90 + mpi/longlong.h | 27 +++++++++++++--------------
91 + 1 file changed, 13 insertions(+), 14 deletions(-)
92 +
93 +diff --git a/mpi/longlong.h b/mpi/longlong.h
94 +index c2ab9c5..8c8260e 100644
95 +--- a/mpi/longlong.h
96 ++++ b/mpi/longlong.h
97 +@@ -188,8 +188,8 @@ extern UDItype __udiv_qrnnd ();
98 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
99 + __asm__ ("adds %1, %4, %5\n" \
100 + "adc %0, %2, %3" \
101 +- : "=r" ((USItype)(sh)), \
102 +- "=&r" ((USItype)(sl)) \
103 ++ : "=r" ((sh)), \
104 ++ "=&r" ((sl)) \
105 + : "%r" ((USItype)(ah)), \
106 + "rI" ((USItype)(bh)), \
107 + "%r" ((USItype)(al)), \
108 +@@ -197,15 +197,15 @@ extern UDItype __udiv_qrnnd ();
109 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
110 + __asm__ ("subs %1, %4, %5\n" \
111 + "sbc %0, %2, %3" \
112 +- : "=r" ((USItype)(sh)), \
113 +- "=&r" ((USItype)(sl)) \
114 ++ : "=r" ((sh)), \
115 ++ "=&r" ((sl)) \
116 + : "r" ((USItype)(ah)), \
117 + "rI" ((USItype)(bh)), \
118 + "r" ((USItype)(al)), \
119 + "rI" ((USItype)(bl)))
120 + #if defined __ARM_ARCH_2__ || defined __ARM_ARCH_3__
121 + #define umul_ppmm(xh, xl, a, b) \
122 +- __asm__ ("%@ Inlined umul_ppmm\n" \
123 ++ __asm__ ("@ Inlined umul_ppmm\n" \
124 + "mov %|r0, %2, lsr #16 @ AAAA\n" \
125 + "mov %|r2, %3, lsr #16 @ BBBB\n" \
126 + "bic %|r1, %2, %|r0, lsl #16 @ aaaa\n" \
127 +@@ -218,20 +218,19 @@ extern UDItype __udiv_qrnnd ();
128 + "addcs %|r2, %|r2, #65536\n" \
129 + "adds %1, %|r1, %|r0, lsl #16\n" \
130 + "adc %0, %|r2, %|r0, lsr #16" \
131 +- : "=&r" ((USItype)(xh)), \
132 +- "=r" ((USItype)(xl)) \
133 ++ : "=&r" ((xh)), \
134 ++ "=r" ((xl)) \
135 + : "r" ((USItype)(a)), \
136 + "r" ((USItype)(b)) \
137 + : "r0", "r1", "r2")
138 + #else
139 + #define umul_ppmm(xh, xl, a, b) \
140 +- __asm__ ("%@ Inlined umul_ppmm\n" \
141 +- "umull %r1, %r0, %r2, %r3" \
142 +- : "=&r" ((USItype)(xh)), \
143 +- "=r" ((USItype)(xl)) \
144 ++ __asm__ ("@ Inlined umul_ppmm\n" \
145 ++ "umull %1, %0, %2, %3" \
146 ++ : "=&r" ((xh)), \
147 ++ "=r" ((xl)) \
148 + : "r" ((USItype)(a)), \
149 +- "r" ((USItype)(b)) \
150 +- : "r0", "r1")
151 ++ "r" ((USItype)(b)))
152 + #endif
153 + #define UMUL_TIME 20
154 + #define UDIV_TIME 100
155 +--
156 +2.4.4
157 +
158
159 diff --git a/dev-libs/libgcrypt/libgcrypt-1.5.4-r1.ebuild b/dev-libs/libgcrypt/libgcrypt-1.5.4-r1.ebuild
160 new file mode 100644
161 index 0000000..fe222f9
162 --- /dev/null
163 +++ b/dev-libs/libgcrypt/libgcrypt-1.5.4-r1.ebuild
164 @@ -0,0 +1,57 @@
165 +# Copyright 1999-2015 Gentoo Foundation
166 +# Distributed under the terms of the GNU General Public License v2
167 +# $Id$
168 +
169 +EAPI=5
170 +AUTOTOOLS_AUTORECONF=1
171 +
172 +inherit autotools-multilib
173 +
174 +DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
175 +HOMEPAGE="http://www.gnupg.org/"
176 +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
177 +
178 +LICENSE="LGPL-2.1 MIT"
179 +SLOT="0/11" # subslot = soname major version
180 +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-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"
181 +IUSE="static-libs"
182 +
183 +RDEPEND=">=dev-libs/libgpg-error-1.12[${MULTILIB_USEDEP}]
184 + !dev-libs/libgcrypt:11
185 + abi_x86_32? (
186 + !<=app-emulation/emul-linux-x86-baselibs-20131008-r19
187 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
188 + )"
189 +DEPEND="${RDEPEND}"
190 +
191 +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
192 +
193 +PATCHES=(
194 + "${FILESDIR}"/${PN}-1.5.0-uscore.patch
195 + "${FILESDIR}"/${PN}-multilib-syspath.patch
196 + "${FILESDIR}"/${P}-clang-arm.patch
197 +)
198 +
199 +MULTILIB_CHOST_TOOLS=(
200 + /usr/bin/libgcrypt-config
201 +)
202 +
203 +src_configure() {
204 + local myeconfargs=(
205 + --disable-padlock-support # bug 201917
206 + --disable-dependency-tracking
207 + --enable-noexecstack
208 + --disable-O-flag-munging
209 + $(use_enable static-libs static)
210 +
211 + # disabled due to various applications requiring privileges
212 + # after libgcrypt drops them (bug #468616)
213 + --without-capabilities
214 +
215 + # http://trac.videolan.org/vlc/ticket/620
216 + # causes bus-errors on sparc64-solaris
217 + $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
218 + $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
219 + )
220 + autotools-multilib_src_configure
221 +}
222
223 diff --git a/dev-libs/libgcrypt/libgcrypt-1.5.4-r100.ebuild b/dev-libs/libgcrypt/libgcrypt-1.5.4-r100.ebuild
224 new file mode 100644
225 index 0000000..a0aad0c
226 --- /dev/null
227 +++ b/dev-libs/libgcrypt/libgcrypt-1.5.4-r100.ebuild
228 @@ -0,0 +1,58 @@
229 +# Copyright 1999-2015 Gentoo Foundation
230 +# Distributed under the terms of the GNU General Public License v2
231 +# $Id$
232 +
233 +EAPI=5
234 +AUTOTOOLS_AUTORECONF=1
235 +
236 +inherit autotools-multilib
237 +
238 +DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
239 +HOMEPAGE="http://www.gnupg.org/"
240 +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2"
241 +
242 +LICENSE="LGPL-2.1 MIT"
243 +SLOT="11/11" # subslot = soname major version
244 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-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"
245 +IUSE=""
246 +
247 +RDEPEND=">=dev-libs/libgpg-error-1.12[${MULTILIB_USEDEP}]
248 + !dev-libs/libgcrypt:0/11
249 + abi_x86_32? (
250 + !<=app-emulation/emul-linux-x86-baselibs-20131008-r19
251 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
252 + )"
253 +DEPEND="${RDEPEND}"
254 +
255 +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
256 +
257 +PATCHES=(
258 + "${FILESDIR}"/${PN}-1.5.0-uscore.patch
259 + "${FILESDIR}"/${PN}-multilib-syspath.patch
260 + "${FILESDIR}"/${P}-clang-arm.patch
261 +)
262 +
263 +src_configure() {
264 + local myeconfargs=(
265 + --disable-padlock-support # bug 201917
266 + --disable-dependency-tracking
267 + --enable-noexecstack
268 + --disable-O-flag-munging
269 +
270 + # disabled due to various applications requiring privileges
271 + # after libgcrypt drops them (bug #468616)
272 + --without-capabilities
273 +
274 + # http://trac.videolan.org/vlc/ticket/620
275 + # causes bus-errors on sparc64-solaris
276 + $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
277 + $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
278 + )
279 + autotools-multilib_src_configure
280 +}
281 +
282 +src_install() {
283 + autotools-multilib_src_install
284 +
285 + rm -r "${ED%/}"/usr/{bin,include,lib*/*.so,share} || die
286 +}