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
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')
-rw-r--r--dev-libs/openssl/openssl-1.0.2s-r1.ebuild26
-rw-r--r--dev-libs/openssl/openssl-1.0.2s-r200.ebuild26
-rw-r--r--dev-libs/openssl/openssl-1.1.0k-r1.ebuild22
-rw-r--r--dev-libs/openssl/openssl-1.1.1c-r1.ebuild22
4 files changed, 62 insertions, 34 deletions
diff --git a/dev-libs/openssl/openssl-1.0.2s-r1.ebuild b/dev-libs/openssl/openssl-1.0.2s-r1.ebuild
index a2cb9f7917ed..b4902db7e537 100644
--- a/dev-libs/openssl/openssl-1.0.2s-r1.ebuild
+++ b/dev-libs/openssl/openssl-1.0.2s-r1.ebuild
@@ -187,7 +187,9 @@ multilib_src_configure() {
[[ -z ${sslout} ]] && config="config"
# Fedora hobbled-EC needs 'no-ec2m', 'no-srp'
- 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") \
@@ -216,17 +218,23 @@ multilib_src_configure() {
|| die
# Clean out hardcoded flags that openssl uses
- local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
+ local DEFAULT_CFLAGS=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
-e 's:^CFLAG=::' \
- -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:\(^\| \)-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 "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
- -e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
+ -e "/^CFLAG/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
+ -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
Makefile || die
}
diff --git a/dev-libs/openssl/openssl-1.0.2s-r200.ebuild b/dev-libs/openssl/openssl-1.0.2s-r200.ebuild
index 281b169b64b0..24f2b3a5663f 100644
--- a/dev-libs/openssl/openssl-1.0.2s-r200.ebuild
+++ b/dev-libs/openssl/openssl-1.0.2s-r200.ebuild
@@ -191,7 +191,9 @@ multilib_src_configure() {
[[ -z ${sslout} ]] && config="config"
# Fedora hobbled-EC needs 'no-ec2m', 'no-srp'
- 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") \
@@ -220,17 +222,23 @@ multilib_src_configure() {
|| die
# Clean out hardcoded flags that openssl uses
- local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
+ local DEFAULT_CFLAGS=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
-e 's:^CFLAG=::' \
- -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:\(^\| \)-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 "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
- -e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
+ -e "/^CFLAG/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
+ -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
Makefile || die
}
diff --git a/dev-libs/openssl/openssl-1.1.0k-r1.ebuild b/dev-libs/openssl/openssl-1.1.0k-r1.ebuild
index 937d3b7ed11f..7bcd5d03e7e3 100644
--- a/dev-libs/openssl/openssl-1.1.0k-r1.ebuild
+++ b/dev-libs/openssl/openssl-1.1.0k-r1.ebuild
@@ -176,7 +176,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") \
@@ -203,16 +205,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}|" \
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}|" \