commit:     f84e0bd3e7f13888c343883bbc5e0b26b0694bf3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 12 07:56:00 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 12 08:12:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f84e0bd3

dev-libs/botan: backport upstream fix for ninja & switch back to it.

This reverts commit 5fb454ae567ba6c7c71616b602ce641b5ab7f216. Go back to ninja
with the patch, but let's revbump Just In Case as it's possible that a different
binary got installed given the nature of the patch.

Bug: https://bugs.gentoo.org/915544
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{botan-3.2.0.ebuild => botan-3.2.0-r1.ebuild}    | 15 +++++++++++----
 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
similarity index 96%
rename from dev-libs/botan/botan-3.2.0.ebuild
rename to 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 <[email protected]>
+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}
+

Reply via email to