net-misc/bird: Using custom-cflags to make lto optionnal

This commit is contained in:
Alarig Le Lay 2023-03-07 19:17:11 +01:00
parent 9d96d16d75
commit ef479ce0f2
Signed by: alarig
GPG Key ID: 7AFE62C6DF8BCDEC
1 changed files with 19 additions and 5 deletions

View File

@ -12,7 +12,7 @@ LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm64 ~x86 ~x64-macos"
IUSE="+client debug libssh"
IUSE="+client custom-cflags debug libssh"
RDEPEND="
client? (
@ -46,11 +46,25 @@ src_prepare() {
}
src_configure() {
econf \
--localstatedir="${EPREFIX}/var" \
$(use_enable client) \
$(use_enable debug) \
# This export makes compilation and test phases verbose
export VERBOSE=1
# lto must be enabled by default as bird is mono-threaded and use several
# optimisations to be fast, at it may very likely be exposed to several
# thounsand BGP updates per seconds
# Although, we make it possible to desactivate it if wanted
if use custom-cflags; then
export bird_cv_c_lto=no
fi
local myargs=(
--localstatedir="${EPREFIX}/var"
$(use_enable client)
$(use_enable debug)
$(use_enable libssh)
)
econf "${myargs[@]}"
}
src_install() {