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 \
|
2013-05-21 20:16:06 +00:00
|
|
|
file://0004-qt_functions-temporary-remove-isEmpty-check.patch \
|
|
|
|
file://0005-qmake-is-already-built-in-qtbase-native.patch \
|
|
|
|
file://0006-Allow-building-a-separate-qmake-for-the-target.patch \
|
|
|
|
file://0007-configureapp-Prefix-default-LIBDIRS-and-INCDIRS-with.patch \
|
|
|
|
file://0008-qt_module-Fix-pkgconfig-replacement.patch \
|
|
|
|
file://0009-qt_module-Fix-paths-in-.prl-files.patch \
|
|
|
|
file://0010-wayland-scanner-disable-silent-rules.patch \
|
|
|
|
file://0011-configure-don-t-export-SYSTEM_VARIABLES-to-.qmake.va.patch \
|
|
|
|
file://0012-configure.prf-Allow-to-add-extra-arguments-to-make.patch \
|
2013-05-28 10:47:20 +00:00
|
|
|
file://0013-Disable-mkv8snapshot.patch \
|
|
|
|
file://0014-enables-tslib-device-to-be-read-from-env-variable.patch \
|
|
|
|
file://0015-qtbase-allow-build-of-examples.patch \
|
2013-05-24 18:37:02 +00:00
|
|
|
file://0018-QOpenGLPaintDevice-sub-area-support.patch \
|
|
|
|
file://0020-Use-BGRA-extension-in-bindTexture.patch \
|
2013-07-19 22:02:57 +00:00
|
|
|
file://0021-configure-make-pulseaudio-a-configurable-option.patch \
|
|
|
|
file://0022-configure-make-alsa-a-configurable-option.patch \
|
|
|
|
file://0023-configure-make-freetype-a-configurable-option.patch \
|
2013-07-22 21:11:56 +00:00
|
|
|
file://0024-Use-OE_QMAKE_PATH_EXTERNAL_HOST_BINS-to-determine-pa.patch \
|
2012-11-15 19:38:27 +00:00
|
|
|
"
|
|
|
|
|
2013-07-19 22:02:57 +00:00
|
|
|
DEPENDS += "qtbase-native"
|
2012-12-12 05:19:48 +00:00
|
|
|
|
2013-07-24 21:31:47 +00:00
|
|
|
# for syncqt
|
|
|
|
RDEPENDS_${PN}-tools += "perl"
|
|
|
|
|
2013-07-19 22:02:57 +00:00
|
|
|
# separate some parts of PACKAGECONFIG which are often changed
|
|
|
|
# be aware that you need to add icu to build qtwebkit, default
|
|
|
|
# PACKAGECONFIG is kept rather minimal for people who don't need
|
|
|
|
# stuff like webkit (and it's easier to add options than remove)
|
2012-11-15 19:38:27 +00:00
|
|
|
|
2013-07-19 22:02:57 +00:00
|
|
|
# gl or gles needs to be enabled in order to build qtdeclarative
|
|
|
|
# http://qt.gitorious.org/qt/qtdeclarative/commit/e988998a08b1420ed10bd02d9d4b3b8ed2289df9
|
|
|
|
PACKAGECONFIG_GL ?= "${@base_contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)}"
|
|
|
|
PACKAGECONFIG_FB ?= "${@base_contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)}"
|
|
|
|
PACKAGECONFIG_X11 ?= "${@base_contains('DISTRO_FEATURES', 'x11', 'xcb xvideo xsync xshape xrender xrandr xfixes xinput2 xinput xinerama xcursor gtkstyle', '', d)}"
|
|
|
|
PACKAGECONFIG_FONTS ?= "fontconfig freetype"
|
|
|
|
PACKAGECONFIG_SYSTEM ?= "jpeg libpng zlib"
|
|
|
|
PACKAGECONFIG_MULTIMEDIA ?= "${@base_contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}"
|
|
|
|
PACKAGECONFIG_DISTRO ?= ""
|
2013-05-07 13:10:31 +00:00
|
|
|
|
2013-07-19 22:02:57 +00:00
|
|
|
PACKAGECONFIG ??= " \
|
|
|
|
release \
|
|
|
|
dbus \
|
|
|
|
udev \
|
|
|
|
evdev \
|
|
|
|
widgets \
|
|
|
|
openssl \
|
|
|
|
${PACKAGECONFIG_GL} \
|
|
|
|
${PACKAGECONFIG_FB} \
|
|
|
|
${PACKAGECONFIG_X11} \
|
|
|
|
${PACKAGECONFIG_FONTS} \
|
|
|
|
${PACKAGECONFIG_SYSTEM} \
|
|
|
|
${PACKAGECONFIG_MULTIMEDIA} \
|
|
|
|
${PACKAGECONFIG_DISTRO} \
|
|
|
|
"
|
2013-06-26 02:13:02 +00:00
|
|
|
|
2013-07-19 22:02:57 +00:00
|
|
|
PACKAGECONFIG[release] = "-release,-debug"
|
|
|
|
PACKAGECONFIG[sm] = "-sm,-no-sm"
|
|
|
|
PACKAGECONFIG[tests] = ",-nomake tests"
|
|
|
|
PACKAGECONFIG[examples] = ",-nomake examples"
|
2013-08-29 07:53:44 +00:00
|
|
|
# accessibility is required to compile qtquickcontrols
|
2013-07-19 22:02:57 +00:00
|
|
|
PACKAGECONFIG[accessibility] = "-accessibility,-no-accessibility"
|
|
|
|
PACKAGECONFIG[glib] = "-glib,-no-glib,glib-2.0"
|
|
|
|
PACKAGECONFIG[freetype] = "-system-freetype,-no-freetype,freetype"
|
|
|
|
PACKAGECONFIG[jpeg] = "-system-libjpeg,-no-libjpeg,jpeg"
|
|
|
|
PACKAGECONFIG[libpng] = "-system-libpng,-no-libpng,libpng"
|
|
|
|
PACKAGECONFIG[zlib] = "-system-zlib,-qt-zlib,zlib"
|
|
|
|
PACKAGECONFIG[pcre] = "-system-pcre,-qt-pcre,pcre"
|
2013-08-13 20:57:10 +00:00
|
|
|
# gl or gles2 is needed in order to build qtdeclarative (qtdeclarative.do_configure fails to find quick module without)
|
|
|
|
PACKAGECONFIG[gl] = "-opengl desktop -no-eglfs,,virtual/libgl"
|
2013-07-19 22:02:57 +00:00
|
|
|
PACKAGECONFIG[gles2] = "-opengl es2 -eglfs,,virtual/libgles2 virtual/egl"
|
|
|
|
PACKAGECONFIG[tslib] = "-tslib,-no-tslib,tslib"
|
|
|
|
PACKAGECONFIG[dbus] = "-dbus,-no-dbus,dbus"
|
|
|
|
PACKAGECONFIG[xcb] = "-xcb,-no-xcb,xcb-util-wm xcb-util-image xcb-util-keysyms"
|
|
|
|
PACKAGECONFIG[sql-ibase] = "-sql-ibase,-no-sql-ibase"
|
|
|
|
PACKAGECONFIG[sql-mysql] = "-sql-mysql,-no-sql-mysql,mysql"
|
|
|
|
PACKAGECONFIG[sql-psql] = "-sql-psql,-no-sql-psql,postgresql"
|
|
|
|
PACKAGECONFIG[sql-odbc] = "-sql-odbc,-no-sql-odbc"
|
|
|
|
PACKAGECONFIG[sql-oci] = "-sql-oci,-no-sql-oci"
|
|
|
|
PACKAGECONFIG[sql-tds] = "-sql-tds,-no-sql-tds"
|
|
|
|
PACKAGECONFIG[sql-db2] = "-sql-db2,-no-sql-db2"
|
|
|
|
PACKAGECONFIG[sql-sqlite2] = "-sql-sqlite2,-no-sql-sqlite2,sqlite"
|
|
|
|
PACKAGECONFIG[sql-sqlite] = "-sql-sqlite,-no-sql-sqlite,sqlite3"
|
|
|
|
PACKAGECONFIG[xcursor] = "-xcursor,-no-xcursor,libxcursor"
|
|
|
|
PACKAGECONFIG[xinerama] = "-xinerama,-no-xinerama,libxinerama"
|
|
|
|
PACKAGECONFIG[xinput] = "-xinput,-no-xinput"
|
|
|
|
PACKAGECONFIG[xinput2] = "-xinput2,-no-xinput2"
|
|
|
|
PACKAGECONFIG[xfixes] = "-xfixes,-no-xfixes,libxfixes"
|
|
|
|
PACKAGECONFIG[xrandr] = "-xrandr,-no-xrandr,libxrandr"
|
|
|
|
PACKAGECONFIG[xrender] = "-xrender,-no-xrender,libxrender"
|
|
|
|
PACKAGECONFIG[xshape] = "-xshape,-no-xshape"
|
|
|
|
PACKAGECONFIG[xsync] = "-xsync,-no-xsync"
|
|
|
|
PACKAGECONFIG[xvideo] = "-xvideo,-no-xvideo"
|
|
|
|
PACKAGECONFIG[openvg] = "-openvg,-no-openvg"
|
|
|
|
PACKAGECONFIG[iconv] = "-iconv,-no-iconv,virtual/libiconv"
|
|
|
|
PACKAGECONFIG[xkb] = "-xkb,-no-xkb,libxkbcommon"
|
|
|
|
PACKAGECONFIG[evdev] = "-evdev,-no-evdev"
|
2013-08-13 20:57:10 +00:00
|
|
|
# depends on glib
|
2013-07-19 22:02:57 +00:00
|
|
|
PACKAGECONFIG[gstreamer] = "-gstreamer,-no-gstreamer,gstreamer"
|
|
|
|
PACKAGECONFIG[fontconfig] = "-fontconfig,-no-fontconfig,fontconfig"
|
|
|
|
PACKAGECONFIG[gtkstyle] = "-gtkstyle,-no-gtkstyle,gtk+"
|
|
|
|
PACKAGECONFIG[directfb] = "-directfb,-no-directfb,directfb"
|
|
|
|
PACKAGECONFIG[linuxfb] = "-linuxfb,-no-linuxfb,linuxfb"
|
|
|
|
PACKAGECONFIG[mitshm] = "-mitshm,-no-mitshm,mitshm"
|
|
|
|
PACKAGECONFIG[kms] = "-kms,-no-kms,kms"
|
2013-08-13 20:57:10 +00:00
|
|
|
# needed for qtdeclarative (qtdeclarative.do_configure fails to find quick module without)
|
2013-07-19 22:02:57 +00:00
|
|
|
PACKAGECONFIG[icu] = "-icu,-no-icu,${ICU}"
|
|
|
|
PACKAGECONFIG[udev] = "-libudev,-no-libudev,udev"
|
|
|
|
PACKAGECONFIG[openssl] = "-openssl,-no-openssl,openssl"
|
|
|
|
PACKAGECONFIG[alsa] = "-alsa,-no-alsa,alsa-lib"
|
|
|
|
PACKAGECONFIG[pulseaudio] = "-pulseaudio,-no-pulseaudio,pulseaudio"
|
|
|
|
PACKAGECONFIG[nis] = "-nis,-no-nis"
|
|
|
|
PACKAGECONFIG[widgets] = "-widgets,-no-widgets"
|
2013-05-07 13:10:31 +00:00
|
|
|
|
|
|
|
QT_CONFIG_FLAGS += " \
|
|
|
|
-reduce-relocations \
|
|
|
|
-shared \
|
|
|
|
-silent \
|
|
|
|
-no-pch \
|
|
|
|
-no-rpath \
|
|
|
|
-pkg-config \
|
2013-07-19 22:02:57 +00:00
|
|
|
${EXTRA_OECONF} \
|
2013-05-07 13:10:31 +00:00
|
|
|
"
|
2012-11-18 17:02:52 +00:00
|
|
|
|
2012-11-15 19:38:27 +00:00
|
|
|
# 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
|
2013-05-24 17:50:00 +00:00
|
|
|
OE_QMAKE_QMAKE_ORIG = "${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}/qmake"
|
2013-04-28 20:30:58 +00:00
|
|
|
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() {
|
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
|
2013-05-28 13:03:54 +00:00
|
|
|
# install fonts manually if they are missing
|
|
|
|
if [ ! -d ${D}/${OE_QMAKE_PATH_LIBS}/fonts ]; then
|
|
|
|
cp -a ${S}/lib/fonts ${D}/${OE_QMAKE_PATH_LIBS}
|
|
|
|
fi
|
2012-12-12 05:19:48 +00:00
|
|
|
}
|
2012-12-12 18:11:06 +00:00
|
|
|
|
2013-05-28 13:03:54 +00:00
|
|
|
PACKAGES =. " \
|
|
|
|
${PN}-fonts \
|
|
|
|
${PN}-fonts-ttf-vera \
|
|
|
|
${PN}-fonts-ttf-dejavu \
|
|
|
|
${PN}-fonts-pfa \
|
|
|
|
${PN}-fonts-pfb \
|
|
|
|
${PN}-fonts-qpf \
|
|
|
|
"
|
|
|
|
|
|
|
|
RRECOMMENDS_${PN}-fonts = " \
|
|
|
|
${PN}-fonts-ttf-vera \
|
|
|
|
${PN}-fonts-ttf-dejavu \
|
|
|
|
${PN}-fonts-pfa \
|
|
|
|
${PN}-fonts-pfb \
|
|
|
|
${PN}-fonts-qpf \
|
|
|
|
"
|
|
|
|
|
|
|
|
ALLOW_EMPTY_${PN}-fonts = "1"
|
|
|
|
|
|
|
|
FILES_${PN}-fonts-ttf-vera = "${OE_QMAKE_PATH_LIBS}/fonts/Vera*.ttf"
|
|
|
|
FILES_${PN}-fonts-ttf-dejavu = "${OE_QMAKE_PATH_LIBS}/fonts/DejaVu*.ttf"
|
|
|
|
FILES_${PN}-fonts-pfa = "${OE_QMAKE_PATH_LIBS}/fonts/*.pfa"
|
|
|
|
FILES_${PN}-fonts-pfb = "${OE_QMAKE_PATH_LIBS}/fonts/*.pfb"
|
|
|
|
FILES_${PN}-fonts-qpf = "${OE_QMAKE_PATH_LIBS}/fonts/*.qpf*"
|
|
|
|
FILES_${PN}-fonts = "${OE_QMAKE_PATH_LIBS}/fonts/README \
|
|
|
|
${OE_QMAKE_PATH_LIBS}/fonts/fontdir"
|