summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-08-23 19:44:30 +0200
committerThomas Deutschmann <whissi@gentoo.org>2019-08-23 20:10:20 +0200
commit975f55449d9ecbac24beb97081273946083168b4 (patch)
tree8b033297a1b88d502b5e7d9aa09e359e987e9ad2 /dev-libs/openssl/openssl-1.1.1c-r1.ebuild
parentdev-libs/openssl: synchronize v1.1.0x with v1.1.1x (diff)
downloadgentoo-975f55449d9ecbac24beb97081273946083168b4.tar.gz
gentoo-975f55449d9ecbac24beb97081273946083168b4.tar.bz2
gentoo-975f55449d9ecbac24beb97081273946083168b4.zip
dev-libs/openssl: don't destroy user flags
Thanks-to: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Closes: https://bugs.gentoo.org/671016 Package-Manager: Portage-2.3.72, Repoman-2.3.17 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'dev-libs/openssl/openssl-1.1.1c-r1.ebuild')
-rw-r--r--dev-libs/openssl/openssl-1.1.1c-r1.ebuild22
1 files changed, 14 insertions, 8 deletions
diff --git a/dev-libs/openssl/openssl-1.1.1c-r1.ebuild b/dev-libs/openssl/openssl-1.1.1c-r1.ebuild
index 683c57075663..a3a0f2a2c06e 100644
--- a/dev-libs/openssl/openssl-1.1.1c-r1.ebuild
+++ b/dev-libs/openssl/openssl-1.1.1c-r1.ebuild
@@ -172,7 +172,9 @@ multilib_src_configure() {
# 'srp' was restricted until early 2017 as well.
# "disable-deprecated" option breaks too many consumers.
# Don't set it without thorough revdeps testing.
- echoit \
+ # Make sure user flags don't get added *yet* to avoid duplicated
+ # flags.
+ CFLAGS= LDFLAGS= echoit \
./${config} \
${sslout} \
$(use cpu_flags_x86_sse2 || echo "no-sse2") \
@@ -199,16 +201,20 @@ multilib_src_configure() {
|| die
# Clean out hardcoded flags that openssl uses
- # Fix quoting for sed
local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \
-e 's:^CFLAGS=::' \
- -e 's:-fomit-frame-pointer ::g' \
- -e 's:-O[0-9] ::g' \
- -e 's:-march=[-a-z0-9]* ::g' \
- -e 's:-mcpu=[-a-z0-9]* ::g' \
- -e 's:-m[a-z0-9]* ::g' \
- -e 's:\\:\\\\:g' \
+ -e 's:\(^\| \)-fomit-frame-pointer::g' \
+ -e 's:\(^\| \)-O[^ ]*::g' \
+ -e 's:\(^\| \)-march=[^ ]*::g' \
+ -e 's:\(^\| \)-mcpu=[^ ]*::g' \
+ -e 's:\(^\| \)-m[^ ]*::g' \
+ -e 's:^ *::' \
+ -e 's: *$::' \
+ -e 's: \+: :g' \
+ -e 's:\\:\\\\:g'
)
+
+ # Now insert clean default flags with user flags
sed -i \
-e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
-e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \