From 42a19dc5aa15c368f1ff1c515059ac12494b4cb2 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 21 Oct 2022 10:27:14 +0200 Subject: [PATCH] dev-libs/nettle: Sync with Gentoo It's from Gentoo commit 5cbd73313ea7907047e614d4b3009eea044f0fad. --- .../portage-stable/dev-libs/nettle/Manifest | 3 +- .../dev-libs/nettle/metadata.xml | 1 + .../dev-libs/nettle/nettle-3.7.3.ebuild | 67 --------------- .../dev-libs/nettle/nettle-3.8.1.ebuild | 84 +++++++++++++++++++ 4 files changed, 87 insertions(+), 68 deletions(-) delete mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.7.3.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.8.1.ebuild diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/Manifest b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/Manifest index bdf71382ac..e7503051d5 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/Manifest @@ -1 +1,2 @@ -DIST nettle-3.7.3.tar.gz 2383985 BLAKE2B 8d8efbbff98fc1f3eff3296681d3d72346e78392f356aebfe80138ae6ae1ebf3695bd7f74b906beef0cf3625ba6d84bdb43c0f6707f54f4d98870d50c90ac9a3 SHA512 9901eba305421adff6d551ac7f478dff3f68a339d444c776724ab0b977fe6be792b1d2950c8705acbe76bd924fd6d898a65eded546777884be3b436d0e052437 +DIST nettle-3.8.1.tar.gz 2406251 BLAKE2B 22b4ec81645b579504356597ba87b637e46285682020c90e03ecaea386ac9b48eaf91ee76ae3b86b6060be355de20c320ab3b74958074ad23fc08ad9ab6a4cbb SHA512 a405da3438d185d96917b03b00abb9ab43e04f58f770f657f716c25d64bb258ee170a71328e74736caa7121f50c0c89d3cc840c1201d2a92cfaf1357d24bdc6a +DIST nettle-3.8.1.tar.gz.sig 374 BLAKE2B e2bfce4aaa1be114fb9bf8724f25db75c69c3b98538df46e9b1428ce615f7db3b9e9f9240d232fddac195db4568439b3f58989c20beca82aa6db79f4956db547 SHA512 978304b1faa5adc3b0d6ea7e9597af6154ad5d6e328913ac19184ece94771fdb2a7d5ce0af535ae8d28cb6ccd94fb3d4ef2613c0356df9e08b5d4c26ea646e09 diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/metadata.xml index a654b0cda0..62b7968b92 100644 --- a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/metadata.xml @@ -7,6 +7,7 @@ cpe:/a:nettle_project:nettle + gnutls/nettle Support assembly hand optimized crypto functions (i.e. faster run time) diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.7.3.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.7.3.ebuild deleted file mode 100644 index 88f5f2c3fe..0000000000 --- a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.7.3.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools multilib-build multilib-minimal toolchain-funcs - -DESCRIPTION="Low-level cryptographic library" -HOMEPAGE="http://www.lysator.liu.se/~nisse/nettle/" -SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" - -LICENSE="|| ( LGPL-3 LGPL-2.1 )" -SLOT="0/8-6" # subslot = libnettle - libhogweed soname version -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="+asm doc +gmp static-libs test cpu_flags_x86_aes cpu_flags_arm_neon cpu_flags_x86_sha" -RESTRICT="!test? ( test )" - -DEPEND="gmp? ( >=dev-libs/gmp-6.1:0=[static-libs?,${MULTILIB_USEDEP}] )" -RDEPEND="${DEPEND}" -BDEPEND="doc? ( sys-apps/texinfo )" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/nettle/version.h -) - -DOCS=() -HTML_DOCS=() - -pkg_setup() { - use doc && DOCS+=( - nettle.pdf - ) - use doc && HTML_DOCS+=( - nettle.html - ) -} - -src_prepare() { - default - - # I do not see in config.sub reference to sunldsolaris. - # if someone complains readd - # -e 's/solaris\*)/sunldsolaris*)/' \ - sed -e '/CFLAGS=/s: -ggdb3::' \ - -i configure.ac || die - - eautoreconf -} - -multilib_src_configure() { - local myeconfargs=( - CC_FOR_BUILD="$(tc-getBUILD_CC)" - $(tc-is-static-only && echo --disable-shared) - $(use_enable cpu_flags_x86_aes x86-aesni) - $(use_enable cpu_flags_x86_sha x86-sha-ni) - $(use_enable asm assembler) - $(use_enable doc documentation) - $(use_enable gmp public-key) - $(use_enable cpu_flags_arm_neon arm-neon) - $(use_enable static-libs static) - --disable-fat - # --disable-openssl bug #427526 - --disable-openssl - --libdir="${EPREFIX}"/usr/$(get_libdir) - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" -} diff --git a/sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.8.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.8.1.ebuild new file mode 100644 index 0000000000..b342934797 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-libs/nettle/nettle-3.8.1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/nettle.asc +inherit multilib-build multilib-minimal toolchain-funcs verify-sig + +DESCRIPTION="Low-level cryptographic library" +HOMEPAGE="http://www.lysator.liu.se/~nisse/nettle/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" +SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.gz.sig )" + +LICENSE="|| ( LGPL-3 LGPL-2.1 )" +# Subslot = libnettle - libhogweed soname version +SLOT="0/8-6" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+asm doc +gmp static-libs cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_x86_aes cpu_flags_x86_sha cpu_flags_x86_pclmul" +# The arm64 crypto option controls AES, SHA1, and SHA2 usage. +REQUIRED_USE="cpu_flags_arm_aes? ( cpu_flags_arm_sha1 cpu_flags_arm_sha2 ) + cpu_flags_arm_sha1? ( cpu_flags_arm_aes cpu_flags_arm_sha2 ) + cpu_flags_arm_sha2? ( cpu_flags_arm_aes cpu_flags_arm_sha1 )" + +DEPEND="gmp? ( >=dev-libs/gmp-6.1:0=[static-libs?,${MULTILIB_USEDEP}] )" +RDEPEND="${DEPEND}" +BDEPEND=" + sys-devel/m4 + doc? ( sys-apps/texinfo ) + verify-sig? ( sec-keys/openpgp-keys-nettle ) +" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/nettle/version.h +) + +DOCS=() +HTML_DOCS=() + +src_prepare() { + default + + # I do not see in config.sub reference to sunldsolaris. + # if someone complains readd + # -e 's/solaris\*)/sunldsolaris*)/' \ + sed -e '/CFLAGS=/s: -ggdb3::' \ + -i configure.ac configure || die + + if use doc ; then + DOCS+=( nettle.pdf ) + HTML_DOCS+=( nettle.html ) + fi +} + +multilib_src_configure() { + local myeconfargs=( + CC_FOR_BUILD="$(tc-getBUILD_CC)" + + $(tc-is-static-only && echo --disable-shared) + + # Intrinsics + $(use_enable cpu_flags_arm_neon arm-neon) + $(use_enable cpu_flags_arm_aes arm64-crypto) + $(use_enable cpu_flags_ppc_altivec power-altivec) + $(use_enable cpu_flags_x86_aes x86-aesni) + $(use_enable cpu_flags_x86_sha x86-sha-ni) + $(use_enable cpu_flags_x86_pclmul x86-pclmul) + # TODO: PPC crypto flag? + --disable-power-crypto-ext + # TODO: cpu_flags_s390? + --disable-s390x-vf + --disable-s390x-msa + + $(use_enable asm assembler) + $(multilib_native_use_enable doc documentation) + $(use_enable gmp public-key) + $(use_enable static-libs static) + --disable-fat + + # openssl is just used for benchmarks (bug #427526) + --disable-openssl + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +}