diff options
Diffstat (limited to 'dev-libs/libsodium')
-rw-r--r-- | dev-libs/libsodium/Manifest | 4 | ||||
-rw-r--r-- | dev-libs/libsodium/files/libsodium-1.0.19-cpuflags.patch | 40 | ||||
-rw-r--r-- | dev-libs/libsodium/libsodium-1.0.19_p20240117.ebuild | 77 |
3 files changed, 121 insertions, 0 deletions
diff --git a/dev-libs/libsodium/Manifest b/dev-libs/libsodium/Manifest index 68aeb20d2c20..8c9d8cd0af95 100644 --- a/dev-libs/libsodium/Manifest +++ b/dev-libs/libsodium/Manifest @@ -1,9 +1,13 @@ AUX libsodium-1.0.10-cpuflags.patch 1232 BLAKE2B 07d8d993af926db81135b6366fc2219b52c82d3e04abe7208bddcc62b4ec9db5dc9480f7c3c40b6d750a4d5465942b49e4d3840189bf92586a93d99f7510e254 SHA512 0559e5073c3238d887fc34a9f9cd78bde6d628e36c8741ff8bdd0e7db5bca4f510e3b0e2b858c0ecb83433b3cb74ad1c957c61d68ae406843f42139af8b382fd +AUX libsodium-1.0.19-cpuflags.patch 1448 BLAKE2B 36a54f26c3e8522109e39e08908291d461de8fe25c554c34d87b0487f07f25cb74f1ef93d567da0cc5695868c1bb83ee073f28956292aa467ce95d48bb5fde02 SHA512 8fcf8b59ca151eb8604ae4ea5ab55f9005a125eb4eb7e0493e01862ddbcbfc2eb3a17e4d4c043a311af84b90717bd979019d380de045bf7829a92f94d7b63f95 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 +DIST libsodium-1.0.19_p20240117.tar.gz 1946650 BLAKE2B 6faa56733ed28f34d58b41a71a41d6ba6369e2f5686e01169f83d5fe955523825bd250cfd59e15515b24f67cef1610af41749b6f56bc370e7f77708a86bd7684 SHA512 2cefd883b60fba5522bf4a6f3c73f9bc54164340400377089eea8fbb01447f1137fcb7f6183845a6c5e2aad51982122a356272b4eda5452d7b550a65aa576140 +DIST libsodium-1.0.19_p20240117.tar.gz.minisig 318 BLAKE2B f951b547f53b2569ed1493dcdbff1cc93519437f56cdf97a764d61a7e1fa98b383b49d4f4a9c4b7b199e2060037971f293796e641bd689c9cd6c7ae2c90b7a20 SHA512 202f9686fabcb7b362923b7f1eeac8544c5f21e7eaa0b4cdd7329733a62a5ec9efd18713bc63187055149525a066540a6904776870d718fd3b238b71ba4b9a35 EBUILD libsodium-1.0.18_p20220618.ebuild 1998 BLAKE2B c0971b1d0f9e13ee2365093c311cd6a7186de26a557461b66111a8e9f75691e8ce4318a285074cd873d3e122b15be2f646bd341b261220f94e0fe170ddc21b0b SHA512 1c0e04a0540c2bb0fc9e6f141c370c28a5c20e086f32cf5548cb6d73937ab2bcc4305d973d248b476a4c932b8450f4462e25185c1f82cefa6aff091abd538221 EBUILD libsodium-1.0.19-r1.ebuild 1998 BLAKE2B 50b3fc86c63c7721fd3a3d3bda38648fed17127558c34b6e08e3e025fb47550748aaffe614d8393833c6cc4d433079b854411ae0000029fb79fdeb2876744071 SHA512 165a6d4bfba97d9049af1f9a06160a7d92aec6bc7d23205d2ab1c860a17b3310d305cf8bc16919935503a4ee67ba3cffe347c374b0c1f842909a3b50826100a2 EBUILD libsodium-1.0.19-r2.ebuild 1974 BLAKE2B 3814694f707d21f0fbc970b3fd2ac11e69ef4297571adcb7405210ca96a7ec73e37de64a12a761c17d8b17cb1adc6b18bfe0beb6e3c12c9fb7ca1cdf7938ce45 SHA512 2564b9ed2ab21e30b82439bea675960371e269a5148644bf8bc6da9735aca9376f34dcfcaf48ba6aee871d38d96df76e94e685a795f26b6e4c8f0ef301128813 +EBUILD libsodium-1.0.19_p20240117.ebuild 2053 BLAKE2B 044f5f9f1b000452254cc6c47e0ddb765b5c7373c2dbc36d7ce233c904db618071748c5486238e28f9b6edda51f33415e03d7e903c4815703fd9c212e93a31c8 SHA512 ee3f730a2875ef9e7054832f774bf55b972873111c6e18a0c995f39063074ce7b0b686ce5104e6a84fc76999726136ef0e454a6405e2fee8762efc33e4e2632c MISC metadata.xml 806 BLAKE2B 069f36bae588b263d664f00b50c9a0f4c2348b1a1f0ff2e5c5902217ccf14a81e648997fae2f789220d5b9fa5aef440a7c0526918a7d7f402870dd80067e3744 SHA512 1902268ec9dbb312b9740f9bc9b2df5e66f50dc066ba281b438fbf6d2b5317c589c587305c400c929c068af95c30918fde7a6324ab53b76503ef183aab034886 diff --git a/dev-libs/libsodium/files/libsodium-1.0.19-cpuflags.patch b/dev-libs/libsodium/files/libsodium-1.0.19-cpuflags.patch new file mode 100644 index 000000000000..a2fa6a42df38 --- /dev/null +++ b/dev-libs/libsodium/files/libsodium-1.0.19-cpuflags.patch @@ -0,0 +1,40 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -524,6 +524,10 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [ + [AC_MSG_RESULT(no)]) + CFLAGS="$oldcflags" + ++AC_ARG_ENABLE(sse4_1, [AS_HELP_STRING(--disable-sse4_1,Do not use sse4.1 code)], ++ AS_IF([test "x$enableval" = "xyes"], check_sse4_1="yes", check_sse4_1="no"), ++ check_sse4_1="yes") ++AS_IF([test "$check_sse4_1" = "yes"],[ + oldcflags="$CFLAGS" + AX_CHECK_COMPILE_FLAG([-msse4.1], [CFLAGS="$CFLAGS -msse4.1"]) + AC_MSG_CHECKING(for SSE4.1 instructions set) +@@ -536,6 +540,7 @@ AS_IF([test "x$EMSCRIPTEN" = "x"], [ + AX_CHECK_COMPILE_FLAG([-msse4.1], [CFLAGS_SSE41="-msse4.1"])], + [AC_MSG_RESULT(no)]) + CFLAGS="$oldcflags" ++ ]) + + oldcflags="$CFLAGS" + AX_CHECK_COMPILE_FLAG([-mavx], [CFLAGS="$CFLAGS -mavx"]) +@@ -609,6 +614,10 @@ __m512i y = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), + ]) + CFLAGS="$oldcflags" + ++AC_ARG_ENABLE(aesni, [AS_HELP_STRING(--disable-aesni,Do not use aesni code)], ++ AS_IF([test "x$enableval" = "xyes"], check_aesni="yes", check_aesni="no"), ++ check_aesni="yes") ++AS_IF([test "$check_aesni" = "yes"],[ + oldcflags="$CFLAGS" + AX_CHECK_COMPILE_FLAG([-maes], [CFLAGS="$CFLAGS -maes"]) + AX_CHECK_COMPILE_FLAG([-mpclmul], [CFLAGS="$CFLAGS -mpclmul"]) +@@ -640,6 +649,7 @@ __m512i y = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), + ], + [AC_MSG_RESULT(no)]) + CFLAGS="$oldcflags" ++ ]) + + ]) + diff --git a/dev-libs/libsodium/libsodium-1.0.19_p20240117.ebuild b/dev-libs/libsodium/libsodium-1.0.19_p20240117.ebuild new file mode 100644 index 000000000000..bb62d58a0e8c --- /dev/null +++ b/dev-libs/libsodium/libsodium-1.0.19_p20240117.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2024 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 ) + " +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/26" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~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 +} |