diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2024-02-19 20:25:46 +0300 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2024-02-20 00:01:20 +0100 |
commit | 1d4896e65ae2e640b8ecd32958c4a90d3d3b4e4c (patch) | |
tree | 5764e41ff64efd308bd396c2002935db2fb52444 | |
parent | 1a1195480fa43535332b58987ccb07051b23e13a (diff) | |
download | tde-packaging-gentoo-1d4896e65ae2e640b8ecd32958c4a90d3d3b4e4c.tar.gz tde-packaging-gentoo-1d4896e65ae2e640b8ecd32958c4a90d3d3b4e4c.zip |
dev-tqt/tqt: respect user's flags with USE=debug
Closes: https://mirror.git.trinitydesktop.org/gitea/TDE/tde-packaging-gentoo/issues/362
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 7a92246547f0a575bf4ef554fd14b861388d1fc7)
-rw-r--r-- | dev-tqt/tqt/tqt-14.1.0.ebuild | 20 | ||||
-rw-r--r-- | dev-tqt/tqt/tqt-14.1.1.ebuild | 20 | ||||
-rw-r--r-- | dev-tqt/tqt/tqt-9999.ebuild | 20 |
3 files changed, 45 insertions, 15 deletions
diff --git a/dev-tqt/tqt/tqt-14.1.0.ebuild b/dev-tqt/tqt/tqt-14.1.0.ebuild index f1dec6aa..d5452962 100644 --- a/dev-tqt/tqt/tqt-14.1.0.ebuild +++ b/dev-tqt/tqt/tqt-14.1.0.ebuild @@ -1,5 +1,5 @@ -# Copyright 1999-2023 Gentoo Authors -# Copyright 2020-2023 The Trinity Desktop Project +# Copyright 1999-2024 Gentoo Authors +# Copyright 2020-2024 The Trinity Desktop Project # Distributed under the terms of the GNU General Public License v2 EAPI="8" @@ -119,11 +119,21 @@ src_prepare() { find mkspecs -name qmake.conf | xargs \ sed -i -e 's:QMAKE_RPATH.*:QMAKE_RPATH =:' || die + if use debug; then + qmake_flags_edits=( -e "s:QMAKE_CFLAGS_DEBUG.*=.*:QMAKE_CFLAGS_DEBUG=${CFLAGS}:" + -e "s:QMAKE_CXXFLAGS_DEBUG.*=.*:QMAKE_CXXFLAGS_DEBUG=${CXXFLAGS}:" + -e "s:QMAKE_LFLAGS_DEBUG.*=.*:QMAKE_LFLAGS_DEBUG=${LDFLAGS}:" + ) + else + qmake_flags_edits=( -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" + -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" + -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" + ) + fi + # Make qmake.conf respect our flags and toolchain - sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \ + sed -i "${qmake_flags_edits[@]}" \ -e 's:QMAKE_CFLAGS\t\t=.*:QMAKE_CFLAGS =:' \ - -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \ - -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \ -e "s:\<QMAKE_CC\>.*=.*:QMAKE_CC=$(tc-getCC):" \ -e "s:\<QMAKE_CXX\>.*=.*:QMAKE_CXX=$(tc-getCXX):" \ -e "s:\<QMAKE_LINK\>.*=.*:QMAKE_LINK=$(tc-getCXX):" \ diff --git a/dev-tqt/tqt/tqt-14.1.1.ebuild b/dev-tqt/tqt/tqt-14.1.1.ebuild index 508ad7dc..ebf6cc8d 100644 --- a/dev-tqt/tqt/tqt-14.1.1.ebuild +++ b/dev-tqt/tqt/tqt-14.1.1.ebuild @@ -1,5 +1,5 @@ -# Copyright 1999-2023 Gentoo Authors -# Copyright 2020-2023 The Trinity Desktop Project +# Copyright 1999-2024 Gentoo Authors +# Copyright 2020-2024 The Trinity Desktop Project # Distributed under the terms of the GNU General Public License v2 EAPI="8" @@ -124,11 +124,21 @@ src_prepare() { find mkspecs -name qmake.conf | xargs \ sed -i -e 's:QMAKE_RPATH.*:QMAKE_RPATH =:' || die + if use debug; then + qmake_flags_edits=( -e "s:QMAKE_CFLAGS_DEBUG.*=.*:QMAKE_CFLAGS_DEBUG=${CFLAGS}:" + -e "s:QMAKE_CXXFLAGS_DEBUG.*=.*:QMAKE_CXXFLAGS_DEBUG=${CXXFLAGS}:" + -e "s:QMAKE_LFLAGS_DEBUG.*=.*:QMAKE_LFLAGS_DEBUG=${LDFLAGS}:" + ) + else + qmake_flags_edits=( -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" + -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" + -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" + ) + fi + # Make qmake.conf respect our flags and toolchain - sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \ + sed -i "${qmake_flags_edits[@]}" \ -e 's:QMAKE_CFLAGS\t\t=.*:QMAKE_CFLAGS =:' \ - -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \ - -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \ -e "s:\<QMAKE_CC\>.*=.*:QMAKE_CC=$(tc-getCC):" \ -e "s:\<QMAKE_CXX\>.*=.*:QMAKE_CXX=$(tc-getCXX):" \ -e "s:\<QMAKE_LINK\>.*=.*:QMAKE_LINK=$(tc-getCXX):" \ diff --git a/dev-tqt/tqt/tqt-9999.ebuild b/dev-tqt/tqt/tqt-9999.ebuild index bdf40bda..f994caae 100644 --- a/dev-tqt/tqt/tqt-9999.ebuild +++ b/dev-tqt/tqt/tqt-9999.ebuild @@ -1,5 +1,5 @@ -# Copyright 1999-2020 Gentoo Authors -# Copyright 2020 The Trinity Desktop Project +# Copyright 1999-2024 Gentoo Authors +# Copyright 2020-2024 The Trinity Desktop Project # Distributed under the terms of the GNU General Public License v2 EAPI="8" @@ -119,11 +119,21 @@ src_prepare() { find mkspecs -name qmake.conf | xargs \ sed -i -e 's:QMAKE_RPATH.*:QMAKE_RPATH =:' || die + if use debug; then + qmake_flags_edits=( -e "s:QMAKE_CFLAGS_DEBUG.*=.*:QMAKE_CFLAGS_DEBUG=${CFLAGS}:" + -e "s:QMAKE_CXXFLAGS_DEBUG.*=.*:QMAKE_CXXFLAGS_DEBUG=${CXXFLAGS}:" + -e "s:QMAKE_LFLAGS_DEBUG.*=.*:QMAKE_LFLAGS_DEBUG=${LDFLAGS}:" + ) + else + qmake_flags_edits=( -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" + -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" + -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" + ) + fi + # Make qmake.conf respect our flags and toolchain - sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \ + sed -i "${qmake_flags_edits[@]}" \ -e 's:QMAKE_CFLAGS\t\t=.*:QMAKE_CFLAGS =:' \ - -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \ - -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \ -e "s:\<QMAKE_CC\>.*=.*:QMAKE_CC=$(tc-getCC):" \ -e "s:\<QMAKE_CXX\>.*=.*:QMAKE_CXX=$(tc-getCXX):" \ -e "s:\<QMAKE_LINK\>.*=.*:QMAKE_LINK=$(tc-getCXX):" \ |