2012-11-15 19:38:27 +00:00
|
|
|
require qt5.inc
|
|
|
|
|
|
|
|
SRC_URI += " \
|
2013-04-03 12:13:27 +00:00
|
|
|
file://0001-Add-linux-oe-g-platform.patch \
|
|
|
|
file://0002-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
|
|
|
|
file://0003-Add-external-hostbindir-option.patch \
|
|
|
|
file://0004-qmake-is-already-built-in-qtbase-native.patch \
|
|
|
|
file://0005-Allow-building-a-separate-qmake-for-the-target.patch \
|
|
|
|
file://0006-qt_functions-temporary-remove-isEmpty-check.patch \
|
2013-04-28 00:21:55 +00:00
|
|
|
file://0008-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch \
|
|
|
|
file://0009-qt_module-Fix-pkgconfig-replacement.patch \
|
|
|
|
file://0010-qmake-property-rename-QT_INSTALL_CONFIGURATION-to-QT.patch \
|
2013-04-28 10:58:41 +00:00
|
|
|
file://0011-qt_module-Fix-paths-in-.prl-files.patch \
|
2013-03-06 20:20:37 +00:00
|
|
|
file://0012-wayland-scanner-disable-silent-rules.patch \
|
2013-05-08 21:58:07 +00:00
|
|
|
file://0013-configure-don-t-export-SYSTEM_VARIABLES-to-.qmake.va.patch \
|
2012-11-15 19:38:27 +00:00
|
|
|
"
|
|
|
|
|
2013-04-05 17:50:23 +00:00
|
|
|
DEPENDS += "qtbase-native virtual/libgl freetype jpeg libpng zlib openssl glib-2.0 ${ICU} udev"
|
2012-12-12 05:19:48 +00:00
|
|
|
|
2012-12-02 18:04:53 +00:00
|
|
|
# to provide xcb/xcb_icccm.h, xcb/xcb_image.h, xcb/xcb_keysyms.h and dbus/dbus.h
|
2013-03-30 03:04:20 +00:00
|
|
|
XCB_DEPENDS += "xcb-util-wm xcb-util-image xcb-util-keysyms dbus"
|
2012-12-12 05:09:18 +00:00
|
|
|
# reenable when we switch to "-qt-xcb" and build of
|
2013-03-30 03:04:20 +00:00
|
|
|
# DEPENDS += "${XCB_DEPENDS}"
|
2013-05-07 13:10:31 +00:00
|
|
|
# QT_XCB = "-qt-xcb"
|
2012-12-12 05:09:18 +00:00
|
|
|
# src/platformsupport/glxconvenience/ is resolved to be before build of
|
|
|
|
# src/plugins/platforms/xcb/
|
2012-11-15 19:38:27 +00:00
|
|
|
|
2013-05-07 13:10:31 +00:00
|
|
|
QT_XCB ?= "-no-xcb"
|
|
|
|
|
|
|
|
QT_DISTRO_FLAGS ?= "-no-accessibility -no-sm"
|
|
|
|
QT_DISTRO_FLAGS_linuxstdbase = "-sm"
|
|
|
|
|
|
|
|
# Some can be used only for certain QT_MODULEs, so define them here,
|
|
|
|
# but add them to QT_CONFIG_FLAGS e.g. in qtbase.inc
|
|
|
|
QT_SQL_DRIVER_FLAGS ?= "-no-sql-ibase -no-sql-mysql -no-sql-psql -no-sql-odbc -plugin-sql-sqlite"
|
|
|
|
QT_GLFLAGS ?= ""
|
|
|
|
QT_XML ?= "-xmlpatterns"
|
|
|
|
QT_WEBKIT ?= "-webkit"
|
|
|
|
QT_PHONON ?= "-phonon"
|
|
|
|
QT_DBUS ?= "-qdbus"
|
|
|
|
QT_MULTIMEDIA ?= "${@base_contains('DISTRO_FEATURES', 'pulseaudio', '-pulseaudio', '-no-pulseaudio', d)}"
|
|
|
|
QT_NAS ?= "-no-nas-sound"
|
|
|
|
QT_NIS ?= "-no-nis"
|
|
|
|
QT_CUPS ?= "-no-cups"
|
|
|
|
QT_STL ?= "-stl"
|
|
|
|
QT_SYSTEM_LIBS ?= "-system-libjpeg -system-libpng -system-zlib"
|
|
|
|
QT_TESTS ?= "-nomake tests"
|
|
|
|
QT_EXAMPLES ?= "-nomake examples"
|
|
|
|
QT_DEMOS ?= "-nomake demos"
|
|
|
|
QT_RELEASE ?= "-release"
|
|
|
|
|
|
|
|
QT_CONFIG_FLAGS += " \
|
|
|
|
${QT_RELEASE} \
|
|
|
|
-reduce-relocations \
|
|
|
|
-shared \
|
|
|
|
-silent \
|
|
|
|
-glib \
|
|
|
|
-no-pch \
|
|
|
|
-no-rpath \
|
|
|
|
-pkg-config \
|
|
|
|
${QT_SYSTEM_LIBS} \
|
|
|
|
${QT_NIS} \
|
|
|
|
${QT_CUPS} \
|
|
|
|
${QT_SQL_DRIVER_FLAGS} \
|
|
|
|
${QT_DISTRO_FLAGS} \
|
|
|
|
${QT_XCB} \
|
|
|
|
${QT_GLFLAGS} \
|
|
|
|
${QT_TESTS} \
|
|
|
|
${QT_EXAMPLES} \
|
|
|
|
${QT_DEMOS} \
|
|
|
|
"
|
2012-11-18 17:02:52 +00:00
|
|
|
|
2012-11-15 19:38:27 +00:00
|
|
|
INC_PR = "r0"
|
|
|
|
|
|
|
|
# Qt uses atomic instructions not supported in thumb mode
|
|
|
|
ARM_INSTRUCTION_SET = "arm"
|
|
|
|
|
2013-04-28 00:24:17 +00:00
|
|
|
do_generate_qt_config_file_append() {
|
2013-05-08 20:13:07 +00:00
|
|
|
cat >> ${QT_CONF_PATH} <<EOF
|
2013-04-28 00:24:17 +00:00
|
|
|
|
|
|
|
[EffectivePaths]
|
|
|
|
Prefix=..
|
|
|
|
EOF
|
|
|
|
}
|
2013-04-03 12:13:27 +00:00
|
|
|
|
2013-03-30 03:04:20 +00:00
|
|
|
# qtbase is exception, we need to use mkspecs from ${S}
|
2013-04-03 12:13:27 +00:00
|
|
|
QMAKE_MKSPEC_PATH = "${B}"
|
2012-12-15 00:39:59 +00:00
|
|
|
|
2013-04-28 20:30:58 +00:00
|
|
|
# another exception is that we need to run bin/qmake, because EffectivePaths are relative to qmake location
|
|
|
|
OE_QMAKE_QMAKE_ORIG := "${OE_QMAKE_QMAKE}"
|
|
|
|
OE_QMAKE_QMAKE = "bin/qmake"
|
|
|
|
|
2013-05-08 20:20:41 +00:00
|
|
|
# qtbase is exception, configure script is using our get(X)QEvalMakeConf and setBootstrapEvalVariable functions to read it from shell
|
|
|
|
export OE_QMAKE_COMPILER
|
|
|
|
export OE_QMAKE_CC
|
|
|
|
export OE_QMAKE_CFLAGS
|
|
|
|
export OE_QMAKE_CXX
|
|
|
|
export OE_QMAKE_CXXFLAGS
|
|
|
|
export OE_QMAKE_LINK
|
|
|
|
export OE_QMAKE_LDFLAGS
|
|
|
|
export OE_QMAKE_AR
|
|
|
|
export OE_QMAKE_STRIP
|
|
|
|
|
2013-04-28 20:30:58 +00:00
|
|
|
do_configure() {
|
|
|
|
set_arch
|
|
|
|
set_endian
|
|
|
|
|
2013-04-28 00:24:17 +00:00
|
|
|
# we need symlink in path relative to source, because
|
|
|
|
# EffectivePaths:Prefix is relative to qmake location
|
2013-04-03 12:13:27 +00:00
|
|
|
if [ ! -e ${B}/bin/qmake ]; then
|
|
|
|
mkdir ${B}/bin
|
2013-04-28 20:30:58 +00:00
|
|
|
ln -sf ${OE_QMAKE_QMAKE_ORIG} ${B}/bin/qmake
|
2013-04-03 19:52:54 +00:00
|
|
|
fi
|
2013-04-03 12:13:27 +00:00
|
|
|
|
|
|
|
${S}/configure -v \
|
2013-04-28 00:24:17 +00:00
|
|
|
-dont-process \
|
2012-12-12 05:19:48 +00:00
|
|
|
-opensource -confirm-license \
|
2013-04-03 12:13:27 +00:00
|
|
|
-sysroot ${STAGING_DIR_TARGET} \
|
|
|
|
-no-gcc-sysroot \
|
2013-04-28 20:44:42 +00:00
|
|
|
-prefix ${OE_QMAKE_PATH_PREFIX} \
|
|
|
|
-bindir ${OE_QMAKE_PATH_BINS} \
|
|
|
|
-libdir ${OE_QMAKE_PATH_LIBS} \
|
|
|
|
-datadir ${OE_QMAKE_PATH_DATA} \
|
|
|
|
-sysconfdir ${OE_QMAKE_PATH_SETTINGS} \
|
|
|
|
-docdir ${OE_QMAKE_PATH_DOCS} \
|
|
|
|
-headerdir ${OE_QMAKE_PATH_HEADERS} \
|
|
|
|
-archdatadir ${OE_QMAKE_PATH_ARCHDATA} \
|
|
|
|
-libexecdir ${OE_QMAKE_PATH_LIBEXECS} \
|
|
|
|
-plugindir ${OE_QMAKE_PATH_PLUGINS} \
|
|
|
|
-importdir ${OE_QMAKE_PATH_IMPORTS} \
|
|
|
|
-qmldir ${OE_QMAKE_PATH_QML} \
|
|
|
|
-translationdir ${OE_QMAKE_PATH_TRANSLATIONS} \
|
|
|
|
-testsdir ${OE_QMAKE_PATH_TESTS} \
|
|
|
|
-examplesdir ${OE_QMAKE_PATH_EXAMPLES} \
|
|
|
|
-hostbindir ${OE_QMAKE_PATH_HOST_BINS} \
|
|
|
|
-hostdatadir ${OE_QMAKE_PATH_HOST_DATA} \
|
|
|
|
-external-hostbindir ${OE_QMAKE_PATH_EXTERNAL_HOST_BINS} \
|
2013-03-30 03:04:20 +00:00
|
|
|
-platform ${OE_QMAKESPEC} \
|
2013-04-03 12:13:27 +00:00
|
|
|
-xplatform linux-oe-g++ \
|
2012-12-12 05:19:48 +00:00
|
|
|
${QT_CONFIG_FLAGS}
|
2013-04-28 20:30:58 +00:00
|
|
|
|
|
|
|
qmake5_base_do_configure
|
2012-12-12 05:19:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_compile_append() {
|
|
|
|
# Build qmake for the target arch
|
2013-04-17 21:13:20 +00:00
|
|
|
# Disable for now, because doesn't work well with separate ${B}
|
2013-04-28 00:24:17 +00:00
|
|
|
# cp -ra ${S}/qmake ${B}
|
|
|
|
# cd ${B}/qmake
|
2013-04-17 21:13:20 +00:00
|
|
|
# ${OE_QMAKE_QMAKE}
|
2013-04-28 00:24:17 +00:00
|
|
|
# Fix to use headers in ${B}
|
|
|
|
# sed '/INCPATH/s#${S}#${B}#g' -i Makefile
|
2013-04-17 21:13:20 +00:00
|
|
|
# oe_runmake CC="${CC}" CXX="${CXX}"
|
2013-04-28 00:24:17 +00:00
|
|
|
# cd ${B}
|
2012-12-12 05:19:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install_append() {
|
|
|
|
### Fix up the binaries to the right location
|
|
|
|
### TODO: FIX
|
2013-04-17 21:13:20 +00:00
|
|
|
# qemu built on host breaks do_package, remove it here (will be replaces with right qemu when do_compile is fixed
|
|
|
|
# ERROR: objcopy failed with exit code 1 (cmd was 'arm-oe-linux-gnueabi-objcopy' --only-keep-debug '/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.1-r0.0/package/usr/bin/qmake' '/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.1-r0.0/package/usr/bin/.debug/qmake')
|
2013-04-28 00:24:17 +00:00
|
|
|
rm -f ${D}/${bindir}/${QT_DIR_NAME}/qmake
|
2012-12-12 05:19:48 +00:00
|
|
|
}
|
2012-12-12 18:11:06 +00:00
|
|
|
|
2013-04-22 22:56:47 +00:00
|
|
|
PACKAGES =. "${PN}-fonts "
|
2013-04-28 00:16:27 +00:00
|
|
|
FILES_${PN}-fonts = "${libdir}/${QT_DIR_NAME}/fonts ${libdir}/fonts"
|