[vlc-commits] [Git][videolan/vlc][master] 6 commits: contrib: qt: build before installing

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Oct 22 04:44:34 UTC 2022



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
6f9f42e4 by Steve Lhomme at 2022-10-22T03:43:04+00:00
contrib: qt: build before installing

- - - - -
0e88baaf by Steve Lhomme at 2022-10-22T03:43:04+00:00
contrib: qt: pass the CPPFLAGS/LDFLAGS to the configure script

We need to pass the compiler definition so they are know during the configure
phase. Otherwise the system libraries are not detected.

- - - - -
19eb9f2b by Steve Lhomme at 2022-10-22T03:43:04+00:00
contrib: qt: split the added and remove CONFIG values

We don't need to set static as it's set in QT_CONFIG and will be kept for all
targets.

- - - - -
46651f24 by Steve Lhomme at 2022-10-22T03:43:04+00:00
contrib: qt: remove debug_and_release

We don't need a Makefile.Debug and Makefile.Release as we only build one
variant at a time.

- - - - -
e6a6d2c1 by Steve Lhomme at 2022-10-22T03:43:04+00:00
contrib: qt: remove redundant msys patch

We already set object_parallel_to_source globally.

- - - - -
cee6cee6 by Steve Lhomme at 2022-10-22T03:43:04+00:00
contrib: qt: don't patch create_libtool value

We remove the create_libtool feature globally in .qmake.cache.

- - - - -


5 changed files:

- + contrib/src/qt/configure-env.py
- − contrib/src/qt/qt-fix-msys-long-pathes.patch
- contrib/src/qt/rules.mak
- contrib/src/qtgraphicaleffects/rules.mak
- contrib/src/qtx11extras/rules.mak


Changes:

=====================================
contrib/src/qt/configure-env.py
=====================================
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+import argparse
+
+# Argument parsing
+parser = argparse.ArgumentParser(description="Generate Qt configure options from the compilation variables")
+parser.add_argument('-D', action='append', help='compiler definition')
+parser.add_argument('-I', action='append', help='include directory')
+parser.add_argument('-L', action='append', help='linker directory')
+# parser.add_argument('-F', action='append', help='framework flags')
+args, remaining = parser.parse_known_args()
+
+all_params = []
+if args.D:
+    all_params += ['-D ' + sub for sub in args.D]
+if args.I:
+    all_params += ['-I ' + sub for sub in args.I]
+if args.L:
+    all_params += ['-L ' + sub for sub in args.L]
+
+if all_params:
+    print(' '.join(all_params))
+else:
+    print('')


=====================================
contrib/src/qt/qt-fix-msys-long-pathes.patch deleted
=====================================
@@ -1,8 +0,0 @@
---- qt/src/angle/src/common/gles_common.pri.msys	2020-03-19 15:10:05.865014200 +0100
-+++ qt/src/angle/src/common/gles_common.pri	2020-03-19 15:10:09.946228700 +0100
-@@ -1,4 +1,4 @@
--CONFIG += simd no_batch object_parallel_to_source
-+CONFIG += simd no_batch
- include(common.pri)
- 
- INCLUDEPATH += \


=====================================
contrib/src/qt/rules.mak
=====================================
@@ -50,7 +50,6 @@ ifndef HAVE_CLANG
 	$(APPLY) $(SRC)/qt/0010-Windows-QPA-Fix-build-with-mingw64-Win32-threading.patch
 endif
 else
-	$(APPLY) $(SRC)/qt/qt-fix-msys-long-pathes.patch
 	$(APPLY) $(SRC)/qt/0003-fix-angle-compilation.patch
 	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
@@ -132,14 +131,14 @@ qmake_toolchain = echo "!host_build {"    > $(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
+	echo "CONFIG -= create_libtool debug_and_release" >> $(1)/.qmake.cache && \
+	echo "CONFIG += 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
+	+cd $< && $(QT_ENV_VARS) ./configure $(QT_PLATFORM) $(QT_CONFIG) -prefix $(PREFIX) -hostprefix $(PREFIX)/lib/qt5 \
+	    $(shell $(SRC)/qt/configure-env.py $(CPPFLAGS) $(LDFLAGS))
 	# Make && Install libraries
 	cd $< && $(QT_ENV_VARS) $(MAKE)
 	$(MAKE) -C $< -C src \


=====================================
contrib/src/qtgraphicaleffects/rules.mak
=====================================
@@ -26,5 +26,6 @@ qtgraphicaleffects: qtgraphicaleffects-everywhere-src-$(QTGE_VERSION).tar.xz .su
 .qtgraphicaleffects: qtgraphicaleffects
 	$(call qmake_toolchain, $<)
 	cd $< && $(PREFIX)/lib/qt5/bin/qmake
+	$(MAKE) -C $<
 	$(MAKE) -C $< install INSTALL_FILE="$(QT_QINSTALL)" VLC_PREFIX="$(PREFIX)"
 	touch $@


=====================================
contrib/src/qtx11extras/rules.mak
=====================================
@@ -20,5 +20,6 @@ qtx11extras: qtx11extras-$(QTX11_VERSION).tar.xz .sum-qtx11extras
 	$(call qmake_toolchain, $<)
 	cd $< && $(PREFIX)/lib/qt5/bin/qmake
 	# Make && Install libraries
+	$(MAKE) -C $<
 	$(MAKE) -C $< install INSTALL_FILE="$(QT_QINSTALL)" VLC_PREFIX="$(PREFIX)"
 	touch $@



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0325402cf799c20ca0c0667771683bd563db6f34...cee6cee6aacd9ac186e91c9fbfa2e7c8e9fc6033

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/0325402cf799c20ca0c0667771683bd563db6f34...cee6cee6aacd9ac186e91c9fbfa2e7c8e9fc6033
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