[vlc-commits] [Git][videolan/vlc][master] 8 commits: contrib: qt: don't install tools in target path

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Nov 15 09:26:40 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
52f4ac35 by Steve Lhomme at 2022-11-15T06:45:41+00:00
contrib: qt: don't install tools in target path

They are supposed to be found in lib/qt5/bin when cross compiling and the
script has no effect on executables.

- - - - -
b9d3d992 by Steve Lhomme at 2022-11-15T06:45:41+00:00
contrib: qt: fix harfbuzz detection on macOS

It needs the CoreFoundation/CoreText/CoreGraphics when linking and it can't be
added to the configure options.

- - - - -
3df5c07a by Steve Lhomme at 2022-11-15T06:45:41+00:00
contrib: qt: use the proper qmake configuration for macOS

QT_SPEC was not used and darwin-g++ would not build. The one that was used is
macx-clang.

- - - - -
f3ccdc5b by Steve Lhomme at 2022-11-15T06:45:41+00:00
contrib: qt: use the proper qmake configuration for Linux

It needs to be defined when cross-compiling (to arm as we do for raspberrypi).

- - - - -
3c006803 by Steve Lhomme at 2022-11-15T06:45:41+00:00
contrib: qt: handle HAVE_CROSS_COMPILE for all platforms

- - - - -
4ff63ee9 by Steve Lhomme at 2022-11-15T06:45:41+00:00
contrib: qt: force using the tools bootstrap

We build our own environment even when not cross compiling.

This avoids having some tools in different places when not cross-compiling.

- - - - -
37332b3b by Steve Lhomme at 2022-11-15T06:45:41+00:00
contrib: qt: remove unneeded VLC_EXTRA values

They are passed through the .qmake.cache file.

- - - - -
6ea0cd77 by Steve Lhomme at 2022-11-15T06:45:41+00:00
qt: add missing PLUGINS_LIBS to qt-vlc-check

- - - - -


3 changed files:

- − contrib/src/qt/0001-allow-to-pass-user-defined-compilation-flags-to-qt.patch
- contrib/src/qt/rules.mak
- modules/gui/qt/Makefile.am


Changes:

=====================================
contrib/src/qt/0001-allow-to-pass-user-defined-compilation-flags-to-qt.patch deleted
=====================================
@@ -1,53 +0,0 @@
-From 691cced4d252d3b76dce02963c18ca85d125bf09 Mon Sep 17 00:00:00 2001
-From: Pierre Lamot <pierre at videolabs.io>
-Date: Tue, 18 Aug 2020 16:06:06 +0200
-Subject: [PATCH] allow to pass user defined compilation flags to qt
-
----
- mkspecs/darwin-g++/qmake.conf      | 4 ++++
- mkspecs/win32-clang-g++/qmake.conf | 4 ++++
- mkspecs/win32-g++/qmake.conf       | 4 ++++
- 3 files changed, 12 insertions(+)
-
-diff --git a/mkspecs/darwin-g++/qmake.conf b/mkspecs/darwin-g++/qmake.conf
-index 85955f7..8602b78 100644
---- a/mkspecs/darwin-g++/qmake.conf
-+++ b/mkspecs/darwin-g++/qmake.conf
-@@ -86,4 +86,8 @@ QMAKE_PCH_OUTPUT_EXT    = .gch
- QMAKE_CXXFLAGS_PRECOMPILE += -x objective-c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
- QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
- 
-+QMAKE_CFLAGS           += $${VLC_EXTRA_CFLAGS}
-+QMAKE_CXXFLAGS         += $${VLC_EXTRA_CXXFLAGS}
-+QMAKE_LFLAGS           += $${VLC_EXTRA_LDFLAGS}
-+
- load(qt_config)
-diff --git a/mkspecs/win32-clang-g++/qmake.conf b/mkspecs/win32-clang-g++/qmake.conf
-index 4630ec4..149f779 100644
---- a/mkspecs/win32-clang-g++/qmake.conf
-+++ b/mkspecs/win32-clang-g++/qmake.conf
-@@ -24,4 +24,8 @@ QMAKE_CXXFLAGS_WARN_ON  = $$QMAKE_CFLAGS_WARN_ON
- QMAKE_LINK              = $${CROSS_COMPILE}clang++
- QMAKE_LINK_C            = $${CROSS_COMPILE}clang
- 
-+QMAKE_CFLAGS           += $${VLC_EXTRA_CFLAGS}
-+QMAKE_CXXFLAGS         += $${VLC_EXTRA_CXXFLAGS}
-+QMAKE_LFLAGS           += $${VLC_EXTRA_LDFLAGS}
-+
- load(qt_config)
-diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
-index 5e99233..b22cbce 100644
---- a/mkspecs/win32-g++/qmake.conf
-+++ b/mkspecs/win32-g++/qmake.conf
-@@ -26,4 +26,8 @@ QMAKE_CFLAGS_LTCG       = -flto
- QMAKE_CXXFLAGS_LTCG     = $$QMAKE_CFLAGS_LTCG
- QMAKE_LFLAGS_LTCG       = $$QMAKE_CFLAGS_LTCG
- 
-+QMAKE_CFLAGS           += $${VLC_EXTRA_CFLAGS}
-+QMAKE_CXXFLAGS         += $${VLC_EXTRA_CXXFLAGS}
-+QMAKE_LFLAGS           += $${VLC_EXTRA_LDFLAGS}
-+
- load(qt_config)
--- 
-2.25.1
-


