summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-09-14 03:31:25 +0100
committerSam James <sam@gentoo.org>2023-09-14 03:31:25 +0100
commitd9c6ecaf79461a5f27dbb4c826ac73129d6788cf (patch)
treefae2b24861427f7c9f0ddc9d2391f48a576e1e7d /dev-libs
parentsys-apps/texinfo: drop 7.0.91 (diff)
downloadgentoo-d9c6ecaf79461a5f27dbb4c826ac73129d6788cf.tar.gz
gentoo-d9c6ecaf79461a5f27dbb4c826ac73129d6788cf.tar.bz2
gentoo-d9c6ecaf79461a5f27dbb4c826ac73129d6788cf.zip
dev-libs/libsodium: add 1.0.19
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libsodium/Manifest2
-rw-r--r--dev-libs/libsodium/libsodium-1.0.19.ebuild88
2 files changed, 90 insertions, 0 deletions
diff --git a/dev-libs/libsodium/Manifest b/dev-libs/libsodium/Manifest
index efe46dd1e3f7..35b788ea8cb1 100644
--- a/dev-libs/libsodium/Manifest
+++ b/dev-libs/libsodium/Manifest
@@ -1,2 +1,4 @@
DIST libsodium-1.0.18_p20220618.tar.gz 1869858 BLAKE2B 60d46f722c4e5c9896226e3e03c31768a2183bae80a535234b23ac5bc9a2c3632d6c891ce72cbc1d6dc633a15b539111e322c2d210f993f99d6e5bd32f8a8b63 SHA512 14d1c6109de2ac02ba6cb5541746275f6deb25302b60cb3f65a7922b34d2c3bd5f17a4d730acf77a53d5837be00228c68fa06c6a2e9095ea97f6d8c4b782ab6b
DIST libsodium-1.0.18_p20220618.tar.gz.minisig 318 BLAKE2B a2cba3c62ca5a84e7897373cdfe4033c636c652c848bf9beff15765d359f1dd2a8834dc3a4d4443d0b9418a59a94309cf9c5c917ae9c8965778411e21f98e4e6 SHA512 ca1ac892b41c5cb6dd1ba9d4bbde8e75987e66023d29cfc81839bbb3b99efa215f7db1ef903c375dd9d2d5a76f6064b3c7eab833081d21983693b7db87175160
+DIST libsodium-1.0.19.tar.gz 1945523 BLAKE2B de43520150b55760142d186404cc3e49471c6e911a7a590c7ae08bc61e928c063c459555f49cd88155238fb0008ef3924b6d7c14ba9cff2f90f1e96201e1259c SHA512 8e9b6d796f6330e00921ce37f1b43545966094250938626ae227deef5fd1279f2fc18b5cd55e23484732a27df4d919cf0d2f07b9c2f1aa0c0ef689e668b0d439
+DIST libsodium-1.0.19.tar.gz.minisig 318 BLAKE2B e86e653107478d9e9281894632baafda57358229f2d56fcaf55591098e38d6be72ed2f599a7f2c16d5b9978d2cbfe8e07db4e772b053a832a61fd325fc1efae4 SHA512 8b5993bd7e541a5913ea1659c1009c4edefd9b5907e0a7c9090fa604c23d77006ad9d9a897d66243162742d63ce9bc1f2c81091d50a584f1495dd3bd87d4451e
diff --git a/dev-libs/libsodium/libsodium-1.0.19.ebuild b/dev-libs/libsodium/libsodium-1.0.19.ebuild
new file mode 100644
index 000000000000..124dae6f5cba
--- /dev/null
+++ b/dev-libs/libsodium/libsodium-1.0.19.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools multilib-minimal
+
+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 )
+ "
+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
+
+S="${WORKDIR}"/${PN}-stable
+
+LICENSE="ISC"
+SLOT="0/23"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos"
+IUSE="+asm minimal static-libs +urandom verify-sig"
+
+CPU_USE=( cpu_flags_x86_{aes,sse4_1} )
+IUSE+=" ${CPU_USE[@]}"
+
+BDEPEND=" verify-sig? ( app-crypt/minisign )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.0.10-cpuflags.patch
+)
+
+src_unpack() {
+ # TODO: Could verify-sig.eclass support minisig? bug #783066
+ MINISIGN_KEY="RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"
+
+ if use verify-sig ; then
+ ebegin "Verifying signature using app-crypt/minisign"
+ minisign -V \
+ -P ${MINISIGN_KEY} \
+ -x "${DISTDIR}"/${P}.tar.gz.minisig \
+ -m "${DISTDIR}"/${P}.tar.gz
+ eend $? || die "Failed to verify distfile using minisign!"
+ fi
+
+ default
+}
+
+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 minimal)
+ $(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
+}