diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-11-17 06:56:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-11-17 06:56:15 +0000 |
commit | 1536d928ae095e00db8775fecca580c10adc0af8 (patch) | |
tree | ce87fe174db749dca9fac4dcd229d263a03f47c4 /dev-libs/botan | |
parent | 0e33d150b98b9f2354c92788ef9dc739850b40f6 (diff) |
gentoo auto-resync : 17:11:2022 - 06:56:15
Diffstat (limited to 'dev-libs/botan')
-rw-r--r-- | dev-libs/botan/Manifest | 3 | ||||
-rw-r--r-- | dev-libs/botan/botan-2.19.3.ebuild | 180 |
2 files changed, 183 insertions, 0 deletions
diff --git a/dev-libs/botan/Manifest b/dev-libs/botan/Manifest index 92f52dccfca3..4386b2d24d23 100644 --- a/dev-libs/botan/Manifest +++ b/dev-libs/botan/Manifest @@ -1,4 +1,7 @@ DIST Botan-2.19.2.tar.xz 6063336 BLAKE2B a46fa49c61846e718197ab3a8431a5bdcab0f4cc5e42aec04fd22932ecdbfa2b755cae53c125eee8248ecae237671ec6f0533f99289068ed81e6cd34886d8b88 SHA512 52b9c80a240457e46a299480338472f7d0c0b56df7b1709fdef52c5be3afca5b474fe143801c9a332ae884eaf033e60461c9d3e0b2f7b069f4fe8b4c45932abf DIST Botan-2.19.2.tar.xz.asc 488 BLAKE2B 94d22dff9de02871560649b1d961f4c7ae5fa37a847141554f8da9f0a726d4497cd23e0d84197beb4d176f29aa3a478118d94cd52d2c04733d115828f85d400d SHA512 e25a03ac437a08737ecde541ead4b841ccb507d3198683a1755dab1d4f82e9ce0278473db7c7041a4b808f9dff9927106e30bbad79b1674615254ee78f0b6a06 +DIST Botan-2.19.3.tar.xz 6105896 BLAKE2B 6d7778d9e9a101c76f35c65b0fb0201641cd91967ba934510f3836ee4b924d54cabdc760dd460997679250aa66e1d2a99369cd03f8fb9e7b2fe672d4b355215f SHA512 80012397e2aa7cc88a9536340ac9b770d1195fddda53b9d4cfde82318dd05f9d4f925bbdff773aba99883a701f4d30581e9d5c97e915fa80c3ca2acfa5a92110 +DIST Botan-2.19.3.tar.xz.asc 488 BLAKE2B cd86bf77306aad2956cced6ac4fb96081279af88743e87d8fe5437e72e9fa8db8aaf40d0b5cb9c5b3a85204cb7d63c3baa3054126ab4c9a2db527e6835a069d7 SHA512 9142f932c958138b4bac32f503a550e6c73b61612690a280dcb98efe8c367aa6bd3cd88b4ed4decec376bb87596a780a21bdcb01d4a3573a1c44fbeb0aa49d23 EBUILD botan-2.19.2.ebuild 4430 BLAKE2B f3c6cb01469f7b75f6691a66c1ca7eb0e49fcf8f23a19c51f8260a83ff4f80c8052f74b2fed7c4aa23080fbf23d6afc073d3862602db1cb1cc750ff790f23af3 SHA512 342b9dba9d8c0dffe98cbfbaec2b75f156a9c59488733a1a387130f621411d9dea71d67861a0e4d2dfb0951e1ad23a1b9eb426dbbc8c20a4923ca654a948ea41 +EBUILD botan-2.19.3.ebuild 4434 BLAKE2B fbf22614514b0ab76213a6bf10aa6d1378949665782302865dcdef1c80bc1f7466e1e01248bbacf106180452216be66484ef34d10e8258d094474a13e875d05b SHA512 cac7940a21d539f288607f45c7aaeea396b6f16687136261e0cfb47e19ff6ec5925a72a9a7752602469c543edd5ddeb35ed47bb42430c469e59423de98816069 MISC metadata.xml 587 BLAKE2B 8d46466fee633fda0f81549a6e512e4ef5963eda31d7c882cee2fe2bfae8b0379509f046d0bdfdb1fe9481eea0585f1754753ed6b509c4f922b8fbf9ae089f39 SHA512 258e04098b9db5821a66e38d02ffb195b57378621fd2a549c8892744cf257be857ebf75c8e4a2f041cd267f07c2f1c3a5fca8df61db0538d8282507cf03a029d diff --git a/dev-libs/botan/botan-2.19.3.ebuild b/dev-libs/botan/botan-2.19.3.ebuild new file mode 100644 index 000000000000..87dba760e169 --- /dev/null +++ b/dev-libs/botan/botan-2.19.3.ebuild @@ -0,0 +1,180 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/botan.asc +inherit edo 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" +SLOT="2/$(ver_cut 1-2)" # soname version +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~ppc-macos" +IUSE="doc boost bzip2 lzma python static-libs sqlite test tools zlib" +RESTRICT="!test? ( test )" + +CPU_USE=( + cpu_flags_arm_{aes,neon} + cpu_flags_ppc_altivec + cpu_flags_x86_{aes,avx2,popcnt,rdrand,sha,sse2,ssse3,sse4_1,sse4_2} +) + +IUSE+=" ${CPU_USE[@]}" + +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}" +BDEPEND=" + ${PYTHON_DEPS} + $(python_gen_any_dep ' + doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) + ') + 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}]" +} + +src_configure() { + 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_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 (presumably due to stack direction) + $(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) + + --cpu=${chostarch} + --docdir=share/doc + --disable-modules=$(IFS=","; echo "${disable_modules[*]}") + --distribution-info="Gentoo ${PVR}" + --libdir="$(get_libdir)" + + # 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 + --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 kernel_linux ; then + myargs+=( + --with-os-features=getrandom,getentropy + ) + fi + + tc-export AR CC CXX + + edo ${EPYTHON} configure.py --verbose "${myargs[@]}" +} + +src_test() { + LD_LIBRARY_PATH="${S}" ./botan-test || die "Validation tests failed" +} + +src_install() { + default + + # Manually install the Python bindings (bug #723096) + if use python ; then + python_foreach_impl python_domodule src/python/botan2.py + fi +} |