[arch-commits] Commit in qt5-base/trunk (PKGBUILD qt5-base-cflags.patch)

Antonio Rojas arojas at archlinux.org
Mon Mar 30 11:41:15 UTC 2020


    Date: Monday, March 30, 2020 @ 11:41:15
  Author: arojas
Revision: 378721

Preserve upstream default flags if C(XX)FLAGS is empty

Modified:
  qt5-base/trunk/PKGBUILD
  qt5-base/trunk/qt5-base-cflags.patch

-----------------------+
 PKGBUILD              |    2 +-
 qt5-base-cflags.patch |   29 +++++++++++++++++------------
 2 files changed, 18 insertions(+), 13 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-03-30 11:22:52 UTC (rev 378720)
+++ PKGBUILD	2020-03-30 11:41:15 UTC (rev 378721)
@@ -31,7 +31,7 @@
 source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"
          qt5-base-cflags.patch)
 sha256sums=('d9d423a6e7bcf1055c0372fc029f14a6fe67dd62c67b83095cde68b60b762cf7'
-            '6912a6485eac657afe6dc227d5f7dbf32dfeca6eb2674929bc291ba26e329efb')
+            'cf707cd970650f8b60f8897692b36708ded9ba116723ec8fcd885576783fe85c')
 
 prepare() {
   cd ${_pkgfqn}

Modified: qt5-base-cflags.patch
===================================================================
--- qt5-base-cflags.patch	2020-03-30 11:22:52 UTC (rev 378720)
+++ qt5-base-cflags.patch	2020-03-30 11:41:15 UTC (rev 378721)
@@ -1,19 +1,20 @@
 diff --git a/mkspecs/common/g++-unix.conf b/mkspecs/common/g++-unix.conf
-index a493cd5984..e0b30df4f5 100644
+index a493cd5984..41342f5020 100644
 --- a/mkspecs/common/g++-unix.conf
 +++ b/mkspecs/common/g++-unix.conf
-@@ -10,5 +10,5 @@
+@@ -10,5 +10,6 @@
  
  include(g++-base.conf)
  
 -QMAKE_LFLAGS_RELEASE   += -Wl,-O1
-+eval(QMAKE_LFLAGS_RELEASE += $$(LDFLAGS))
++SYSTEM_LDFLAGS = $$(LDFLAGS)
++!isEmpty(SYSTEM_LDFLAGS) { eval(QMAKE_LFLAGS_RELEASE += $$(LDFLAGS)) } else { QMAKE_LFLAGS_RELEASE   += -Wl,-O1 }
  QMAKE_LFLAGS_NOUNDEF   += -Wl,--no-undefined
 diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
-index 1f919d270a..156686b391 100644
+index 1f919d270a..7ef6046326 100644
 --- a/mkspecs/common/gcc-base.conf
 +++ b/mkspecs/common/gcc-base.conf
-@@ -40,9 +40,9 @@ QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os
+@@ -40,9 +40,11 @@ QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os
  QMAKE_CFLAGS_DEPS          += -M
  QMAKE_CFLAGS_WARN_ON       += -Wall -Wextra
  QMAKE_CFLAGS_WARN_OFF      += -w
@@ -20,13 +21,15 @@
 -QMAKE_CFLAGS_RELEASE       += $$QMAKE_CFLAGS_OPTIMIZE
 -QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g
 -QMAKE_CFLAGS_DEBUG         += -g
-+eval(QMAKE_CFLAGS_RELEASE += $$(CPPFLAGS) $$(CFLAGS))
-+eval(QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$(CPPFLAGS) -g $$(CFLAGS))
-+eval(QMAKE_CFLAGS_DEBUG         += $$(DEBUG_CFLAGS))
++SYSTEM_CFLAGS = $$(CFLAGS)
++SYSTEM_DEBUG_CFLAGS = $$(DEBUG_CFLAGS)
++!isEmpty(SYSTEM_CFLAGS) { eval(QMAKE_CFLAGS_RELEASE += $$(CPPFLAGS) $$(CFLAGS)) } else { QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE }
++!isEmpty(SYSTEM_CFLAGS) { eval(QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$(CPPFLAGS) -g $$(CFLAGS)) } else { QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g }
++!isEmpty(SYSTEM_DEBUG_CFLAGS) { eval(QMAKE_CFLAGS_DEBUG += $$(DEBUG_CFLAGS)) } else { QMAKE_CFLAGS_DEBUG += -g }
  QMAKE_CFLAGS_SHLIB         += $$QMAKE_CFLAGS_PIC
  QMAKE_CFLAGS_STATIC_LIB    += $$QMAKE_CFLAGS_PIC
  QMAKE_CFLAGS_APP           += $$QMAKE_CFLAGS_PIC
-@@ -59,9 +59,9 @@ QMAKE_CXXFLAGS            += $$QMAKE_CFLAGS
+@@ -59,9 +61,11 @@ QMAKE_CXXFLAGS            += $$QMAKE_CFLAGS
  QMAKE_CXXFLAGS_DEPS       += $$QMAKE_CFLAGS_DEPS
  QMAKE_CXXFLAGS_WARN_ON    += $$QMAKE_CFLAGS_WARN_ON
  QMAKE_CXXFLAGS_WARN_OFF   += $$QMAKE_CFLAGS_WARN_OFF
@@ -33,9 +36,11 @@
 -QMAKE_CXXFLAGS_RELEASE    += $$QMAKE_CFLAGS_RELEASE
 -QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
 -QMAKE_CXXFLAGS_DEBUG      += $$QMAKE_CFLAGS_DEBUG
-+eval(QMAKE_CXXFLAGS_RELEASE += $$(CPPFLAGS) $$(CXXFLAGS))
-+eval(QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$(CPPFLAGS) -g $$(CXXFLAGS))
-+eval(QMAKE_CXXFLAGS_DEBUG         += $$(DEBUG_CXXFLAGS))
++SYSTEM_CXXFLAGS = $$(CXXFLAGS)
++SYSTEM_DEBUG_CXXFLAGS = $$(DEBUG_CXXFLAGS)
++!isEmpty(SYSTEM_CXXFLAGS) { eval(QMAKE_CXXFLAGS_RELEASE += $$(CPPFLAGS) $$(CXXFLAGS)) } else { QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE }
++!isEmpty(SYSTEM_CXXFLAGS) { eval(QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$(CPPFLAGS) -g $$(CXXFLAGS)) } else { QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g }
++!isEmpty(SYSTEM_DEBUG_CXXFLAGS) { eval(QMAKE_CXXFLAGS_DEBUG += $$(DEBUG_CXXFLAGS)) } else { QMAKE_CXXFLAGS_DEBUG += -g }
  QMAKE_CXXFLAGS_SHLIB      += $$QMAKE_CFLAGS_SHLIB
  QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB
  QMAKE_CXXFLAGS_APP        += $$QMAKE_CFLAGS_APP



More information about the arch-commits mailing list