Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
5918cd78 by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
contrib: qt: patch to add missing limits header
Otherwise, the compiler on Linux complains that std::numeric_limits
doesn't exist. The patch was only applied on Windows for some reasons..
- - - - -
0059afc9 by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
contrib: qt: enforce the creation of a .pc file
Ensure the files are generated with a pkgconfig file. In particular, we
want Qt plugins and QML plugins to have a .pc file so as to find them
and link them from configure.ac.
Note that the generated plugin file will not be valid currently, and in
particular Libs: will wrongly point to $(PREFIX)/lib although the
library is installed in $(PREFIX)/plugins/$$[PLUGIN_TYPE].
Also enforce VERSION for the plugins. Without enforcing VERSION, the
QMAKE_PKGCONFIG_VERSION is not set at all on Windows, and Version: in
the .pc file is not present. It leads to invalid pkgconfig files on
Windows.
- - - - -
52c46bfe by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
contrib: qt*: refactor make targets for clarity
Prepare the next patch by re-indenting the $(MAKE) target one by line.
The next patches will add the definition of new variables that will be
enforced from the command line.
- - - - -
45a4ac51 by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
contrib: qt: add install_wrapper.sh
The script is used by enforcing it through the INSTALL_FILE= make
variable and override the copy of .pc files so as to fix the lib=
variable and ensure the .pc file is linked to $(PREFIX)/lib/pkgconfig/
unlike the installed Qt plugins and qml plugins.
- - - - -
93bd0707 by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
contrib: qt: use the new INSTALL_FILE script
It overrides the installation of files, and in particular pkg-config
files, so that they get patched and linked to $(PREFIX)/lib/pkgconfig
immediately. There is no other functional change.
- - - - -
cfbd5997 by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
qt: Makefile: remove -rpath option
The module is not compiled conditionnally to an autoconf variable so
there is no point in giving an -rpath option here.
- - - - -
f067c577 by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
qt: separate plugins from qt.cpp
The Qt plugin list needs to be used both in vlc-qt-check binary and in
the Qt plugin itself.
- - - - -
9345e349 by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
qt: makefile: add QT5_PLUGINS/QT5_PLATFORM_PLUGINS
QT5_PLUGINS includes the cross-platform plugins for Qml, imageformats,
network, etc, while QT5_PLATFORM_PLUGINS includes mandatory plugins for
specific platforms. LIBS_qt currently contains the optional plugins.
- - - - -
a4d1aa4f by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
configure.ac: add support for static Qt plugins
It currently only supports the platforms that were already supported by
the previous contrib system patching. QT_STATIC is checked from the
qconfig.h file.
- - - - -
6261d2dc by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
configure.ac: add support for XCB in static Qt plugins
The plugins are not mandatory for a successful build, but might result
is no platform plugins being available. The rationale is being able to
build a wayland-only platform.
- - - - -
b65aae35 by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
qt: register plugins for xcb
They are currently enabled only when the matching contrib has been found
on the system. The plugin name doesn't match with the plugin from the
contrib, but still enforce at link time the plugin to be present.
- - - - -
d33f86fd by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
configure.ac: add support for wayland in static Qt plugins
- - - - -
900e3854 by Hugo Beauzée-Luyssen at 2022-09-09T20:38:46+00:00
qt: Makefile.am: use Qt5Wayland when available
- - - - -
873a7cdd by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
qt: register plugins for wayland
They are currently enabled only when the matching contrib has been found
on the system. The plugin name doesn't match with the plugin from the
contrib, but still enforce at link time the plugin to be present.
This always use the XdgShell integration regardless of what is supported
for now.
- - - - -
518c9994 by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
contrib: qt: remove the previous contrib hacks
- - - - -
4c8048e1 by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
contrib: qt: remove now unused AddStaticLink script
- - - - -
014b4799 by Hugo Beauzée-Luyssen at 2022-09-09T20:38:46+00:00
contribs: Add Qt11Extras
This is required when building for linux, and might cause a system
provided version to be used, causing conflicts during linking.
Typically, the error message at link time will look like this:
/usr/bin/ld: .libs/libqt_plugin.so: version node not found for symbol
qt_version_tag@Qt_5.10
Co-authored-by: Alexandre Janniaux <aja...@videolabs.io>
- - - - -
5734f6a0 by Hugo Beauzée-Luyssen at 2022-09-09T20:38:46+00:00
contribs: Add QtWayland
We need the plugins for the Qt Wayland integration.
Co-authored-by: Alexandre Janniaux <aja...@videolabs.io>
- - - - -
daffd90d by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
vlc-qt-check: output error to console
- - - - -
1704d543 by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
qt: Makefile: move vlc-qt-check up
So that we can factor together the different checks on X11 and Wayland
support.
- - - - -
5c2c7a8b by Alexandre Janniaux at 2022-09-09T20:38:46+00:00
contrib: qt: remove ad-hoc copy for macos
The plugins are now correctly installed to the correct location.
- - - - -
17 changed files:
- configure.ac
- − contrib/src/qt/AddStaticLink.sh
- + contrib/src/qt/install_wrapper.sh
- contrib/src/qt/rules.mak
- + contrib/src/qt/set-mkspecs-properties.patch
- contrib/src/qtdeclarative/rules.mak
- contrib/src/qtgraphicaleffects/rules.mak
- contrib/src/qtquickcontrols2/rules.mak
- contrib/src/qtsvg/rules.mak
- + contrib/src/qtwayland/SHA512SUMS
- + contrib/src/qtwayland/rules.mak
- + contrib/src/qtx11extras/SHA512SUMS
- + contrib/src/qtx11extras/rules.mak
- modules/gui/qt/Makefile.am
- + modules/gui/qt/plugins.hpp
- modules/gui/qt/qt.cpp
- modules/gui/qt/vlc-qt-check.cpp
Changes:
=====================================
configure.ac
=====================================
@@ -3872,6 +3872,13 @@ AS_IF([test "${enable_qt}" != "no"], [
],[
AC_MSG_WARN([Not building Qt Interface with X11 helpers.])
])
+ dnl TODO
+ PKG_CHECK_MODULES([QT5_WAYLAND], [Qt5WaylandClient], [
+ have_qt5_wayland="yes"
+ ],[
+ AC_MSG_WARN([Not building Qt Interface with wayland support.])
+ ])
+
QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)"
QT_VERSION="$(eval $PKG_CONFIG --modversion Qt5Gui)"
@@ -3882,6 +3889,40 @@ AS_IF([test "${enable_qt}" != "no"], [
AS_IF([test "${QMLCACHE}" = "no"], [
AC_MSG_WARN([qmlcachegen not found])
])
+
+ VLC_SAVE_FLAGS
+ CPPFLAGS="${CPPFLAGS} ${QT_CFLAGS}"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <qconfig.h>]],[[QT_STATIC]])],
+ [have_qt_static=yes],[have_qt_static=no])
+ VLC_RESTORE_FLAGS
+
+ AS_IF([test "${have_qt_static}" = "yes"],[
+ PKG_CHECK_MODULES([QT5_PLUGINS], [
+ qtgraphicaleffectsplugin qtquick2plugin qtquickcontrols2plugin
+ qtquicktemplates2plugin qquicklayoutsplugin windowplugin
+ qmlshapesplugin qmlplugin modelsplugin qsvg qsvgicon
+ qtgraphicaleffectsprivate qjpeg ])
+
+ PKG_CHECK_MODULES([QT5_XCB_PLUGINS], [
+ qxcb-glx-integration qxcb
+ ], [VLC_ADD_LIBS([qt],[${QT5_XCB_PLUGINS_LIBS}])], [:])
+
+ PKG_CHECK_MODULES([QT5_WAYLAND_PLUGINS], [
+ qwayland-generic qwayland-egl xdg-shell
+ ], [VLC_ADD_LIBS([qt],[${QT5_WAYLAND_PLUGINS_LIBS}])], [:])
+
+ dnl Platform plugins are mandatory on those platforms, as opposed to
+ dnl the previous integration for linux which are optional
+
+ AS_IF([test "${SYS}" = "mingw32"], [
+ PKG_CHECK_MODULES([QT5_PLATFORM_PLUGINS], [qwindows
qwindowsvistastyle])
+ ])
+
+ AS_IF([test "${SYS}" = "darwin" -a "${HAVE_OSX}" = 1], [
+ PKG_CHECK_MODULES([QT5_PLATFORM_PLUGINS], [qcocoa])
+ ])
+ ])
], [
AS_IF([test -n "${enable_qt}"],[
AC_MSG_ERROR([${QT_PKG_ERRORS}. If you want to build VLC without GUI,
pass --disable-qt.])
@@ -3907,6 +3948,7 @@ AS_IF([test "${enable_qt}" != "no"], [
AC_SUBST([QT_VERSION])
AM_CONDITIONAL([ENABLE_QT], [test "$enable_qt" != "no"])
AM_CONDITIONAL([HAVE_QT5_X11], [test "${have_qt5_x11}" = "yes"])
+AM_CONDITIONAL([HAVE_QT5_WAYLAND], [test "${have_qt5_wayland}" = "yes"])
dnl
dnl detect kde4-config patch (used for kde solids).
=====================================
contrib/src/qt/AddStaticLink.sh deleted
=====================================
@@ -1,48 +0,0 @@
-#! /bin/sh
-
-# Add a Qt plugin in the static pkg-config configuration of a Qt module
-# By default plugins are found in $PREFIX/plugins but are not seen by
pkg-config.
-# This is also done for qml plugins which are found in $PREFIX/qml.
-#
-# This could also be done in configure.ac to detect what plugins are available
and where to add them
-
-REAL_PREFIX="$1"
-OS_NAME="`uname -o`"
-if [ "$OS_NAME" = "Cygwin" -o "$OS_NAME" = "Msys" ]; then
-if [ ! `cygpath.exe -pm / || echo FAIL` = "FAIL" ]; then
- REAL_PREFIX=`cygpath.exe -pm ${REAL_PREFIX}`
-fi
-fi
-
-PREFIX=$(python3 -c "import os; print(os.path.realpath('${REAL_PREFIX}'))")
-PLUGIN_PATH="$3"
-PLUGIN_NAME="$4"
-
-PC_DEST="${PREFIX}/lib/pkgconfig/${2}.pc"
-PRL_SOURCE=${PREFIX}/${PLUGIN_PATH}/lib${PLUGIN_NAME}.prl
-
-if [ ! -f $PC_DEST ]; then
- echo "destination ${PC_DEST} doesn't exists" >&2
- exit 1
-fi
-
-if [ ! -f $PRL_SOURCE ]; then
- PRL_SOURCE=${PREFIX}/${PLUGIN_PATH}/${PLUGIN_NAME}.prl
- if [ ! -f $PRL_SOURCE ]; then
- echo "source ${PRL_SOURCE} doesn't exists" >&2
- exit 1
- fi
-fi
-
-# Get the links flags necessary to use the plugin from the installed PRL file
of the plugin
-# replace hardcoded pathes by {libdir}
-LIBS=$(sed -e "/QMAKE_PRL_LIBS =/ { \
- s/QMAKE_PRL_LIBS =//; \
- s@$PREFIX/lib@\${libdir}@g; \
- s@\$\$\[QT_INSTALL_LIBS\]@\${libdir}@g;" -e "p" \
- -e "};" -e "d" $PRL_SOURCE )
-
-# prepend the plugin that uses the module
-sed -i.bak -e "s# -l${2}# -l${PLUGIN_NAME} -l${2}#" $PC_DEST
-# add the plugin static dependencies to the ones of the module
-sed -i.bak -e "s#Libs.private: #Libs.private: $LIBS
-L\${prefix}/${PLUGIN_PATH} #" $PC_DEST
=====================================
contrib/src/qt/install_wrapper.sh
=====================================
@@ -0,0 +1,33 @@
+#!/usr/bin/env sh
+# Copyright (C) 2022 Videolabs
+# This file is distributed under the same license as the vlc package.
+set -e
+
+SCRIPT_DIR="$(cd "$(dirname "$0" )" && pwd -P)"
+SOURCE="$1"
+DEST="$2"
+
+install -m 644 -p $SOURCE $DEST
+
+# Filter pkg-config files only
+if [ "${SOURCE##*.}" != 'pc' ]; then
+ exit 0
+fi
+
+"${SCRIPT_DIR}/../pkg-static.sh" "${DEST}"
+
+# Filter pkg-config files that are not installed in the main pkg-config folder
+if [ "$(dirname $2)" -ef "${VLC_PREFIX}/lib/pkgconfig" ]; then
+ exit 0
+fi
+
+pkgconfigdir="$(cd "$(dirname "${DEST}")" && pwd -P)"
+
+# Filter packages installed in a pkgconfig/ folder
+if [ "$(basename "${pkgconfigdir}")" -eq "pkgconfig" ]; then
+ exit 0
+fi
+
+sed -i.orig "s,libdir=.*,libdir=${pkgconfigdir}," "${DEST}"
+mkdir -p "${VLC_PREFIX}/lib/pkgconfig"
+ln -sf "${DEST}" "${VLC_PREFIX}/lib/pkgconfig/"
=====================================
contrib/src/qt/rules.mak
=====================================
@@ -53,10 +53,10 @@ else
cd $(UNPACK_DIR); for i in QtFontDatabaseSupport
QtWindowsUIAutomationSupport QtEventDispatcherSupport QtCore; do \
sed -i.orig -e 's,"../../../../../src,"../src,g'
include/$$i/$(QT_VERSION)/$$i/private/*.h; done
endif
- $(APPLY) $(SRC)/qt/qt-fix-gcc11-build.patch
-
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
$(MOVE)
@@ -108,6 +108,7 @@ QT_CONFIG += -no-direct2d
endif
QT_ENV_VARS := $(HOSTVARS) DXSDK_DIR=$(PREFIX)/bin
+QT_QINSTALL="$(shell cd $(SRC)/qt/; pwd -P)/install_wrapper.sh"
.qt: qt
# Prevent all Qt contribs from generating and installing libtool .la
files
@@ -115,24 +116,32 @@ QT_ENV_VARS := $(HOSTVARS) DXSDK_DIR=$(PREFIX)/bin
+cd $< && $(QT_ENV_VARS) ./configure $(QT_PLATFORM) $(QT_CONFIG)
-prefix $(PREFIX) -hostprefix $(PREFIX)/lib/qt5
# Make && Install libraries
cd $< && $(QT_ENV_VARS) $(MAKE)
- cd $< && $(MAKE) -C src sub-corelib-install_subtargets
sub-gui-install_subtargets sub-widgets-install_subtargets
sub-platformsupport-install_subtargets sub-zlib-install_subtargets
sub-bootstrap-install_subtargets sub-network-install_subtargets
+ cd $< && $(MAKE) -C src \
+ INSTALL_FILE=$(QT_QINSTALL) VLC_PREFIX="$(PREFIX)" \
+ sub-corelib-install_subtargets \
+ sub-gui-install_subtargets \
+ sub-widgets-install_subtargets \
+ sub-platformsupport-install_subtargets \
+ sub-zlib-install_subtargets \
+ sub-bootstrap-install_subtargets \
+ sub-network-install_subtargets
# Install tools
- cd $< && $(MAKE) -C src sub-moc-install_subtargets
sub-rcc-install_subtargets sub-uic-install_subtargets
sub-qlalr-install_subtargets
+ cd $< && $(MAKE) -C src \
+ INSTALL_FILE=$(QT_QINSTALL) VLC_PREFIX="$(PREFIX)" \
+ sub-moc-install_subtargets \
+ sub-rcc-install_subtargets \
+ sub-uic-install_subtargets \
+ sub-qlalr-install_subtargets
# Install plugins
- cd $< && $(MAKE) -C src -C plugins sub-imageformats-install_subtargets
sub-platforms-install_subtargets sub-styles-install_subtargets
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5Gui plugins/imageformats qjpeg
+ cd $< && $(MAKE) -C src -C plugins \
+ INSTALL_FILE=$(QT_QINSTALL) VLC_PREFIX="$(PREFIX)" \
+ sub-imageformats-install_subtargets \
+ sub-platforms-install_subtargets \
+ sub-styles-install_subtargets
+
ifdef HAVE_WIN32
# Add the private include to our project (similar to using
"gui-private" in a qmake project) as well as ANGLE headers
sed -i.orig -e 's#-I$${includedir}/QtGui#-I$${includedir}/QtGui
-I$${includedir}/QtGui/$(QT_VERSION)/QtGui -I$${includedir}/QtANGLE#'
$(PREFIX)/lib/pkgconfig/Qt5Gui.pc
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5Gui plugins/platforms qwindows
- # Vista styling
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5Widgets plugins/styles
qwindowsvistastyle
-endif
-
-ifdef HAVE_MACOSX
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5Gui plugins/platforms qcocoa
- # Qt Cocoa plugins depend on printer support...
- cd $< && cp ./lib/libQt5PrintSupport.a "$(PREFIX)/lib/"
endif
#fix host tools headers to avoid collusion with target headers
=====================================
contrib/src/qt/set-mkspecs-properties.patch
=====================================
@@ -0,0 +1,49 @@
+--- a/mkspecs/features/qml_plugin.prf 2020-09-02 12:15:07.000000000 +0200
++++ b/mkspecs/features/qml_plugin.prf 2022-08-31 10:58:10.110600024 +0200
+@@ -12,7 +12,7 @@
+ load(qt_build_config)
+
+ TEMPLATE = lib
+-CONFIG += plugin
++CONFIG += plugin create_pc
+
+ if(win32|mac):!macx-xcode {
+ qtConfig(debug_and_release): CONFIG += debug_and_release
+--- a/mkspecs/features/qt_plugin.prf 2020-09-02 12:15:07.000000000 +0200
++++ b/mkspecs/features/qt_plugin.prf 2022-08-31 10:59:48.380662936 +0200
+@@ -14,8 +14,8 @@
+ isEmpty(PLUGIN_TYPE): error("PLUGIN_TYPE (plugins/ subdirectory) needs to be
defined.")
+
+ TEMPLATE = lib
+-CONFIG += plugin
++CONFIG += plugin create_pc
+ DESTDIR = $$MODULE_BASE_OUTDIR/plugins/$$PLUGIN_TYPE
+
+ win32:CONFIG(shared, static|shared) {
+ # Embed a VERSIONINFO resource into the plugin's DLL.
+--- a/mkspecs/features/qml_plugin.prf 2022-09-02 14:15:09.023765377 +0200
++++ b/mkspecs/features/qml_plugin.prf 2022-09-02 14:59:06.296938907 +0200
+@@ -30,9 +30,9 @@
+ }
+ isEmpty(TARGETPATH): TARGETPATH = $$eval(QT.$${CXX_MODULE}.name)
+
++isEmpty(VERSION): VERSION = $$MODULE_VERSION
+ win32:CONFIG(shared, static|shared) {
+ # Embed a VERSIONINFO resource into the plugin's DLL.
+- isEmpty(VERSION): VERSION = $$MODULE_VERSION
+ CONFIG += skip_target_version_ext
+ }
+
+--- a/mkspecs/features/qt_plugin.prf 2022-09-02 14:15:04.593670115 +0200
++++ b/mkspecs/features/qt_plugin.prf 2022-09-02 14:59:06.296938907 +0200
+@@ -17,9 +17,9 @@
+ CONFIG += plugin create_pc
+ DESTDIR = $$MODULE_BASE_OUTDIR/plugins/$$PLUGIN_TYPE
+
++isEmpty(VERSION): VERSION = $$QT_VERSION
+ win32:CONFIG(shared, static|shared) {
+ # Embed a VERSIONINFO resource into the plugin's DLL.
+- isEmpty(VERSION): VERSION = $$QT_VERSION
+ CONFIG += skip_target_version_ext
+ }
+
=====================================
contrib/src/qtdeclarative/rules.mak
=====================================
@@ -35,14 +35,20 @@ QT_DECLARATIVE_CONFIG := \
cd $</src && $(PREFIX)/lib/qt5/bin/qmake -o Makefile src.pro
# Build & install only what we require
# Invoke the build rules one at a time as some rule dependencies seem
to be broken
- cd $< && $(MAKE) -C src sub-quick-make_first-ordered \
+ cd $< && $(MAKE) -C src \
+ INSTALL_FILE="$(QT_QINSTALL)" VLC_PREFIX="$(PREFIX)" \
+ sub-quick-make_first-ordered \
sub-qmlmodels-make_first-ordered \
sub-qmldevtools-make_first-ordered \
sub-qmlworkerscript-make_first-ordered
# We don't use particles, but the import target (which generates the
qtquick2plugin.a) require
# the particle module to be built
- cd $< && $(MAKE) -C src sub-particles-make_first-ordered
- cd $< && $(MAKE) -C src sub-quick-install_subtargets \
+ cd $< && $(MAKE) -C src \
+ INSTALL_FILE="$(QT_QINSTALL)" VLC_PREFIX="$(PREFIX)" \
+ sub-particles-make_first-ordered
+ cd $< && $(MAKE) -C src \
+ INSTALL_FILE="$(QT_QINSTALL)" VLC_PREFIX="$(PREFIX)" \
+ sub-quick-install_subtargets \
sub-qml-install_subtargets \
sub-quickwidgets-install_subtargets \
sub-imports-install_subtargets \
@@ -50,12 +56,7 @@ QT_DECLARATIVE_CONFIG := \
sub-qmlworkerscript-install_subtargets \
sub-quickshapes-install_subtargets
cd $</tools && $(PREFIX)/lib/qt5/bin/qmake -o Makefile tools.pro
- cd $< && $(MAKE) -C tools sub-qmlcachegen-install_subtargets
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5Quick qml/QtQuick.2
qtquick2plugin
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5Quick qml/QtQuick/Layouts
qquicklayoutsplugin
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5Quick qml/QtQuick/Window.2
windowplugin
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5Quick qml/QtQuick/Shapes
qmlshapesplugin
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5Qml qml/QtQml qmlplugin
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5Qml qml/QtQml/Models.2
modelsplugin
-
+ cd $< && $(MAKE) -C tools \
+ INSTALL_FILE="$(QT_QINSTALL)" VLC_PREFIX="$(PREFIX)" \
+ sub-qmlcachegen-install_subtargets
touch $@
=====================================
contrib/src/qtgraphicaleffects/rules.mak
=====================================
@@ -25,9 +25,5 @@ qtgraphicaleffects:
qtgraphicaleffects-everywhere-src-$(QTGE_VERSION).tar.xz .su
.qtgraphicaleffects: qtgraphicaleffects
cd $< && $(PREFIX)/lib/qt5/bin/qmake
- # Make && Install libraries
- cd $< && $(MAKE)
- cd $< && $(MAKE) -C src sub-effects-install_subtargets
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5QuickWidgets
qml/QtGraphicalEffects qtgraphicaleffectsplugin
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5QuickWidgets
qml/QtGraphicalEffects/private qtgraphicaleffectsprivate
+ cd $< && $(MAKE) install INSTALL_FILE="$(QT_QINSTALL)"
VLC_PREFIX="$(PREFIX)"
touch $@
=====================================
contrib/src/qtquickcontrols2/rules.mak
=====================================
@@ -38,7 +38,6 @@ ifndef HAVE_CROSS_COMPILE
cd $<; for i in QtQuickControls2 QtQuickTemplates2; do \
sed -i -e 's,"../../../../../src,"../src,g'
include/$$i/$(QTQC2_VERSION)/$$i/private/*.h; done
endif
- cd $< && $(MAKE) install_subtargets
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5QuickControls2
qml/QtQuick/Controls.2 qtquickcontrols2plugin
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5QuickControls2
qml/QtQuick/Templates.2 qtquicktemplates2plugin
+ cd $< && $(MAKE) install_subtargets \
+ INSTALL_FILE="$(QT_QINSTALL)" VLC_PREFIX="$(PREFIX)"
touch $@
=====================================
contrib/src/qtsvg/rules.mak
=====================================
@@ -28,7 +28,7 @@ qtsvg: qtsvg-everywhere-src-$(QTSVG_VERSION).tar.xz .sum-qtsvg
cd $< && $(PREFIX)/lib/qt5/bin/qmake
# Make && Install libraries
cd $< && $(MAKE)
- cd $< && $(MAKE) -C src sub-plugins-install_subtargets
sub-svg-install_subtargets
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5Svg plugins/iconengines
qsvgicon
- $(SRC)/qt/AddStaticLink.sh "$(PREFIX)" Qt5Svg plugins/imageformats qsvg
+ cd $< && $(MAKE) -C src sub-plugins-install_subtargets \
+ INSTALL_FILE="$(QT_QINSTALL)" VLC_PREFIX="$(PREFIX)" \
+ sub-svg-install_subtargets
touch $@
=====================================
contrib/src/qtwayland/SHA512SUMS
=====================================
@@ -0,0 +1 @@
+d6619f35b3ab163372a0d49a2221c487d5936b6d9ebeb92a7fd41521c424d550eea7c5c584e07f15bde1ec5ece1bd5774845eb9956ce793e546197ffdb28d594
qtwayland-5.15.1.tar.xz
=====================================
contrib/src/qtwayland/rules.mak
=====================================
@@ -0,0 +1,31 @@
+# qtwayland
+
+QTWAYLAND_VERSION_MAJOR := 5.15
+QTWAYLAND_VERSION := $(QTWAYLAND_VERSION_MAJOR).1
+QTWAYLAND_URL :=
http://download.qt.io/development_releases/qt/5.12/5.12.0-beta1/submodules/qtwayland-everywhere-src-5.12.0-beta1.tar.xz
+QTWAYLAND_URL :=
http://download.qt.io/official_releases/qt/$(QTWAYLAND_VERSION_MAJOR)/$(QTWAYLAND_VERSION)/submodules/qtwayland-everywhere-src-$(QTWAYLAND_VERSION).tar.xz
+
+DEPS_qtwayland = qtdeclarative $(DEPS_qtdeclarative)
+
+$(TARBALLS)/qtwayland-$(QTWAYLAND_VERSION).tar.xz:
+ $(call download,$(QTWAYLAND_URL))
+
+.sum-qtwayland: qtwayland-$(QTWAYLAND_VERSION).tar.xz
+
+qtwayland: qtwayland-$(QTWAYLAND_VERSION).tar.xz .sum-qtwayland
+ $(UNPACK)
+ mv qtwayland-everywhere-src-$(QTWAYLAND_VERSION)
qtwayland-$(QTWAYLAND_VERSION)
+ sed -i.orig '/SUBDIRS/d' "$(UNPACK_DIR)/tests/tests.pro"
+ sed -i.orig 's/"egl drm"/"egl"/g' \
+ $(UNPACK_DIR)/src/compositor/configure.json \
+ $(UNPACK_DIR)/src/client/configure.json
+ $(MOVE)
+
+.qtwayland: qtwayland
+ cd $< && $(PREFIX)/lib/qt5/bin/qmake
+ # Make && Install libraries
+ cd $< && $(MAKE)
+ cd $< && $(MAKE) -C src \
+ INSTALL_FILE="$(QT_QINSTALL)" VLC_PREFIX="$(PREFIX)" \
+ sub-plugins-install_subtargets
+ touch $@
=====================================
contrib/src/qtx11extras/SHA512SUMS
=====================================
@@ -0,0 +1 @@
+59155fc97da3f7571da37dd63bed79f61580fa4df7d4886df51520ea6fe8e01e7c09f0aa9caaeaa986c0e5eac11d4479c99c892da4d075c6369b535fd505b084
qtx11extras-5.15.1.tar.xz
=====================================
contrib/src/qtx11extras/rules.mak
=====================================
@@ -0,0 +1,23 @@
+# qtx11extras
+
+QTX11_VERSION_MAJOR := 5.15
+QTX11_VERSION:= $(QTX11_VERSION_MAJOR).1
+QTX11_URL :=
http://download.qt.io/official_releases/qt/$(QTX11_VERSION_MAJOR)/$(QTX11_VERSION)/submodules/qtx11extras-everywhere-src-$(QTX11_VERSION).tar.xz
+
+DEPS_qtx11extras += qt $(DEPS_qt)
+
+$(TARBALLS)/qtx11extras-$(QTX11_VERSION).tar.xz:
+ $(call download,$(QTX11_URL))
+
+.sum-qtx11extras: qtx11extras-$(QTX11_VERSION).tar.xz
+
+qtx11extras: qtx11extras-$(QTX11_VERSION).tar.xz .sum-qtx11extras
+ $(UNPACK)
+ mv qtx11extras-everywhere-src-$(QTX11_VERSION)
qtx11extras-$(QTX11_VERSION)
+ $(MOVE)
+
+.qtx11extras: qtx11extras
+ cd $< && $(PREFIX)/lib/qt5/bin/qmake
+ # Make && Install libraries
+ cd $< && $(MAKE) install INSTALL_FILE="$(QT_QINSTALL)"
VLC_PREFIX="$(PREFIX)"
+ touch $@
=====================================
modules/gui/qt/Makefile.am
=====================================
@@ -13,6 +13,11 @@
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)
+
libqt_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
-I$(srcdir)/gui/qt -I$(builddir)/gui/qt/ \
-I$(builddir)/gui/qt/dialogs/extended \
@@ -27,14 +32,16 @@ libqt_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) \
-I$(builddir)/gui/qt/dialogs/vlm
libqt_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) $(CXXFLAGS_qt)
-libqt_plugin_la_LIBADD = $(QT_LIBS) $(LIBS_qt) $(LIBM)
-libqt_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)'
+libqt_plugin_la_LIBADD = $(QT_LIBS) $(LIBS_qt) $(LIBM) \
+ $(QT5_PLUGINS_LIBS) $(QT5_PLATFORM_PLUGINS_LIBS)
+libqt_plugin_la_LDFLAGS = $(AM_LDFLAGS)
if HAVE_DARWIN
libqt_plugin_la_LDFLAGS += -Wl,-framework,Cocoa
endif
if HAVE_QT5_X11
libqt_plugin_la_CXXFLAGS += $(QT5_X11_CFLAGS) -DQT5_HAS_X11
libqt_plugin_la_LIBADD += $(QT5_X11_LIBS) $(X_LIBS) $(X_PRE_LIB) -lX11
+vlc_qt_check_CPPFLAGS += $(QT5_WAYLAND_CFLAGS) -DQT5_HAS_X11
endif
if HAVE_XCB
@@ -55,6 +62,12 @@ libqt_plugin_la_CPPFLAGS += -DQT5_HAS_WAYLAND \
libqt_plugin_la_CXXFLAGS += $(WAYLAND_CLIENT_CFLAGS)
libqt_plugin_la_LIBADD += $(WAYLAND_CLIENT_LIBS)
endif
+if HAVE_QT5_WAYLAND
+libqt_plugin_la_CPPFLAGS += $(QT5_WAYLAND_CFLAGS)
+libqt_plugin_la_LIBADD += $(QT5_WAYLAND_LIBS)
+vlc_qt_check_CPPFLAGS += $(QT5_WAYLAND_CFLAGS) -DQT5_HAS_WAYLAND
+vlc_qt_check_LDADD += $(QT5_WAYLAND_LIBS)
+endif
if HAVE_WIN32
libqt_plugin_la_CXXFLAGS += $(LIBCOMCXXFLAGS)
libqt_plugin_la_LIBADD += $(LIBCOM) -lcomctl32 -luuid -ld3d11
@@ -67,7 +80,7 @@ libqt_plugin_la_CPPFLAGS += -DQT_QML_DEBUG
endif
libqt_plugin_la_SOURCES = \
- gui/qt/qt.cpp gui/qt/qt.hpp \
+ gui/qt/qt.cpp gui/qt/qt.hpp gui/qt/plugins.hpp \
gui/qt/dialogs/bookmarks/bookmarks.cpp
gui/qt/dialogs/bookmarks/bookmarks.hpp \
gui/qt/dialogs/dialogs/dialogmodel.cpp \
gui/qt/dialogs/dialogs/dialogmodel.hpp \
@@ -1058,10 +1071,6 @@ gui/qt/resources.cpp: $(lib_qt_plugin_la_QRC)
$(libqt_plugin_la_RES) $(libqt_plu
endif
-vlc_qt_check_SOURCES = gui/qt/vlc-qt-check.cpp
-vlc_qt_check_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) -fPIC $(CXXFLAGS_qt)
-vlc_qt_check_LDADD = $(QT_LIBS)
-
if ENABLE_QT
gui_LTLIBRARIES += libqt_plugin.la
BUILT_SOURCES += $(nodist_libqt_plugin_la_SOURCES)
=====================================
modules/gui/qt/plugins.hpp
=====================================
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * plugins.hpp : Qt static plugin integration
+ ****************************************************************************
+ * Copyright © 2006-2009 the VideoLAN team
+ * Copyright © 2022 Videolabs
+ *
+ * Authors: Clément Stenac <zorg...@videolan.org>
+ * Jean-Baptiste Kempf <j...@videolan.org>
+ * Alexandre Janniaux <aja...@videolabs.io>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301,
USA.
+ *****************************************************************************/
+
+#if !defined(QT_STATIC) && !defined(QT_SHARED)
+# error "Make sure qconfig.h was included before"
+#endif
+
+#if !defined(Q_IMPORT_PLUGIN)
+# error "Make sure QtPlugin was included before"
+#endif
+
+#ifdef QT_STATIC /* For static builds */
+ Q_IMPORT_PLUGIN(QSvgIconPlugin)
+ Q_IMPORT_PLUGIN(QSvgPlugin)
+ Q_IMPORT_PLUGIN(QJpegPlugin)
+ Q_IMPORT_PLUGIN(QtQuick2Plugin)
+ Q_IMPORT_PLUGIN(QtQuickControls2Plugin)
+ Q_IMPORT_PLUGIN(QtQuickLayoutsPlugin)
+ Q_IMPORT_PLUGIN(QtQuick2WindowPlugin)
+ Q_IMPORT_PLUGIN(QtQuickTemplates2Plugin)
+ Q_IMPORT_PLUGIN(QtQmlModelsPlugin)
+ Q_IMPORT_PLUGIN(QtGraphicalEffectsPlugin)
+ Q_IMPORT_PLUGIN(QtGraphicalEffectsPrivatePlugin)
+ Q_IMPORT_PLUGIN(QmlShapesPlugin)
+
+ #if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
+ Q_IMPORT_PLUGIN(QtQmlPlugin)
+ #endif
+
+ #ifdef _WIN32
+ Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin)
+ Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
+ #elif defined(Q_OS_MACOS)
+ Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)
+ #endif
+
+ #if defined(QT5_HAS_X11)
+ Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)
+ Q_IMPORT_PLUGIN(QXcbGlxIntegrationPlugin)
+ #endif
+
+ #if defined(QT5_HAS_WAYLAND)
+ Q_IMPORT_PLUGIN(QWaylandEglPlatformIntegrationPlugin)
+ Q_IMPORT_PLUGIN(QWaylandIntegrationPlugin)
+ Q_IMPORT_PLUGIN(QWaylandXdgShellIntegrationPlugin)
+ #endif
+#endif
=====================================
modules/gui/qt/qt.cpp
=====================================
@@ -25,6 +25,13 @@
# include "config.h"
#endif
+#include <qconfig.h>
+#include <QtPlugin>
+
+QT_BEGIN_NAMESPACE
+#include "plugins.hpp"
+QT_END_NAMESPACE
+
#define VLC_MODULE_LICENSE VLC_LICENSE_GPL_2_PLUS
#include <stdlib.h>
@@ -68,36 +75,7 @@ extern "C" char **environ;
#include <vlc_window.h>
#include <vlc_cxx_helpers.hpp>
-#ifdef QT_STATIC /* For static builds */
- #include <QtPlugin>
- #include <QQuickWindow>
-
- #ifdef QT_STATICPLUGIN
- Q_IMPORT_PLUGIN(QSvgIconPlugin)
- Q_IMPORT_PLUGIN(QSvgPlugin)
- Q_IMPORT_PLUGIN(QJpegPlugin)
- Q_IMPORT_PLUGIN(QtQuick2Plugin)
- Q_IMPORT_PLUGIN(QtQuickControls2Plugin)
- Q_IMPORT_PLUGIN(QtQuickLayoutsPlugin)
- Q_IMPORT_PLUGIN(QtQuick2WindowPlugin)
- Q_IMPORT_PLUGIN(QtQuickTemplates2Plugin)
- Q_IMPORT_PLUGIN(QtQmlModelsPlugin)
- Q_IMPORT_PLUGIN(QtGraphicalEffectsPlugin)
- Q_IMPORT_PLUGIN(QtGraphicalEffectsPrivatePlugin)
- Q_IMPORT_PLUGIN(QmlShapesPlugin)
-
- #if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
- Q_IMPORT_PLUGIN(QtQmlPlugin)
- #endif
-
- #ifdef _WIN32
- Q_IMPORT_PLUGIN(QWindowsVistaStylePlugin)
- Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)
- #elif defined(Q_OS_MACOS)
- Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)
- #endif
- #endif
-#endif
+#include <QQuickWindow>
#ifndef X_DISPLAY_MISSING
# include <vlc_xlib.h>
=====================================
modules/gui/qt/vlc-qt-check.cpp
=====================================
@@ -24,14 +24,26 @@
#include <stdlib.h>
#include <QApplication>
+#include <QTextStream>
+#include <QtGlobal>
+#include <iostream>
static void messageOutput(QtMsgType type, const QMessageLogContext &,
- const QString &)
+ const QString &msg)
{
if (type == QtFatalMsg)
+ {
+ std::cerr << msg.toUtf8().constData() << std::endl;
exit(1);
+ }
}
+#include <qconfig.h>
+#include <QtPlugin>
+QT_BEGIN_NAMESPACE
+#include "plugins.hpp"
+QT_END_NAMESPACE
+
int main(int argc, char *argv[])
{
qInstallMessageHandler(messageOutput);
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/compare/84990ffadaf8bfc3df56298d5473be58cf2a80d8...5c2c7a8bd2ec78507fe0634372ac801984d5535c
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/compare/84990ffadaf8bfc3df56298d5473be58cf2a80d8...5c2c7a8bd2ec78507fe0634372ac801984d5535c
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits