[oe-commits] org.oe.dev packages/qmake/qmake2-native.inc: Install the specs only once, add a patch to change the prefixes at runtime

freyther commit openembedded-commits at lists.openembedded.org
Wed Dec 26 12:17:49 UTC 2007


packages/qmake/qmake2-native.inc: Install the specs only once, add a patch to change the prefixes at runtime
    qmake has built-in paths. When building qmake2-native we have a pretty boring path
    which is certainly wrong for qt/x11 and qt/embedded. So we need a way to change this
    path at runtime. We just need to point qmake to a qt.conf and everything will be fine!

Author: freyther at openembedded.org
Branch: org.openembedded.dev
Revision: 269e8f219f82044dd0677744897b262e7a93ecb6
ViewMTN: http://monotone.openembedded.org/revision/info/269e8f219f82044dd0677744897b262e7a93ecb6
Files:
1
packages/qmake/qmake2-native/qt-config.patch
packages/qmake/qmake2-native.inc
Diffs:

#
# mt diff -r298bc2896d3a6a4eb4b01d570235aa640e69f0df -r269e8f219f82044dd0677744897b262e7a93ecb6
#
# 
# 
# add_file "packages/qmake/qmake2-native/qt-config.patch"
#  content [ffca4aa5d3ae8c6e3e9c1d699382d3079a770c7c]
# 
# patch "packages/qmake/qmake2-native.inc"
#  from [346b6f802856e0f31c80ec62fef076127fc5bcc5]
#    to [d58b0ef825d0f6d7d1a0103da1b2ec0e903de4b2]
# 
============================================================
--- packages/qmake/qmake2-native/qt-config.patch	ffca4aa5d3ae8c6e3e9c1d699382d3079a770c7c
+++ packages/qmake/qmake2-native/qt-config.patch	ffca4aa5d3ae8c6e3e9c1d699382d3079a770c7c
@@ -0,0 +1,27 @@
+Allow to set a qt.conf from the outside using the environment. This allows
+to inject new prefixes and other paths into qmake. This is needed when using
+the same qmake binary to build qt/x11 and qt/embedded
+
+Index: qtopia-core-opensource-src-4.3.3/src/corelib/global/qlibraryinfo.cpp
+===================================================================
+--- qtopia-core-opensource-src-4.3.3.orig/src/corelib/global/qlibraryinfo.cpp	2007-12-25 00:55:32.000000000 +0100
++++ qtopia-core-opensource-src-4.3.3/src/corelib/global/qlibraryinfo.cpp	2007-12-25 01:20:18.000000000 +0100
+@@ -42,6 +42,7 @@
+ #include "qpointer.h"
+ #ifdef QT_BUILD_QMAKE
+ extern QString qmake_libraryInfoFile();
++#include <stdlib.h>
+ #else
+ # include "qcoreapplication.h"
+ #endif
+@@ -107,6 +108,10 @@
+ #ifdef QT_BUILD_QMAKE
+     if(!QFile::exists(qtconfig))
+         qtconfig = qmake_libraryInfoFile();
++    if (!QFile::exists(qtconfig)) {
++        QByteArray config = getenv("QT_CONF_PATH");
++        qtconfig = config;
++    }
+ #else
+     if (!QFile::exists(qtconfig) && QCoreApplication::instance()) {
+ #ifdef Q_OS_MAC
============================================================
--- packages/qmake/qmake2-native.inc	346b6f802856e0f31c80ec62fef076127fc5bcc5
+++ packages/qmake/qmake2-native.inc	d58b0ef825d0f6d7d1a0103da1b2ec0e903de4b2
@@ -10,6 +10,7 @@ SRC_URI = "ftp://ftp.trolltech.com/pub/q
 FILESDIR += "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/qmake2-native"
 SRC_URI = "ftp://ftp.trolltech.com/pub/qt/source/${QTVER}.tar.gz \
            file://0001-fix-mkspecs.patch;patch=1 \
+           file://qt-config.patch;patch=1 \
            file://use-lflags-last.patch;patch=1 \
            file://linux-oe-qmake.conf"
 S = "${WORKDIR}/${QTVER}"
@@ -57,10 +58,8 @@ do_stage() {
 do_stage() {
     install -m 0755 bin/qmake ${STAGING_BINDIR}/qmake2
     install -m 0755 bin/qmake ${STAGING_BINDIR}/qmake-qt4
-    install -d ${STAGING_DIR}/${CROSS_SYS}/qt4/
-    cp -PfR mkspecs ${STAGING_DIR}/${CROSS_SYS}/qt4/
-    install -d ${STAGING_DIR}/${HOST_SYS}/qt4/
-    cp -PfR mkspecs ${STAGING_DIR}/${HOST_SYS}/qt4/
+    install -d ${CROSS_DATADIR}/qt4
+    cp -PfR mkspecs ${CROSS_DATADIR}/qt4/
 }
 
 do_install() {






More information about the Openembedded-commits mailing list