From 87007380eafc9e42710c4c7b8bad2236285ac4be Mon Sep 17 00:00:00 2001 From: Brian Evans Date: Thu, 29 Dec 2022 10:33:19 -0500 Subject: [PATCH] mail-client/s-nail: Ensure a -O value exists in CFLAGS Bug: https://bugs.gentoo.org/888613 Signed-off-by: Brian Evans --- mail-client/s-nail/s-nail-14.9.24.ebuild | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mail-client/s-nail/s-nail-14.9.24.ebuild b/mail-client/s-nail/s-nail-14.9.24.ebuild index 34059f4f450e1..58bc90639ae8d 100644 --- a/mail-client/s-nail/s-nail-14.9.24.ebuild +++ b/mail-client/s-nail/s-nail-14.9.24.ebuild @@ -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)"