add qt5tools - for now only build as HostBuild
authorMirko Vogt <mirko-dev@nanl.de>
Tue, 21 Feb 2017 02:14:40 +0000 (03:14 +0100)
committerMirko Vogt <mirko-dev@nanl.de>
Tue, 21 Feb 2017 02:16:04 +0000 (03:16 +0100)
frameworks/qt5tools/Makefile [new file with mode: 0644]
frameworks/qt5tools/patches/000-enable-kmap2qmap.patch [new file with mode: 0644]
frameworks/qt5tools/patches/001-add-further-keys.patch [new file with mode: 0644]

diff --git a/frameworks/qt5tools/Makefile b/frameworks/qt5tools/Makefile
new file mode 100644 (file)
index 0000000..eaf70bb
--- /dev/null
@@ -0,0 +1,60 @@
+#
+# Copyright (C) 2016 OpenWrt
+# Author: Mirko Vogt <mirko@openwrt.org>
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=qt5tools
+PKG_VERSION:=5.8.0
+PKG_RELEASE:=1
+PKG_HASH:=95ec8e76d393b6ba26ffff5041fce41946d2bf3aec1402c6533e24d9fc269d83
+
+PKG_SYS_NAME:=qttools-opensource-src-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_SYS_NAME).tar.xz
+PKG_SOURCE_URL:=http://download.qt-project.org/official_releases/qt/$(basename $(PKG_VERSION))/$(PKG_VERSION)/submodules
+
+PKG_HOST_ONLY:=1
+PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_SYS_NAME)
+HOST_BUILD_DIR=$(BUILD_DIR)/host/$(PKG_SYS_NAME)
+PKG_BUILD_PARALLEL:=1
+HOST_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+HOST_BUILD_DEPENDS:=qt5base/host
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/nls.mk
+-include $(STAGING_DIR)/host/mk/qmake.mk
+
+define Package/qt5tools
+  SECTION:=video-frameworks
+  CATEGORY:=Video
+  SUBMENU:=Frameworks and Toolkits
+  TITLE:=qt5tools
+  URL:=http://qt.io
+  MAINTAINER:=Mirko Vogt <mirko@openwrt.org>
+  DEPENDS:=+qt5base
+  BUILDONLY:=1
+endef
+
+define Host/Install
+       $(call Host/Install/Default)
+
+       $(INSTALL_DIR) \
+         $(STAGING_DIR_HOST)/lib \
+         $(STAGING_DIR_HOST)/bin
+
+       $(CP) \
+         $(HOST_INSTALL_DIR)/lib/* \
+         $(STAGING_DIR_HOST)/lib/
+
+       $(CP) \
+         $(HOST_INSTALL_DIR)/bin/* \
+         $(STAGING_DIR_HOST)/bin/
+endef
+
+$(eval $(call BuildPackage,qt5tools))
+$(eval $(call HostBuild))
diff --git a/frameworks/qt5tools/patches/000-enable-kmap2qmap.patch b/frameworks/qt5tools/patches/000-enable-kmap2qmap.patch
new file mode 100644 (file)
index 0000000..2fdc383
--- /dev/null
@@ -0,0 +1,12 @@
+--- qttools-opensource-src-5.8.0.orig/src/src.pro      2017-01-02 07:50:13.000000000 +0100
++++ qttools-opensource-src-5.8.0/src/src.pro   2017-02-21 02:58:04.974231681 +0100
+@@ -14,7 +14,8 @@
+ SUBDIRS += linguist \
+     qdoc \
+-    qtattributionsscanner
++    qtattributionsscanner \
++    kmap2qmap
+ !android|android_app: SUBDIRS += qtplugininfo
diff --git a/frameworks/qt5tools/patches/001-add-further-keys.patch b/frameworks/qt5tools/patches/001-add-further-keys.patch
new file mode 100644 (file)
index 0000000..f7bddaf
--- /dev/null
@@ -0,0 +1,35 @@
+diff -ruN qttools-opensource-src-5.8.0.orig/src/kmap2qmap/main.cpp qttools-opensource-src-5.8.0/src/kmap2qmap/main.cpp
+--- qttools-opensource-src-5.8.0.orig/src/kmap2qmap/main.cpp   2017-01-02 07:50:13.000000000 +0100
++++ qttools-opensource-src-5.8.0/src/kmap2qmap/main.cpp        2017-02-21 03:07:04.565561784 +0100
+@@ -270,6 +270,8 @@
+     { "Pause",         Qt::Key_Pause },
+     { "VolumeDown",    Qt::Key_VolumeDown },
+     { "VolumeUp",      Qt::Key_VolumeUp },
++    { "VolumeMute",    Qt::Key_VolumeMute },
++    { "MicMute",       Qt::Key_MicMute },
+     { "MediaTogglePlayPause", Qt::Key_MediaTogglePlayPause },
+     { "MediaPlay",     Qt::Key_MediaPlay },
+     { "MediaPause",    Qt::Key_MediaPause },
+@@ -286,6 +288,11 @@
+     { "ToggleCallHangup", Qt::Key_ToggleCallHangup },
+     { "VoiceDial"       , Qt::Key_VoiceDial },
+     { "LastNumberRedial", Qt::Key_LastNumberRedial },
++    { "Phone",            Qt::Key_Phone },
++    { "Menu",             Qt::Key_Menu },
++    { "Back",             Qt::Key_Back },
++    { "LaunchMail",       Qt::Key_LaunchMail },
++    { "LaunchMedia",      Qt::Key_LaunchMedia },
+     { "KP_0",        Qt::Key_0 | Qt::KeypadModifier },
+     { "KP_1",        Qt::Key_1 | Qt::KeypadModifier },
+@@ -696,8 +703,8 @@
+             if (kcpos >= 0 && kcpos < (tokens.count()-3) && tokens[kcpos+2] == "=") {
+                 quint16 keycode = tokens[kcpos+1].toInt();
+-                if (keycode <= 0 || keycode > 0x1ff /* KEY_MAX */) {
+-                    parseWarning("keycode out of range [0..0x1ff]");
++                if (keycode <= 0 || keycode > 0x2ff /* KEY_MAX */) {
++                    parseWarning("keycode out of range [0..0x2ff]");
+                     break;
+                 }