commit:     9f5cfe5f4abb8e97ac0231301e6c0bdb31d21796
Author:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  7 20:47:42 2019 +0000
Commit:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Mon Jan  7 20:47:42 2019 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=9f5cfe5f

qt5-build.eclass: move the 's/optimize_full//' sed where it belongs

Signed-off-by: Davide Pesavento <pesa <AT> gentoo.org>

 dev-qt/qtcore/qtcore-5.12.0.ebuild    | 3 +++
 dev-qt/qtcore/qtcore-5.12.9999.ebuild | 3 +++
 dev-qt/qtcore/qtcore-5.9999.ebuild    | 3 +++
 dev-qt/qtgui/qtgui-5.12.0.ebuild      | 3 +++
 dev-qt/qtgui/qtgui-5.12.9999.ebuild   | 3 +++
 dev-qt/qtgui/qtgui-5.9999.ebuild      | 3 +++
 eclass/qt5-build.eclass               | 8 +++++---
 7 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/dev-qt/qtcore/qtcore-5.12.0.ebuild 
b/dev-qt/qtcore/qtcore-5.12.0.ebuild
index a77edf08..2aa86f3a 100644
--- a/dev-qt/qtcore/qtcore-5.12.0.ebuild
+++ b/dev-qt/qtcore/qtcore-5.12.0.ebuild
@@ -44,6 +44,9 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 )
 
 src_prepare() {
+       # don't add -O3 to CXXFLAGS, bug 549140
+       sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || 
die
+
        # fix missing qt_version_tag symbol w/ LTO, bug 674382
        sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die
 

diff --git a/dev-qt/qtcore/qtcore-5.12.9999.ebuild 
b/dev-qt/qtcore/qtcore-5.12.9999.ebuild
index a77edf08..2aa86f3a 100644
--- a/dev-qt/qtcore/qtcore-5.12.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-5.12.9999.ebuild
@@ -44,6 +44,9 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 )
 
 src_prepare() {
+       # don't add -O3 to CXXFLAGS, bug 549140
+       sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || 
die
+
        # fix missing qt_version_tag symbol w/ LTO, bug 674382
        sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die
 

diff --git a/dev-qt/qtcore/qtcore-5.9999.ebuild 
b/dev-qt/qtcore/qtcore-5.9999.ebuild
index a77edf08..2aa86f3a 100644
--- a/dev-qt/qtcore/qtcore-5.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-5.9999.ebuild
@@ -44,6 +44,9 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 )
 
 src_prepare() {
+       # don't add -O3 to CXXFLAGS, bug 549140
+       sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/corelib/corelib.pro || 
die
+
        # fix missing qt_version_tag symbol w/ LTO, bug 674382
        sed -i -e 's/^gcc:ltcg/gcc/' src/corelib/global/global.pri || die
 

diff --git a/dev-qt/qtgui/qtgui-5.12.0.ebuild b/dev-qt/qtgui/qtgui-5.12.0.ebuild
index a7e6c5ce..c8804eb3 100644
--- a/dev-qt/qtgui/qtgui-5.12.0.ebuild
+++ b/dev-qt/qtgui/qtgui-5.12.0.ebuild
@@ -123,6 +123,9 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 )
 
 src_prepare() {
+       # don't add -O3 to CXXFLAGS, bug 549140
+       sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
        # egl_x11 is activated when both egl and xcb are enabled
        use egl && QT5_GENTOO_CONFIG+=(xcb:egl_x11:) || 
QT5_GENTOO_CONFIG+=(egl:egl_x11:)
 

diff --git a/dev-qt/qtgui/qtgui-5.12.9999.ebuild 
b/dev-qt/qtgui/qtgui-5.12.9999.ebuild
index 2d60029e..d0432526 100644
--- a/dev-qt/qtgui/qtgui-5.12.9999.ebuild
+++ b/dev-qt/qtgui/qtgui-5.12.9999.ebuild
@@ -123,6 +123,9 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 )
 
 src_prepare() {
+       # don't add -O3 to CXXFLAGS, bug 549140
+       sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
        # egl_x11 is activated when both egl and xcb are enabled
        use egl && QT5_GENTOO_CONFIG+=(xcb:egl_x11:) || 
QT5_GENTOO_CONFIG+=(egl:egl_x11:)
 

diff --git a/dev-qt/qtgui/qtgui-5.9999.ebuild b/dev-qt/qtgui/qtgui-5.9999.ebuild
index 2d60029e..d0432526 100644
--- a/dev-qt/qtgui/qtgui-5.9999.ebuild
+++ b/dev-qt/qtgui/qtgui-5.9999.ebuild
@@ -123,6 +123,9 @@ QT5_GENTOO_PRIVATE_CONFIG=(
 )
 
 src_prepare() {
+       # don't add -O3 to CXXFLAGS, bug 549140
+       sed -i -e '/CONFIG\s*+=/s/optimize_full//' src/gui/gui.pro || die
+
        # egl_x11 is activated when both egl and xcb are enabled
        use egl && QT5_GENTOO_CONFIG+=(xcb:egl_x11:) || 
QT5_GENTOO_CONFIG+=(egl:egl_x11:)
 

diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index c6c08a6b..d0a73287 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -178,9 +178,11 @@ qt5-build_src_prepare() {
                sed -i -e "/^QMAKE_CONF_COMPILER=/ s:=.*:=\"$(tc-getCXX)\":" \
                        configure || die "sed failed (QMAKE_CONF_COMPILER)"
 
-               # Don't add -O3 to CXXFLAGS (bug 549140)
-               sed -i -e '/CONFIG\s*+=/ s/optimize_full//' \
-                       src/{corelib/corelib,gui/gui}.pro || die "sed failed 
(optimize_full)"
+               if [[ ${QT5_MINOR_VERSION} -lt 12 ]]; then
+                       # Don't add -O3 to CXXFLAGS (bug 549140)
+                       sed -i -e '/CONFIG\s*+=/ s/optimize_full//' \
+                               src/{corelib/corelib,gui/gui}.pro || die "sed 
failed (optimize_full)"
+               fi
 
                # Respect build variables in configure tests (bug #639494)
                sed -i -e "s|\"\$outpath/bin/qmake\" \"\$relpathMangled\" -- 
\"\$@\"|& $(qt5_qmake_args) |" configure || die

Reply via email to