Skip to content

Commit 5feffcd

Browse files
committed
dev-libs/libsecp256k1: drop "precompute-ecmult" USE flag
And change the ecmult window size for USE="lowmem" from 2 to 4. Suggested-by: Tim Ruffing <[email protected]> See: bitcoin-core/secp256k1#1159 (comment) See: https://gitlab.com/bitcoin/gentoo/-/commit/6e39601a748f3465f66a38e7989e7414a4a1d9c0 Signed-off-by: Matt Whitlock <[email protected]>
1 parent bc5d054 commit 5feffcd

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

dev-libs/libsecp256k1/libsecp256k1-0.1_pre20201028.ebuild dev-libs/libsecp256k1/libsecp256k1-0.1_pre20201028-r1.ebuild

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 1999-2021 Gentoo Authors
1+
# Copyright 1999-2023 Gentoo Authors
22
# Distributed under the terms of the GNU General Public License v2
33

44
EAPI=7
@@ -14,13 +14,12 @@ SRC_URI="https://github.com/bitcoin-core/${MyPN}/archive/${COMMITHASH}.tar.gz ->
1414
LICENSE="MIT"
1515
SLOT="0"
1616
KEYWORDS="amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
17-
IUSE="+asm ecdh +experimental +extrakeys gmp lowmem precompute-ecmult +schnorr +recovery test test-openssl valgrind"
17+
IUSE="+asm ecdh +experimental +extrakeys gmp lowmem +recovery +schnorr test test-openssl valgrind"
1818
RESTRICT="!test? ( test )"
1919

2020
REQUIRED_USE="
2121
asm? ( || ( amd64 arm ) arm? ( experimental ) )
2222
extrakeys? ( experimental )
23-
?? ( lowmem precompute-ecmult )
2423
schnorr? ( experimental extrakeys )
2524
test-openssl? ( test )
2625
"
@@ -63,8 +62,7 @@ src_configure() {
6362
--with-bignum=$(usex gmp gmp no) \
6463
$(use_enable recovery module-recovery) \
6564
$(use_enable schnorr module-schnorrsig) \
66-
$(usex lowmem '--with-ecmult-window=2 --with-ecmult-gen-precision=2' '') \
67-
$(usex precompute-ecmult '--with-ecmult-window=24 --with-ecmult-gen-precision=8' '') \
65+
$(usex lowmem '--with-ecmult-window=4 --with-ecmult-gen-precision=2' '') \
6866
$(use_with valgrind) \
6967
--disable-static
7068
}

dev-libs/libsecp256k1/libsecp256k1-0.2.0-r1.ebuild dev-libs/libsecp256k1/libsecp256k1-0.2.0-r2.ebuild

+2-4
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ SRC_URI="https://github.com/bitcoin-core/secp256k1/archive/v${PV}.tar.gz -> ${P}
1313
LICENSE="MIT"
1414
SLOT="0/1" # subslot is "$((_LIB_VERSION_CURRENT-_LIB_VERSION_AGE))" from configure.ac
1515
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
16-
IUSE="+asm +ecdh experimental +extrakeys lowmem precompute-ecmult +schnorr +recovery test valgrind"
16+
IUSE="+asm +ecdh experimental +extrakeys lowmem +recovery +schnorr test valgrind"
1717
RESTRICT="!test? ( test )"
1818

1919
REQUIRED_USE="
20-
?? ( lowmem precompute-ecmult )
2120
asm? ( || ( amd64 arm ) arm? ( experimental ) )
2221
schnorr? ( extrakeys )
2322
"
@@ -46,8 +45,7 @@ src_configure() {
4645
$(use_enable {,module-}extrakeys)
4746
$(use_enable {,module-}recovery)
4847
$(use_enable schnorr module-schnorrsig)
49-
$(usev lowmem '--with-ecmult-window=2 --with-ecmult-gen-precision=2')
50-
$(usev precompute-ecmult '--with-ecmult-window=24 --with-ecmult-gen-precision=8')
48+
$(usev lowmem '--with-ecmult-window=4 --with-ecmult-gen-precision=2')
5149
$(use_with valgrind)
5250
)
5351
if use asm; then

dev-libs/libsecp256k1/metadata.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
<flag name="endomorphism">Enable endomorphism</flag>
1616
<flag name="experimental">Allow experimental USE flags</flag>
1717
<flag name="extrakeys">Enable extrakeys module</flag>
18-
<flag name="lowmem">Reduce runtime memory usage at the expense of performance (ecmult window size 2, gen precision 2)</flag>
19-
<flag name="precompute-ecmult">Use over 512 MB memory at runtime for better performance (ecmult window size 24, gen precision 8)</flag>
18+
<flag name="lowmem">Reduce runtime memory usage at the expense of performance (ecmult window size 4, gen precision 2)</flag>
2019
<flag name="recovery">Enable ECDSA pubkey recovery module</flag>
2120
<flag name="schnorr">Enable Schnorr signature module</flag>
2221
<flag name="test-openssl">Enable OpenSSL comparison tests</flag>

0 commit comments

Comments
 (0)