diff options
author | V3n3RiX <venerix@koprulu.sector> | 2025-02-06 00:10:59 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2025-02-06 00:10:59 +0000 |
commit | 22eaa60297c2dbc92dd1658fb7d8e46878552755 (patch) | |
tree | c3e1147cecf778a6418d736658cedc5d7f2dfa2d /dev-libs/botan | |
parent | e019d91362a4788fe5cc5788877327b813d0f730 (diff) |
gentoo auto-resync : 06:02:2025 - 00:10:59
Diffstat (limited to 'dev-libs/botan')
-rw-r--r-- | dev-libs/botan/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/botan/botan-3.7.1.ebuild | 224 |
2 files changed, 227 insertions, 0 deletions
diff --git a/dev-libs/botan/Manifest b/dev-libs/botan/Manifest index f3f18eb13918..84d0439bfe63 100644 --- a/dev-libs/botan/Manifest +++ b/dev-libs/botan/Manifest @@ -15,10 +15,13 @@ DIST Botan-3.2.0.tar.xz 8998204 BLAKE2B f21e7574af93ab3331607f4a4ecf1b2cbbc0db4b DIST Botan-3.2.0.tar.xz.asc 488 BLAKE2B f7bc716dd18eedf35928933e22c75de3d2731330dfdaf8a5048e8ad86e1f3896ea55294a64b7f82593af16dd2e4097a9ba68f25baa024e175b7334478bcf84a6 SHA512 3ee42ac73e1bd6cea0a2e9f468b88d67c02a4a69786c41ddf9fc7f94b6847be00e0f3f0f38f934ab599b8d6dd29006414294df8b371f5cf2422292f3dd176756 DIST Botan-3.6.1.tar.xz 7581864 BLAKE2B 744eed158e021d26b9414b3a098e017e6e2c2160fc7fb6a0f24f6cbbb4b08501157108dedd7a71fc3645e27c86608a9ba5d18a11087adfd1c9b174ca3ce85b30 SHA512 06327c55bee5e0d2e142f81b997dd8a1ef98f61ef920b57f6eb4e80ebf6b3de1c62373b889d4a32e62509495792e0b46d5dcc82a6446266974b4d4ead8d9f287 DIST Botan-3.6.1.tar.xz.asc 488 BLAKE2B 3538c941f707a182f86226dfdbb8222570671e0bce3ca61137a5d978c2b1f5e658ffc1168d7e73a1861210adfac8aa661124c9cbc4950973f7b1e2c3360aab90 SHA512 871c6d91368d8a080e704afb53b1339c6d06aa57aaa45f260bccf1cb1ed31c635587ba930f954ab55668a7ca13b89b2f2acba3c0f1723e3f7190c6ebe9dc2e0b +DIST Botan-3.7.1.tar.xz 8659408 BLAKE2B 3cd934bc738c0665c4a5b3ea4391402058ade2159a185ee257aa2746ef8aa29e59873fd0a95dbdf978ce950bab6c25a72975d73b5d17da898cb16bc04ae7b8ba SHA512 f9b5d793642e9f9e9f444de3a0851840b4ed1f5f82804ad60bb5ede62c5a90ea05cb41e8aefcf556caa15da1aaa78ba1fcb040df3365705e3fd9c6a12788b72e +DIST Botan-3.7.1.tar.xz.asc 488 BLAKE2B 6f00bf01f0f02e8cefd926e4b5f70feb8e689ef9286684e45c5d1139a686af649bf44950e7bfc6a9c881d1d233c1ab5d10ee0815e8119e0ffdc89ec62ec5089c SHA512 a3fc9958e606b0bc073287dc45cb4e2143ff3399a8891a4d51a0c25052d9eb395d97bd31eb97b13344a27186e32906a6411927211345f3ae06464acb73eaa3b6 EBUILD botan-2.19.3-r2.ebuild 5084 BLAKE2B 4e38d5f419f00e83691cc0eabf70679ef9c2b3ca6583de89bdd629ff047b7ed2fb42e8a577b4352bd5702925de8df0c4c1694562d2fa7b37a3599e13af276da9 SHA512 018dc521bc66d71373865307debdf1bd556b8c663fde27a8e2abb1ab96ce783851024255d8059b0c0146f6ea33d8c43469e77d07996bf3c4ccc7b69a90c0c65a EBUILD botan-2.19.5.ebuild 5224 BLAKE2B b24860c971aabe2a3eacfe3b617b0db00f991e2615785107b6fe8c7d5e85b5c16637b7afc2912c80c6d972d81f57831b3358e54dedce303d10471e34823feafd SHA512 3043e3d0b6ca928985e2265ac358b576dc1c8659d530b6a615a5b63528f8865d31409fb0d0585a83808175972284279697528bc38f2e53fc9b11be6a1fba7b27 EBUILD botan-3.1.1.ebuild 5687 BLAKE2B 2a54f03f4c60f34a426306a440c961d8c670d353dc309eece4b89c251e280a3025faf8c46d76b5f3c2778678fb5302bffa4d13192b7c49b83ff2c4830bd53cf9 SHA512 039403784b9e5314fbf44491a075337e82b88a872965d9c4ec230c9e62b72d2758fb22c0270232faaf07c6de85bc6c9476986f5a264b5253cdb147f8d6c0fd09 EBUILD botan-3.2.0-r1.ebuild 5949 BLAKE2B d3896126f123289ba540718729e96b72fb5c40527be15fe3b7921040210014efdb65748c4dc601130949bf48fced3864f746915ee9ada72f77d85120fbf85a10 SHA512 623175e58b1b045757ff939c05b1cc55357e0d32b76485027ab45179adc5278eb01f46bac5b944ebbb00e0fcb6963da4ae7202721546c306dc0355e7bb747161 EBUILD botan-3.2.0-r2.ebuild 5974 BLAKE2B 0d13e2fd6b89cd5cd4254b0d4d109ce1df29f7e191df73c453786db9e2c134fc79a7faa592147c0bd780e1ea2e0d0c230b51402e028ea1b45f6fa188e20cd8a5 SHA512 d1ec5f53985ddcd8ef65439385a9fa4b33be4686e8fbcedf1c7c3b15eeb74dc635bf46bbba39195e6a5487297ac71e68b9442c129ab36d92c60b8d366dfde1f3 EBUILD botan-3.6.1.ebuild 6065 BLAKE2B 3aabed0798a41be5fe48eba353bb5065ce43f609e5ff0a5c2e80e0c1f16e3b26ffb1a619144f0777cd3ee857de8c1205434494edf6fe96a3056a057949c95767 SHA512 2654262dc89039fb45b8548fc8643490b2a4d15c89b6c5ae25d85be8009313530e377ec2a3afc18a18ba07f7f82cf1203cba9ae0dd5699078ed04a6710f285eb +EBUILD botan-3.7.1.ebuild 5955 BLAKE2B 8f44aff18efdc3d4c83aa8f2be3c63da3368a89f943adc8adf9c5a99e1226298a79f8414f828ad2a43607a964b10ec55adb6eba27995343a0f9dd2004823e478 SHA512 ff73d548bf6865ab9a89ef71b05b42f7f24e35a1ffa6e6e81147aaa164361562b1de1fffb356743ed38018f015726062db8a8e6d7f1269f88fbad8789c1a66d1 MISC metadata.xml 587 BLAKE2B 8d46466fee633fda0f81549a6e512e4ef5963eda31d7c882cee2fe2bfae8b0379509f046d0bdfdb1fe9481eea0585f1754753ed6b509c4f922b8fbf9ae089f39 SHA512 258e04098b9db5821a66e38d02ffb195b57378621fd2a549c8892744cf257be857ebf75c8e4a2f041cd267f07c2f1c3a5fca8df61db0538d8282507cf03a029d diff --git a/dev-libs/botan/botan-3.7.1.ebuild b/dev-libs/botan/botan-3.7.1.ebuild new file mode 100644 index 000000000000..fedf9575a46c --- /dev/null +++ b/dev-libs/botan/botan-3.7.1.ebuild @@ -0,0 +1,224 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/botan.asc +inherit edo flag-o-matic multiprocessing ninja-utils python-r1 toolchain-funcs verify-sig + +MY_P="Botan-${PV}" +DESCRIPTION="C++ crypto library" +HOMEPAGE="https://botan.randombit.net/" +SRC_URI="https://botan.randombit.net/releases/${MY_P}.tar.xz" +SRC_URI+=" verify-sig? ( https://botan.randombit.net/releases/${MY_P}.tar.xz.asc )" +S="${WORKDIR}/${MY_P}" + +LICENSE="BSD-2" +# New major versions are parallel-installable +SLOT="$(ver_cut 1)/$(ver_cut 1-2)" # soname version +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-macos" +IUSE="doc boost bzip2 lzma python static-libs sqlite test tools zlib" +CPU_USE=( + cpu_flags_arm_{aes,neon,sha1,sha2} + cpu_flags_ppc_altivec + cpu_flags_x86_{aes,avx2,popcnt,rdrand,sha,sse2,ssse3,sse4_1,sse4_2} +) +IUSE+=" ${CPU_USE[@]}" +RESTRICT="!test? ( test )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +# NOTE: Boost is needed at runtime too for the CLI tool. +DEPEND=" + boost? ( dev-libs/boost:= ) + bzip2? ( >=app-arch/bzip2-1.0.5:= ) + lzma? ( app-arch/xz-utils:= ) + python? ( ${PYTHON_DEPS} ) + sqlite? ( dev-db/sqlite:3= ) + zlib? ( >=sys-libs/zlib-1.2.3:= ) +" +RDEPEND=" + ${DEPEND} + !<dev-libs/botan-2.19.3-r1:2[tools] +" +BDEPEND=" + ${PYTHON_DEPS} + ${NINJA_DEPEND} + $(python_gen_any_dep ' + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + ') + || ( >=sys-devel/gcc-11:* >=llvm-core/clang-14:* ) + verify-sig? ( sec-keys/openpgp-keys-botan ) +" + +# NOTE: Considering patching Botan? +# Please see upstream's guidance: +# https://botan.randombit.net/handbook/packaging.html#minimize-distribution-patches + +python_check_deps() { + use doc || return 0 + python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" +} + +pkg_pretend() { + [[ ${MERGE_TYPE} == binary ]] && return + + # bug #908958 + if tc-is-gcc && ver_test $(gcc-version) -lt 11 ; then + eerror "Botan needs >=gcc-11 or >=clang-14 to compile." + eerror "Please upgrade GCC: emerge -v1 sys-devel/gcc" + die "GCC version is too old to compile Botan!" + elif tc-is-clang && ver_test $(clang-version) -lt 14 ; then + eerror "Botan needs >=gcc-11 or >=clang-14 to compile." + eerror "Please upgrade Clang: emerge -v1 llvm-core/clang" + die "Clang version is too old to compile Botan!" + fi +} + +src_configure() { + tc-export AR CC CXX + python_setup + + local disable_modules=( + $(usev !boost 'boost') + ) + + if [[ -z "${DISABLE_MODULES}" ]] ; then + elog "Disabling module(s): ${disable_modules[@]}" + fi + + local chostarch="${CHOST%%-*}" + + # Arch specific wrangling + local myos= + case ${CHOST} in + *-darwin*) + myos=darwin + ;; + *) + myos=linux + + if [[ ${CHOST} == *hppa* ]] ; then + chostarch=parisc + elif [[ ${ABI} == sparc64 ]] ; then + chostarch="sparc64" + elif [[ ${ABI} == sparc32 ]] ; then + chostarch="sparc32" + fi + ;; + esac + + local pythonvers=() + if use python ; then + _append() { + pythonvers+=( ${EPYTHON/python/} ) + } + + python_foreach_impl _append + fi + + local myargs=( + # Intrinsics + # TODO: x86 RDSEED (new CPU_FLAGS_X86?) + # TODO: POWER Crypto (new CPU_FLAGS_PPC?) + $(usev !cpu_flags_arm_aes '--disable-armv8crypto') + $(usev !cpu_flags_arm_neon '--disable-neon') + $(usev !cpu_flags_arm_sha1 '--disable-armv8crypto') + $(usev !cpu_flags_arm_sha2 '--disable-armv8crypto') + $(usev !cpu_flags_ppc_altivec '--disable-altivec') + $(usev !cpu_flags_x86_aes '--disable-aes-ni') + $(usev !cpu_flags_x86_avx2 '--disable-avx2') + $(usev !cpu_flags_x86_popcnt '--disable-bmi2') + $(usev !cpu_flags_x86_rdrand '--disable-rdrand') + $(usev !cpu_flags_x86_sha '--disable-sha-ni') + $(usev !cpu_flags_x86_sse2 '--disable-sse2') + $(usev !cpu_flags_x86_ssse3 '--disable-ssse3') + $(usev !cpu_flags_x86_sse4_1 '--disable-sse4.1') + $(usev !cpu_flags_x86_sse4_2 '--disable-sse4.2') + + # HPPA's GCC doesn't support SSP + $(usev hppa '--without-stack-protector') + + $(use_with boost) + $(use_with bzip2) + $(use_with doc documentation) + $(use_with doc sphinx) + $(use_with lzma) + $(use_enable static-libs static-library) + $(use_with sqlite sqlite3) + $(use_with zlib) + + --build-tool=ninja + --cpu=${chostarch} + --docdir=share/doc + --disable-modules=$(IFS=","; echo "${disable_modules[*]}") + --distribution-info="Gentoo ${PVR}" + --libdir="$(get_libdir)" + # Avoid collisions between slots for tools (bug #905700) + --program-suffix=$(ver_cut 1) + + # Don't install Python bindings automatically + # (do it manually later in the right place) + # bug #723096 + --no-install-python-module + + --os=${myos} + --prefix="${EPREFIX}"/usr + --lto-cxxflags-to-ldflags + --with-endian="$(tc-endian)" + --with-python-version=$(IFS=","; echo "${pythonvers[*]}") + ) + + local build_targets=( + shared + $(usev static-libs static) + $(usev tools cli) + $(usev test tests) + ) + + myargs+=( + --build-targets=$(IFS=","; echo "${build_targets[*]}") + ) + + if ( use elibc_glibc || use elibc_musl ) && use kernel_linux ; then + myargs+=( + --with-os-features=getrandom,getentropy + ) + fi + + local sanitizers=() + if is-flagq -fsanitize=address ; then + sanitizers+=( address ) + fi + if is-flagq -fsanitize=undefined ; then + sanitizers+=( undefined ) + fi + filter-flags '-fsanitize=*' + myargs+=( + --enable-sanitizers=$(IFS=","; echo "${sanitizers[*]}") + ) + + edo ${EPYTHON} configure.py --verbose "${myargs[@]}" +} + +src_compile() { + eninja +} + +src_test() { + LD_LIBRARY_PATH="${S}" edo ./botan-test$(ver_cut 1) --test-threads="$(makeopts_jobs)" +} + +src_install() { + DESTDIR="${D}" eninja install + + if [[ -d "${ED}"/usr/share/doc/${P} && ${P} != ${PF} ]] ; then + # --docdir in configure controls the parent directory unfortunately + mv "${ED}"/usr/share/doc/${P} "${ED}"/usr/share/doc/${PF} || die + fi + + # Manually install the Python bindings (bug #723096) + if use python ; then + python_foreach_impl python_domodule src/python/botan$(ver_cut 1).py + fi +} |