[vlc-commits] [Git][videolan/vlc][master] 5 commits: contrib: move the tool version regex in a variable
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri May 31 14:09:17 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
d4bb07bb by Steve Lhomme at 2024-05-31T12:44:38+00:00
contrib: move the tool version regex in a variable
- - - - -
93b24240 by Steve Lhomme at 2024-05-31T12:44:38+00:00
contrib: qt: only look for the native tools path for cross compilation
For native compilation, native tools are built with the libraries.
- - - - -
9cf2364d by Steve Lhomme at 2024-05-31T12:44:38+00:00
contrib: qt: centralize the decision to use system or contrib tools
We cannot mix system tools and tools in contribs because qtpaths6 will only provide one of those.
So either we build all of them, or we build none of them.
- - - - -
9e089f4e by Steve Lhomme at 2024-05-31T12:44:38+00:00
contrib: qt: allow using Qt tools with different patch version
- - - - -
7e46edcb by Steve Lhomme at 2024-05-31T12:44:38+00:00
CI: update Docker images with prebuilt VLC contrib tools
And without ragel.
- snap is left out because there's a new image coming
- - - - -
5 changed files:
- contrib/src/main.mak
- contrib/src/qt/rules.mak
- contrib/src/qtdeclarative/rules.mak
- contrib/src/qtshadertools/rules.mak
- extras/ci/gitlab-ci.yml
Changes:
=====================================
contrib/src/main.mak
=====================================
@@ -266,7 +266,8 @@ PKG_CONFIG_PATH := $(PREFIX)/lib/pkgconfig:$(PREFIX)/share/pkgconfig:$(PKG_CONFI
export PKG_CONFIG_PATH
# Get the version of a system tool $1 and pass it through the $2 command(s)
-system_tool_version = $(shell PATH="${SYSTEM_PATH}" $(1) 2>/dev/null | head -1 | sed -ne 's/[^0-9]*\([0-9]\([0-9a-zA-Z\.\-]*\)\)\(.*\)/\1/p' | $(2))
+FULL_VERSION_REGEX := 's/[^0-9]*\([0-9]\([0-9a-zA-Z\.\-]*\)\)\(.*\)/\1/p'
+system_tool_version = $(shell PATH="${SYSTEM_PATH}" $(1) 2>/dev/null | head -1 | sed -ne ${FULL_VERSION_REGEX} | $(2))
# Get the major.minor version of a system tool
system_tool_majmin = $(call system_tool_version, $(1), cut -d '.' -f -2)
@@ -541,22 +542,41 @@ MESONCLEAN = rm -rf $(BUILD_DIR)/meson-private
MESONBUILD = meson compile -C $(BUILD_DIR) $(MESON_BUILD) && meson install -C $(BUILD_DIR)
# shared Qt config
+ifdef HAVE_CROSS_COMPILE
+QT_LIBEXECS := $(shell qmake6 -query QT_HOST_LIBEXECS)
+QT_BINS := $(shell qmake6 -query QT_HOST_BINS)
+else
+QT_LIBEXECS := $(shell qmake6 -query QT_INSTALL_LIBEXECS):$(shell qmake6 -query QT_HOST_LIBEXECS)
+QT_BINS := $(shell qmake6 -query QT_INSTALL_BINS):$(shell qmake6 -query QT_HOST_BINS)
+endif
+
ifeq ($(call system_tool_majmin, qmake6 -query QT_VERSION),$(QTBASE_VERSION_MAJOR))
-# using system Qt native tools
+ifeq ($(call system_tool_majmin, PATH="${QT_LIBEXECS}" moc --version),$(QTBASE_VERSION_MAJOR))
+ifeq ($(call system_tool_majmin, PATH="${QT_BINS}" qsb --version),$(QTBASE_VERSION_MAJOR))
+ifeq ($(call system_tool_majmin, PATH="${QT_LIBEXECS}" qmlcachegen --version),$(QTBASE_VERSION_MAJOR))
+QT_USES_SYSTEM_TOOLS = 1
+endif
+endif
+endif
+endif
+
ifdef HAVE_CROSS_COMPILE
+ifdef QT_USES_SYSTEM_TOOLS
+ # using system Qt native tools
QT_HOST_PREFIX := $(shell PATH="${SYSTEM_PATH}" qmake6 -query QT_HOST_PREFIX)
QT_HOST_LIBS := $(shell PATH="${SYSTEM_PATH}" qmake6 -query QT_HOST_LIBS)
- QT_HOST_PATH := -DQT_HOST_PATH=$(QT_HOST_PREFIX) -DQT_HOST_PATH_CMAKE_DIR=$(QT_HOST_LIBS)/cmake
-endif
else
-# using locally compiled Qt native tools
-ifdef HAVE_CROSS_COMPILE
+ # using locally compiled Qt native tools
QT_HOST_PREFIX := $(BUILDPREFIX)
QT_HOST_LIBS := $(QT_HOST_PREFIX)/lib
- QT_HOST_PATH := -DQT_HOST_PATH=$(QT_HOST_PREFIX) -DQT_HOST_PATH_CMAKE_DIR=$(QT_HOST_LIBS)/cmake
endif
+QT_HOST_PATH := -DQT_HOST_PATH=$(QT_HOST_PREFIX) -DQT_HOST_PATH_CMAKE_DIR=$(QT_HOST_LIBS)/cmake
endif
QT_CMAKE_CONFIG := -DCMAKE_TOOLCHAIN_FILE=$(PREFIX)/lib/cmake/Qt6/qt.toolchain.cmake $(QT_HOST_PATH)
+ifdef QT_USES_SYSTEM_TOOLS
+# We checked the versions match, assume we know what we're going
+QT_CMAKE_CONFIG += -DQT_NO_PACKAGE_VERSION_CHECK=TRUE
+endif
ifdef GPL
REQUIRE_GPL =
=====================================
contrib/src/qt/rules.mak
=====================================
@@ -28,7 +28,7 @@ PKGS_FOUND += qt
endif
ifndef HAVE_CROSS_COMPILE
PKGS_FOUND += qt-tools
-else ifeq ($(call system_tool_majmin, moc --version),$(QTBASE_VERSION_MAJOR))
+else ifdef QT_USES_SYSTEM_TOOLS
PKGS_FOUND += qt-tools
endif
@@ -96,6 +96,11 @@ QTBASE_NATIVE_CONFIG := -DQT_BUILD_EXAMPLES=FALSE -DQT_BUILD_TESTS=FALSE -DFEATU
-DFEATURE_texthtmlparser=OFF -DFEATURE_cssparser=OFF -DFEATURE_textodfwriter=OFF -DFEATURE_textmarkdownreader=OFF \
-DFEATURE_textmarkdownwriter=OFF -DINPUT_libb2=no -DFEATURE_harfbuzz=OFF -DFEATURE_freetype=OFF -DINPUT_opengl=no
+ifdef QT_USES_SYSTEM_TOOLS
+# We checked the versions match, assume we know what we're going
+QTBASE_CONFIG += -DQT_NO_PACKAGE_VERSION_CHECK=TRUE
+endif
+
.qt-tools: BUILD_DIR=$</vlc_native
.qt-tools: qt
$(CMAKECLEAN)
=====================================
contrib/src/qtdeclarative/rules.mak
=====================================
@@ -20,7 +20,7 @@ PKGS_FOUND += qtdeclarative
endif
ifndef HAVE_CROSS_COMPILE
PKGS_FOUND += qtdeclarative-tools
-else ifeq ($(call system_tool_majmin, qmlcachegen --version),$(QTBASE_VERSION_MAJOR))
+else ifdef QT_USES_SYSTEM_TOOLS
PKGS_FOUND += qtdeclarative-tools
endif
=====================================
contrib/src/qtshadertools/rules.mak
=====================================
@@ -15,7 +15,7 @@ PKGS_TOOLS += qtshadertools-tools
endif
PKGS_ALL += qtshadertools-tools
-ifeq ($(call system_tool_majmin, qsb --version),$(QTBASE_VERSION_MAJOR))
+ifdef QT_USES_SYSTEM_TOOLS
PKGS_FOUND += qtshadertools-tools
endif
=====================================
extras/ci/gitlab-ci.yml
=====================================
@@ -20,14 +20,14 @@ default:
variables:
VLC_TEST_TIMEOUT: 60
- VLC_WIN64_IMAGE: registry.videolan.org/vlc-debian-win64-posix:20240212151604
- VLC_WIN_LLVM_MSVCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-msvcrt:20240212151604
- VLC_WIN_LLVM_UCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-ucrt:20240212151604
+ VLC_WIN64_IMAGE: registry.videolan.org/vlc-debian-win64-posix:20240522152555
+ VLC_WIN_LLVM_MSVCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-msvcrt:20240522152555
+ VLC_WIN_LLVM_UCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-ucrt:20240522152555
VLC_DEBIAN_IMAGE: registry.videolan.org/vlc-debian-unstable:20240402131352
- VLC_ANDROID_IMAGE: registry.videolan.org/vlc-debian-android:20240514145422
+ VLC_ANDROID_IMAGE: registry.videolan.org/vlc-debian-android:20240522152555
VLC_SNAP_IMAGE: registry.videolan.org/vlc-ubuntu-focal:20231013031754
- VLC_RASPBIAN_IMAGE: registry.videolan.org/vlc-ubuntu-raspberry:20231013032350
- VLC_WASM_EMSCRIPTEN: registry.videolan.org/vlc-debian-wasm-emscripten:20240313095757
+ VLC_RASPBIAN_IMAGE: registry.videolan.org/vlc-ubuntu-raspberry:20240514145422
+ VLC_WASM_EMSCRIPTEN: registry.videolan.org/vlc-debian-wasm-emscripten:20240522152555
.variables-debian: &variables-debian
HOST_ARCH: x86_64
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b2a8bb1be60315b7d8afa1151cfc6a19890aa977...7e46edcb0c14628165d80123997a6a42ff51b5b7
--
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/b2a8bb1be60315b7d8afa1151cfc6a19890aa977...7e46edcb0c14628165d80123997a6a42ff51b5b7
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