commit:     87bf692971965762a188b305e34a792851cc5b3f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu May  8 11:30:44 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May  8 11:30:44 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87bf6929

dev-libs/botan: tweaks to 3.8.1 (dot-a, no forced SSP)

Followup to fa81d04521b661486ba7357d100be3a2be66d84d which I meant to do
earlier (had it unstaged but sitting in tree):

* Use dot-a.eclass to avoid installing broken static libraries w/ LTO
* Don't forcefully add -fstack-protector (already set by our toolchain)

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/botan/botan-3.8.1.ebuild | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/dev-libs/botan/botan-3.8.1.ebuild 
b/dev-libs/botan/botan-3.8.1.ebuild
index f9ad07c34c60..6c759e64bbb6 100644
--- a/dev-libs/botan/botan-3.8.1.ebuild
+++ b/dev-libs/botan/botan-3.8.1.ebuild
@@ -5,7 +5,7 @@ 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
+inherit edo dot-a flag-o-matic multiprocessing ninja-utils python-r1 
toolchain-funcs verify-sig
 
 MY_P="Botan-${PV}"
 DESCRIPTION="C++ crypto library"
@@ -77,6 +77,7 @@ pkg_pretend() {
 
 src_configure() {
        tc-export AR CC CXX
+       use static-libs && lto-guarantee-fat
        python_setup
 
        local disable_modules=(
@@ -136,8 +137,8 @@ src_configure() {
                $(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')
+               # We already set this by default in the toolchain
+               --without-stack-protector
 
                $(use_with boost)
                $(use_with bzip2)
@@ -211,6 +212,8 @@ src_test() {
 src_install() {
        DESTDIR="${D}" eninja install
 
+       strip-lto-bytecode
+
        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

Reply via email to