[vlc-commits] [Git][videolan/vlc][master] 3 commits: contrib: qt: use a single source URL for all Qt packages
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Oct 15 16:06:04 UTC 2022
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
94b8eb85 by Steve Lhomme at 2022-10-15T15:12:47+00:00
contrib: qt: use a single source URL for all Qt packages
- - - - -
44b9ee3f by Steve Lhomme at 2022-10-15T15:12:47+00:00
contrib: generate a toolchain file for qt targets
Otherwise our CXXFLAGS/LDFLAGS are not used
See https://doc.qt.io/qt-6/qmake-environment-reference.html#cache-file
- - - - -
804f16bc by Steve Lhomme at 2022-10-15T15:12:47+00:00
contrib: qt: don't force the WINVER/_WIN32_WINNT values
It should come from the environment to select what preferred set of Windows API
is selected. And there's no reason to force it just for mingw.
- - - - -
8 changed files:
- contrib/src/main.mak
- contrib/src/qt/rules.mak
- contrib/src/qtdeclarative/rules.mak
- contrib/src/qtgraphicaleffects/rules.mak
- contrib/src/qtquickcontrols2/rules.mak
- contrib/src/qtsvg/rules.mak
- contrib/src/qtwayland/rules.mak
- contrib/src/qtx11extras/rules.mak
Changes:
=====================================
contrib/src/main.mak
=====================================
@@ -24,6 +24,7 @@ VIDEOLAN := http://downloads.videolan.org/pub/videolan
CONTRIB_VIDEOLAN := http://downloads.videolan.org/pub/contrib
GITHUB := https://github.com
GOOGLE_CODE := https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com
+QT := https://download.qt.io/official_releases/qt
#
# Machine-dependent variables
=====================================
contrib/src/qt/rules.mak
=====================================
@@ -4,7 +4,7 @@ QT_VERSION_MAJOR := 5.15
QT_VERSION := $(QT_VERSION_MAJOR).1
# Insert potential -betaX suffix here:
QT_VERSION_FULL := $(QT_VERSION)
-QT_URL := https://download.qt.io/official_releases/qt/$(QT_VERSION_MAJOR)/$(QT_VERSION_FULL)/submodules/qtbase-everywhere-src-$(QT_VERSION_FULL).tar.xz
+QT_URL := $(QT)/$(QT_VERSION_MAJOR)/$(QT_VERSION_FULL)/submodules/qtbase-everywhere-src-$(QT_VERSION_FULL).tar.xz
ifdef HAVE_MACOSX
#PKGS += qt
@@ -59,6 +59,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
+ # 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)
@@ -114,7 +116,24 @@ endif
QT_ENV_VARS := $(HOSTVARS) DXSDK_DIR=$(PREFIX)/bin
QT_QINSTALL="$(shell cd $(SRC)/qt/; pwd -P)/install_wrapper.sh"
+qmake_toolchain = echo "!host_build {" > $(1)/.qmake.cache && \
+ echo " QMAKE_C = $(CC)" >> $(1)/.qmake.cache && \
+ echo " QMAKE_CXX = $(CXX)" >> $(1)/.qmake.cache && \
+ echo " QMAKE_CFLAGS += -isystem $(PREFIX)/include $(CFLAGS)" >> $(1)/.qmake.cache && \
+ echo " QMAKE_CXXFLAGS += -isystem $(PREFIX)/include $(CXXFLAGS)" >> $(1)/.qmake.cache && \
+ echo " QMAKE_LFLAGS += $(LDFLAGS)" >> $(1)/.qmake.cache && \
+ echo "} else {" >> $(1)/.qmake.cache && \
+ echo " QMAKE_C = $(BUILDCC)" >> $(1)/.qmake.cache && \
+ echo " QMAKE_CXX = $(BUILDCXX)" >> $(1)/.qmake.cache && \
+ echo " QMAKE_CFLAGS += $(BUILDCFLAGS)" >> $(1)/.qmake.cache && \
+ echo " QMAKE_CXXFLAGS += $(BUILDCXXFLAGS)" >> $(1)/.qmake.cache && \
+ echo " QMAKE_LFLAGS += $(BUILDLDFLAGS)" >> $(1)/.qmake.cache && \
+ echo "}" >> $(1)/.qmake.cache && \
+ echo "CONFIG += static -shared -create_libtool nostrip object_parallel_to_source create_pc" >> $(1)/.qmake.cache
+
+
.qt: qt
+ $(call qmake_toolchain, $<)
# Prevent all Qt contribs from generating and installing libtool .la files
sed -i.orig "/CONFIG/ s/ create_libtool/ -create_libtool/g" $(UNPACK_DIR)/mkspecs/features/qt_module.prf
+cd $< && $(QT_ENV_VARS) ./configure $(QT_PLATFORM) $(QT_CONFIG) -prefix $(PREFIX) -hostprefix $(PREFIX)/lib/qt5
=====================================
contrib/src/qtdeclarative/rules.mak
=====================================
@@ -2,7 +2,7 @@
QTDECLARATIVE_VERSION_MAJOR := 5.15
QTDECLARATIVE_VERSION := $(QTDECLARATIVE_VERSION_MAJOR).1
-QTDECLARATIVE_URL := http://download.qt.io/official_releases/qt/$(QTDECLARATIVE_VERSION_MAJOR)/$(QTDECLARATIVE_VERSION)/submodules/qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz
+QTDECLARATIVE_URL := $(QT)/$(QTDECLARATIVE_VERSION_MAJOR)/$(QTDECLARATIVE_VERSION)/submodules/qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz
DEPS_qtdeclarative += qt $(DEPS_qt)
@@ -31,6 +31,7 @@ QT_DECLARATIVE_CONFIG := \
.qtdeclarative: qtdeclarative
# Generate Makefile & src/Makefile
+ $(call qmake_toolchain, $<)
cd $< && $(PREFIX)/lib/qt5/bin/qmake -- $(QT_DECLARATIVE_CONFIG)
cd $</src && $(PREFIX)/lib/qt5/bin/qmake -o Makefile src.pro
# Build & install only what we require
=====================================
contrib/src/qtgraphicaleffects/rules.mak
=====================================
@@ -2,7 +2,7 @@
QTGE_VERSION_MAJOR := 5.15
QTGE_VERSION := $(QTGE_VERSION_MAJOR).1
-QTGE_URL := http://download.qt.io/official_releases/qt/$(QTGE_VERSION_MAJOR)/$(QTGE_VERSION)/submodules/qtgraphicaleffects-everywhere-src-$(QTGE_VERSION).tar.xz
+QTGE_URL := $(QT)/$(QTGE_VERSION_MAJOR)/$(QTGE_VERSION)/submodules/qtgraphicaleffects-everywhere-src-$(QTGE_VERSION).tar.xz
DEPS_qtgraphicaleffects += qtdeclarative $(DEPS_qtdeclarative)
@@ -24,6 +24,7 @@ qtgraphicaleffects: qtgraphicaleffects-everywhere-src-$(QTGE_VERSION).tar.xz .su
$(MOVE)
.qtgraphicaleffects: qtgraphicaleffects
+ $(call qmake_toolchain, $<)
cd $< && $(PREFIX)/lib/qt5/bin/qmake
$(MAKE) -C $< install INSTALL_FILE="$(QT_QINSTALL)" VLC_PREFIX="$(PREFIX)"
touch $@
=====================================
contrib/src/qtquickcontrols2/rules.mak
=====================================
@@ -2,7 +2,7 @@
QTQC2_VERSION_MAJOR := 5.15
QTQC2_VERSION := $(QTQC2_VERSION_MAJOR).1
-QTQC2_URL := http://download.qt.io/official_releases/qt/$(QTQC2_VERSION_MAJOR)/$(QTQC2_VERSION)/submodules/qtquickcontrols2-everywhere-src-$(QTQC2_VERSION).tar.xz
+QTQC2_URL := $(QT)/$(QTQC2_VERSION_MAJOR)/$(QTQC2_VERSION)/submodules/qtquickcontrols2-everywhere-src-$(QTQC2_VERSION).tar.xz
ifdef HAVE_WIN32
PKGS += qtquickcontrols2
@@ -31,6 +31,7 @@ QUICK_CONTROL_CONFIG := \
-no-feature-quickcontrols2-imagine
.qtquickcontrols2: qtquickcontrols2
+ $(call qmake_toolchain, $<)
cd $< && $(PREFIX)/lib/qt5/bin/qmake -- $(QUICK_CONTROL_CONFIG)
# Make && Install libraries
$(MAKE) -C $< sub-src-qmake_all
=====================================
contrib/src/qtsvg/rules.mak
=====================================
@@ -2,7 +2,7 @@
QTSVG_VERSION_MAJOR := 5.15
QTSVG_VERSION := $(QTSVG_VERSION_MAJOR).1
-QTSVG_URL := https://download.qt.io/official_releases/qt/$(QTSVG_VERSION_MAJOR)/$(QTSVG_VERSION)/submodules/qtsvg-everywhere-src-$(QTSVG_VERSION).tar.xz
+QTSVG_URL := $(QT)/$(QTSVG_VERSION_MAJOR)/$(QTSVG_VERSION)/submodules/qtsvg-everywhere-src-$(QTSVG_VERSION).tar.xz
DEPS_qtsvg += qt $(DEPS_qt)
@@ -24,6 +24,7 @@ qtsvg: qtsvg-everywhere-src-$(QTSVG_VERSION).tar.xz .sum-qtsvg
$(MOVE)
.qtsvg: qtsvg
+ $(call qmake_toolchain, $<)
cd $< && $(PREFIX)/lib/qt5/bin/qmake
# Make && Install libraries
$(MAKE) -C $<
=====================================
contrib/src/qtwayland/rules.mak
=====================================
@@ -2,8 +2,7 @@
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
+QTWAYLAND_URL := $(QT)/$(QTWAYLAND_VERSION_MAJOR)/$(QTWAYLAND_VERSION)/submodules/qtwayland-everywhere-src-$(QTWAYLAND_VERSION).tar.xz
DEPS_qtwayland = qtdeclarative $(DEPS_qtdeclarative)
@@ -22,6 +21,7 @@ qtwayland: qtwayland-$(QTWAYLAND_VERSION).tar.xz .sum-qtwayland
$(MOVE)
.qtwayland: qtwayland
+ $(call qmake_toolchain, $<)
cd $< && $(PREFIX)/lib/qt5/bin/qmake
# Make && Install libraries
$(MAKE) -C $<
=====================================
contrib/src/qtx11extras/rules.mak
=====================================
@@ -2,7 +2,7 @@
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
+QTX11_URL := $(QT)/$(QTX11_VERSION_MAJOR)/$(QTX11_VERSION)/submodules/qtx11extras-everywhere-src-$(QTX11_VERSION).tar.xz
DEPS_qtx11extras += qt $(DEPS_qt)
@@ -17,6 +17,7 @@ qtx11extras: qtx11extras-$(QTX11_VERSION).tar.xz .sum-qtx11extras
$(MOVE)
.qtx11extras: qtx11extras
+ $(call qmake_toolchain, $<)
cd $< && $(PREFIX)/lib/qt5/bin/qmake
# Make && Install libraries
$(MAKE) -C $< install INSTALL_FILE="$(QT_QINSTALL)" VLC_PREFIX="$(PREFIX)"
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/63b45cfcf0214f77f0add30b538d1344ea23840c...804f16bc2cc0229064f5719e54e320673060e613
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/63b45cfcf0214f77f0add30b538d1344ea23840c...804f16bc2cc0229064f5719e54e320673060e613
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