Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libgcrypt-compat/, dev-libs/libgcrypt-compat/files/
Date: Sat, 13 Apr 2019 13:17:20
Message-Id: 1555161386.99c47b485089d702abba2b5bb8feef72f767f1cc.chewi@gentoo
1 commit: 99c47b485089d702abba2b5bb8feef72f767f1cc
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 13 13:16:26 2019 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 13 13:16:26 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99c47b48
7
8 dev-libs/libgcrypt-compat: New libgcrypt compatibility package
9
10 Currently provides version 1.5 (slot 11), which is about to be
11 last-rited. This is required by some older binaries.
12
13 Package-Manager: Portage-2.3.62, Repoman-2.3.12
14 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
15
16 dev-libs/libgcrypt-compat/Manifest | 1 +
17 .../files/libgcrypt-1.5.0-uscore.patch | 33 +++++++++
18 .../files/libgcrypt-1.5.4-clang-arm.patch | 84 ++++++++++++++++++++++
19 .../libgcrypt-compat/libgcrypt-compat-1.5.6.ebuild | 58 +++++++++++++++
20 dev-libs/libgcrypt-compat/metadata.xml | 8 +++
21 5 files changed, 184 insertions(+)
22
23 diff --git a/dev-libs/libgcrypt-compat/Manifest b/dev-libs/libgcrypt-compat/Manifest
24 new file mode 100644
25 index 00000000000..c7a08977556
26 --- /dev/null
27 +++ b/dev-libs/libgcrypt-compat/Manifest
28 @@ -0,0 +1 @@
29 +DIST libgcrypt-1.5.6.tar.bz2 1548918 BLAKE2B 14ff8dfcfd7c5345f1be6d5300b97db27c9ac3c78141cc888ee978882aee39ac386a1e90588d3840bf0595a519437e92fa53b5f73d8659e193a43cfa374dfb34 SHA512 2c16912de66bc83adfbf8f43a2a9f57e1afcc866b1774ec11a670e2a793a7c5f2029d134c0bda681c9cb95f7dcc166133782c124e520b7fbe246ec10a9e1c06a
30
31 diff --git a/dev-libs/libgcrypt-compat/files/libgcrypt-1.5.0-uscore.patch b/dev-libs/libgcrypt-compat/files/libgcrypt-1.5.0-uscore.patch
32 new file mode 100644
33 index 00000000000..1d4f650b6c7
34 --- /dev/null
35 +++ b/dev-libs/libgcrypt-compat/files/libgcrypt-1.5.0-uscore.patch
36 @@ -0,0 +1,33 @@
37 +The version taken from GnuPG 1.4 assumes any cross-compiled package have
38 +prefixed underscores, which is not the case; by using libtool's own macro,
39 +we can avoid the whole issue.
40 +
41 +diff --git a/configure.ac b/configure.ac
42 +index ab160c3..6df49bf 100644
43 +--- a/configure.ac
44 ++++ b/configure.ac
45 +@@ -886,7 +886,7 @@ fi
46 + #
47 + # Setup assembler stuff.
48 + #
49 +-GNUPG_SYS_SYMBOL_UNDERSCORE()
50 ++LT_SYS_SYMBOL_USCORE
51 + AC_ARG_ENABLE(mpi-path,
52 + AC_HELP_STRING([--enable-mpi-path=EXTRA_PATH],
53 + [prepend EXTRA_PATH to list of CPU specific optimizations]),
54 +diff --git a/mpi/config.links b/mpi/config.links
55 +index 7e910ee..9696828 100644
56 +--- a/mpi/config.links
57 ++++ b/mpi/config.links
58 +@@ -291,7 +291,7 @@ fi
59 +
60 + # Make sysdep.h
61 + echo '/* created by config.links - do not edit */' >./mpi/sysdep.h
62 +-if test x$ac_cv_sys_symbol_underscore = xyes; then
63 ++if test x$sys_symbol_underscore = xyes; then
64 + cat <<EOF >>./mpi/sysdep.h
65 + #if __STDC__
66 + #define C_SYMBOL_NAME(name) _##name
67 +--
68 +1.7.6.1
69 +
70
71 diff --git a/dev-libs/libgcrypt-compat/files/libgcrypt-1.5.4-clang-arm.patch b/dev-libs/libgcrypt-compat/files/libgcrypt-1.5.4-clang-arm.patch
72 new file mode 100644
73 index 00000000000..ab5d844552a
74 --- /dev/null
75 +++ b/dev-libs/libgcrypt-compat/files/libgcrypt-1.5.4-clang-arm.patch
76 @@ -0,0 +1,84 @@
77 +fix from upstream
78 +
79 +From e67c67321ce240c93dd0fa2b21c649c0a8e233f7 Mon Sep 17 00:00:00 2001
80 +From: Jussi Kivilinna <jussi.kivilinna@×××.fi>
81 +Date: Tue, 22 Oct 2013 17:07:53 +0300
82 +Subject: [PATCH] mpi: allow building with clang on ARM
83 +
84 +* mpi/longlong.h [__arm__] (add_ssaaaa, sub_ddmmss, umul_ppmm)
85 +(count_leading_zeros): Do not cast assembly output arguments.
86 +[__arm__] (umul_ppmm): Remove the extra '%' ahead of assembly comment.
87 +[_ARM_ARCH >= 4] (umul_ppmm): Use correct inputs and outputs instead of
88 +registers.
89 +--
90 +
91 +Signed-off-by: Jussi Kivilinna <jussi.kivilinna@×××.fi>
92 +---
93 + mpi/longlong.h | 27 +++++++++++++--------------
94 + 1 file changed, 13 insertions(+), 14 deletions(-)
95 +
96 +diff --git a/mpi/longlong.h b/mpi/longlong.h
97 +index c2ab9c5..8c8260e 100644
98 +--- a/mpi/longlong.h
99 ++++ b/mpi/longlong.h
100 +@@ -188,8 +188,8 @@ extern UDItype __udiv_qrnnd ();
101 + #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
102 + __asm__ ("adds %1, %4, %5\n" \
103 + "adc %0, %2, %3" \
104 +- : "=r" ((USItype)(sh)), \
105 +- "=&r" ((USItype)(sl)) \
106 ++ : "=r" ((sh)), \
107 ++ "=&r" ((sl)) \
108 + : "%r" ((USItype)(ah)), \
109 + "rI" ((USItype)(bh)), \
110 + "%r" ((USItype)(al)), \
111 +@@ -197,15 +197,15 @@ extern UDItype __udiv_qrnnd ();
112 + #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
113 + __asm__ ("subs %1, %4, %5\n" \
114 + "sbc %0, %2, %3" \
115 +- : "=r" ((USItype)(sh)), \
116 +- "=&r" ((USItype)(sl)) \
117 ++ : "=r" ((sh)), \
118 ++ "=&r" ((sl)) \
119 + : "r" ((USItype)(ah)), \
120 + "rI" ((USItype)(bh)), \
121 + "r" ((USItype)(al)), \
122 + "rI" ((USItype)(bl)))
123 + #if defined __ARM_ARCH_2__ || defined __ARM_ARCH_3__
124 + #define umul_ppmm(xh, xl, a, b) \
125 +- __asm__ ("%@ Inlined umul_ppmm\n" \
126 ++ __asm__ ("@ Inlined umul_ppmm\n" \
127 + "mov %|r0, %2, lsr #16 @ AAAA\n" \
128 + "mov %|r2, %3, lsr #16 @ BBBB\n" \
129 + "bic %|r1, %2, %|r0, lsl #16 @ aaaa\n" \
130 +@@ -218,20 +218,19 @@ extern UDItype __udiv_qrnnd ();
131 + "addcs %|r2, %|r2, #65536\n" \
132 + "adds %1, %|r1, %|r0, lsl #16\n" \
133 + "adc %0, %|r2, %|r0, lsr #16" \
134 +- : "=&r" ((USItype)(xh)), \
135 +- "=r" ((USItype)(xl)) \
136 ++ : "=&r" ((xh)), \
137 ++ "=r" ((xl)) \
138 + : "r" ((USItype)(a)), \
139 + "r" ((USItype)(b)) \
140 + : "r0", "r1", "r2")
141 + #else
142 + #define umul_ppmm(xh, xl, a, b) \
143 +- __asm__ ("%@ Inlined umul_ppmm\n" \
144 +- "umull %r1, %r0, %r2, %r3" \
145 +- : "=&r" ((USItype)(xh)), \
146 +- "=r" ((USItype)(xl)) \
147 ++ __asm__ ("@ Inlined umul_ppmm\n" \
148 ++ "umull %1, %0, %2, %3" \
149 ++ : "=&r" ((xh)), \
150 ++ "=r" ((xl)) \
151 + : "r" ((USItype)(a)), \
152 +- "r" ((USItype)(b)) \
153 +- : "r0", "r1")
154 ++ "r" ((USItype)(b)))
155 + #endif
156 + #define UMUL_TIME 20
157 + #define UDIV_TIME 100
158 +--
159 +2.4.4
160 +
161
162 diff --git a/dev-libs/libgcrypt-compat/libgcrypt-compat-1.5.6.ebuild b/dev-libs/libgcrypt-compat/libgcrypt-compat-1.5.6.ebuild
163 new file mode 100644
164 index 00000000000..76e7e0a7adc
165 --- /dev/null
166 +++ b/dev-libs/libgcrypt-compat/libgcrypt-compat-1.5.6.ebuild
167 @@ -0,0 +1,58 @@
168 +# Copyright 1999-2019 Gentoo Authors
169 +# Distributed under the terms of the GNU General Public License v2
170 +
171 +EAPI=7
172 +
173 +inherit autotools multilib-minimal
174 +
175 +MY_PN="${PN%-compat}"
176 +MY_P="${MY_PN}-${PV}"
177 +
178 +DESCRIPTION="Old version of libgcrypt needed by some binaries"
179 +HOMEPAGE="http://www.gnupg.org/"
180 +SRC_URI="mirror://gnupg/${MY_PN}/${MY_P}.tar.bz2"
181 +LICENSE="LGPL-2.1 MIT"
182 +SLOT="11" # soname major version
183 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
184 +
185 +RDEPEND=">=dev-libs/libgpg-error-1.12[${MULTILIB_USEDEP}]
186 + !dev-libs/libgcrypt:0/11
187 + !dev-libs/libgcrypt:11/11"
188 +
189 +DEPEND="${RDEPEND}"
190 +
191 +S="${WORKDIR}/${MY_P}"
192 +
193 +PATCHES=(
194 + "${FILESDIR}"/${MY_PN}-1.5.0-uscore.patch
195 + "${FILESDIR}"/${MY_PN}-1.5.4-clang-arm.patch
196 +)
197 +
198 +src_prepare() {
199 + default
200 + eautoreconf
201 +}
202 +
203 +multilib_src_configure() {
204 + local myeconfargs=(
205 + --disable-padlock-support # bug 201917
206 + --disable-dependency-tracking
207 + --enable-noexecstack
208 + --disable-O-flag-munging
209 +
210 + # disabled due to various applications requiring privileges
211 + # after libgcrypt drops them (bug #468616)
212 + --without-capabilities
213 +
214 + # http://trac.videolan.org/vlc/ticket/620
215 + # causes bus-errors on sparc64-solaris
216 + $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
217 + $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
218 + )
219 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
220 +}
221 +
222 +multilib_src_install() {
223 + emake -C src DESTDIR="${D}" install-libLTLIBRARIES
224 + rm -v "${ED}"/usr/$(get_libdir)/*.{la,so} || die
225 +}
226
227 diff --git a/dev-libs/libgcrypt-compat/metadata.xml b/dev-libs/libgcrypt-compat/metadata.xml
228 new file mode 100644
229 index 00000000000..54be7ff7e5d
230 --- /dev/null
231 +++ b/dev-libs/libgcrypt-compat/metadata.xml
232 @@ -0,0 +1,8 @@
233 +<?xml version="1.0" encoding="UTF-8"?>
234 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
235 +<pkgmetadata>
236 + <maintainer type="person">
237 + <email>chewi@g.o</email>
238 + <name>James Le Cuirot</name>
239 + </maintainer>
240 +</pkgmetadata>