Skip to content

Commit

Permalink
mail-client/s-nail: Ensure a -O value exists in CFLAGS
Browse files Browse the repository at this point in the history
Bug: https://bugs.gentoo.org/888613
Signed-off-by: Brian Evans <[email protected]>
  • Loading branch information
Brian Evans committed Dec 29, 2022
1 parent 25e61c8 commit 8700738
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mail-client/s-nail/s-nail-14.9.24.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,18 @@ BDEPEND="
"

src_configure() {
has_cflag() {
local x var="CFLAGS[*]"
for x in ${!var} ; do
[[ ${x} == $1 ]] && return 0
done
return 1
}

# Fails to build without replace Bug 860357
replace-flags -O[0gs] -O1
# A valid -O option is necessary Bug 888613
has_cflag -O* || append-cflags -O1
append-cflags -std=c99
local confopts=(
CC="$(tc-getCC)"
Expand Down

0 comments on commit 8700738

Please sign in to comment.