From b5ce8864b7047647a68948575fe54c4f58da4205 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 6 Dec 2015 17:23:14 +0100 Subject: [PATCH] qt5base: build some modules only when needed Build some parts only depending on the parts which are selected in OpenWrt menuconfig and not always. Signed-off-by: Hauke Mehrtens --- frameworks/qt5base/Makefile | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/frameworks/qt5base/Makefile b/frameworks/qt5base/Makefile index c500f28..c0c08d1 100644 --- a/frameworks/qt5base/Makefile +++ b/frameworks/qt5base/Makefile @@ -31,6 +31,15 @@ include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk include ./files/qmake.mk +PKG_CONFIG_DEPENDS:= \ + CONFIG_PACKAGE_qt5base-plugin-sqldrivers-sqlite \ + CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg \ + CONFIG_PACKAGE_qt5base-network \ + CONFIG_PACKAGE_qt5base-gui \ + CONFIG_PACKAGE_qt5base-plugin-imageformats-gif \ + CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb \ + CONFIG_PACKAGE_qt5base-plugin-platforms-minimal + define Package/qt5base/Default SECTION:=video-frameworks CATEGORY:=Video @@ -250,7 +259,7 @@ define Build/Configure -shared \ -largefile \ -accessibility \ - -system-sqlite \ + $(if $(CONFIG_PACKAGE_qt5base-plugin-sqldrivers-sqlite),-system-sqlite,-no-sql-sqlite2) \ -no-qml-debug \ -no-sse2 \ -no-sse3 \ @@ -265,11 +274,11 @@ define Build/Configure -system-zlib \ -mtdev \ -no-journald \ - -system-libpng \ - -system-libjpeg \ + $(if $(CONFIG_PACKAGE_qt5base-gui),-system-libpng,-no-libpng) \ + $(if $(CONFIG_PACKAGE_qt5base-plugin-imageformats-jpeg),-system-libjpeg,-no-libjpeg) \ -system-freetype \ -no-harfbuzz \ - -openssl-linked \ + $(if $(CONFIG_PACKAGE_qt5base-network),-openssl-linked,-no-openssl) \ -system-pcre \ -system-xcb \ -system-xkbcommon \ @@ -281,7 +290,8 @@ define Build/Configure -no-gtkstyle \ -nomake tools \ -make examples \ - -gui \ + $(if $(CONFIG_PACKAGE_qt5base-gui),-gui,-no-gui) \ + $(if $(CONFIG_PACKAGE_qt5base-plugin-imageformats-gif),,-no-gif) \ -widgets \ -no-optimized-qmake \ -no-cups \ @@ -297,9 +307,9 @@ define Build/Configure -no-xcb \ -no-eglfs \ -no-directfb \ - -linuxfb \ + $(if $(CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb),-linuxfb,-no-linuxfb) \ -no-kms \ - -qpa minimal \ + $(if $(CONFIG_PACKAGE_qt5base-plugin-platforms-minimal),,-qpa minimal) \ -xplatform linux-openwrt-g++ \ -no-opengl \ -no-system-proxies \ -- 2.30.2