=====================================
contrib/src/qt/rules.mak
=====================================
@@ -33,7 +33,6 @@ $(TARBALLS)/qtbase-everywhere-src-$(QT_VERSION_FULL).tar.xz:
 
 qt: qtbase-everywhere-src-$(QT_VERSION_FULL).tar.xz .sum-qt
 	$(UNPACK)
-	$(APPLY) $(SRC)/qt/0001-allow-to-pass-user-defined-compilation-flags-to-qt.patch
 ifdef HAVE_WIN32
 	$(APPLY) $(SRC)/qt/0002-Windows-QPA-Disable-systray-notification-sounds.patch
 ifndef HAVE_WIN64
@@ -58,6 +57,8 @@ endif
 	$(APPLY) $(SRC)/qt/qt-fix-gcc11-build.patch
 	$(APPLY) $(SRC)/qt/qt-add-missing-header-darwin.patch
 	$(APPLY) $(SRC)/qt/set-mkspecs-properties.patch
+	# fix detection of our harfbuzz on macosx
+	sed -i.orig 's#"-lharfbuzz"#{ "libs": "-framework CoreText -framework CoreGraphics -framework CoreFoundation -lharfbuzz", "condition": "config.darwin" }, "-lharfbuzz"#' "$(UNPACK_DIR)/src/gui/configure.json"
 	# Let us decide the WINVER/_WIN32_WINNT
 	sed -i.orig 's,mingw: DEFINES += WINVER=0x0601,# mingw: DEFINES += WINVER=0x0601,' "$(UNPACK_DIR)/mkspecs/features/qt_build_config.prf"
 	$(MOVE)
@@ -70,7 +71,15 @@ QT_OPENGL := -opengl desktop
 endif
 
 ifdef HAVE_MACOSX
-QT_SPEC := darwin-g++
+QT_SPEC := macx-clang
+endif
+
+ifdef HAVE_LINUX
+ifdef HAVE_CLANG
+QT_SPEC := linux-clang
+else
+QT_SPEC := linux-g++
+endif
 endif
 
 ifdef HAVE_WIN32
@@ -81,6 +90,8 @@ else
 QT_SPEC := win32-g++
 endif
 
+endif
+
 ifdef HAVE_CROSS_COMPILE
 QT_PLATFORM := -xplatform $(QT_SPEC) -device-option CROSS_COMPILE=$(HOST)-
 else
@@ -89,12 +100,6 @@ QT_PLATFORM := -platform $(QT_SPEC)
 endif
 endif
 
-endif
-
-QT_PLATFORM += -device-option VLC_EXTRA_CFLAGS="-isystem $(PREFIX)/include" \
-	-device-option VLC_EXTRA_CXXFLAGS="-isystem $(PREFIX)/include" \
-	-device-option VLC_EXTRA_LDFLAGS="-L$(PREFIX)/lib"
-
 QT_CONFIG := -static -opensource -confirm-license $(QT_OPENGL) -no-pkg-config \
 	-no-sql-sqlite -no-gif -no-openssl -no-dbus -no-vulkan -no-sql-odbc -no-pch \
 	-no-feature-testlib -no-feature-itemmodeltester -no-feature-sqlmodel -no-feature-sql \
@@ -128,7 +133,7 @@ qmake_toolchain = echo "!host_build {"    > $(1)/.qmake.cache && \
 	echo "  QMAKE_LFLAGS   += $(BUILDLDFLAGS)"  >> $(1)/.qmake.cache && \
 	echo "}"                                           >> $(1)/.qmake.cache && \
 	echo "CONFIG -= create_libtool debug_and_release" >> $(1)/.qmake.cache && \
-	echo "CONFIG += nostrip object_parallel_to_source create_pc" >> $(1)/.qmake.cache
+	echo "CONFIG += nostrip object_parallel_to_source create_pc force_bootstrap" >> $(1)/.qmake.cache
 
 
 .qt: qt
@@ -147,7 +152,6 @@ qmake_toolchain = echo "!host_build {"    > $(1)/.qmake.cache && \
 		sub-network-install_subtargets
 	# Install tools
 	$(MAKE) -C $< -C src \
-		INSTALL_FILE=$(QT_QINSTALL) VLC_PREFIX="$(PREFIX)" \
 		sub-moc-install_subtargets \
 		sub-rcc-install_subtargets \
 		sub-uic-install_subtargets \


=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -16,7 +16,7 @@ SUFFIXES += .ui .h .hpp .moc.cpp .qml
 vlc_qt_check_SOURCES = gui/qt/vlc-qt-check.cpp gui/qt/plugins.hpp
 vlc_qt_check_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) -fPIC $(CXXFLAGS_qt)
 vlc_qt_check_CPPFLAGS = $(AM_CPPFLAGS)
-vlc_qt_check_LDADD = $(QT_LIBS) $(LIBS_qt) $(QT5_PLUGINS_LIBS) $(QT5_PLATFORM_PLUGINS_LIBS)
+vlc_qt_check_LDADD = $(QT_LIBS) $(LIBS_qt) $(QT5_PLUGINS_LIBS) $(QT5_PLATFORM_PLUGINS_LIBS) $(QT5_XCB_PLUGINS_LIBS) $(QT5_WAYLAND_PLUGINS_LIBS)
 
 libqt_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
 	-I$(srcdir)/gui/qt -I$(builddir)/gui/qt/ \



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8f662de470c065caa7c26bdb8a7636cd03635fab...6ea0cd77db7da8526059a3a0aa14774bb8fde95e

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8f662de470c065caa7c26bdb8a7636cd03635fab...6ea0cd77db7da8526059a3a0aa14774bb8fde95e
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list