[vlmc-devel] Contribs: add Qt
Jean-Baptiste Kempf
git at videolan.org
Tue Aug 2 01:00:20 CEST 2016
vlmc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Jul 18 09:29:07 2016 +0200| [56352884dd5b2ae238c162872e98cfe4002f6451] | committer: Hugo Beauzée-Luyssen
Contribs: add Qt
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> https://code.videolan.org/videolan/vlmc/commit/56352884dd5b2ae238c162872e98cfe4002f6451
---
contribs/src/qt/SHA512SUMS | 1 +
contribs/src/qt/rules.mak | 68 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 69 insertions(+)
diff --git a/contribs/src/qt/SHA512SUMS b/contribs/src/qt/SHA512SUMS
new file mode 100644
index 0000000..f7c167b
--- /dev/null
+++ b/contribs/src/qt/SHA512SUMS
@@ -0,0 +1 @@
+5b2a5842346475be0944fc44bc09ff5b5d5da167246310de132f034e17ebbcbbf103b6f085dbf8b566389694bd095227aa1ed569b93e0f9a8f02da51d8fe076e qt-5.6.0.tar.xz
diff --git a/contribs/src/qt/rules.mak b/contribs/src/qt/rules.mak
new file mode 100644
index 0000000..f29853c
--- /dev/null
+++ b/contribs/src/qt/rules.mak
@@ -0,0 +1,68 @@
+# Qt
+
+QT_VERSION = 5.6.0
+QT_URL := https://download.qt.io/official_releases/qt/5.6/$(QT_VERSION)/submodules/qtbase-opensource-src-$(QT_VERSION).tar.xz
+
+ifdef HAVE_MACOSX
+#PKGS += qt
+endif
+ifdef HAVE_WIN32
+PKGS += qt
+endif
+
+ifeq ($(call need_pkg,"Qt5Core Qt5Gui Qt5Widgets"),)
+PKGS_FOUND += qt
+endif
+
+$(TARBALLS)/qt-$(QT_VERSION).tar.xz:
+ $(call download,$(QT_URL))
+
+.sum-qt: qt-$(QT_VERSION).tar.xz
+
+qt: qt-$(QT_VERSION).tar.xz .sum-qt
+ $(UNPACK)
+ mv qtbase-opensource-src-$(QT_VERSION) qt-$(QT_VERSION)
+ $(MOVE)
+
+ifdef HAVE_MACOSX
+QT_PLATFORM := -platform darwin-g++
+endif
+ifdef HAVE_WIN32
+QT_SPEC := win32-g++
+QT_PLATFORM := -xplatform win32-g++ -device-option CROSS_COMPILE=$(HOST)-
+endif
+
+QT_CONFIG := -static -release -opensource -confirm-license -no-pkg-config \
+ -no-sql-sqlite -no-gif -qt-libjpeg -no-openssl -no-opengl -no-dbus \
+ -no-qml-debug -no-audio-backend -no-sql-odbc \
+ -no-compile-examples -nomake examples
+
+.qt: qt
+ cd $< && ./configure $(QT_PLATFORM) $(QT_CONFIG) -prefix $(PREFIX)
+ # Make && Install libraries
+ cd $< && $(MAKE)
+ cd $</src && $(MAKE) sub-corelib-install_subtargets sub-gui-install_subtargets sub-widgets-install_subtargets sub-platformsupport-install_subtargets
+ # Install tools
+ cd $</src && $(MAKE) sub-moc-install_subtargets sub-rcc-install_subtargets sub-uic-install_subtargets
+ # Install plugins
+ cd $</src/plugins && $(MAKE) sub-platforms-install_subtargets
+ mv $(PREFIX)/plugins/platforms/libqwindows.a $(PREFIX)/lib/ && rm -rf $(PREFIX)/plugins
+ # Move includes to match what VLC expects
+ mkdir -p $(PREFIX)/include/QtGui/qpa
+ cp $(PREFIX)/include/QtGui/$(QT_VERSION)/QtGui/qpa/qplatformnativeinterface.h $(PREFIX)/include/QtGui/qpa
+ # Clean Qt mess
+ rm -rf $(PREFIX)/lib/libQt5Bootstrap* $(PREFIX)/lib/*.prl $(PREFIX)/mkspecs
+ # Fix .pc files to remove debug version (d)
+ cd $(PREFIX)/lib/pkgconfig; for i in Qt5Core.pc Qt5Gui.pc Qt5Widgets.pc; do sed -i -e 's/d\.a/.a/g' -e 's/d $$/ /' $$i; done
+ # Fix Qt5Gui.pc file to include qwindows (QWindowsIntegrationPlugin) and Qt5Platform Support
+ cd $(PREFIX)/lib/pkgconfig; sed -i -e 's/ -lQt5Gui/ -lqwindows -lQt5PlatformSupport -lQt5Gui/g' Qt5Gui.pc
+ifdef HAVE_CROSS_COMPILE
+ # Building Qt build tools for Xcompilation
+ cd $</include/QtCore; ln -sf $(QT_VERSION)/QtCore/private
+ cd $</qmake; $(MAKE)
+ cd $</src/tools; \
+ for i in bootstrap uic rcc moc; \
+ do (cd $$i; echo $$i && ../../../bin/qmake -spec $(QT_SPEC) && $(MAKE) clean && $(MAKE) CC=$(HOST)-gcc CXX=$(HOST)-g++ LINKER=$(HOST)-g++ && $(MAKE) install); \
+ done
+endif
+ touch $@
More information about the Vlmc-devel
mailing list