2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-03-07 11:18:38 +01:00
|
|
|
#
|
|
|
|
# qt5base
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-03-07 11:18:38 +01:00
|
|
|
|
2013-03-19 10:29:42 +01:00
|
|
|
QT5BASE_VERSION = $(QT5_VERSION)
|
2013-04-15 05:11:19 +02:00
|
|
|
QT5BASE_SITE = $(QT5_SITE)
|
2013-03-07 11:18:38 +01:00
|
|
|
QT5BASE_SOURCE = qtbase-opensource-src-$(QT5BASE_VERSION).tar.xz
|
|
|
|
|
|
|
|
QT5BASE_DEPENDENCIES = host-pkgconf zlib pcre
|
|
|
|
QT5BASE_INSTALL_STAGING = YES
|
|
|
|
|
|
|
|
# A few comments:
|
|
|
|
# * -no-pch to workaround the issue described at
|
|
|
|
# http://comments.gmane.org/gmane.comp.lib.qt.devel/5933.
|
|
|
|
# * -system-zlib because zlib is mandatory for Qt build, and we
|
|
|
|
# want to use the Buildroot packaged zlib
|
|
|
|
# * -system-pcre because pcre is mandatory to build Qt, and we
|
|
|
|
# want to use the one packaged in Buildroot
|
|
|
|
QT5BASE_CONFIGURE_OPTS += \
|
|
|
|
-optimized-qmake \
|
|
|
|
-no-kms \
|
|
|
|
-no-cups \
|
|
|
|
-no-nis \
|
|
|
|
-no-iconv \
|
|
|
|
-system-zlib \
|
|
|
|
-system-pcre \
|
|
|
|
-no-pch
|
|
|
|
|
2013-03-07 11:18:40 +01:00
|
|
|
ifeq ($(BR2_ENABLE_DEBUG),y)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += -debug
|
|
|
|
else
|
|
|
|
QT5BASE_CONFIGURE_OPTS += -release
|
|
|
|
endif
|
|
|
|
|
2013-04-07 11:57:16 +02:00
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),y)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += -static
|
|
|
|
else
|
|
|
|
# We apparently can't build both the shared and static variants of the
|
|
|
|
# library.
|
|
|
|
QT5BASE_CONFIGURE_OPTS += -shared
|
|
|
|
endif
|
|
|
|
|
2013-03-07 11:18:38 +01:00
|
|
|
ifeq ($(BR2_LARGEFILE),y)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += -largefile
|
|
|
|
else
|
|
|
|
QT5BASE_CONFIGURE_OPTS += -no-largefile
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += -opensource -confirm-license
|
|
|
|
QT5BASE_LICENSE = LGPLv2.1 or GPLv3.0
|
|
|
|
QT5BASE_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt
|
|
|
|
else
|
|
|
|
QT5BASE_LICENSE = Commercial license
|
|
|
|
QT5BASE_REDISTRIBUTE = NO
|
|
|
|
endif
|
|
|
|
|
2013-05-28 11:05:37 +02:00
|
|
|
# Qt5 SQL Plugins
|
|
|
|
ifeq ($(BR2_PACKAGE_QT5BASE_SQL),y)
|
|
|
|
ifeq ($(BR2_PACKAGE_QT5BASE_MYSQL),y)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += -plugin-sql-mysql -mysql_config $(STAGING_DIR)/usr/bin/mysql_config
|
2014-01-22 07:24:35 +01:00
|
|
|
QT5BASE_DEPENDENCIES += mysql
|
2013-05-28 11:05:37 +02:00
|
|
|
else
|
|
|
|
QT5BASE_CONFIGURE_OPTS += -no-sql-mysql
|
|
|
|
endif
|
|
|
|
|
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_QT),-plugin-sql-sqlite)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),-system-sqlite)
|
|
|
|
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),sqlite)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_NONE),-no-sql-sqlite)
|
|
|
|
endif
|
|
|
|
|
2013-03-07 11:18:39 +01:00
|
|
|
# We have to use --enable-linuxfb, otherwise Qt thinks that -linuxfb
|
|
|
|
# is to add a link against the "inuxfb" library.
|
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-gui,-no-gui)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_WIDGETS),-widgets,-no-widgets)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_LINUXFB),--enable-linuxfb,-no-linuxfb)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),-directfb,-no-directfb)
|
|
|
|
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),directfb)
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y)
|
2013-09-20 07:43:10 +02:00
|
|
|
QT5BASE_CONFIGURE_OPTS += -xcb -system-xkbcommon
|
2013-03-07 11:18:39 +01:00
|
|
|
QT5BASE_DEPENDENCIES += \
|
|
|
|
libxcb \
|
|
|
|
xcb-util-wm \
|
|
|
|
xcb-util-image \
|
|
|
|
xcb-util-keysyms \
|
2013-09-20 07:43:10 +02:00
|
|
|
xlib_libX11 \
|
|
|
|
libxkbcommon
|
|
|
|
ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS),y)
|
|
|
|
QT5BASE_DEPENDENCIES += xlib_libXext
|
|
|
|
endif
|
2013-03-07 11:18:39 +01:00
|
|
|
else
|
|
|
|
QT5BASE_CONFIGURE_OPTS += -no-xcb
|
|
|
|
endif
|
|
|
|
|
2013-03-19 10:29:35 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_QT5BASE_EGLFS),y)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += -opengl es2 -eglfs
|
|
|
|
QT5BASE_DEPENDENCIES += libgles libegl
|
2013-09-18 07:17:09 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_GPU_VIV_BIN_MX6Q),y)
|
|
|
|
QT5BASE_EGLFS_PLATFORM_HOOKS_SOURCES = \
|
|
|
|
$(@D)/mkspecs/devices/linux-imx6-g++/qeglfshooks_imx6.cpp
|
|
|
|
endif
|
2013-03-19 10:29:40 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
|
|
|
|
QT5BASE_EGLFS_PLATFORM_HOOKS_SOURCES = \
|
|
|
|
$(@D)/mkspecs/devices/linux-rasp-pi-g++/qeglfshooks_pi.cpp
|
|
|
|
endif
|
2013-03-19 10:29:35 +01:00
|
|
|
else
|
|
|
|
QT5BASE_CONFIGURE_OPTS += -no-opengl -no-eglfs
|
|
|
|
endif
|
|
|
|
|
2013-03-19 10:29:34 +01:00
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_OPENSSL),-openssl,-no-openssl)
|
|
|
|
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_OPENSSL),openssl)
|
|
|
|
|
2013-03-19 10:29:36 +01:00
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_FONTCONFIG),-fontconfig,-no-fontconfig)
|
|
|
|
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_FONTCONFIG),fontconfig)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GIF),,-no-gif)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_JPEG),-system-libjpeg,-no-libjpeg)
|
|
|
|
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_JPEG),jpeg)
|
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_PNG),-system-libpng,-no-libpng)
|
|
|
|
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_PNG),libpng)
|
|
|
|
|
2013-03-19 10:29:37 +01:00
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DBUS),-dbus,-no-dbus)
|
|
|
|
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_DBUS),dbus)
|
|
|
|
|
2013-10-28 01:29:27 +01:00
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_TSLIB),-tslib,-no-tslib)
|
|
|
|
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_TSLIB),tslib)
|
|
|
|
|
2013-03-19 10:29:38 +01:00
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_LIBGLIB2),-glib,-no-glib)
|
|
|
|
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBGLIB2),libglib2)
|
|
|
|
|
2013-03-19 10:29:39 +01:00
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_ICU),-icu,-no-icu)
|
|
|
|
QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_ICU),icu)
|
|
|
|
|
2014-01-02 08:07:02 +01:00
|
|
|
QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_EXAMPLES),-make,-nomake) examples
|
|
|
|
|
2013-03-07 11:18:38 +01:00
|
|
|
# Build the list of libraries to be installed on the target
|
|
|
|
QT5BASE_INSTALL_LIBS_y += Qt5Core
|
|
|
|
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_NETWORK) += Qt5Network
|
|
|
|
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_CONCURRENT) += Qt5Concurrent
|
|
|
|
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_SQL) += Qt5Sql
|
|
|
|
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_TEST) += Qt5Test
|
|
|
|
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_XML) += Qt5Xml
|
2013-05-15 12:34:44 +02:00
|
|
|
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5OpenGL
|
2013-03-07 11:18:38 +01:00
|
|
|
|
2013-03-07 11:18:39 +01:00
|
|
|
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_GUI) += Qt5Gui
|
|
|
|
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_WIDGETS) += Qt5Widgets
|
|
|
|
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport
|
|
|
|
|
2013-03-19 10:29:37 +01:00
|
|
|
QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus
|
|
|
|
|
2013-03-07 11:18:38 +01:00
|
|
|
define QT5BASE_CONFIGURE_CMDS
|
|
|
|
(cd $(@D); \
|
|
|
|
PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \
|
|
|
|
PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \
|
|
|
|
PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \
|
|
|
|
MAKEFLAGS="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" \
|
|
|
|
./configure \
|
|
|
|
-v \
|
|
|
|
-prefix /usr \
|
|
|
|
-hostprefix $(HOST_DIR)/usr \
|
2013-12-24 07:53:57 +01:00
|
|
|
-headerdir /usr/include/qt5 \
|
2013-03-07 11:18:38 +01:00
|
|
|
-sysroot $(STAGING_DIR) \
|
|
|
|
-plugindir /usr/lib/qt/plugins \
|
2014-01-02 08:07:02 +01:00
|
|
|
-examplesdir /usr/lib/qt/examples \
|
2013-03-07 11:18:38 +01:00
|
|
|
-no-rpath \
|
2014-01-02 08:07:02 +01:00
|
|
|
-nomake tests \
|
2013-03-07 11:18:38 +01:00
|
|
|
-device buildroot \
|
2013-11-29 09:47:49 +01:00
|
|
|
-device-option CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
|
2014-02-04 15:10:03 +01:00
|
|
|
-device-option BR_COMPILER_CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
-device-option BR_COMPILER_CXXFLAGS="$(TARGET_CXXFLAGS)" \
|
2013-11-20 13:17:41 +01:00
|
|
|
-device-option EGLFS_PLATFORM_HOOKS_SOURCES="$(QT5BASE_EGLFS_PLATFORM_HOOKS_SOURCES)" \
|
2013-03-07 11:18:38 +01:00
|
|
|
-no-c++11 \
|
|
|
|
$(QT5BASE_CONFIGURE_OPTS) \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define QT5BASE_BUILD_CMDS
|
|
|
|
$(MAKE) -C $(@D)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define QT5BASE_INSTALL_STAGING_CMDS
|
|
|
|
$(MAKE) -C $(@D) install
|
|
|
|
$(QT5_LA_PRL_FILES_FIXUP)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define QT5BASE_INSTALL_TARGET_LIBS
|
|
|
|
for lib in $(QT5BASE_INSTALL_LIBS_y); do \
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/lib/lib$${lib}.so.* $(TARGET_DIR)/usr/lib ; \
|
|
|
|
done
|
|
|
|
endef
|
|
|
|
|
|
|
|
define QT5BASE_INSTALL_TARGET_PLUGINS
|
|
|
|
if [ -d $(STAGING_DIR)/usr/lib/qt/plugins/ ] ; then \
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins ; \
|
|
|
|
cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins ; \
|
|
|
|
fi
|
|
|
|
endef
|
|
|
|
|
2013-03-19 10:29:41 +01:00
|
|
|
define QT5BASE_INSTALL_TARGET_FONTS
|
|
|
|
if [ -d $(STAGING_DIR)/usr/lib/fonts/ ] ; then \
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/lib/fonts ; \
|
|
|
|
cp -dpfr $(STAGING_DIR)/usr/lib/fonts/* $(TARGET_DIR)/usr/lib/fonts ; \
|
|
|
|
fi
|
|
|
|
endef
|
|
|
|
|
2014-01-02 08:07:02 +01:00
|
|
|
define QT5BASE_INSTALL_TARGET_EXAMPLES
|
|
|
|
if [ -d $(STAGING_DIR)/usr/lib/qt/examples/ ] ; then \
|
|
|
|
mkdir -p $(TARGET_DIR)/usr/lib/qt/examples ; \
|
|
|
|
cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/* $(TARGET_DIR)/usr/lib/qt/examples ; \
|
|
|
|
fi
|
|
|
|
endef
|
|
|
|
|
2013-04-07 11:57:16 +02:00
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),y)
|
|
|
|
define QT5BASE_INSTALL_TARGET_CMDS
|
|
|
|
$(QT5BASE_INSTALL_TARGET_FONTS)
|
2014-01-02 08:07:02 +01:00
|
|
|
$(QT5BASE_INSTALL_TARGET_EXAMPLES)
|
2013-04-07 11:57:16 +02:00
|
|
|
endef
|
|
|
|
else
|
2013-03-07 11:18:38 +01:00
|
|
|
define QT5BASE_INSTALL_TARGET_CMDS
|
|
|
|
$(QT5BASE_INSTALL_TARGET_LIBS)
|
|
|
|
$(QT5BASE_INSTALL_TARGET_PLUGINS)
|
2013-03-19 10:29:41 +01:00
|
|
|
$(QT5BASE_INSTALL_TARGET_FONTS)
|
2014-01-02 08:07:02 +01:00
|
|
|
$(QT5BASE_INSTALL_TARGET_EXAMPLES)
|
2013-03-07 11:18:38 +01:00
|
|
|
endef
|
2013-04-07 11:57:16 +02:00
|
|
|
endif
|
2013-03-07 11:18:38 +01:00
|
|
|
|
|
|
|
$(eval $(generic-package))
|