CMake generates wrong -isystem /usr/include compilations flags with Qt5::Gui (#1704474)

This commit is contained in:
Rex Dieter 2019-04-30 15:23:29 -05:00
parent 1a5c543723
commit 3e7f6f93e7
2 changed files with 25 additions and 2 deletions

View File

@ -53,7 +53,7 @@ BuildRequires: pkgconfig(libsystemd)
Name: qt5-qtbase
Summary: Qt5 - QtBase components
Version: 5.12.1
Release: 3%{?dist}
Release: 4%{?dist}
# See LGPL_EXCEPTIONS.txt, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions
@ -102,6 +102,10 @@ Patch51: qtbase-hidpi_scale_at_192.patch
# 2. Workaround sysmacros.h (pre)defining major/minor a breaking stuff
Patch52: qtbase-opensource-src-5.7.1-moc_macros.patch
# CMake generates wrong -isystem /usr/include compilations flags with Qt5::Gui
# https://bugzilla.redhat.com/1704474
Patch53: qtbase-everywhere-src-5.12.1-qt5gui_cmake_isystem_includes.patch
# respect QMAKE_LFLAGS_RELEASE when building qmake
Patch54: qtbase-qmake_LFLAGS.patch
@ -373,11 +377,13 @@ Qt5 libraries used for drawing widgets and OpenGL items.
%patch4 -p1 -b .QTBUG-35459
%patch8 -p1 -b .tell-the-truth-about-private-api
# omit '-b .tell-the-truth-about-private-api' so it doesn't end up in installed files -- rdieter
%patch8 -p1
%patch50 -p1 -b .QT_VERSION_CHECK
%patch51 -p1 -b .hidpi_scale_at_192
%patch52 -p1 -b .moc_macros
%patch53 -p1 -b .qt5gui_cmake_isystem_includes
%patch54 -p1 -b .qmake_LFLAGS
%patch61 -p1 -b .qt5-qtbase-cxxflag
%patch64 -p1 -b .firebird
@ -1007,6 +1013,9 @@ fi
%changelog
* Tue Apr 30 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-4
- CMake generates wrong -isystem /usr/include compilations flags with Qt5::Gui (#1704474)
* Tue Apr 30 2019 Rex Dieter <rdieter@fedoraproject.org> - 5.12.1-3
- -private-devel subpkg, move Requires: cups-devel here

View File

@ -0,0 +1,14 @@
diff -up qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in
--- qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo 2019-04-30 15:18:24.886346423 -0500
+++ qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in 2019-04-30 15:19:48.303873296 -0500
@@ -66,8 +66,10 @@ unset(_GL_INCDIRS)
# Don\'t check for existence of the "_qt5gui_OPENGL_INCLUDE_DIR" because it is
# optional.
+if (NOT ${_qt5gui_OPENGL_INCLUDE_DIR} STREQUAL "/usr/include")
list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR})
set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR})
+endif()
unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE)