summaryrefslogtreecommitdiff
path: root/dev-libs/libgcrypt
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/libgcrypt')
-rw-r--r--dev-libs/libgcrypt/Manifest3
-rw-r--r--dev-libs/libgcrypt/libgcrypt-1.11.1.ebuild178
2 files changed, 181 insertions, 0 deletions
diff --git a/dev-libs/libgcrypt/Manifest b/dev-libs/libgcrypt/Manifest
index 070078931b0a..53d7dd6d2b36 100644
--- a/dev-libs/libgcrypt/Manifest
+++ b/dev-libs/libgcrypt/Manifest
@@ -14,9 +14,12 @@ DIST libgcrypt-1.10.3.tar.bz2 3783827 BLAKE2B 1a228e02820e886016eb55dee75936c442
DIST libgcrypt-1.10.3.tar.bz2.sig 238 BLAKE2B 216baebca91b2e940f60d70a4260b6b6b8221ef88cfb42b020bc7b3743a465ef2cf105316648ed1e689cbbf7d79da421aa9f08b5af21c5b862734cf01f377214 SHA512 73795781a458c334ec6daade1b86ae8b788dd5da0b7198b46b8e54a103c5ec4c65a5dd7e6a9d173d136889f24e7f5721992f59117334f39bd1c8a94e3b55a048
DIST libgcrypt-1.11.0.tar.bz2 4180345 BLAKE2B fe3f42480c0b9a0c50c24f4c54197404b4e1056d8baa9c0c07c671c9c05b90777580b4cbcde931b50ecb4dd93f5ddad89cea99aa36a35f86f796a003e3816f7d SHA512 8e093e69e3c45d30838625ca008e995556f0d5b272de1c003d44ef94633bcc0d0ef5d95e8725eb531bfafb4490ac273488633e0c801200d4666194f86c3e270e
DIST libgcrypt-1.11.0.tar.bz2.sig 119 BLAKE2B e64d59dae5556e2826f6d297988a3300c36d05aeecfe19544c5092b5f7b777b9b3f37c5ddcfcba5a916ae237cf981efdd9e3bdec482f7c36b12ac5c70f9d4c52 SHA512 8c5ceb50d70ccdedcc1ff4b31a65a07198567b85f582e3e67699cc3e5d012bebf7b1d4903652d11905a9cd845976ad7d3642474804777d0bdc46c6847d92fe38
+DIST libgcrypt-1.11.1.tar.bz2 4233557 BLAKE2B 6416c6a782665e8a8d1c7993d94e620c586cfb65f273bde3d609bd7ca729a92d7ac3e156dabea42c34dbe50af7ce9b16333f63115f968aebb2b4a6dd37d4b99c SHA512 85846d62ce785e4250a2bf8a2b13ec24837e48ab8e10d537ad4a18d650d2cca747f82fd1501feab47ad3114b9593b36c9fa7a892f48139e2a71ef61295a47678
+DIST libgcrypt-1.11.1.tar.bz2.sig 119 BLAKE2B b8d5bca5b903b34f48694a49e6da2c1ce449b0b28a71b9a0a6ce156e413cd19510ae7bc051bbc194bb17eec07501ee58538b45baf89918803077645f22c2244c SHA512 a9b9e2466f32623f417574537656f776baf9a933fba96fd969dda26b6bf13864ee5765112654b269f79a7f20a4a0712cf8cec7be759966088045bca040e01edc
EBUILD libgcrypt-1.10.2.ebuild 6049 BLAKE2B c3abe8e46627206c9961738fdd12a18b529724bccc31336c338cf1b03ab901a7bea360d931ad2471982f26c2fe0d25d3b8166dfd2626671724cf675129d3c9e6 SHA512 785b99b03f4bbfbc107ca43b36d2204f271d8696c90b7b52da0650238c4a045105410ab92a37592d757a3a3bd201dd9c688d62a6453917cf1380954a2da66a46
EBUILD libgcrypt-1.10.3-r1.ebuild 5804 BLAKE2B 27301be37c347d03d18634e4fd8704acc756e9b422168a683919ae040ee3e5e01d07a758ebf0a197d5f37a0c8cfab9b9117ec30e2b80ee2899b4a857946ecb6a SHA512 57bb78ab90aacc5c70c8235e2ab7b18cf88e35e6f07f049bf022b869333ef0891bbc021d6b2f749202afe5c97966216fd081f997fd81cbc3ac6bb9e05109a837
EBUILD libgcrypt-1.10.3-r2.ebuild 6039 BLAKE2B ba04a02e678ca037e75742c496c37ecaee7ed58777f49a463190dfd4eeff355bb9fb176d7dcab9da3878a050880b945a48c674083534ba6a7df20e4686b5934c SHA512 be0517e78c1959c1602d697b515c8a1f77795321449a5f10acde484bb3a8ae96dc54a1167bde28d1a4acc8bac877f45273b7fc7482d7c4188c7165218bee3932
EBUILD libgcrypt-1.11.0-r1.ebuild 5747 BLAKE2B 6827d911d5fbf7b3792f7b3fe56b3f67424c8b1229654991c09bae928881f73b813e4e70d735eb8e817bc5fa31281b216cd4937fe6c1f181b9a5f103c3614a91 SHA512 982299d905507a0a36a5b9d1ef15e516e347e6e53447b0e1ac10b12820c3f476de75ce07197e94fef08beba3a72de29d2492d3a27700044190449c9159b6fbf7
EBUILD libgcrypt-1.11.0-r2.ebuild 5976 BLAKE2B d62dfe8e874e59db7c279caad43bcea19b53040e9963653d04d771543ccd83a76d72a8cfd6bf350e76632af43eeefb9fa7e5a6f343cbc51791c062bece46b789 SHA512 05ab6f719cffc2ee670f5e73739b545f269d2d556fdde89189896e1c1ca3f3b490f51d8e5aa1f342b8c12ed276e5bb70f30237f5da5c08c952e14e985d2da512
+EBUILD libgcrypt-1.11.1.ebuild 5881 BLAKE2B a2a512c1f92a267759391285afc9d6ab2a59b2d0ee41784716e33b46025ea36839c0fb796e00b82a765f12b477b161eb60e90e2b45e787d5d405b8c33e77a046 SHA512 1d98026f3a7a78745245959c44fb45d8b1dbe47bdaf7ad9e7149c4d71871c23fbb6f2c52888edfc169ae328e51b8b8e29f717c6244d80768f7faf4b20d5d7458
MISC metadata.xml 451 BLAKE2B 3be914b8449db0938d868c7cf2df7fbcf29d7f2e9b91320dfb97f0c1bf6c22326f3a1c3f3b695eaacbe4d74bb3a0b733a7afc1f88e04a37d06a9d9ed25358efb SHA512 add260d64091e3aa1de6fb802f4cfd076c1520622ebe93ddf7a0312f8d46232bd330d9bd380e2bdef6aec15563b6d27f2733b5ebe624ad9d0965ed9c6456939d
diff --git a/dev-libs/libgcrypt/libgcrypt-1.11.1.ebuild b/dev-libs/libgcrypt/libgcrypt-1.11.1.ebuild
new file mode 100644
index 000000000000..feb27f3ae197
--- /dev/null
+++ b/dev-libs/libgcrypt/libgcrypt-1.11.1.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/gnupg.asc
+inherit autotools flag-o-matic linux-info 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+ GPL-2+ MIT"
+SLOT="0/20" # subslot = soname major version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="+asm doc +getentropy static-libs"
+IUSE+=" cpu_flags_arm_neon cpu_flags_arm_aes cpu_flags_arm_sha1 cpu_flags_arm_sha2 cpu_flags_arm_sve"
+IUSE+=" cpu_flags_ppc_altivec cpu_flags_ppc_vsx2 cpu_flags_ppc_vsx3"
+IUSE+=" cpu_flags_x86_aes cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_avx512f cpu_flags_x86_padlock cpu_flags_x86_sha cpu_flags_x86_sse4_1"
+
+# 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.49[${MULTILIB_USEDEP}]
+ getentropy? (
+ kernel_linux? (
+ elibc_glibc? ( >=sys-libs/glibc-2.25 )
+ elibc_musl? ( >=sys-libs/musl-1.1.20 )
+ )
+ )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( virtual/texi2dvi )
+ verify-sig? ( sec-keys/openpgp-keys-gnupg )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-multilib-syspath.patch
+ "${FILESDIR}"/${PN}-powerpc-darwin.patch
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/libgcrypt-config
+)
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} == buildonly ]]; then
+ return
+ fi
+ if use kernel_linux && use getentropy; then
+ unset KV_FULL
+ get_running_version
+ if [[ -n ${KV_FULL} ]] && kernel_is -lt 3 17; then
+ eerror "The getentropy function requires the getrandom syscall."
+ eerror "This was introduced in Linux 3.17."
+ eerror "Your system is currently running Linux ${KV_FULL}."
+ eerror "Disable the 'getentropy' USE flag or upgrade your kernel."
+ die "Kernel is too old for getentropy"
+ fi
+ fi
+}
+
+pkg_setup() {
+ :
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ # Sensitive to optimisation; parts of the codebase are built with
+ # -O0 already. Don't risk it with UB.
+ strip-flags
+
+ # Hardcodes the path to FGREP in libgcrypt-config
+ export ac_cv_path_SED="sed"
+ export ac_cv_path_EGREP="grep -E"
+ export ac_cv_path_EGREP_TRADITIONAL="grep -E"
+ export ac_cv_path_FGREP="grep -F"
+ export ac_cv_path_GREP="grep"
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ 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
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ 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_arm_sve sve-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_avx512f avx512-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)
+
+ # disabled due to various applications requiring privileges
+ # after libgcrypt drops them (bug #468616)
+ --without-capabilities
+
+ $(use asm || echo "--disable-asm")
+
+ GPG_ERROR_CONFIG="${ESYSROOT}/usr/bin/${CHOST}-gpg-error-config"
+ )
+
+ if use kernel_linux; then
+ # --enable-random=getentropy requires getentropy/getrandom.
+ # --enable-random=linux enables legacy code that tries getrandom
+ # and falls back to reading /dev/random.
+ myeconfargs+=( --enable-random=$(usex getentropy getentropy linux) )
+ fi
+
+ 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_test() {
+ # t-secmem and t-sexp need mlock which requires extra privileges; nspawn
+ # at least disallows that by default.
+ local -x GCRYPT_IN_ASAN_TEST=1
+ # Avoid running (very) expensive bench-slope test. On hppa, it
+ # takes at least 7 hours.
+ local -x GCRYPT_NO_BENCHMARKS=1
+
+ default
+}
+
+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
+}