diff options
| author | Mikko Levonmaa <mikko.levonmaa@palm.com> | 2012-11-15 20:38:27 +0100 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2012-11-15 21:57:18 +0100 |
| commit | 13ed17b2baeb253961885c469ba3c97b9ed420e5 (patch) | |
| tree | 968d09fb06656497dfd799558f5e651c50fffcb3 | |
| parent | 4ec2e9d2d8184f4da4de86711db34012317f3114 (diff) | |
| download | meta-qt5-13ed17b2baeb253961885c469ba3c97b9ed420e5.tar.gz | |
qtbase: add recipe for git version
Signed-off-by: Mikko Levonmaa <mikko.levonmaa@palm.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
| -rw-r--r-- | classes/qmake5.bbclass | 22 | ||||
| -rw-r--r-- | classes/qmake5_base.bbclass | 35 | ||||
| -rw-r--r-- | recipes-qt/qt5/files/qmake-build.conf.sh | 31 | ||||
| -rw-r--r-- | recipes-qt/qt5/files/qmake.conf.sh | 39 | ||||
| -rw-r--r-- | recipes-qt/qt5/files/qplatformdefs.h | 1 | ||||
| -rw-r--r-- | recipes-qt/qt5/qt5.inc | 86 | ||||
| -rw-r--r-- | recipes-qt/qt5/qt5_arch.inc | 19 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase.inc | 23 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase/0001-Allowing-the-customization-of-the-paths.patch | 37 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase/0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch | 44 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase/0002-qmake-is-already-built-in-qt5-tools-native.patch | 29 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase/0003-Allow-building-a-separate-qmake-for-the-target.patch | 28 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtbase_4.999+git.bb | 6 |
13 files changed, 397 insertions, 3 deletions
diff --git a/classes/qmake5.bbclass b/classes/qmake5.bbclass new file mode 100644 index 00000000..b30b1507 --- /dev/null +++ b/classes/qmake5.bbclass | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # | ||
| 2 | # QMake variables for Qt | ||
| 3 | # | ||
| 4 | inherit qmake5_base | ||
| 5 | |||
| 6 | QT5TOOLSDEPENDS ?= "qt5-native " | ||
| 7 | DEPENDS_prepend = "${QT5TOOLSDEPENDS}" | ||
| 8 | |||
| 9 | export QMAKESPEC = "${STAGING_DATADIR_NATIVE}/qt5/mkspecs/${TARGET_OS}-oe-g++" | ||
| 10 | export OE_QMAKE_UIC = "${STAGING_BINDIR_NATIVE}/uic" | ||
| 11 | export OE_QMAKE_MOC = "${STAGING_BINDIR_NATIVE}/moc" | ||
| 12 | export OE_QMAKE_RCC = "${STAGING_BINDIR_NATIVE}/rcc" | ||
| 13 | export OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}/qmake" | ||
| 14 | export OE_QMAKE_LINK = "${CXX}" | ||
| 15 | export OE_QMAKE_CXXFLAGS = "${CXXFLAGS}" | ||
| 16 | export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/qt5" | ||
| 17 | export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}" | ||
| 18 | export OE_QMAKE_LIBS_QT = "qt" | ||
| 19 | export OE_QMAKE_LIBS_X11 = "-lXext -lX11 -lm" | ||
| 20 | export OE_QMAKE_LIBS_X11SM = "-lSM -lICE" | ||
| 21 | export OE_QMAKE_LRELEASE = "${STAGING_BINDIR_NATIVE}/lrelease5" | ||
| 22 | export OE_QMAKE_LUPDATE = "${STAGING_BINDIR_NATIVE}/lupdate5" | ||
diff --git a/classes/qmake5_base.bbclass b/classes/qmake5_base.bbclass new file mode 100644 index 00000000..fc90429f --- /dev/null +++ b/classes/qmake5_base.bbclass | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | |||
| 2 | # We override this completely to eliminate the -e normally passed in | ||
| 3 | EXTRA_OEMAKE = ' MAKEFLAGS= ' | ||
| 4 | |||
| 5 | export OE_QMAKE_CC="${CC}" | ||
| 6 | export OE_QMAKE_CFLAGS="${CFLAGS}" | ||
| 7 | export OE_QMAKE_CXX="${CXX}" | ||
| 8 | export OE_QMAKE_LDFLAGS="${LDFLAGS}" | ||
| 9 | export OE_QMAKE_AR="${AR} cqs" | ||
| 10 | export OE_QMAKE_STRIP="echo" | ||
| 11 | export OE_QMAKE_RPATH="-Wl,-rpath-link," | ||
| 12 | |||
| 13 | # do not export STRIP to the environment | ||
| 14 | STRIP[unexport] = "1" | ||
| 15 | |||
| 16 | do_generate_qt_config_file() { | ||
| 17 | export QT_CONF_PATH=${WORKDIR}/qt.conf | ||
| 18 | cat > ${WORKDIR}/qt.conf <<EOF | ||
| 19 | [Paths] | ||
| 20 | Prefix = | ||
| 21 | Binaries = ${STAGING_BINDIR_NATIVE} | ||
| 22 | Headers = ${STAGING_INCDIR}/qt5 | ||
| 23 | Plugins = ${STAGING_LIBDIR}/qt5/plugins/ | ||
| 24 | Libraries = ${STAGING_LIBDIR}/qt5-test | ||
| 25 | Mkspecs = ${STAGING_DATADIR}/qt5/mkspecs/ | ||
| 26 | HostData = ${STAGING_DATADIR_NATIVE}/qt5 | ||
| 27 | HostBinaries = ${STAGING_BINDIR_NATIVE}/ | ||
| 28 | EOF | ||
| 29 | } | ||
| 30 | |||
| 31 | addtask generate_qt_config_file after do_patch before do_configure | ||
| 32 | |||
| 33 | #EXPORT_FUNCTIONS do_configure | ||
| 34 | |||
| 35 | #addtask configure after do_unpack do_patch before do_compile | ||
diff --git a/recipes-qt/qt5/files/qmake-build.conf.sh b/recipes-qt/qt5/files/qmake-build.conf.sh new file mode 100644 index 00000000..f09433a1 --- /dev/null +++ b/recipes-qt/qt5/files/qmake-build.conf.sh | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #cat <<EOF | ||
| 2 | # | ||
| 3 | # qmake configuration for building with openembedded | ||
| 4 | # | ||
| 5 | |||
| 6 | MAKEFILE_GENERATOR = UNIX | ||
| 7 | TARGET_PLATFORM = unix | ||
| 8 | TEMPLATE = app | ||
| 9 | CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index | ||
| 10 | QT += core gui | ||
| 11 | QMAKE_INCREMENTAL_STYLE = sublib | ||
| 12 | |||
| 13 | include(../common/linux.conf) | ||
| 14 | include(../common/gcc-base-unix.conf) | ||
| 15 | include(../common/g++-unix.conf) | ||
| 16 | |||
| 17 | QMAKE_AR = ${OE_QMAKE_AR} cqs | ||
| 18 | #QMAKE_AR = ${BUILD_AR} cqs | ||
| 19 | QMAKE_STRIP = ${BUILD_STRIP} | ||
| 20 | QMAKE_CFLAGS += ${BUILD_CFLAGS} | ||
| 21 | QMAKE_CXXFLAGS += \$\$QMAKE_CFLAGS ${BUILD_CXXFLAGS} | ||
| 22 | #QMAKE_LFLAGS += ${BUILD_LDFLAGS} | ||
| 23 | QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS) | ||
| 24 | QMAKE_CC = ${BUILD_CC} | ||
| 25 | QMAKE_LINK_C = ${BUILD_CCLD} | ||
| 26 | QMAKE_LINK_C_SHLIB = ${BUILD_CCLD} | ||
| 27 | QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += ${OE_QMAKE_CFLAGS} | ||
| 28 | QMAKE_CXX = ${BUILD_CXX} | ||
| 29 | QMAKE_LINK = ${BUILD_CXX} ${BUILD_LDFLAGS} | ||
| 30 | QMAKE_LINK_SHLIB = ${BUILD_CXX} ${BUILD_LDFLAGS} | ||
| 31 | QMAKE_RANLIB = ${BUILD_RANLIB} | ||
diff --git a/recipes-qt/qt5/files/qmake.conf.sh b/recipes-qt/qt5/files/qmake.conf.sh new file mode 100644 index 00000000..52682396 --- /dev/null +++ b/recipes-qt/qt5/files/qmake.conf.sh | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | cat <<EOF | ||
| 2 | # | ||
| 3 | # qmake configuration for building with openembedded | ||
| 4 | # | ||
| 5 | |||
| 6 | MAKEFILE_GENERATOR = UNIX | ||
| 7 | TARGET_PLATFORM = unix | ||
| 8 | TEMPLATE = app | ||
| 9 | CONFIG += qt warn_on release incremental link_prl gdb_dwarf_index | ||
| 10 | QT += core gui | ||
| 11 | QMAKE_INCREMENTAL_STYLE = sublib | ||
| 12 | |||
| 13 | include(../common/linux.conf) | ||
| 14 | include(../common/gcc-base-unix.conf) | ||
| 15 | include(../common/g++-unix.conf) | ||
| 16 | |||
| 17 | QMAKE_INCDIR_QT = ${OE_QMAKE_INCDIR_QT} | ||
| 18 | QMAKE_LIBDIR_QT = ${OE_QMAKE_LIBDIR_QT} | ||
| 19 | QMAKE_LIBS_X11 = ${OE_QMAKE_LIBS_X11} | ||
| 20 | QMAKE_LIBS_X11SM = ${OE_QMAKE_LIBS_X11SM} | ||
| 21 | QMAKE_MOC = ${OE_QMAKE_MOC} | ||
| 22 | QMAKE_UIC = ${OE_QMAKE_UIC} | ||
| 23 | QMAKE_RCC = ${OE_QMAKE_RCC} | ||
| 24 | #QMAKE_AR = ${OE_QMAKE_AR} cqs | ||
| 25 | QMAKE_AR = ${OE_QMAKE_AR} | ||
| 26 | QMAKE_STRIP = ${OE_QMAKE_STRIP} | ||
| 27 | QMAKE_CFLAGS += ${OE_QMAKE_CFLAGS} | ||
| 28 | QMAKE_CXXFLAGS += \$\$QMAKE_CFLAGS ${OE_QMAKE_CXXFLAGS} | ||
| 29 | QMAKE_LFLAGS += ${OE_QMAKE_LDFLAGS} | ||
| 30 | QMAKE_CC = ${OE_QMAKE_CC} | ||
| 31 | QMAKE_LINK_C = ${OE_QMAKE_LINK} | ||
| 32 | QMAKE_LINK_C_SHLIB = ${OE_QMAKE_LINK} | ||
| 33 | QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += ${OE_QMAKE_CFLAGS} | ||
| 34 | QMAKE_CXX = ${OE_QMAKE_CXX} | ||
| 35 | QMAKE_LINK = ${OE_QMAKE_LINK} | ||
| 36 | QMAKE_LINK_SHLIB = ${OE_QMAKE_LINK} | ||
| 37 | |||
| 38 | load(qt_config) | ||
| 39 | EOF \ No newline at end of file | ||
diff --git a/recipes-qt/qt5/files/qplatformdefs.h b/recipes-qt/qt5/files/qplatformdefs.h new file mode 100644 index 00000000..5d22fb41 --- /dev/null +++ b/recipes-qt/qt5/files/qplatformdefs.h | |||
| @@ -0,0 +1 @@ | |||
| #include "../linux-g++/qplatformdefs.h" | |||
diff --git a/recipes-qt/qt5/qt5.inc b/recipes-qt/qt5/qt5.inc index ff5f2b1c..5035ad08 100644 --- a/recipes-qt/qt5/qt5.inc +++ b/recipes-qt/qt5/qt5.inc | |||
| @@ -1,8 +1,88 @@ | |||
| 1 | # Copyright (C) 2012 O.S. Systems Software LTDA. | 1 | # Copyright (C) 2012 O.S. Systems Software LTDA. |
| 2 | 2 | ||
| 3 | inherit qmake5_base | ||
| 4 | |||
| 5 | SRC_URI += " \ | ||
| 6 | file://qmake-build.conf.sh \ | ||
| 7 | file://qmake.conf.sh \ | ||
| 8 | file://qplatformdefs.h \ | ||
| 9 | " | ||
| 10 | |||
| 11 | # Qt5 is dependent on icu for localization | ||
| 12 | ICU = "icu " | ||
| 13 | ICU_powerpc = "pango" | ||
| 14 | |||
| 15 | DEPENDS += "qt5-tools-native virtual/libgl freetype jpeg libpng zlib openssl glib-2.0 ${ICU}" | ||
| 16 | |||
| 17 | require qt5_arch.inc | ||
| 18 | |||
| 3 | QT_MODULE ?= "${PN}" | 19 | QT_MODULE ?= "${PN}" |
| 4 | QT_VERSION ?= "${PV}-beta1" | ||
| 5 | 20 | ||
| 6 | SRC_URI = "http://releases.qt-project.org/qt5.0/beta1/split_sources/${QT_MODULE}-opensource-src-${QT_VERSION}.tar.xz" | 21 | QT_CONFIG_FLAGS ?= "" |
| 22 | |||
| 23 | QT_TESTS ?= "-nomake tests" | ||
| 24 | QT_EXAMPLES ?= "-nomake examples" | ||
| 25 | QT_DEMOS ?= "-nomake demos" | ||
| 26 | |||
| 27 | |||
| 28 | EXTRA_OEMAKE = "-e" | ||
| 29 | |||
| 30 | do_configure() { | ||
| 31 | set_endian | ||
| 32 | |||
| 33 | if [ ! -e bin/qmake ]; then | ||
| 34 | ln -sf ${STAGING_BINDIR_NATIVE}/qmake bin/qmake | ||
| 35 | fi | ||
| 36 | |||
| 37 | # Avoid problems with the linkers, since we want the linker to be g++ | ||
| 38 | unset LD | ||
| 39 | |||
| 40 | mkdir -p mkspecs/${TARGET_OS}-oe-g++ | ||
| 41 | cp -f ${WORKDIR}/qplatformdefs.h mkspecs/${TARGET_OS}-oe-g++ | ||
| 42 | bash ${WORKDIR}/qmake.conf.sh > mkspecs/${TARGET_OS}-oe-g++/qmake.conf | ||
| 43 | |||
| 44 | mkdir -p mkspecs/build-oe-g++ | ||
| 45 | cp -f ${WORKDIR}/qplatformdefs.h mkspecs/build-oe-g++ | ||
| 46 | |||
| 47 | ## FIXME, the file nameing is dumb... | ||
| 48 | cp ${WORKDIR}/qmake-build.conf.sh mkspecs/build-oe-g++/qmake.conf | ||
| 49 | |||
| 50 | ./configure -v \ | ||
| 51 | -opensource -confirm-license \ | ||
| 52 | -prefix ${prefix} \ | ||
| 53 | -bindir ${bindir} \ | ||
| 54 | -libdir ${libdir} \ | ||
| 55 | -datadir ${datadir}/${QT_DIR_NAME} \ | ||
| 56 | -sysconfdir ${sysconfdir}/${QT_DIR_NAME} \ | ||
| 57 | -docdir ${docdir}/${QT_DIR_NAME} \ | ||
| 58 | -headerdir ${includedir}/${QT_DIR_NAME} \ | ||
| 59 | -plugindir ${libdir}/${QT_DIR_NAME}/plugins \ | ||
| 60 | -importdir ${libdir}/${QT_DIR_NAME}/imports \ | ||
| 61 | -translationdir ${datadir}/${QT_DIR_NAME}/translations \ | ||
| 62 | -examplesdir ${bindir}/${QT_DIR_NAME}/examples \ | ||
| 63 | -shared \ | ||
| 64 | -no-rpath \ | ||
| 65 | -platform build-oe-g++ \ | ||
| 66 | -xplatform ${TARGET_OS}-oe-g++ \ | ||
| 67 | ${QT_TESTS} \ | ||
| 68 | ${QT_EXAMPLES} \ | ||
| 69 | ${QT_DEMOS} \ | ||
| 70 | ${QT_CONFIG_FLAGS} -no-fast | ||
| 71 | } | ||
| 72 | |||
| 73 | do_compile() { | ||
| 74 | unset CFLAGS CXXFLAGS AR | ||
| 75 | |||
| 76 | export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++" | ||
| 77 | |||
| 78 | oe_runmake | ||
| 79 | } | ||
| 80 | |||
| 81 | do_install() { | ||
| 82 | oe_runmake install INSTALL_ROOT=${D} | ||
| 83 | } | ||
| 7 | 84 | ||
| 8 | S = "${WORKDIR}/${QT_MODULE}-opensource-src-${QT_VERSION}" | 85 | FILES_${PN} = "${libdir}/*.so.*" |
| 86 | FILES_${PN}-dbg = "${libdir}/.debug/*.so.*" | ||
| 87 | FILES_${PN}-dev = "${libdir}/cmake/* ${libdir}/pkgconfig/*.pc ${libdir}/*.la ${libdir}/*.prl ${includedir}/qt5/*" | ||
| 88 | FILES_${PN}-staticdev = "${libdir}/libQt*.a" | ||
diff --git a/recipes-qt/qt5/qt5_arch.inc b/recipes-qt/qt5/qt5_arch.inc new file mode 100644 index 00000000..7048d7a3 --- /dev/null +++ b/recipes-qt/qt5/qt5_arch.inc | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | inherit siteinfo | ||
| 2 | |||
| 3 | set_arch() { | ||
| 4 | case ${TARGET_ARCH} in | ||
| 5 | arm*) QT_ARCH=arm ;; | ||
| 6 | i*86*) QT_ARCH=i386 ;; | ||
| 7 | mips*) QT_ARCH=mips ;; | ||
| 8 | powerpc*) QT_ARCH=powerpc ;; | ||
| 9 | x86_64*) QT_ARCH=x86_64 ;; | ||
| 10 | esac | ||
| 11 | } | ||
| 12 | |||
| 13 | set_endian() { | ||
| 14 | if [ ${SITEINFO_ENDIANNESS} = "le" ] ; then | ||
| 15 | QT_ENDIAN="-little-endian" | ||
| 16 | elif [ ${SITEINFO_ENDIANNESS} = "be" ] ; then | ||
| 17 | QT_ENDIAN="-big-endian" | ||
| 18 | fi | ||
| 19 | } | ||
diff --git a/recipes-qt/qt5/qtbase.inc b/recipes-qt/qt5/qtbase.inc new file mode 100644 index 00000000..235029b0 --- /dev/null +++ b/recipes-qt/qt5/qtbase.inc | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | require qt5.inc | ||
| 2 | |||
| 3 | SRC_URI += " \ | ||
| 4 | file://0001-Allowing-the-customization-of-the-paths.patch \ | ||
| 5 | file://0002-qmake-is-already-built-in-qt5-tools-native.patch \ | ||
| 6 | file://0003-Allow-building-a-separate-qmake-for-the-target.patch \ | ||
| 7 | " | ||
| 8 | #file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch | ||
| 9 | |||
| 10 | # to provide xcb/xcb_icccm.h, xcb/xcb_image.h, xcb/xcb_keysyms.h | ||
| 11 | DEPENDS += "xcb-util-wm xcb-util-image xcb-util-keysyms" | ||
| 12 | |||
| 13 | INC_PR = "r0" | ||
| 14 | |||
| 15 | QT_BASE_NAME = "qt5" | ||
| 16 | QT_DIR_NAME = "qt5" | ||
| 17 | |||
| 18 | export QMAKESPEC = "${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/${TARGET_OS}-oe-g++" | ||
| 19 | |||
| 20 | # Qt uses atomic instructions not supported in thumb mode | ||
| 21 | ARM_INSTRUCTION_SET = "arm" | ||
| 22 | |||
| 23 | inherit qmake5 | ||
diff --git a/recipes-qt/qt5/qtbase/0001-Allowing-the-customization-of-the-paths.patch b/recipes-qt/qt5/qtbase/0001-Allowing-the-customization-of-the-paths.patch new file mode 100644 index 00000000..073df378 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0001-Allowing-the-customization-of-the-paths.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From 183cf66e2770f7fbc420cf7aa94a9a8564785044 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mikko Levonmaa <mikko.levonmaa@palm.com> | ||
| 3 | Date: Wed, 7 Nov 2012 14:48:46 -0800 | ||
| 4 | Subject: [PATCH] Allowing the customization of the paths | ||
| 5 | |||
| 6 | Signed-off-by: Mikko Levonmaa <mikko.levonmaa@palm.com> | ||
| 7 | --- | ||
| 8 | src/corelib/global/qlibraryinfo.cpp | 6 ++++++ | ||
| 9 | 1 files changed, 6 insertions(+), 0 deletions(-) | ||
| 10 | |||
| 11 | diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp | ||
| 12 | index ccf0718..487b8eb 100644 | ||
| 13 | --- a/src/corelib/global/qlibraryinfo.cpp | ||
| 14 | +++ b/src/corelib/global/qlibraryinfo.cpp | ||
| 15 | @@ -49,6 +49,7 @@ | ||
| 16 | QT_BEGIN_NAMESPACE | ||
| 17 | extern QString qt_libraryInfoFile(); | ||
| 18 | QT_END_NAMESPACE | ||
| 19 | +#include <stdlib.h> | ||
| 20 | #elif defined(QT_BOOTSTRAPPED) | ||
| 21 | QString qt_libraryInfoFile() | ||
| 22 | { | ||
| 23 | @@ -164,6 +165,11 @@ QSettings *QLibraryInfoPrivate::findConfiguration() | ||
| 24 | } | ||
| 25 | } | ||
| 26 | #endif | ||
| 27 | + if (!QFile::exists(qtconfig)) { | ||
| 28 | + QByteArray config = getenv("QT_CONF_PATH"); | ||
| 29 | + qtconfig = QFile::decodeName(config); | ||
| 30 | + printf("Using qt.conf from: %s\n", qtconfig.toLatin1().data()); | ||
| 31 | + } | ||
| 32 | if (QFile::exists(qtconfig)) | ||
| 33 | return new QSettings(qtconfig, QSettings::IniFormat); | ||
| 34 | return 0; //no luck | ||
| 35 | -- | ||
| 36 | 1.7.4.1 | ||
| 37 | |||
diff --git a/recipes-qt/qt5/qtbase/0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch b/recipes-qt/qt5/qtbase/0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch new file mode 100644 index 00000000..6b5bed9a --- /dev/null +++ b/recipes-qt/qt5/qtbase/0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From d5a0cf45ebbd6a5911f8bd208fe355eb990b5388 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Holger Freyther <zecke@selfish.org> | ||
| 3 | Date: Wed, 26 Sep 2012 17:22:30 +0200 | ||
| 4 | Subject: [PATCH] qlibraryinfo: allow to set qt.conf from the outside using the environment | ||
| 5 | |||
| 6 | Allow to set a qt.conf from the outside using the environment. This allows | ||
| 7 | to inject new prefixes and other paths into qmake. This is needed when using | ||
| 8 | the same qmake binary to build qt/x11 and qt/embedded | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 13 | --- | ||
| 14 | src/corelib/global/qlibraryinfo.cpp | 5 +++++ | ||
| 15 | 1 files changed, 5 insertions(+), 0 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp | ||
| 18 | index ccf0718..497e72e 100644 | ||
| 19 | --- a/src/corelib/global/qlibraryinfo.cpp | ||
| 20 | +++ b/src/corelib/global/qlibraryinfo.cpp | ||
| 21 | @@ -49,6 +49,8 @@ | ||
| 22 | QT_BEGIN_NAMESPACE | ||
| 23 | extern QString qt_libraryInfoFile(); | ||
| 24 | QT_END_NAMESPACE | ||
| 25 | +#include <stdlib.h> | ||
| 26 | +#include <stdio.h> | ||
| 27 | #elif defined(QT_BOOTSTRAPPED) | ||
| 28 | QString qt_libraryInfoFile() | ||
| 29 | { | ||
| 30 | @@ -142,6 +143,11 @@ QSettings *QLibraryInfoPrivate::findConfiguration() | ||
| 31 | #ifdef QT_BOOTSTRAPPED | ||
| 32 | if(!QFile::exists(qtconfig)) | ||
| 33 | qtconfig = qt_libraryInfoFile(); | ||
| 34 | + if (!QFile::exists(qtconfig)) { | ||
| 35 | + QByteArray config = getenv("QT_CONF_PATH"); | ||
| 36 | + qtconfig = QFile::decodeName(config); | ||
| 37 | + printf("using qt.conf %s", qtconfig.toLatin1().data()); | ||
| 38 | + } | ||
| 39 | #else | ||
| 40 | if (!QFile::exists(qtconfig) && QCoreApplication::instance()) { | ||
| 41 | #ifdef Q_OS_MAC | ||
| 42 | -- | ||
| 43 | 1.7.4.1 | ||
| 44 | |||
diff --git a/recipes-qt/qt5/qtbase/0002-qmake-is-already-built-in-qt5-tools-native.patch b/recipes-qt/qt5/qtbase/0002-qmake-is-already-built-in-qt5-tools-native.patch new file mode 100644 index 00000000..0c1f63c6 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0002-qmake-is-already-built-in-qt5-tools-native.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | From aab01049543f4508f1dc92fb62b980d1d0c3bcc0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Michael Krelin <hacker@klever.net> | ||
| 3 | Date: Mon, 29 Oct 2012 20:07:49 -0700 | ||
| 4 | Subject: [PATCH] qmake is already built in qt5-tools-native | ||
| 5 | |||
| 6 | Ported from OE by: Yu Ke <ke.yu@intel.com> | ||
| 7 | Upstream-Status: Inappropriate [configuration] | ||
| 8 | |||
| 9 | Signed-off-by: Mikko Levonmaa <mikko.levonmaa@gmail.com> | ||
| 10 | --- | ||
| 11 | configure | 2 +- | ||
| 12 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/configure b/configure | ||
| 15 | index c3e61d6..5e43a19 100755 | ||
| 16 | --- a/configure | ||
| 17 | +++ b/configure | ||
| 18 | @@ -3594,7 +3594,7 @@ setBootstrapVariable() | ||
| 19 | } | ||
| 20 | |||
| 21 | # build qmake | ||
| 22 | -if true; then ###[ '!' -f "$outpath/bin/qmake" ]; | ||
| 23 | +if false; then ###[ '!' -f "$outpath/bin/qmake" ]; | ||
| 24 | echo "Creating qmake. Please wait..." | ||
| 25 | |||
| 26 | #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured | ||
| 27 | -- | ||
| 28 | 1.7.4.1 | ||
| 29 | |||
diff --git a/recipes-qt/qt5/qtbase/0003-Allow-building-a-separate-qmake-for-the-target.patch b/recipes-qt/qt5/qtbase/0003-Allow-building-a-separate-qmake-for-the-target.patch new file mode 100644 index 00000000..781d6e54 --- /dev/null +++ b/recipes-qt/qt5/qtbase/0003-Allow-building-a-separate-qmake-for-the-target.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | From a2a01e1fd975e8e616b580423c3bf30db9c11b6d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 3 | Date: Mon, 29 Oct 2012 20:26:36 -0700 | ||
| 4 | Subject: [PATCH] Allow building a separate qmake for the target | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [config] | ||
| 7 | |||
| 8 | Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> | ||
| 9 | Signed-off-by: Mikko Levonmaa <mikko.levonmaa@gmail.com> | ||
| 10 | --- | ||
| 11 | qmake/qmake.pro | 1 + | ||
| 12 | 1 files changed, 1 insertions(+), 0 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/qmake/qmake.pro b/qmake/qmake.pro | ||
| 15 | index 0d92ac2..07fa80e 100644 | ||
| 16 | --- a/qmake/qmake.pro | ||
| 17 | +++ b/qmake/qmake.pro | ||
| 18 | @@ -9,6 +9,7 @@ CONFIG -= qt shared app_bundle uic | ||
| 19 | DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED \ | ||
| 20 | PROEVALUATOR_FULL PROEVALUATOR_DEBUG | ||
| 21 | DESTDIR = ../bin/ | ||
| 22 | +TARGET = qmake2 | ||
| 23 | |||
| 24 | OBJECTS_DIR = . | ||
| 25 | MOC_DIR = . | ||
| 26 | -- | ||
| 27 | 1.7.4.1 | ||
| 28 | |||
diff --git a/recipes-qt/qt5/qtbase_4.999+git.bb b/recipes-qt/qt5/qtbase_4.999+git.bb new file mode 100644 index 00000000..fe8fd1e5 --- /dev/null +++ b/recipes-qt/qt5/qtbase_4.999+git.bb | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | require qtbase.inc | ||
| 2 | require qt5-4.999+git.inc | ||
| 3 | |||
| 4 | PR = "${INC_PR}.0" | ||
| 5 | |||
| 6 | SRCREV = "f7d99ad50f11ee7c263d4c2bdbe024355a1ab3e9" | ||
