Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libsecp256k1/, dev-libs/libsecp256k1/files/
Date: Tue, 24 Jan 2017 01:17:52
Message-Id: 1485220645.7e4f64ed2f47697ab0a7f606cd8ba3e05c5a6509.asturm@gentoo
1 commit: 7e4f64ed2f47697ab0a7f606cd8ba3e05c5a6509
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 22 21:24:59 2017 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 24 01:17:25 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e4f64ed
7
8 dev-libs/libsecp256k1: Drop old
9
10 Package-Manager: portage-2.3.0
11
12 dev-libs/libsecp256k1/Manifest | 2 -
13 dev-libs/libsecp256k1/files/20141212-fixes.patch | 289 ---------------------
14 .../libsecp256k1-0.0.0_pre20141212.ebuild | 74 ------
15 .../libsecp256k1-0.0.0_pre20150423.ebuild | 57 ----
16 4 files changed, 422 deletions(-)
17
18 diff --git a/dev-libs/libsecp256k1/Manifest b/dev-libs/libsecp256k1/Manifest
19 index ea22c61..f988266 100644
20 --- a/dev-libs/libsecp256k1/Manifest
21 +++ b/dev-libs/libsecp256k1/Manifest
22 @@ -1,4 +1,2 @@
23 DIST libsecp256k1-v0.0.0_pre20161213.tgz 147557 SHA256 1cb5350e50d8d7e9061835d40a06e8419d8dcf95210bdf887380d2b933217743 SHA512 f4d16fae972364fd04bfcfbaca1edde4410a7367a936f76c1e93b85ac3c9c45da58785f604a4fc14cdfb4d7a23395d2d274957ad83118e15a236dfff0d0f57dd WHIRLPOOL af3bf6aeffa66f2d442dcc11255a60e5f24d281b30751ddcf72d9abbfb052cb8197081b56281e4b19a99602eead204ca985ed74feeb4b1e5c89543c70014f454
24 -DIST secp256k1-v0.0.0_pre20141212.tgz 60007 SHA256 f5d3a7cac425caf64040395d99c1a91ab2ca1c973b228a66772ba4a290f355ce SHA512 ab2a211c1bf882ebb62e78891e4e12c3ed7244d46d532e37ff2a669ba08db8dcafec7b4c57c073310e463957fd2fa0dffb940c4f35b61890cb8ce86d4283f0f6 WHIRLPOOL 3aa8b7545ca24028ceb17e770fdbf997e2895212ec25a193fcd926660e78f16d704bf27a5b1aa7cf3cabe643c33b128bf0b0568172c15833eb82fcc58e5941c1
25 -DIST secp256k1-v0.0.0_pre20150423.tgz 77451 SHA256 7e4e78d5ded245b59dbe8abc9804fdf7ba41d9030936fb39766d5f2bd7e29b2e SHA512 a640188d83e9aa5a4292900c211e29815f2f1b57db4fbccfb8a3bf770bb52f0232d405044f317a3b6b6ea4d5a5107180dc4e374cf7ab06eb79676c270061c3b7 WHIRLPOOL 5796d32cd8f578ef28f6e79ced53fa505519273af39bdeaa413e9b48669ce7945d12437c6093f3aa0b3db9412dac50638c335a3f4f8cf0d4ffa8c94665a85f72
26 DIST secp256k1-v0.0.0_pre20151118.tgz 125884 SHA256 75549cea9b22affda02d6731385a7184b60703f1ca0a4f098fec8c702a20f7b0 SHA512 3cc0a4973acf7936a7c6dc0abc37ee43ecd69e835069ed40765595d36ca597b43837b5d6f90499455599de03abfc775d7c9d019d26216b79b03dd6dc53a73e19 WHIRLPOOL 61eb9a709e8986db9113d305a989d44700f5e53143471485935bed0f79d18c745cb78f2b4b5e55614b6ca80a6bd29830b52108797bc21bc792789a7590597fed
27
28 diff --git a/dev-libs/libsecp256k1/files/20141212-fixes.patch b/dev-libs/libsecp256k1/files/20141212-fixes.patch
29 deleted file mode 100644
30 index f8cb274..00000000
31 --- a/dev-libs/libsecp256k1/files/20141212-fixes.patch
32 +++ /dev/null
33 @@ -1,289 +0,0 @@
34 -diff --git a/build-aux/m4/bitcoin_secp.m4 b/build-aux/m4/bitcoin_secp.m4
35 -index 1373478..4a398d6 100644
36 ---- a/build-aux/m4/bitcoin_secp.m4
37 -+++ b/build-aux/m4/bitcoin_secp.m4
38 -@@ -1,12 +1,6 @@
39 - dnl libsecp25k1 helper checks
40 - AC_DEFUN([SECP_INT128_CHECK],[
41 - has_int128=$ac_cv_type___int128
42 --if test x"$has_int128" != x"yes" && test x"$set_field" = x"64bit"; then
43 -- AC_MSG_ERROR([$set_field field support explicitly requested but is not compatible with this host])
44 --fi
45 --if test x"$has_int128" != x"yes" && test x"$set_scalar" = x"64bit"; then
46 -- AC_MSG_ERROR([$set_scalar scalar support explicitly requested but is not compatible with this host])
47 --fi
48 - ])
49 -
50 - dnl
51 -@@ -18,11 +12,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
52 - __asm__ __volatile__("movq $0x100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx");
53 - ]])],[has_64bit_asm=yes],[has_64bit_asm=no])
54 - AC_MSG_RESULT([$has_64bit_asm])
55 --if test x"$set_field" == x"64bit_asm"; then
56 -- if test x"$has_64bit_asm" == x"no"; then
57 -- AC_MSG_ERROR([$set_field field support explicitly requested but no x86_64 assembly available])
58 -- fi
59 --fi
60 - ])
61 -
62 - dnl
63 -@@ -43,7 +32,7 @@ else
64 - )])
65 - LIBS=
66 - fi
67 --if test x"$has_libcrypto" == x"yes" && test x"$has_openssl_ec" = x; then
68 -+if test x"$has_libcrypto" = x"yes" && test x"$has_openssl_ec" = x; then
69 - AC_MSG_CHECKING(for EC functions in libcrypto)
70 - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
71 - #include <openssl/ec.h>
72 -@@ -69,11 +58,4 @@ if test x"$has_gmp" != x"yes"; then
73 - CPPFLAGS="$CPPFLAGS_TEMP"
74 - LIBS="$LIBS_TEMP"
75 - fi
76 --if test x"$set_field" = x"gmp" && test x"$has_gmp" != x"yes"; then
77 -- AC_MSG_ERROR([$set_field field support explicitly requested but libgmp was not found])
78 --fi
79 --if test x"$set_bignum" = x"gmp" && test x"$has_gmp" != x"yes"; then
80 -- AC_MSG_ERROR([$set_bignum field support explicitly requested but libgmp was not found])
81 --fi
82 - ])
83 --
84 -diff --git a/configure.ac b/configure.ac
85 -index 40e121e..bd99013 100644
86 ---- a/configure.ac
87 -+++ b/configure.ac
88 -@@ -23,7 +23,7 @@ if test "x$CFLAGS" = "x"; then
89 - fi
90 -
91 - AC_PROG_CC_C99
92 --if test x"$ac_cv_prog_cc_c99" == x"no"; then
93 -+if test x"$ac_cv_prog_cc_c99" = x"no"; then
94 - AC_MSG_ERROR([c99 compiler support required])
95 - fi
96 -
97 -@@ -96,15 +96,18 @@ AC_ARG_ENABLE(endomorphism,
98 - [use_endomorphism=$enableval],
99 - [use_endomorphism=no])
100 -
101 --AC_ARG_WITH([field], [AS_HELP_STRING([--with-field=gmp|64bit|64bit_asm|32bit|auto],
102 -+AC_ARG_WITH([field], [AS_HELP_STRING([--with-field=gmp|64bit|32bit|auto],
103 - [Specify Field Implementation. Default is auto])],[req_field=$withval], [req_field=auto])
104 -
105 --AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|none|auto],
106 -+AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|no|auto],
107 - [Specify Bignum Implementation. Default is auto])],[req_bignum=$withval], [req_bignum=auto])
108 -
109 - AC_ARG_WITH([scalar], [AS_HELP_STRING([--with-scalar=64bit|32bit|auto],
110 - [Specify scalar implementation. Default is auto])],[req_scalar=$withval], [req_scalar=auto])
111 -
112 -+AC_ARG_WITH([asm], [AS_HELP_STRING([--with-asm=x86_64|no|auto]
113 -+[Specify assembly optimizations to use. Default is auto])],[req_asm=$withval], [req_asm=auto])
114 -+
115 - AC_CHECK_TYPES([__int128])
116 -
117 - AC_MSG_CHECKING([for __builtin_expect])
118 -@@ -113,40 +116,66 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[void myfunc() {__builtin_expect(0,0);}]])],
119 - [ AC_MSG_RESULT([no])
120 - ])
121 -
122 --if test x"$req_field" = x"auto"; then
123 -+if test x"$req_asm" = x"auto"; then
124 - SECP_64BIT_ASM_CHECK
125 - if test x"$has_64bit_asm" = x"yes"; then
126 -- set_field=64bit_asm
127 -+ set_asm=x86_64
128 -+ fi
129 -+ if test x"$set_asm" = x; then
130 -+ set_asm=no
131 - fi
132 -+else
133 -+ set_asm=$req_asm
134 -+ case $set_asm in
135 -+ x86_64)
136 -+ SECP_64BIT_ASM_CHECK
137 -+ if test x"$has_64bit_asm" != x"yes"; then
138 -+ AC_MSG_ERROR([x86_64 assembly optimization requested but not available])
139 -+ fi
140 -+ ;;
141 -+ no)
142 -+ ;;
143 -+ *)
144 -+ AC_MSG_ERROR([invalid assembly optimization selection])
145 -+ ;;
146 -+ esac
147 -+fi
148 -
149 -+if test x"$req_field" = x"auto"; then
150 -+ if test x"set_asm" = x"x86_64"; then
151 -+ set_field=64bit
152 -+ fi
153 - if test x"$set_field" = x; then
154 - SECP_INT128_CHECK
155 - if test x"$has_int128" = x"yes"; then
156 - set_field=64bit
157 - fi
158 - fi
159 --
160 - if test x"$set_field" = x; then
161 - SECP_GMP_CHECK
162 - if test x"$has_gmp" = x"yes"; then
163 - set_field=gmp
164 - fi
165 - fi
166 --
167 - if test x"$set_field" = x; then
168 - set_field=32bit
169 - fi
170 - else
171 - set_field=$req_field
172 - case $set_field in
173 -- 64bit_asm)
174 -- SECP_64BIT_ASM_CHECK
175 -- ;;
176 - 64bit)
177 -- SECP_INT128_CHECK
178 -+ if test x"$set_asm" != x"x86_64"; then
179 -+ SECP_INT128_CHECK
180 -+ if test x"$has_int128" != x"yes"; then
181 -+ AC_MSG_ERROR([64bit field explicitly requested but neither __int128 support or x86_64 assembly available])
182 -+ fi
183 -+ fi
184 - ;;
185 - gmp)
186 - SECP_GMP_CHECK
187 -+ if test x"$has_gmp" != x"yes"; then
188 -+ AC_MSG_ERROR([gmp field explicitly requested but libgmp not available])
189 -+ fi
190 - ;;
191 - 32bit)
192 - ;;
193 -@@ -157,11 +186,9 @@ else
194 - fi
195 -
196 - if test x"$req_scalar" = x"auto"; then
197 -- if test x"$set_scalar" = x; then
198 -- SECP_INT128_CHECK
199 -- if test x"$has_int128" = x"yes"; then
200 -- set_scalar=64bit
201 -- fi
202 -+ SECP_INT128_CHECK
203 -+ if test x"$has_int128" = x"yes"; then
204 -+ set_scalar=64bit
205 - fi
206 - if test x"$set_scalar" = x; then
207 - set_scalar=32bit
208 -@@ -171,6 +198,9 @@ else
209 - case $set_scalar in
210 - 64bit)
211 - SECP_INT128_CHECK
212 -+ if test x"$has_int128" != x"yes"; then
213 -+ AC_MSG_ERROR([64bit scalar explicitly requested but __int128 support not available])
214 -+ fi
215 - ;;
216 - 32bit)
217 - ;;
218 -@@ -187,15 +217,18 @@ if test x"$req_bignum" = x"auto"; then
219 - fi
220 -
221 - if test x"$set_bignum" = x; then
222 -- set_bignum=none
223 -+ set_bignum=no
224 - fi
225 - else
226 - set_bignum=$req_bignum
227 - case $set_bignum in
228 - gmp)
229 - SECP_GMP_CHECK
230 -+ if test x"$has_gmp" != x"yes"; then
231 -+ AC_MSG_ERROR([gmp bignum explicitly requested but libgmp not available])
232 -+ fi
233 - ;;
234 -- none)
235 -+ no)
236 - ;;
237 - *)
238 - AC_MSG_ERROR([invalid bignum implementation selection])
239 -@@ -203,14 +236,21 @@ else
240 - esac
241 - fi
242 -
243 -+# select assembly optimization
244 -+case $set_asm in
245 -+x86_64)
246 -+ AC_DEFINE(USE_ASM_X86_64, 1, [Define this symbol to enable x86_64 assembly optimizations])
247 -+ ;;
248 -+no)
249 -+ ;;
250 -+*)
251 -+ AC_MSG_ERROR([invalid assembly optimizations])
252 -+ ;;
253 -+esac
254 -+
255 - # select field implementation
256 - case $set_field in
257 --64bit_asm)
258 -- AC_DEFINE(USE_FIELD_5X52_ASM, 1, [Define this symbol to use the assembly version for the 5x52 field implementation])
259 -- AC_DEFINE(USE_FIELD_5X52, 1, [Define this symbol to use the FIELD_5X52 implementation])
260 -- ;;
261 - 64bit)
262 -- AC_DEFINE(USE_FIELD_5X52_INT128, 1, [Define this symbol to use the __int128 version for the 5x52 field implementation])
263 - AC_DEFINE(USE_FIELD_5X52, 1, [Define this symbol to use the FIELD_5X52 implementation])
264 - ;;
265 - gmp)
266 -@@ -233,7 +273,7 @@ gmp)
267 - AC_DEFINE(USE_FIELD_INV_NUM, 1, [Define this symbol to use the num-based field inverse implementation])
268 - AC_DEFINE(USE_SCALAR_INV_NUM, 1, [Define this symbol to use the num-based scalar inverse implementation])
269 - ;;
270 --none)
271 -+no)
272 - AC_DEFINE(USE_NUM_NONE, 1, [Define this symbol to use no num implementation])
273 - AC_DEFINE(USE_FIELD_INV_BUILTIN, 1, [Define this symbol to use the native field inverse implementation])
274 - AC_DEFINE(USE_SCALAR_INV_BUILTIN, 1, [Define this symbol to use the native scalar inverse implementation])
275 -@@ -258,7 +298,7 @@ esac
276 -
277 - if test x"$use_tests" = x"yes"; then
278 - SECP_OPENSSL_CHECK
279 -- if test x"$has_openssl_ec" == x"yes"; then
280 -+ if test x"$has_openssl_ec" = x"yes"; then
281 - AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available])
282 - SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS"
283 - SECP_TEST_LIBS="$CRYPTO_LIBS"
284 -@@ -281,9 +321,11 @@ if test x"$use_endomorphism" = x"yes"; then
285 - AC_DEFINE(USE_ENDOMORPHISM, 1, [Define this symbol to use endomorphism optimization])
286 - fi
287 -
288 -+AC_MSG_NOTICE([Using assembly optimizations: $set_asm])
289 - AC_MSG_NOTICE([Using field implementation: $set_field])
290 - AC_MSG_NOTICE([Using bignum implementation: $set_bignum])
291 - AC_MSG_NOTICE([Using scalar implementation: $set_scalar])
292 -+AC_MSG_NOTICE([Using endomorphism optimizations: $use_endomorphism])
293 -
294 - AC_CONFIG_HEADERS([src/libsecp256k1-config.h])
295 - AC_CONFIG_FILES([Makefile libsecp256k1.pc])
296 -@@ -291,7 +333,6 @@ AC_SUBST(SECP_INCLUDES)
297 - AC_SUBST(SECP_LIBS)
298 - AC_SUBST(SECP_TEST_LIBS)
299 - AC_SUBST(SECP_TEST_INCLUDES)
300 --AM_CONDITIONAL([USE_ASM], [test x"$set_field" == x"64bit_asm"])
301 - AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" != x"no"])
302 - AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" != x"no"])
303 -
304 -diff --git a/src/field_5x52_impl.h b/src/field_5x52_impl.h
305 -index 63176d6..a045db3 100644
306 ---- a/src/field_5x52_impl.h
307 -+++ b/src/field_5x52_impl.h
308 -@@ -16,12 +16,10 @@
309 - #include "num.h"
310 - #include "field.h"
311 -
312 --#if defined(USE_FIELD_5X52_ASM)
313 -+#if defined(USE_ASM_X86_64)
314 - #include "field_5x52_asm_impl.h"
315 --#elif defined(USE_FIELD_5X52_INT128)
316 --#include "field_5x52_int128_impl.h"
317 - #else
318 --#error "Please select field_5x52 implementation"
319 -+#include "field_5x52_int128_impl.h"
320 - #endif
321 -
322 - /** Implements arithmetic modulo FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F,
323
324 diff --git a/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20141212.ebuild b/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20141212.ebuild
325 deleted file mode 100644
326 index b9f5da8..00000000
327 --- a/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20141212.ebuild
328 +++ /dev/null
329 @@ -1,74 +0,0 @@
330 -# Copyright 1999-2015 Gentoo Foundation
331 -# Distributed under the terms of the GNU General Public License v2
332 -# $Id$
333 -
334 -EAPI=5
335 -
336 -inherit autotools eutils
337 -
338 -MyPN=secp256k1
339 -DESCRIPTION="Optimized C library for EC operations on curve secp256k1"
340 -HOMEPAGE="https://github.com/bitcoin/${MyPN}"
341 -COMMITHASH="2a53a472f24acd9ff10878b5bf21b5b27ab8060a"
342 -SRC_URI="https://github.com/bitcoin/${MyPN}/archive/${COMMITHASH}.tar.gz -> ${MyPN}-v${PV}.tgz"
343 -
344 -LICENSE="MIT"
345 -SLOT="0"
346 -KEYWORDS="amd64 arm x86"
347 -IUSE="+asm doc endomorphism gmp test"
348 -
349 -REQUIRED_USE="
350 - asm? ( amd64 )
351 -"
352 -RDEPEND="
353 - gmp? ( dev-libs/gmp:0= )
354 -"
355 -DEPEND="${RDEPEND}
356 - virtual/pkgconfig
357 - >=sys-devel/gcc-4.7
358 - test? ( dev-libs/openssl:0 )
359 -"
360 -
361 -S="${WORKDIR}/${MyPN}-${COMMITHASH}"
362 -
363 -src_prepare() {
364 - epatch "${FILESDIR}/20141212-fixes.patch"
365 - eautoreconf
366 -}
367 -
368 -src_configure() {
369 - local field
370 - if use gmp && ! use asm; then
371 - field=gmp
372 - elif use amd64; then
373 - field=64bit
374 - else
375 - field=32bit
376 - fi
377 -
378 - econf \
379 - --disable-benchmark \
380 - $(use_enable test tests) \
381 - $(use_enable endomorphism) \
382 - --with-asm=$(usex asm auto no) \
383 - --with-bignum=$(usex gmp gmp no) \
384 - --with-field=${field} \
385 - --disable-static
386 -}
387 -
388 -src_compile() {
389 - emake
390 -}
391 -
392 -src_test() {
393 - emake check
394 -}
395 -
396 -src_install() {
397 - if use doc; then
398 - dodoc README.md
399 - fi
400 -
401 - emake DESTDIR="${D}" install
402 - prune_libtool_files
403 -}
404
405 diff --git a/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20150423.ebuild b/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20150423.ebuild
406 deleted file mode 100644
407 index ac42c2b..00000000
408 --- a/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20150423.ebuild
409 +++ /dev/null
410 @@ -1,57 +0,0 @@
411 -# Copyright 1999-2016 Gentoo Foundation
412 -# Distributed under the terms of the GNU General Public License v2
413 -# $Id$
414 -
415 -EAPI=5
416 -
417 -inherit autotools eutils
418 -
419 -MyPN=secp256k1
420 -DESCRIPTION="Optimized C library for EC operations on curve secp256k1"
421 -HOMEPAGE="https://github.com/bitcoin/${MyPN}"
422 -COMMITHASH="22f60a62801a8a49ecd049e7a563f69a41affd8d"
423 -SRC_URI="https://github.com/bitcoin/${MyPN}/archive/${COMMITHASH}.tar.gz -> ${MyPN}-v${PV}.tgz"
424 -
425 -LICENSE="MIT"
426 -SLOT="0"
427 -KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
428 -IUSE="+asm doc endomorphism gmp libressl test"
429 -
430 -REQUIRED_USE="
431 - asm? ( amd64 )
432 -"
433 -RDEPEND="
434 - gmp? ( dev-libs/gmp:0= )
435 -"
436 -DEPEND="${RDEPEND}
437 - virtual/pkgconfig
438 - test? (
439 - !libressl? ( dev-libs/openssl:0= )
440 - libressl? ( dev-libs/libressl:0= )
441 - )
442 -"
443 -
444 -S="${WORKDIR}/${MyPN}-${COMMITHASH}"
445 -
446 -src_prepare() {
447 - eautoreconf
448 -}
449 -
450 -src_configure() {
451 - econf \
452 - --disable-benchmark \
453 - $(use_enable test tests) \
454 - $(use_enable endomorphism) \
455 - --with-asm=$(usex asm auto no) \
456 - --with-bignum=$(usex gmp gmp no) \
457 - --disable-static
458 -}
459 -
460 -src_install() {
461 - if use doc; then
462 - dodoc README.md
463 - fi
464 -
465 - emake DESTDIR="${D}" install
466 - prune_libtool_files
467 -}