qtbase: correctly configure
This commit is contained in:
parent
2b5c531b22
commit
85b0bb6445
|
@ -56,6 +56,7 @@ QT_CONFIG_FLAGS += " \
|
||||||
"
|
"
|
||||||
|
|
||||||
do_configure() {
|
do_configure() {
|
||||||
|
# set_arch
|
||||||
set_endian
|
set_endian
|
||||||
|
|
||||||
if [ ! -e bin/qmake ]; then
|
if [ ! -e bin/qmake ]; then
|
||||||
|
@ -66,13 +67,9 @@ do_configure() {
|
||||||
ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++
|
ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f mkspecs/common/g++-unix.conf ] ; then
|
# replace common files with our version
|
||||||
# mkspecs were refactored for 4.8.0
|
cp -f ${WORKDIR}/g++.conf mkspecs/common/g++-unix.conf
|
||||||
cp -f ${WORKDIR}/g++.conf mkspecs/common/g++-unix.conf
|
cp -f ${WORKDIR}/linux.conf mkspecs/common/linux.conf
|
||||||
else
|
|
||||||
cp -f ${WORKDIR}/g++.conf mkspecs/common/g++.conf
|
|
||||||
fi
|
|
||||||
cp -f ${WORKDIR}/linux.conf mkspecs/common/
|
|
||||||
|
|
||||||
# Avoid problems with the linkers, since we want the linker to be g++
|
# Avoid problems with the linkers, since we want the linker to be g++
|
||||||
unset LD
|
unset LD
|
||||||
|
|
|
@ -12,13 +12,16 @@ SRC_URI += " \
|
||||||
DEPENDS += "qtbase-native virtual/libgl freetype jpeg libpng zlib openssl glib-2.0 ${ICU}"
|
DEPENDS += "qtbase-native virtual/libgl freetype jpeg libpng zlib openssl glib-2.0 ${ICU}"
|
||||||
|
|
||||||
# to provide xcb/xcb_icccm.h, xcb/xcb_image.h, xcb/xcb_keysyms.h and dbus/dbus.h
|
# to provide xcb/xcb_icccm.h, xcb/xcb_image.h, xcb/xcb_keysyms.h and dbus/dbus.h
|
||||||
# DEPENDS += "xcb-util-wm xcb-util-image xcb-util-keysyms dbus"
|
XCB_DEPENDS += "xcb-util-wm xcb-util-image xcb-util-keysyms dbus"
|
||||||
# reenable when we switch to "-qt-xcb" and build of
|
# reenable when we switch to "-qt-xcb" and build of
|
||||||
|
# DEPENDS += "${XCB_DEPENDS}"
|
||||||
|
# QT_MODULE_FLAGS = "-qt-xcb"
|
||||||
# src/platformsupport/glxconvenience/ is resolved to be before build of
|
# src/platformsupport/glxconvenience/ is resolved to be before build of
|
||||||
# src/plugins/platforms/xcb/
|
# src/plugins/platforms/xcb/
|
||||||
|
|
||||||
QT_MODULE_FLAGS = "-no-xcb"
|
QT_MODULE_FLAGS = "-no-xcb"
|
||||||
|
|
||||||
|
|
||||||
INC_PR = "r0"
|
INC_PR = "r0"
|
||||||
|
|
||||||
QT_BASE_NAME = "qt5"
|
QT_BASE_NAME = "qt5"
|
||||||
|
@ -29,28 +32,32 @@ ARM_INSTRUCTION_SET = "arm"
|
||||||
|
|
||||||
inherit qmake5
|
inherit qmake5
|
||||||
|
|
||||||
|
do_generate_qt_config_file() {
|
||||||
|
:
|
||||||
|
cat > ${WORKDIR}/qt.conf <<EOF
|
||||||
|
[Paths]
|
||||||
|
Binaries = ${bindir}
|
||||||
|
Libraries = ${libdir}
|
||||||
|
Prefix = ${prefix}
|
||||||
|
Headers = ${includedir}/${QT_DIR_NAME}
|
||||||
|
Data = ${datadir}/${QT_DIR_NAME}
|
||||||
|
ArchData = ${libdir}/${QT_DIR_NAME}
|
||||||
|
Documentation = ${docdir}/${QT_DIR_NAME}
|
||||||
|
HostData = ${S}
|
||||||
|
HostSpecPath = ${QMAKE_MKSPEC_PATH_NATIVE}
|
||||||
|
HostBinaries = ${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME}
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
# qtbase is exception, we need to use mkspecs from ${S}
|
||||||
|
OE_XQMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++"
|
||||||
|
|
||||||
do_configure_append() {
|
do_configure_append() {
|
||||||
### Make sure that our mkspecs will eventually end up in STAGING_DATADIR
|
# qtbase is exception, create mkspecs for it
|
||||||
${OE_QMAKE_QMAKE} -set OE_CROSS_INSTALL_DATA ${datadir}/${QT_DIR_NAME}
|
if [ ! -e ${OE_XQMAKESPEC} ]; then
|
||||||
sed -i '/mkspecs\.path/s/QT_HOST_DATA/OE_CROSS_INSTALL_DATA/' qtbase.pro
|
mkdir -p ${OE_XQMAKESPEC}
|
||||||
sed -i '/pritarget/s/QT_HOST_DATA/OE_CROSS_INSTALL_DATA/' mkspecs/features/qt_installs.prf
|
bash ${WORKDIR}/qmake.conf.sh > ${OE_XQMAKESPEC}/qmake.conf
|
||||||
|
fi
|
||||||
### Same applies to the module headers...
|
|
||||||
${OE_QMAKE_QMAKE} -set OE_CROSS_INSTALL_HEADERS ${includedir}/${QT_DIR_NAME}
|
|
||||||
sed -i 's/QT_INSTALL_HEADERS/OE_CROSS_INSTALL_HEADERS/g' mkspecs/features/qt_installs.prf
|
|
||||||
|
|
||||||
### Create the mkspec for the target
|
|
||||||
mkdir -p mkspecs/${TARGET_OS}-oe-g++
|
|
||||||
cp -f ${WORKDIR}/qplatformdefs.h mkspecs/${TARGET_OS}-oe-g++
|
|
||||||
bash ${WORKDIR}/qmake.conf.sh > mkspecs/${TARGET_OS}-oe-g++/qmake.conf
|
|
||||||
|
|
||||||
### Fix up prl and pkgconfig lib paths, by default they will point to /usr/lib
|
|
||||||
${OE_QMAKE_QMAKE} -set OE_CROSS_INSTALL_LIBS ${STAGING_LIBDIR}
|
|
||||||
sed -i 's/QT_INSTALL_LIBS\/raw/OE_CROSS_INSTALL_LIBS/g' mkspecs/features/qt_module.prf
|
|
||||||
|
|
||||||
# in qtbase case we want to find qmodule.pri in ${S}/mkspec
|
|
||||||
# ./features/qt_build_config.prf: QMAKE_QT_MODULE = $$[QT_HOST_DATA/get]/mkspecs/qmodule.pri
|
|
||||||
echo "HostData = ${S}" >> ${QT_CONF_PATH}
|
|
||||||
|
|
||||||
./configure -v \
|
./configure -v \
|
||||||
-dont-process \
|
-dont-process \
|
||||||
|
@ -58,7 +65,7 @@ do_configure_append() {
|
||||||
-prefix ${prefix} \
|
-prefix ${prefix} \
|
||||||
-bindir ${bindir} \
|
-bindir ${bindir} \
|
||||||
-libdir ${libdir} \
|
-libdir ${libdir} \
|
||||||
-datadir ${datadir}/${QT_DIR_NAME} \
|
-datadir ${S} \
|
||||||
-sysconfdir ${sysconfdir}/${QT_DIR_NAME} \
|
-sysconfdir ${sysconfdir}/${QT_DIR_NAME} \
|
||||||
-docdir ${docdir}/${QT_DIR_NAME} \
|
-docdir ${docdir}/${QT_DIR_NAME} \
|
||||||
-headerdir ${includedir}/${QT_DIR_NAME} \
|
-headerdir ${includedir}/${QT_DIR_NAME} \
|
||||||
|
@ -66,20 +73,18 @@ do_configure_append() {
|
||||||
-importdir ${libdir}/${QT_DIR_NAME}/imports \
|
-importdir ${libdir}/${QT_DIR_NAME}/imports \
|
||||||
-translationdir ${datadir}/${QT_DIR_NAME}/translations \
|
-translationdir ${datadir}/${QT_DIR_NAME}/translations \
|
||||||
-examplesdir ${bindir}/${QT_DIR_NAME}/examples \
|
-examplesdir ${bindir}/${QT_DIR_NAME}/examples \
|
||||||
-platform ${TARGET_OS}-oe-g++ \
|
-hostdatadir ${S} \
|
||||||
-xplatform ${TARGET_OS}-oe-g++ \
|
-hostbindir ${STAGING_BINDIR_NATIVE}/${QT_DIR_NAME} \
|
||||||
|
-platform ${OE_QMAKESPEC} \
|
||||||
|
-xplatform ${OE_XQMAKESPEC} \
|
||||||
${QT_CONFIG_FLAGS}
|
${QT_CONFIG_FLAGS}
|
||||||
|
|
||||||
### As we provided the '-dont-process' switch inorder to allow us to stage a few files
|
|
||||||
### generated by the configure we need to manually run qmake the generate _all_ the Makefiles (-r)
|
|
||||||
export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++"
|
|
||||||
${OE_QMAKE_QMAKE} -r -d
|
${OE_QMAKE_QMAKE} -r -d
|
||||||
}
|
}
|
||||||
|
|
||||||
do_compile_append() {
|
do_compile_append() {
|
||||||
# Build qmake for the target arch
|
# Build qmake for the target arch
|
||||||
cd ${S}/qmake
|
cd ${S}/qmake
|
||||||
export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++"
|
|
||||||
${OE_QMAKE_QMAKE}
|
${OE_QMAKE_QMAKE}
|
||||||
oe_runmake CC="${CC}" CXX="${CXX}"
|
oe_runmake CC="${CC}" CXX="${CXX}"
|
||||||
cd ${S}
|
cd ${S}
|
||||||
|
|
|
@ -35,6 +35,7 @@ QMAKE_CXX = ${OE_QMAKE_CXX}
|
||||||
QMAKE_LINK = ${OE_QMAKE_LINK}
|
QMAKE_LINK = ${OE_QMAKE_LINK}
|
||||||
QMAKE_LINK_SHLIB = ${OE_QMAKE_LINK}
|
QMAKE_LINK_SHLIB = ${OE_QMAKE_LINK}
|
||||||
QMAKE_CONF_COMPILER = ${OE_QMAKE_CONF_COMPILER}
|
QMAKE_CONF_COMPILER = ${OE_QMAKE_CONF_COMPILER}
|
||||||
|
QMAKE_QT_CONFIG = ${OE_QMAKE_QT_CONFIG}
|
||||||
|
|
||||||
load(qt_config)
|
load(qt_config)
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Reference in New Issue