From 4cbcc855382a06088e2f016f62cafdbcb7e40665 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 20 Mar 2022 00:40:44 +0000 Subject: gentoo resync : 20.03.2022 --- dev-libs/libgcrypt/Manifest | 12 +- ...gcrypt-1.10.0-musl-jitterentropy-includes.patch | 26 +++++ dev-libs/libgcrypt/libgcrypt-1.10.0.ebuild | 129 +++++++++++++++++++++ dev-libs/libgcrypt/libgcrypt-1.8.7.ebuild | 77 ------------ dev-libs/libgcrypt/libgcrypt-1.8.9.ebuild | 95 +++++++++++++++ dev-libs/libgcrypt/libgcrypt-1.9.4-r1.ebuild | 128 ++++++++++++++++++++ dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild | 117 ------------------- 7 files changed, 387 insertions(+), 197 deletions(-) create mode 100644 dev-libs/libgcrypt/files/libgcrypt-1.10.0-musl-jitterentropy-includes.patch create mode 100644 dev-libs/libgcrypt/libgcrypt-1.10.0.ebuild delete mode 100644 dev-libs/libgcrypt/libgcrypt-1.8.7.ebuild create mode 100644 dev-libs/libgcrypt/libgcrypt-1.8.9.ebuild create mode 100644 dev-libs/libgcrypt/libgcrypt-1.9.4-r1.ebuild delete mode 100644 dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild (limited to 'dev-libs/libgcrypt') diff --git a/dev-libs/libgcrypt/Manifest b/dev-libs/libgcrypt/Manifest index 0f43c2bbda72..93680bdfd90d 100644 --- a/dev-libs/libgcrypt/Manifest +++ b/dev-libs/libgcrypt/Manifest @@ -1,11 +1,17 @@ +AUX libgcrypt-1.10.0-musl-jitterentropy-includes.patch 723 BLAKE2B 8cfd1f1026e7252de843cb4ca8df68ac2735a332be956b116dd3dab3330d216bfa1e0cce8a9d93f5caf88ea4b053c2765167a7646bab3c2850ad0c469e395e50 SHA512 6cde4a5235ae5f42f2affd28acba5509825aa190beb8e2324b9efc756b61245b57ad556f9f819295b66840a00a57bd1e585ea835860c0d8dd9bdeb6a9b832513 AUX libgcrypt-1.6.1-uscore.patch 843 BLAKE2B a1023bf915e342dd52d07d4c497d3e514c8c4b6c621e4f8704c4841fd95d48773f0af850a456c6f80b80deed878be1334f08f8181f97dce64ed9e61f5cb1bae5 SHA512 971814ac34f17464a96fbc110fe995923d873981949a0126e50c206d39499d6146fd00414e837774e6932e4b491cc68c4147278d6216dda630fb876bc8f61791 AUX libgcrypt-1.9.4-arm-neon-compile-fix.patch 1389 BLAKE2B 548fc764050f322786f3c0ec8f806a6a897987115db0cfd8a2a4f1ffc134a31e9069dca4e334a7a5288f5176ce8e2e8450dc2003c56915d5fdd4dc3c11012c0a SHA512 0b83ab2585502d65d1ccf36440f4a73aa9a9d3a8cb40375ca6a4e81fcc962040fb233df9a345c823281605c061b8ea0e509e0e16a5c3a32581a279e5904bbfd0 AUX libgcrypt-multilib-syspath.patch 588 BLAKE2B 6a8d30246263339571455df3c1cccfc9f38e50117cef34bc92ce37a296c3e31017c0190923ea992f51706c55a63c6f75b1d9fc7d8d40930707486f419e1795c4 SHA512 913c1a474aba50ec3589fb5a991f65204ba2cc28203b92353fdef8fb092350c3be814a57f29a26a2176627509a4f573f6db02ebdbcde3f04a2f1d632879293dc AUX libgcrypt-powerpc-darwin.patch 444 BLAKE2B 37b95d21f0df07c5c06cd7e1e1efe73d02b9ac59dfe2a31d43b7a535bed356ff24095d528662d58a0cdc9c3eb25de50b5b5a4d9feb0ddb917a42f9332b33982e SHA512 2a2e7e84222f4672a70df827955bb8592e714580fecf6b5238e131038460169f9d80fd04d63d6e232f6fc448c04e0acf214993537ef22e297ea98a4d12c6ade5 -DIST libgcrypt-1.8.7.tar.bz2 2985660 BLAKE2B cb2132b826f3f3af240e6c9ac5fd992808aa17ce64144d17452591a5b1e402564af82c021b58f5fd620ebeb5894ac9654835f6d8376ec05ee41fc02189dd6825 SHA512 6309d17624d8029848990d225d5924886c951cef691266c8e010fbbb7f678972cee70cbb91d370ad0bcdc8c8761402a090c2c853c9427ec79293624a59da5060 +DIST libgcrypt-1.10.0.tar.bz2 3774491 BLAKE2B 7ebeced542c19de7a23fc16b03b030f535097665d3304817219744e2e5f9d02cadaa811ab24bfa3b706776b586daf6f0266b444a1a7c4eb8756ae0d7319e05fa SHA512 785c2e14272308956bb6adcea9567c4097edf103122e18cd3907fb42a110a48a5d59c0057f05a438acd7f221c70c7f7ff87e176bd6d7ed99d16e847f9d7be087 +DIST libgcrypt-1.10.0.tar.bz2.sig 119 BLAKE2B 3d19256687993a38384934c4d9c3a4e7ac0cc11c2e9ff901d3432d7145d39a561904ca5879651a4e26ad4bfc105ee3d39f47d4eb7d0da3a5f15d605f2e33c5ac SHA512 75201612225b206faaae284297e92d1b25dcaf0665bcf1f4c5cc9a3a750a803063d0f7bd0af556dbe419f1276c953ce047554fd18a144a90085a42a7ec885168 DIST libgcrypt-1.8.8.tar.bz2 2987685 BLAKE2B 7b590c06d91403f1bbfa108379b3747271e9c83acc5547a4d43ef9ada9b0b7c78654cdc24f6cd0db012d50628ae4ec9320dcb63a901ec2dadde6a7ed56dbed7e SHA512 9861f3b5da3cb013eb79efbf2859864f8c2c11b41484b051c981c45cc0bf1569202838226da10ebddeb7a7b7f39ebd3a95f107b9bf6f908074ccc9a51ea94db8 +DIST libgcrypt-1.8.9.tar.bz2 2988243 BLAKE2B d778bc3007dfcc08f3fab0325609911aa2cde5eb46703fab11f0fdfaf4670a9fde0634b40eb408957a9942e9d3fb0a69290c0878bed59770ffe56bbe6103bcf3 SHA512 6d5a06c5bded61cc740b7883a011e65fd8d878d446160714f26cd42203a32a134ccb302e7577762ae43fec4887cdb6fb4b5413e77614c9e4cfba15ae0a093516 +DIST libgcrypt-1.8.9.tar.bz2.sig 119 BLAKE2B 147fd4701eb5c91c43e1ca21f56b36f8d999c5b1a23bb2f454a05e1ef657a4a96c06b27f2d5c867c8adb9764b9d6d80480a69160b2cd2ad1704c1ff18a37fac5 SHA512 785cb3b3950e6b7102d81cee3690b99b11aa60102ab4333370e60874ad8bbdb2f89ce1b5e0ce9215adce1cdc2a3fe84bb7a92a80830594aa3f74e4129d16ad95 DIST libgcrypt-1.9.4.tar.bz2 3239704 BLAKE2B b8244bc12a68955797b0c2b474ac5c95df1014231f7180a2ffa113e3aacedc98eed60ee1e4b30b032a5fcd6a04855ae07142c223906d5db9c28328a71e014f33 SHA512 d0e117ac73c94d70e9521ee1e6328691498cc8328f8c4e21338096908f5c04c7b838966eb63d59494565f4e19f506c07dab4f4d922150d75610d9f7b57abbf60 -EBUILD libgcrypt-1.8.7.ebuild 2307 BLAKE2B 07fbec8932d2aa100e835463a98cae64451eac74ad8e0f9d96d642d7f7430bd4e778b82e6851c537f3e31a11b5acc52a396bb9c86cb21d81556417e0ee49e922 SHA512 8225fbe1f3154766235ae022bae1e0a31287ff6b27f6cd68b549724c13469ed32bd6387817b95bf6e2baa5a6b6be28b0914043b995cd1d0ffd258dfc200134a5 +DIST libgcrypt-1.9.4.tar.bz2.sig 119 BLAKE2B 4012c22259a9fd56f9da6c87d60077cea0dbfef85d4d4ad1ff6a2375ddefafc4cd03ee9083d18e080c14c95887b495062af886732a9593bcf1b8f187d21073fe SHA512 4aee16449b4b50dac62bd80217e769f32f43fb7cd994402b7d9cffbb1934b2771041c8c0c41a63ced9c8d9408025f9c5608ffc7f00e5e9a9b92a07cb5118a98a +EBUILD libgcrypt-1.10.0.ebuild 5033 BLAKE2B b9c2315616bacd5b5f4b7791c31b2ef008795864bc0cce5de7b4c5f23f1625c3b917141776f371d4a6671ad938922816cb15a0e5c4e0f42ffb4beb2e45ca932c SHA512 09d28b60dd8eb4d9abcfbdc0dfe73dcb758332fec9b99daf1655a35aeb773e070eac21462b60b5e7112d079743b44af2a7ae34d91e308a5300e0b229fc0d3754 EBUILD libgcrypt-1.8.8.ebuild 2318 BLAKE2B 335fffac9a01ebe760a019fb668ce229f22ac6bc6aea38d2fd893fdda587d76895b0bf27146a32c4817d955eab4ac5ae9aa032a3157f9dcf3ae07a98599cc60e SHA512 eea978726cb25bb0c9de94b8617cabd3e5c28b20010ccfba2f4124a4609b655d496ea376d9d72bf07c031116433f74c03d69335950ce295d922ae83801a19ada -EBUILD libgcrypt-1.9.4.ebuild 4414 BLAKE2B a41923959d6ab0fc6a75c9c799cee492293b656628a50acec6c3692bccdddc1f7e4ec8b1a8764da64c69ccac4bea8f4d757f3b30cd1efb93eea98fcab236fa0d SHA512 344586cc5b6c373b920a53b7c3835da6c2e76108102d5b8569671510b2c1e38f5e12036b0256a07036ef335c02ed1ac5ae38fc2de99579dd421edbb173c49c54 +EBUILD libgcrypt-1.8.9.ebuild 2934 BLAKE2B b9b08095da2b6a5e42d986bac58c47ebfc2715cb15e2ac7bec4d45d35a50e164beff508aa57502e15bb5e4c15dd1578e0dd0456cb5f3820f325432b232887609 SHA512 fdfe2903216563309ca7e36d15182b31ffa7b273d70f392cfc3257839204250b3d53be5329e6c8ffabac00bf97a14109f1ead74c698336a758e7d01a2f4a485b +EBUILD libgcrypt-1.9.4-r1.ebuild 5022 BLAKE2B da966c552e2b4dc96e7cf799246d94bc14588545bebdec3f1e6609ac3926c7b1f9cc0fac8ba1ca2b43d6499d9ae9652ec60b6ceea4b27f88cf6bf3aa535b8efc SHA512 412ca793fe764ce72614e7c3547ad40714f55d12a86d1971da0f175432d53fd5ba3b9f591a9453d4785e15f1288fd2595bb80226ee13572994517aff3639a632 MISC metadata.xml 597 BLAKE2B c16e58e302622a51420a94adf5a3f47bf16e49cf5c3e21f5c552d1f64a533aa9ad9a58ae15fb4a314bf7bc833706f0a35ca74305fe96e40a6f8a5b20a267e2c6 SHA512 0d5ea002080a6e0d656c2be39b725168a323ec9536ec85cf791d64d7f0dd8255e3dd541934866c61d61d19789860fc71b2f6fa11ffdfc9b83c8177773f451632 diff --git a/dev-libs/libgcrypt/files/libgcrypt-1.10.0-musl-jitterentropy-includes.patch b/dev-libs/libgcrypt/files/libgcrypt-1.10.0-musl-jitterentropy-includes.patch new file mode 100644 index 000000000000..205944dd7a1b --- /dev/null +++ b/dev-libs/libgcrypt/files/libgcrypt-1.10.0-musl-jitterentropy-includes.patch @@ -0,0 +1,26 @@ +https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=ffaef0be613121d3ee37867d82932a7a30c2bc6d + +From: Heiko Becker +Date: Thu, 3 Feb 2022 22:46:41 +0000 +Subject: [PATCH] jitterentropy: Include and + +* random/jitterentropy-base-user.h: Include for O_RDONLY +* random/jitterentropy-base-user.h: Include for LONG_MAX + +-- + +Fixes the build with musl libc. + +Signed-off-by: Heiko Becker +--- a/random/jitterentropy-base-user.h ++++ b/random/jitterentropy-base-user.h +@@ -39,6 +39,9 @@ + * DAMAGE. + */ + ++#include ++#include ++ + #ifndef GCRYPT_JITTERENTROPY_BASE_USER_H + #define GCRYPT_JITTERENTROPY_BASE_USER_H + diff --git a/dev-libs/libgcrypt/libgcrypt-1.10.0.ebuild b/dev-libs/libgcrypt/libgcrypt-1.10.0.ebuild new file mode 100644 index 000000000000..763e29359827 --- /dev/null +++ b/dev-libs/libgcrypt/libgcrypt-1.10.0.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc +inherit autotools flag-o-matic multilib-minimal toolchain-funcs verify-sig + +DESCRIPTION="General purpose crypto library based on the code used in GnuPG" +HOMEPAGE="https://www.gnupg.org/" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" +SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" + +LICENSE="LGPL-2.1 MIT" +SLOT="0/20" # subslot = soname major version +#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc +o-flag-munging static-libs" + +# Build system only has --disable-arm-crypto-support right now +# If changing this, update src_configure logic too. +# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions, +# but this looks like it might change in future. This is just a safety check +# in case people somehow do have a CPU which only supports some. They must +# for now disable them all if that's the case. +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 ) + cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 ) + cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec ) +" + +RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND}" +BDEPEND="doc? ( virtual/texi2dvi ) + verify-sig? ( sec-keys/openpgp-keys-gnupg )" + +PATCHES=( + "${FILESDIR}"/${PN}-multilib-syspath.patch + "${FILESDIR}"/${PN}-powerpc-darwin.patch + + "${FILESDIR}"/${P}-musl-jitterentropy-includes.patch +) + +MULTILIB_CHOST_TOOLS=( + /usr/bin/libgcrypt-config +) + +src_prepare() { + default + eautoreconf +} + +multilib_src_configure() { + if [[ ${CHOST} == *86*-solaris* ]] ; then + # ASM code uses GNU ELF syntax, divide in particular, we need to + # allow this via ASFLAGS, since we don't have a flag-o-matic + # function for that, we'll have to abuse cflags for this + append-cflags -Wa,--divide + fi + + if [[ ${CHOST} == powerpc* ]] ; then + # ./configure does a lot of automagic, prevent that + # generic ppc32+ppc64 altivec + use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec=no + use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec_cflags=no + # power8 vector extension, aka arch 2.07 ISA, also checked below via ppc-crypto-support + use cpu_flags_ppc_vsx2 || local -x gcry_cv_gcc_inline_asm_ppc_altivec=no + # power9 vector extension, aka arch 3.00 ISA + use cpu_flags_ppc_vsx3 || local -x gcry_cv_gcc_inline_asm_ppc_arch_3_00=no + fi + + # Workaround for GCC < 11.3 bug + # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0b399721ce9709ae25f9d2050360c5ab2115ae29 + # https://dev.gnupg.org/T5581 + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124 + if use arm64 && tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then + append-flags -fno-tree-loop-vectorize + fi + + local myeconfargs=( + CC_FOR_BUILD="$(tc-getBUILD_CC)" + + --enable-noexecstack + $(use_enable cpu_flags_arm_neon neon-support) + # See REQUIRED_USE comment above + $(use_enable cpu_flags_arm_aes arm-crypto-support) + $(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support) + $(use_enable cpu_flags_x86_aes aesni-support) + $(use_enable cpu_flags_x86_avx avx-support) + $(use_enable cpu_flags_x86_avx2 avx2-support) + $(use_enable cpu_flags_x86_padlock padlock-support) + $(use_enable cpu_flags_x86_sha shaext-support) + $(use_enable cpu_flags_x86_sse4_1 sse41-support) + # required for sys-power/suspend[crypt], bug 751568 + $(use_enable static-libs static) + $(use_enable o-flag-munging O-flag-munging) + + # disabled due to various applications requiring privileges + # after libgcrypt drops them (bug #468616) + --without-capabilities + + # http://trac.videolan.org/vlc/ticket/620 + # causes bus-errors on sparc64-solaris + $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm") + $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm") + + $(use asm || echo "--disable-asm") + + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" + ) + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \ + $("${S}/configure" --help | grep -o -- '--without-.*-prefix') +} + +multilib_src_compile() { + default + multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf +} + +multilib_src_install() { + emake DESTDIR="${D}" install + multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf +} + +multilib_src_install_all() { + default + find "${ED}" -type f -name '*.la' -delete || die +} diff --git a/dev-libs/libgcrypt/libgcrypt-1.8.7.ebuild b/dev-libs/libgcrypt/libgcrypt-1.8.7.ebuild deleted file mode 100644 index 104cd442afc7..000000000000 --- a/dev-libs/libgcrypt/libgcrypt-1.8.7.ebuild +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools flag-o-matic multilib-minimal toolchain-funcs - -DESCRIPTION="General purpose crypto library based on the code used in GnuPG" -HOMEPAGE="https://www.gnupg.org/" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" - -LICENSE="LGPL-2.1 MIT" -SLOT="0/20" # subslot = soname major version -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="doc o-flag-munging static-libs" - -RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]" -DEPEND="${RDEPEND}" -BDEPEND="doc? ( virtual/texi2dvi )" - -PATCHES=( - "${FILESDIR}"/${PN}-1.6.1-uscore.patch - "${FILESDIR}"/${PN}-multilib-syspath.patch -) - -MULTILIB_CHOST_TOOLS=( - /usr/bin/libgcrypt-config -) - -src_prepare() { - default - eautoreconf -} - -multilib_src_configure() { - if [[ ${CHOST} == *86*-solaris* ]] ; then - # ASM code uses GNU ELF syntax, divide in particular, we need to - # allow this via ASFLAGS, since we don't have a flag-o-matic - # function for that, we'll have to abuse cflags for this - append-cflags -Wa,--divide - fi - local myeconfargs=( - CC_FOR_BUILD="$(tc-getBUILD_CC)" - --enable-noexecstack - # required for sys-power/suspend[crypt], bug 751568 - $(use_enable static-libs static) - $(use_enable o-flag-munging O-flag-munging) - - # disabled due to various applications requiring privileges - # after libgcrypt drops them (bug #468616) - --without-capabilities - - # http://trac.videolan.org/vlc/ticket/620 - # causes bus-errors on sparc64-solaris - $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm") - $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm") - - GPG_ERROR_CONFIG="${EROOT}/usr/bin/${CHOST}-gpg-error-config" - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \ - $("${S}/configure" --help | grep -o -- '--without-.*-prefix') -} - -multilib_src_compile() { - default - multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf -} - -multilib_src_install() { - emake DESTDIR="${D}" install - multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf -} - -multilib_src_install_all() { - default - find "${D}" -type f -name '*.la' -delete || die -} diff --git a/dev-libs/libgcrypt/libgcrypt-1.8.9.ebuild b/dev-libs/libgcrypt/libgcrypt-1.8.9.ebuild new file mode 100644 index 000000000000..98812288ba3c --- /dev/null +++ b/dev-libs/libgcrypt/libgcrypt-1.8.9.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc +inherit autotools flag-o-matic multilib-minimal toolchain-funcs verify-sig + +DESCRIPTION="General purpose crypto library based on the code used in GnuPG" +HOMEPAGE="https://www.gnupg.org/" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" +SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" + +LICENSE="LGPL-2.1 MIT" +SLOT="0/20" # subslot = soname major version +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc o-flag-munging static-libs" + +RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND}" +BDEPEND="doc? ( virtual/texi2dvi ) + verify-sig? ( sec-keys/openpgp-keys-gnupg )" + +PATCHES=( + "${FILESDIR}"/${PN}-1.6.1-uscore.patch + "${FILESDIR}"/${PN}-multilib-syspath.patch +) + +MULTILIB_CHOST_TOOLS=( + /usr/bin/libgcrypt-config +) + +src_prepare() { + default + + eautoreconf +} + +multilib_src_configure() { + if [[ ${CHOST} == *86*-solaris* ]] ; then + # ASM code uses GNU ELF syntax, divide in particular, we need to + # allow this via ASFLAGS, since we don't have a flag-o-matic + # function for that, we'll have to abuse cflags for this + append-cflags -Wa,--divide + fi + + # Workaround for GCC < 11.3 bug + # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0b399721ce9709ae25f9d2050360c5ab2115ae29 + # https://dev.gnupg.org/T5581 + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124 + if use arm64 && tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then + append-flags -fno-tree-loop-vectorize + fi + + local myeconfargs=( + CC_FOR_BUILD="$(tc-getBUILD_CC)" + + --enable-noexecstack + # disabled due to various applications requiring privileges + # after libgcrypt drops them (bug #468616) + --without-capabilities + + # required for sys-power/suspend[crypt], bug 751568 + $(use_enable static-libs static) + $(use_enable o-flag-munging O-flag-munging) + + # http://trac.videolan.org/vlc/ticket/620 + # causes bus-errors on sparc64-solaris + $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm") + $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm") + + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" + ) + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \ + $("${S}/configure" --help | grep -o -- '--without-.*-prefix') +} + +multilib_src_compile() { + default + + multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf +} + +multilib_src_install() { + emake DESTDIR="${D}" install + + multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf +} + +multilib_src_install_all() { + default + + find "${ED}" -type f -name '*.la' -delete || die +} diff --git a/dev-libs/libgcrypt/libgcrypt-1.9.4-r1.ebuild b/dev-libs/libgcrypt/libgcrypt-1.9.4-r1.ebuild new file mode 100644 index 000000000000..cf2e518df50e --- /dev/null +++ b/dev-libs/libgcrypt/libgcrypt-1.9.4-r1.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/gnupg.asc +inherit autotools flag-o-matic multilib-minimal toolchain-funcs verify-sig + +DESCRIPTION="General purpose crypto library based on the code used in GnuPG" +HOMEPAGE="https://www.gnupg.org/" +SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" +SRC_URI+=" verify-sig? ( mirror://gnupg/${PN}/${P}.tar.bz2.sig )" + +LICENSE="LGPL-2.1 MIT" +SLOT="0/20" # subslot = soname major version +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc o-flag-munging static-libs" + +# Build system only has --disable-arm-crypto-support right now +# If changing this, update src_configure logic too. +# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions, +# but this looks like it might change in future. This is just a safety check +# in case people somehow do have a CPU which only supports some. They must +# for now disable them all if that's the case. +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 ) + cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 ) + cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec ) +" + +RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND}" +BDEPEND="doc? ( virtual/texi2dvi ) + verify-sig? ( sec-keys/openpgp-keys-gnupg )" + +PATCHES=( + "${FILESDIR}"/${PN}-multilib-syspath.patch + "${FILESDIR}"/${PN}-powerpc-darwin.patch + "${FILESDIR}"/${PN}-1.9.4-arm-neon-compile-fix.patch +) + +MULTILIB_CHOST_TOOLS=( + /usr/bin/libgcrypt-config +) + +src_prepare() { + default + eautoreconf +} + +multilib_src_configure() { + if [[ ${CHOST} == *86*-solaris* ]] ; then + # ASM code uses GNU ELF syntax, divide in particular, we need to + # allow this via ASFLAGS, since we don't have a flag-o-matic + # function for that, we'll have to abuse cflags for this + append-cflags -Wa,--divide + fi + + if [[ ${CHOST} == powerpc* ]] ; then + # ./configure does a lot of automagic, prevent that + # generic ppc32+ppc64 altivec + use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec=no + use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec_cflags=no + # power8 vector extension, aka arch 2.07 ISA, also checked below via ppc-crypto-support + use cpu_flags_ppc_vsx2 || local -x gcry_cv_gcc_inline_asm_ppc_altivec=no + # power9 vector extension, aka arch 3.00 ISA + use cpu_flags_ppc_vsx3 || local -x gcry_cv_gcc_inline_asm_ppc_arch_3_00=no + fi + + # Workaround for GCC < 11.3 bug + # https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=0b399721ce9709ae25f9d2050360c5ab2115ae29 + # https://dev.gnupg.org/T5581 + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102124 + if use arm64 && tc-is-gcc && (($(gcc-major-version) == 11)) && (($(gcc-minor-version) <= 2)) && (($(gcc-micro-version) == 0)) ; then + append-flags -fno-tree-loop-vectorize + fi + + local myeconfargs=( + CC_FOR_BUILD="$(tc-getBUILD_CC)" + + --enable-noexecstack + $(use_enable cpu_flags_arm_neon neon-support) + # See REQUIRED_USE comment above + $(use_enable cpu_flags_arm_aes arm-crypto-support) + $(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support) + $(use_enable cpu_flags_x86_aes aesni-support) + $(use_enable cpu_flags_x86_avx avx-support) + $(use_enable cpu_flags_x86_avx2 avx2-support) + $(use_enable cpu_flags_x86_padlock padlock-support) + $(use_enable cpu_flags_x86_sha shaext-support) + $(use_enable cpu_flags_x86_sse4_1 sse41-support) + # required for sys-power/suspend[crypt], bug 751568 + $(use_enable static-libs static) + $(use_enable o-flag-munging O-flag-munging) + + # disabled due to various applications requiring privileges + # after libgcrypt drops them (bug #468616) + --without-capabilities + + # http://trac.videolan.org/vlc/ticket/620 + # causes bus-errors on sparc64-solaris + $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm") + $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm") + + $(use asm || echo "--disable-asm") + + GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" + ) + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \ + $("${S}/configure" --help | grep -o -- '--without-.*-prefix') +} + +multilib_src_compile() { + default + multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf +} + +multilib_src_install() { + emake DESTDIR="${D}" install + multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf +} + +multilib_src_install_all() { + default + find "${ED}" -type f -name '*.la' -delete || die +} diff --git a/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild b/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild deleted file mode 100644 index b921a352a0e5..000000000000 --- a/dev-libs/libgcrypt/libgcrypt-1.9.4.ebuild +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools flag-o-matic multilib-minimal toolchain-funcs - -DESCRIPTION="General purpose crypto library based on the code used in GnuPG" -HOMEPAGE="https://www.gnupg.org/" -SRC_URI="mirror://gnupg/${PN}/${P}.tar.bz2" - -LICENSE="LGPL-2.1 MIT" -SLOT="0/20" # subslot = soname major version -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="+asm cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3 cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1 doc o-flag-munging static-libs" - -# Build system only has --disable-arm-crypto-support right now -# If changing this, update src_configure logic too. -# ARM CPUs seem to, right now, support all-or-nothing for crypto extensions, -# but this looks like it might change in future. This is just a safety check -# in case people somehow do have a CPU which only supports some. They must -# for now disable them all if that's the case. -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 ) - cpu_flags_ppc_vsx3? ( cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 ) - cpu_flags_ppc_vsx2? ( cpu_flags_ppc_altivec ) -" - -RDEPEND=">=dev-libs/libgpg-error-1.25[${MULTILIB_USEDEP}]" -DEPEND="${RDEPEND}" -BDEPEND="doc? ( virtual/texi2dvi )" - -PATCHES=( - "${FILESDIR}"/${PN}-multilib-syspath.patch - "${FILESDIR}"/${PN}-powerpc-darwin.patch - "${FILESDIR}"/${PN}-1.9.4-arm-neon-compile-fix.patch -) - -MULTILIB_CHOST_TOOLS=( - /usr/bin/libgcrypt-config -) - -src_prepare() { - default - eautoreconf -} - -multilib_src_configure() { - if [[ ${CHOST} == *86*-solaris* ]] ; then - # ASM code uses GNU ELF syntax, divide in particular, we need to - # allow this via ASFLAGS, since we don't have a flag-o-matic - # function for that, we'll have to abuse cflags for this - append-cflags -Wa,--divide - fi - - if [[ ${CHOST} == powerpc* ]] ; then - # ./configure does a lot of automagic, prevent that - # generic ppc32+ppc64 altivec - use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec=no - use cpu_flags_ppc_altivec || local -x gcry_cv_cc_ppc_altivec_cflags=no - # power8 vector extension, aka arch 2.07 ISA, also checked below via ppc-crypto-support - use cpu_flags_ppc_vsx2 || local -x gcry_cv_gcc_inline_asm_ppc_altivec=no - # power9 vector extension, aka arch 3.00 ISA - use cpu_flags_ppc_vsx3 || local -x gcry_cv_gcc_inline_asm_ppc_arch_3_00=no - fi - - local myeconfargs=( - CC_FOR_BUILD="$(tc-getBUILD_CC)" - - --enable-noexecstack - $(use_enable cpu_flags_arm_neon neon-support) - # See REQUIRED_USE comment above - $(use_enable cpu_flags_arm_aes arm-crypto-support) - $(use_enable cpu_flags_ppc_vsx2 ppc-crypto-support) - $(use_enable cpu_flags_x86_aes aesni-support) - $(use_enable cpu_flags_x86_avx avx-support) - $(use_enable cpu_flags_x86_avx2 avx2-support) - $(use_enable cpu_flags_x86_padlock padlock-support) - $(use_enable cpu_flags_x86_sha shaext-support) - $(use_enable cpu_flags_x86_sse4_1 sse41-support) - # required for sys-power/suspend[crypt], bug 751568 - $(use_enable static-libs static) - $(use_enable o-flag-munging O-flag-munging) - - # disabled due to various applications requiring privileges - # after libgcrypt drops them (bug #468616) - --without-capabilities - - # http://trac.videolan.org/vlc/ticket/620 - # causes bus-errors on sparc64-solaris - $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm") - $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm") - - $(use asm || echo "--disable-asm") - - GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config" - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" \ - $("${S}/configure" --help | grep -o -- '--without-.*-prefix') -} - -multilib_src_compile() { - default - multilib_is_native_abi && use doc && VARTEXFONTS="${T}/fonts" emake -C doc gcrypt.pdf -} - -multilib_src_install() { - emake DESTDIR="${D}" install - multilib_is_native_abi && use doc && dodoc doc/gcrypt.pdf -} - -multilib_src_install_all() { - default - find "${ED}" -type f -name '*.la' -delete || die -} -- cgit v1.2.3