[vlc-commits] contribs: Add QtQuickControls 1 & 2

Hugo Beauzée-Luyssen git at videolan.org
Fri Aug 24 17:49:36 CEST 2018


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Aug 22 16:37:46 2018 +0200| [b82d6e46bea87dd9be9a6deb100ea98576e19d87] | committer: Hugo Beauzée-Luyssen

contribs: Add QtQuickControls 1 & 2

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b82d6e46bea87dd9be9a6deb100ea98576e19d87
---

 contrib/src/qtquickcontrols/SHA512SUMS |  2 +
 contrib/src/qtquickcontrols/rules.mak  | 69 ++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+)

diff --git a/contrib/src/qtquickcontrols/SHA512SUMS b/contrib/src/qtquickcontrols/SHA512SUMS
new file mode 100644
index 0000000000..2fb1a19473
--- /dev/null
+++ b/contrib/src/qtquickcontrols/SHA512SUMS
@@ -0,0 +1,2 @@
+3c221d4d9f7636baef3dcb50719a589fa9ff54d38a0891dc1464aebda74f2a989b35241bee895db5b27960e88737e81e9262c9c9a4d3e99bf167e94640204436  qtquickcontrols-5.11.0.tar.xz
+89f9543a03b2123fd81d5a9320efd742a119ff52acadf6d4bf4447628fee85916f497f97da5b60fd8cba68d04c652612a26da1a81efc35ad2784efc8f89a6593  qtquickcontrols2-5.11.0.tar.xz
diff --git a/contrib/src/qtquickcontrols/rules.mak b/contrib/src/qtquickcontrols/rules.mak
new file mode 100644
index 0000000000..c0beeca280
--- /dev/null
+++ b/contrib/src/qtquickcontrols/rules.mak
@@ -0,0 +1,69 @@
+# QtQuickControls 1 & 2
+
+QTQC_VERSION := 5.11.0
+QTQC_URL := http://download.qt.io/official_releases/qt/5.11/$(QTQC_VERSION)/submodules/qtquickcontrols-everywhere-src-$(QTQC_VERSION).tar.xz
+QTQC2_URL := http://download.qt.io/official_releases/qt/5.11/$(QTQC_VERSION)/submodules/qtquickcontrols2-everywhere-src-$(QTQC_VERSION).tar.xz
+
+ifdef HAVE_WIN32
+PKGS += qtquickcontrols qtquickcontrols2
+endif
+
+ifeq ($(call need_pkg,"Qt5QuickControls2"),)
+PKGS_FOUND += qtquickcontrols2
+endif
+# QtQuickControl(1) doesn't provide a .pc
+
+DEPS_qtquickcontrols = qtdeclarative $(DEPS_qtdeclarative)
+DEPS_qtquickcontrols2 = qtquickcontrols $(DEPS_qtquickcontrols)
+
+$(TARBALLS)/qtquickcontrols-$(QTQC_VERSION).tar.xz:
+	$(call download,$(QTQC_URL))
+
+$(TARBALLS)/qtquickcontrols2-$(QTQC_VERSION).tar.xz:
+	$(call download,$(QTQC2_URL))
+
+.sum-qtquickcontrols: qtquickcontrols-$(QTQC_VERSION).tar.xz
+.sum-qtquickcontrols2: qtquickcontrols2-$(QTQC_VERSION).tar.xz
+
+qtquickcontrols: qtquickcontrols-$(QTQC_VERSION).tar.xz .sum-qtquickcontrols
+	$(UNPACK)
+	mv qtquickcontrols-everywhere-src-$(QTQC_VERSION) qtquickcontrols-$(QTQC_VERSION)
+	$(MOVE)
+
+qtquickcontrols2: qtquickcontrols2-$(QTQC_VERSION).tar.xz .sum-qtquickcontrols2
+	$(UNPACK)
+	mv qtquickcontrols2-everywhere-src-$(QTQC_VERSION) qtquickcontrols2-$(QTQC_VERSION)
+	$(MOVE)
+
+
+ifdef HAVE_CROSS_COMPILE
+QMAKE=$(PREFIX)/bin/qmake
+else
+QMAKE=../qt/bin/qmake
+endif
+
+.qtquickcontrols: qtquickcontrols
+	cd $< && $(QMAKE)
+	# Make && Install libraries
+	cd $< && $(MAKE)
+	cd $< && $(MAKE) -C src sub-controls-install_subtargets
+	cp $(PREFIX)/qml/QtQuick/Controls/libqtquickcontrolsplugin.a $(PREFIX)/lib/
+	rm -rf $(PREFIX)/qml
+	touch $@
+
+.qtquickcontrols2: qtquickcontrols2 .qtquickcontrols
+	cd $< && $(QMAKE)
+	# Make && Install libraries
+	cd $< && $(MAKE)
+	cd $< && $(MAKE) -C src sub-quickcontrols2-install_subtargets sub-imports-install_subtargets
+	cp $(PREFIX)/qml/QtQuick/Controls.2/libqtquickcontrols2plugin.a $(PREFIX)/lib/
+	cp $(PREFIX)/qml/QtQuick/Templates.2/libqtquicktemplates2plugin.a $(PREFIX)/lib/
+	rm -rf $(PREFIX)/qml
+	cd $(PREFIX)/lib/pkgconfig; sed -i.orig \
+		-e 's/d\.a/.a/g' \
+		-e 's/-lQt\([^ ]*\)d/-lQt\1/g' \
+		-e 's/ -lQt5QuickControls2/ -lqtquickcontrolsplugin -lqtquickcontrols2plugin -lqtquicktemplates2plugin -lQt5QuickControls2/' \
+		Qt5QuickControls2.pc
+
+	touch $@
+



More information about the vlc-commits mailing list