diff options
Diffstat (limited to 'dev-libs/libgcrypt')
-rw-r--r-- | dev-libs/libgcrypt/Manifest | 1 | ||||
-rw-r--r-- | dev-libs/libgcrypt/libgcrypt-1.10.1-r3.ebuild | 132 |
2 files changed, 133 insertions, 0 deletions
diff --git a/dev-libs/libgcrypt/Manifest b/dev-libs/libgcrypt/Manifest index 09709a560be9..7081c0c39357 100644 --- a/dev-libs/libgcrypt/Manifest +++ b/dev-libs/libgcrypt/Manifest @@ -8,5 +8,6 @@ DIST libgcrypt-1.10.1.tar.bz2.sig 119 BLAKE2B 5261d7dbfd5d82b2d3fa2ebf864a9ef0c7 DIST libgcrypt-1.9.4.tar.bz2 3239704 BLAKE2B b8244bc12a68955797b0c2b474ac5c95df1014231f7180a2ffa113e3aacedc98eed60ee1e4b30b032a5fcd6a04855ae07142c223906d5db9c28328a71e014f33 SHA512 d0e117ac73c94d70e9521ee1e6328691498cc8328f8c4e21338096908f5c04c7b838966eb63d59494565f4e19f506c07dab4f4d922150d75610d9f7b57abbf60 DIST libgcrypt-1.9.4.tar.bz2.sig 119 BLAKE2B 4012c22259a9fd56f9da6c87d60077cea0dbfef85d4d4ad1ff6a2375ddefafc4cd03ee9083d18e080c14c95887b495062af886732a9593bcf1b8f187d21073fe SHA512 4aee16449b4b50dac62bd80217e769f32f43fb7cd994402b7d9cffbb1934b2771041c8c0c41a63ced9c8d9408025f9c5608ffc7f00e5e9a9b92a07cb5118a98a EBUILD libgcrypt-1.10.1-r2.ebuild 5024 BLAKE2B 55699147fe7324476a95f85159d39c7441669bb42eadc75e9c1d40015591585ac58fdd057900632a197608c870e2c2cf2e2348509e8420afeb84f6884fe115ee SHA512 d7a0410acd1e4e122b7e7d7c1f486ae5ba25290ae225a633fb5e8b6b2f9378c51fa79d11475be7512585ead906a6cd9bbb815bcc4a227616c0419246925f4fb2 +EBUILD libgcrypt-1.10.1-r3.ebuild 5116 BLAKE2B 99014ad3e2aeed70d57927925ea7f07a315951fc8fdd828b4006c12e8f23ae07312c35fbd3a160640e15fbf31e55e362210a1ac208fea668b9e78c50f60a7a50 SHA512 d0658946061dc1c02a95457c23b4ec9ee2c6d562df0532f12c0341f87033b7b70c74f258f9a11a82e4b935de20e7be7812c15e93db2cbc1cfa713f43c5e4eef5 EBUILD libgcrypt-1.9.4-r2.ebuild 5021 BLAKE2B 28031c72d8ee46ff5ce9820339c3397d6300e07c0a7f6a88b91c2cea144546001cb3d5a2bf3a47d4018ae1d5ebfc565e2789f1b5255e581382a44b2b5949b4eb SHA512 c6cf36fac494c3e90dc1b4b5178a83676b55e5bb785644ba79af83febd431d123e1dca0f4092863e3638e476465f4fdb8e5ac0ff2418ab276e05c0761a56e908 MISC metadata.xml 524 BLAKE2B ab417ec172246d92822cafcadf2ccb72d2b8e0c056d93f1575284afbfc30dae74086d5a3b2d0bc60ec03de0a9f02ac08dc8f961f1f38eb639d862708886141ee SHA512 52d663d33d8d76f5a4613d1fded0630a5597796b0c20ddfc5eecda92fbf28f4f3b8c976e2fdb418cebd9d743ca26b1c6329ad65e1655f6eae5c1d797df1d1f95 diff --git a/dev-libs/libgcrypt/libgcrypt-1.10.1-r3.ebuild b/dev-libs/libgcrypt/libgcrypt-1.10.1-r3.ebuild new file mode 100644 index 000000000000..52ddc411bdd4 --- /dev/null +++ b/dev-libs/libgcrypt/libgcrypt-1.10.1-r3.ebuild @@ -0,0 +1,132 @@ +# 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 ~loong ~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 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.10.1-fix-no-asm-hppa.patch + "${FILESDIR}"/${PN}-1.9.4-no-fgrep-libgcrypt-config.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) + + # Build all "random" modules, allow selection at runtime. + --enable-random=auto + + # disabled due to various applications requiring privileges + # after libgcrypt drops them (bug #468616) + --without-capabilities + + # http://trac.videolan.org/vlc/ticket/620 + $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm") + # causes bus-errors on sparc64-solaris + $([[ ${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 +} |