[vlc-commits] contrib: qt: replace the MODULE_AUX_INCLUDES in .pc patch

Steve Lhomme git at videolan.org
Thu May 16 10:00:21 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue May 14 13:27:19 2019 +0200| [8725235b38b8297eb1cadd6fdbe4fd2c66df0d64] | committer: Steve Lhomme

contrib: qt: replace the MODULE_AUX_INCLUDES in .pc patch

By a patch found in Qt 5.13.0

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8725235b38b8297eb1cadd6fdbe4fd2c66df0d64
---

 ...-Fix-framework-include-paths-in-.pc-files.patch | 63 ++++++++++++++++++++++
 ...ULE_AUX_INCLUDES-in-the-generated-.pc-fil.patch | 30 -----------
 contrib/src/qt/rules.mak                           |  2 +-
 3 files changed, 64 insertions(+), 31 deletions(-)

diff --git a/contrib/src/qt/0001-Fix-framework-include-paths-in-.pc-files.patch b/contrib/src/qt/0001-Fix-framework-include-paths-in-.pc-files.patch
new file mode 100644
index 0000000000..ee6a33df00
--- /dev/null
+++ b/contrib/src/qt/0001-Fix-framework-include-paths-in-.pc-files.patch
@@ -0,0 +1,63 @@
+From 0e844eff19f1174bd5a8f88e8873307ae25cb892 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= <morten.sorvig at qt.io>
+Date: Wed, 6 Jun 2018 22:34:33 +0200
+Subject: [PATCH] Fix framework include paths in .pc files
+
+The macOS framework build of Qt copies headers to each
+framework instead of a centralized include location.
+Update the .pc file generator to match this behavior.
+
+Add two include paths to the .pc files:
+
+  -Ipath/to/lib/foo.framework/Headers
+  This makes #include <FooHeader> work.
+
+  -Fpath/to/lib
+  This makes #include <Foo/FooHeader> work.
+
+Task-number: QTBUG-35256
+Change-Id: I013ce161c904fe6b7bbb03e33c163d32fdda0647
+Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen at qt.io>
+---
+ mkspecs/features/qt_module.prf | 9 +++++++--
+ qmake/generators/makefile.cpp  | 4 ++++
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
+index d4b660b77a..24d9ce2096 100644
+--- a/mkspecs/features/qt_module.prf
++++ b/mkspecs/features/qt_module.prf
+@@ -271,8 +271,13 @@ load(qt_targets)
+         QMAKE_PKGCONFIG_LIBDIR = $$[QT_HOST_LIBS]
+     else: \
+         QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw]
+-    QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]
+-    QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE -I${includedir}/$$MODULE_INCNAME
++    lib_bundle {
++        QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_LIBS/raw]/$${MODULE_INCNAME}.framework/Headers
++        QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE
++    } else {
++        QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]
++        QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE -I${includedir}/$$MODULE_INCNAME
++    }
+     QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ")
+     QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION)
+     for(i, MODULE_DEPENDS): \
+diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
+index 78e6633c1c..cdbd84b8cc 100644
+--- a/qmake/generators/makefile.cpp
++++ b/qmake/generators/makefile.cpp
+@@ -3328,6 +3328,10 @@ MakefileGenerator::writePkgConfigFile()
+          ;
+     if (!project->values("QMAKE_DEFAULT_INCDIRS").contains(includeDir))
+         t << "-I${includedir}";
++    if (target_mode == TARG_MAC_MODE && project->isActiveConfig("lib_bundle")
++        && libDir != QLatin1String("/Library/Frameworks")) {
++            t << " -F${libdir}";
++    }
+     t << endl;
+ 
+     // requires
+-- 
+2.19.1.windows.1
+
diff --git a/contrib/src/qt/0001-include-MODULE_AUX_INCLUDES-in-the-generated-.pc-fil.patch b/contrib/src/qt/0001-include-MODULE_AUX_INCLUDES-in-the-generated-.pc-fil.patch
deleted file mode 100644
index 5f00050167..0000000000
--- a/contrib/src/qt/0001-include-MODULE_AUX_INCLUDES-in-the-generated-.pc-fil.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 41833ff2e8918cf776b7849fd4ab1eab03dd6592 Mon Sep 17 00:00:00 2001
-From: Steve Lhomme <robux4 at ycbcr.xyz>
-Date: Mon, 29 Apr 2019 10:49:01 +0200
-Subject: [PATCH] include MODULE_AUX_INCLUDES in the generated .pc files
-
-QtANGLE is set on MODULE_AUX_INCLUDES so the headers can be found when building
-with angle (gui.pro) but the pkg-config file is missing this header and the Qt
-headers cannot be compiled with the path from this config.
-
-Fixes QTBUG-75495
----
- mkspecs/features/qt_module.prf | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
-index 8bd2d92421..7963356c82 100644
---- a/mkspecs/features/qt_module.prf
-+++ b/mkspecs/features/qt_module.prf
-@@ -278,6 +278,8 @@ load(qt_targets)
-         QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]
-         QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE -I${includedir}/$$MODULE_INCNAME
-     }
-+    !isEmpty(MODULE_AUX_INCLUDES): \
-+        QMAKE_PKGCONFIG_CFLAGS += -I${includedir}/$$section(MODULE_AUX_INCLUDES, /, 1, 1)
-     QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ")
-     QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION)
-     for(i, MODULE_DEPENDS): \
--- 
-2.19.1.windows.1
-
diff --git a/contrib/src/qt/rules.mak b/contrib/src/qt/rules.mak
index 03327edc19..56115a01b5 100644
--- a/contrib/src/qt/rules.mak
+++ b/contrib/src/qt/rules.mak
@@ -51,7 +51,7 @@ endif
 	$(APPLY) $(SRC)/qt/0001-qmake-Always-split-QMAKE_DEFAULT_LIBDIRS-using-with-.patch
 	
 	$(APPLY) $(SRC)/qt/0001-generate-different-pkg-config-files-for-debug-and-re.patch
-	$(APPLY) $(SRC)/qt/0001-include-MODULE_AUX_INCLUDES-in-the-generated-.pc-fil.patch
+	$(APPLY) $(SRC)/qt/0001-Fix-framework-include-paths-in-.pc-files.patch
 	$(MOVE)
 
 



More information about the vlc-commits mailing list