mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 12:16:41 +02:00
dev-libs/libsodium: Sync with Gentoo
It's from Gentoo commit e328c5f5f6c1d22069ac5d60c66fde5e68a6a0fb. Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
This commit is contained in:
parent
714d3e40eb
commit
5f75595695
@ -1,2 +1,4 @@
|
||||
DIST libsodium-1.0.20.tar.gz 1925167 BLAKE2B 2f1d8b2dc8a65f95433132b12bdccb7e0e4750326b05c4f42ddd3a74bf568faa2515384bfe94bba2ef420aff35c515d3d44945ea5a68f72e6a73b3a9b5bb234c SHA512 7ea165f3c1b1609790e30a16348b9dfdc5731302da00c07c65e125c8ab115c75419a5631876973600f8a4b560ca2c8267001770b68f2eb3eebc9ba095d312702
|
||||
DIST libsodium-1.0.20.tar.gz.minisig 318 BLAKE2B b5939a9ca9b25332c39484b3ef02ced54aa75b2dc732d384d4f42daa0b6bd276f0c3359a8cbe8c97d8ab76b8c49e9f66959dcf350e3cf00fae10a279826109ae SHA512 fc5a4282093d58eb42559f88ccf75ea3788449afda9d882d313714e448e78ef11c22ff1e52091af026f6bf3ba01917d606040b1dca240dd1a32278c901b4affb
|
||||
DIST libsodium-1.0.20_p20250606.tar.gz 1987810 BLAKE2B d423f516312fa1108b7e49b9c69d49abc3ebb2db5e6d81698e08ded33a2f11079738d261be7e8bd5ff87080cb6e225ee7c32d9ebf2bf8cc840c4e04454621987 SHA512 afe584c735e439202f6168032800b30afed9b15cf24305043a8fcb9356ba812f3f13e08e8d99ba2da4711da2390d2d7d6c2598285ac3dc1056d48588ba743c76
|
||||
DIST libsodium-1.0.20_p20250606.tar.gz.minisig 318 BLAKE2B 131ed9064a414e2f7dd7a2509c367eceed2784e47a903262e4c037d27ca5809e343943e26a5e87eb9a00be122393acc920861797ac303ab7bf005a74a1bf02a0 SHA512 cafcdcc2de7e34a57f9bd8ae526ed22b3310467e89a51d68035feb298bfff30e6d2ea9100973de18eb3abc11b70d0b05238a726afacbe621287cfac509503dcb
|
||||
|
||||
@ -0,0 +1,76 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libsodium.minisig
|
||||
VERIFY_SIG_METHOD=minisig
|
||||
inherit autotools multilib-minimal verify-sig
|
||||
|
||||
DESCRIPTION="Portable fork of NaCl, a higher-level cryptographic library"
|
||||
HOMEPAGE="https://libsodium.org"
|
||||
|
||||
if [[ ${PV} == *_p* ]] ; then
|
||||
MY_P=${PN}-$(ver_cut 1-3)-stable-$(ver_cut 5-)
|
||||
|
||||
# We use _pN to represent 'stable releases'
|
||||
# These are backports from upstream to the last release branch
|
||||
# See https://download.libsodium.org/libsodium/releases/README.html
|
||||
SRC_URI="
|
||||
https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_P}.tar.gz -> ${P}.tar.gz
|
||||
verify-sig? ( https://dev.gentoo.org/~sam/distfiles/dev-libs/libsodium/${MY_P}.tar.gz.minisig -> ${P}.tar.gz.minisig )
|
||||
"
|
||||
S="${WORKDIR}"/${PN}-stable
|
||||
else
|
||||
SRC_URI="
|
||||
https://download.libsodium.org/${PN}/releases/${P}.tar.gz
|
||||
verify-sig? ( https://download.libsodium.org/${PN}/releases/${P}.tar.gz.minisig )
|
||||
"
|
||||
fi
|
||||
|
||||
LICENSE="ISC"
|
||||
SLOT="0/26"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
|
||||
IUSE="+asm static-libs +urandom"
|
||||
|
||||
CPU_USE=( cpu_flags_x86_{aes,sse4_1} )
|
||||
IUSE+=" ${CPU_USE[@]}"
|
||||
|
||||
BDEPEND=" verify-sig? ( sec-keys/minisig-keys-libsodium )"
|
||||
|
||||
QA_CONFIG_IMPL_DECL_SKIP=(
|
||||
_rdrand64_step # depends on target, bug #924154
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-1.0.19-cpuflags.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_enable asm)
|
||||
$(use_enable cpu_flags_x86_aes aesni)
|
||||
$(use_enable cpu_flags_x86_sse4_1 sse4_1)
|
||||
$(use_enable static-libs static)
|
||||
$(use_enable !urandom blocking-random)
|
||||
)
|
||||
|
||||
# --disable-pie is needed on x86, see bug #512734
|
||||
# TODO: Check if still needed?
|
||||
if [[ ${ABI} == x86 ]] ; then
|
||||
myeconfargs+=( --disable-pie )
|
||||
fi
|
||||
|
||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
multilib_src_install_all() {
|
||||
default
|
||||
find "${ED}" -type f -name "*.la" -delete || die
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user