[vlc-commits] contribs: Add qtdeclarative

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


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

contribs: Add qtdeclarative

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

 contrib/src/qtdeclarative/SHA512SUMS |  1 +
 contrib/src/qtdeclarative/rules.mak  | 53 ++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/contrib/src/qtdeclarative/SHA512SUMS b/contrib/src/qtdeclarative/SHA512SUMS
new file mode 100644
index 0000000000..57583fc4c3
--- /dev/null
+++ b/contrib/src/qtdeclarative/SHA512SUMS
@@ -0,0 +1 @@
+e8dbd3390faaecd833e373d76580c47cf1cec5fa518aa0d30eb305616e0e9c2f58fb8866c0f0ac25622b7b67d102ec3a50c6e48f572a20ab198bc007d5485111  qtdeclarative-5.11.0.tar.xz
diff --git a/contrib/src/qtdeclarative/rules.mak b/contrib/src/qtdeclarative/rules.mak
new file mode 100644
index 0000000000..6a35ec6f71
--- /dev/null
+++ b/contrib/src/qtdeclarative/rules.mak
@@ -0,0 +1,53 @@
+# QtDeclarative
+
+QTDECLARATIVE_VERSION := 5.11.0
+QTDECLARATIVE_URL := http://download.qt.io/official_releases/qt/5.11/$(QTDECLARATIVE_VERSION)/submodules/qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz
+
+DEPS_qtdeclarative += qt $(DEPS_qt)
+
+ifdef HAVE_WIN32
+PKGS += qtdeclarative
+endif
+
+ifeq ($(call need_pkg,"Qt5Quick"),)
+PKGS_FOUND += qtdeclarative
+endif
+
+$(TARBALLS)/qtdeclarative-$(QTDECLARATIVE_VERSION).tar.xz:
+	$(call download,$(QTDECLARATIVE_URL))
+
+.sum-qtdeclarative: qtdeclarative-$(QTDECLARATIVE_VERSION).tar.xz
+
+qtdeclarative: qtdeclarative-$(QTDECLARATIVE_VERSION).tar.xz .sum-qtdeclarative
+	$(UNPACK)
+	mv qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION) qtdeclarative-$(QTDECLARATIVE_VERSION)
+	$(MOVE)
+
+ifdef HAVE_CROSS_COMPILE
+QMAKE=$(PREFIX)/bin/qmake
+else
+QMAKE=../qt/bin/qmake
+endif
+
+.qtdeclarative: qtdeclarative
+	# Generate Makefile & src/Makefile
+	cd $< && $(QMAKE)
+	cd $</src && $(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 sub-qmltest-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-qmltest-install_subtargets sub-quick-install_subtargets sub-qml-install_subtargets sub-quickwidgets-install_subtargets sub-imports-install_subtargets
+	cp $(PREFIX)/qml/QtQuick.2/libqtquick2plugin.a $(PREFIX)/lib/
+	cd $(PREFIX)/qml/QtQuick/ && cp Layouts/libqquicklayoutsplugin.a Window.2/libwindowplugin.a $(PREFIX)/lib/
+	cp $(PREFIX)/qml/QtQml/Models.2/libmodelsplugin.a $(PREFIX)/lib/
+	rm -rf $(PREFIX)/qml
+	cd $(PREFIX)/lib/pkgconfig; for i in Qt5Quick.pc Qt5Qml.pc Qt5QuickWidgets.pc; do \
+		sed -i.orig -e 's/d\.a/.a/g' -e 's/-lQt\([^ ]*\)d/-lQt\1/g' $$i; done
+	cd $(PREFIX)/lib/pkgconfig; sed -i.orig -e 's/ -lQt5Quick/ -lqtquick2plugin -lqquicklayoutsplugin -lwindowplugin -lQt5Quick/' Qt5Quick.pc
+	cd $(PREFIX)/lib/pkgconfig; sed -i.orig -e 's/ -lQt5Qml/ -lmodelsplugin -lQt5Qml/' Qt5Qml.pc
+
+	touch $@



More information about the vlc-commits mailing list