summaryrefslogtreecommitdiffstats
path: root/dev-tqt/tqt
diff options
context:
space:
mode:
authorAlexander Golubev <[email protected]>2024-02-19 20:25:46 +0300
committerAlexander Golubev <[email protected]>2024-02-19 20:25:46 +0300
commit7a92246547f0a575bf4ef554fd14b861388d1fc7 (patch)
tree5764e41ff64efd308bd396c2002935db2fb52444 /dev-tqt/tqt
parent45bfe81f2672bb44497721ab498eb74021befe97 (diff)
downloadtde-packaging-gentoo-7a92246547f0a575bf4ef554fd14b861388d1fc7.tar.gz
tde-packaging-gentoo-7a92246547f0a575bf4ef554fd14b861388d1fc7.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 <[email protected]>
Diffstat (limited to 'dev-tqt/tqt')
-rw-r--r--dev-tqt/tqt/tqt-14.1.0.ebuild20
-rw-r--r--dev-tqt/tqt/tqt-14.1.1.ebuild20
-rw-r--r--dev-tqt/tqt/tqt-9999.ebuild20
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):" \