diff options
-rw-r--r-- | dev-libs/botan/botan-3.2.0-r1.ebuild (renamed from dev-libs/botan/botan-3.2.0.ebuild) | 15 | ||||
-rw-r--r-- | dev-libs/botan/files/botan-3.2.0-ninja.patch | 20 |
2 files changed, 31 insertions, 4 deletions
diff --git a/dev-libs/botan/botan-3.2.0.ebuild b/dev-libs/botan/botan-3.2.0-r1.ebuild index bb651261749f..bd7375f6945b 100644 --- a/dev-libs/botan/botan-3.2.0.ebuild +++ b/dev-libs/botan/botan-3.2.0-r1.ebuild @@ -5,7 +5,7 @@ EAPI=8 PYTHON_COMPAT=( python3_{10..12} ) VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/botan.asc -inherit edo flag-o-matic multiprocessing python-r1 toolchain-funcs verify-sig +inherit edo flag-o-matic multiprocessing ninja-utils python-r1 toolchain-funcs verify-sig MY_P="Botan-${PV}" DESCRIPTION="C++ crypto library" @@ -46,6 +46,7 @@ RDEPEND=" " BDEPEND=" ${PYTHON_DEPS} + ${NINJA_DEPEND} $(python_gen_any_dep ' doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) ') @@ -56,6 +57,9 @@ BDEPEND=" # NOTE: Considering patching Botan? # Please see upstream's guidance: # https://botan.randombit.net/handbook/packaging.html#minimize-distribution-patches +PATCHES=( + "${FILESDIR}"/${P}-ninja.patch +) python_check_deps() { use doc || return 0 @@ -150,8 +154,7 @@ src_configure() { $(use_with sqlite sqlite3) $(use_with zlib) - # Broken in 3.2.0, bug #915544 - #--build-tool=ninja + --build-tool=ninja --cpu=${chostarch} --docdir=share/doc --disable-modules=$(IFS=","; echo "${disable_modules[*]}") @@ -203,12 +206,16 @@ src_configure() { 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() { - default + DESTDIR="${D}" eninja install if [[ -d "${ED}"/usr/share/doc/${P} && ${P} != ${PF} ]] ; then # --docdir in configure controls the parent directory unfortunately diff --git a/dev-libs/botan/files/botan-3.2.0-ninja.patch b/dev-libs/botan/files/botan-3.2.0-ninja.patch new file mode 100644 index 000000000000..826fc496fb31 --- /dev/null +++ b/dev-libs/botan/files/botan-3.2.0-ninja.patch @@ -0,0 +1,20 @@ +https://bugs.gentoo.org/915544 +https://github.com/randombit/botan/commit/a1a32558669a6751e39420b26930d477790509ce + +From a1a32558669a6751e39420b26930d477790509ce Mon Sep 17 00:00:00 2001 +From: Jack Lloyd <jack@randombit.net> +Date: Wed, 11 Oct 2023 07:36:31 -0400 +Subject: [PATCH] Fix Ninja build to pass instruction set flags to the compiler + +Fixes #3750 +--- a/src/build-data/ninja.in ++++ b/src/build-data/ninja.in +@@ -161,6 +161,7 @@ build tidy: tidy + + %{for lib_build_info} + build %{obj}: compile_lib %{src} ++ isa_flags = %{isa_flags} + %{endfor} + + %{for cli_build_info} + |