diff options
| author | Martin Jansa <Martin.Jansa@gmail.com> | 2013-07-03 16:14:44 +0200 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-07-25 12:14:11 +0200 |
| commit | 902f55b957ba0407816739bfcae864c6bd2c3d68 (patch) | |
| tree | 220ada24d4edd83938e8eceaf24b91ad81ff5231 /recipes-qt/qt5/qtbase-5.1.0/0001-Add-linux-oe-g-platform.patch | |
| parent | ca4a0758e17c69905df6eda86fe678a4f10f50f7 (diff) | |
| download | meta-qt5-902f55b957ba0407816739bfcae864c6bd2c3d68.tar.gz | |
qt5: add recipes for 5.1.0
* only rebased patches and updated SRC_URI checksum, haven't even build
tested it yet
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt/qt5/qtbase-5.1.0/0001-Add-linux-oe-g-platform.patch')
| -rw-r--r-- | recipes-qt/qt5/qtbase-5.1.0/0001-Add-linux-oe-g-platform.patch | 304 |
1 files changed, 304 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtbase-5.1.0/0001-Add-linux-oe-g-platform.patch b/recipes-qt/qt5/qtbase-5.1.0/0001-Add-linux-oe-g-platform.patch new file mode 100644 index 00000000..669dffcd --- /dev/null +++ b/recipes-qt/qt5/qtbase-5.1.0/0001-Add-linux-oe-g-platform.patch | |||
| @@ -0,0 +1,304 @@ | |||
| 1 | From 7244ed3ca9326f3521de8961dbe7f9759f8e8041 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 3 | Date: Mon, 15 Apr 2013 04:29:32 +0200 | ||
| 4 | Subject: [PATCH 01/23] Add linux-oe-g++ platform | ||
| 5 | |||
| 6 | * This qmake.conf unlike other platforms reads most variables from | ||
| 7 | shell environment, because it's easier for qt recipes to export | ||
| 8 | *FLAGS or CC specific for given recipe | ||
| 9 | |||
| 10 | * configure: add getQEvalMakeConf and getXQEvalMakeConf | ||
| 11 | Allow expansion of $(...) references from qmake.conf to generate | ||
| 12 | qmake environment from shell environment as exported by qmake5_base | ||
| 13 | |||
| 14 | * OE_QMAKE_CXX in order to allow compiler version check to succeed | ||
| 15 | which allows WebKit to be enabled. | ||
| 16 | |||
| 17 | * Other variables in order to let config.tests to use our -platform | ||
| 18 | settings | ||
| 19 | |||
| 20 | * Add setBootstrapEvalVariable to bootstrap qmake with our environment | ||
| 21 | too, this allows us to use -platform linux-oe-g++ also for native | ||
| 22 | recipe | ||
| 23 | |||
| 24 | * disable gdb_dwarf_index | ||
| 25 | * qmake is trying to call native gdb and we don't depend on gdb-native | ||
| 26 | (or even provide gdb-native) | ||
| 27 | * fixes errors like this: | ||
| 28 | /bin/sh: gdb: command not found | ||
| 29 | /bin/sh: line 0: test: -gt: unary operator expected | ||
| 30 | which are not fatal, but still misleading in do_configure output | ||
| 31 | |||
| 32 | Upstream-Status: Pending | ||
| 33 | |||
| 34 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 35 | --- | ||
| 36 | configure | 54 ++++++++++++++++--- | ||
| 37 | mkspecs/linux-oe-g++/qmake.conf | 40 ++++++++++++++ | ||
| 38 | mkspecs/linux-oe-g++/qplatformdefs.h | 100 +++++++++++++++++++++++++++++++++++ | ||
| 39 | 3 files changed, 187 insertions(+), 7 deletions(-) | ||
| 40 | create mode 100644 mkspecs/linux-oe-g++/qmake.conf | ||
| 41 | create mode 100644 mkspecs/linux-oe-g++/qplatformdefs.h | ||
| 42 | |||
| 43 | diff --git a/configure b/configure | ||
| 44 | index d7c9674..45e0586 100755 | ||
| 45 | --- a/configure | ||
| 46 | +++ b/configure | ||
| 47 | @@ -284,6 +284,16 @@ getQMakeConf() | ||
| 48 | getSingleQMakeVariable "$1" "$specvals" | ||
| 49 | } | ||
| 50 | |||
| 51 | +# OE qmake.conf is reading some variables from shell env | ||
| 52 | +# read them from qmake.conf, replace qmake () syntax with shell and eval | ||
| 53 | +getQEvalMakeConf() | ||
| 54 | +{ | ||
| 55 | + VAL=`getQMakeConf "$1" | sed -n 's/$[(]\([0-9a-zA-Z_]*\)[)]/$\1/pg'` | ||
| 56 | + EVAL=`eval "echo ${VAL}"` | ||
| 57 | +# echo "Running getQEvalMakeConf: var='$1', val='`getQMakeConf \"$1\"`, val-sed='$VAL', eval='$EVAL'" >&2 | ||
| 58 | + eval "echo ${VAL}" | ||
| 59 | +} | ||
| 60 | + | ||
| 61 | getXQMakeConf() | ||
| 62 | { | ||
| 63 | if [ -z "$xspecvals" ]; then | ||
| 64 | @@ -293,6 +303,16 @@ getXQMakeConf() | ||
| 65 | getSingleQMakeVariable "$1" "$xspecvals" | ||
| 66 | } | ||
| 67 | |||
| 68 | +# OE qmake.conf is reading some variables from shell env | ||
| 69 | +# read them from qmake.conf, replace qmake () syntax with shell and eval | ||
| 70 | +getXQEvalMakeConf() | ||
| 71 | +{ | ||
| 72 | + VAL=`getXQMakeConf "$1" | sed -n 's/$[(]\([0-9a-zA-Z_]*\)[)]/$\1/pg'` | ||
| 73 | + EVAL=`eval "echo ${VAL}"` | ||
| 74 | +# echo "Running getXQEvalMakeConf: var='$1', val='`getXQMakeConf \"$1\"`, val-sed='$VAL', eval='$EVAL'" >&2 | ||
| 75 | + eval "echo ${VAL}" | ||
| 76 | +} | ||
| 77 | + | ||
| 78 | compilerSupportsFlag() | ||
| 79 | { | ||
| 80 | cat >conftest.cpp <<EOF | ||
| 81 | @@ -809,6 +829,18 @@ fi | ||
| 82 | # initalize variables | ||
| 83 | #------------------------------------------------------------------------------- | ||
| 84 | |||
| 85 | +# Export all OE variables for qmake.conf from shell env to QMakeVars | ||
| 86 | +OE_VARIABLES="AR CC CFLAGS COMPILER CXX CXXFLAGS LDFLAGS LINK QT_CONFIG STRIP" | ||
| 87 | +for varname in $OE_VARIABLES; do | ||
| 88 | + qmakevarname="${varname}" | ||
| 89 | + cmd=`echo \ | ||
| 90 | +'if [ -n "\$OE_QMAKE_'${varname}'" ]; then | ||
| 91 | + QMakeVar set OE_QMAKE_'${qmakevarname}' "\$OE_QMAKE_'${varname}'" | ||
| 92 | +# echo "Exporting OE_QMAKE_'${qmakevarname}' value=\"\$OE_QMAKE_'${varname}'\"" >&2 | ||
| 93 | +fi'` | ||
| 94 | + eval "$cmd" | ||
| 95 | +done | ||
| 96 | + | ||
| 97 | SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS" | ||
| 98 | for varname in $SYSTEM_VARIABLES; do | ||
| 99 | qmakevarname="${varname}" | ||
| 100 | @@ -2836,7 +2868,7 @@ if [ "$BUILD_ON_MAC" = "yes" ] && [ "$CFG_QGTKSTYLE" = "auto" ]; then | ||
| 101 | CFG_QGTKSTYLE=no | ||
| 102 | fi | ||
| 103 | |||
| 104 | -QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX` | ||
| 105 | +QMAKE_CONF_COMPILER=`getXQEvalMakeConf QMAKE_CXX` | ||
| 106 | |||
| 107 | TEST_COMPILER=$QMAKE_CONF_COMPILER | ||
| 108 | |||
| 109 | @@ -2871,7 +2903,7 @@ if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then | ||
| 110 | exit 1 | ||
| 111 | fi | ||
| 112 | fi | ||
| 113 | -TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS` | ||
| 114 | +TEST_COMPILER_CXXFLAGS=`getXQEvalMakeConf QMAKE_CXXFLAGS` | ||
| 115 | |||
| 116 | GCC_MACHINE_DUMP= | ||
| 117 | case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac | ||
| 118 | @@ -3909,6 +3941,14 @@ setBootstrapVariable() | ||
| 119 | getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile" | ||
| 120 | } | ||
| 121 | |||
| 122 | +# OE qmake.conf is reading some variables from shell env | ||
| 123 | +# read them from qmake.conf, replace qmake () syntax with shell and eval | ||
| 124 | +setBootstrapEvalVariable() | ||
| 125 | +{ | ||
| 126 | + getQEvalMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile" | ||
| 127 | +} | ||
| 128 | + | ||
| 129 | + | ||
| 130 | # build qmake | ||
| 131 | if true; then ###[ '!' -f "$outpath/bin/qmake" ]; | ||
| 132 | echo "Creating qmake..." | ||
| 133 | @@ -3947,11 +3987,11 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; | ||
| 134 | fi | ||
| 135 | |||
| 136 | [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM= | ||
| 137 | - setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM" | ||
| 138 | - setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM" | ||
| 139 | - setBootstrapVariable QMAKE_CFLAGS | ||
| 140 | - setBootstrapVariable QMAKE_CXXFLAGS | ||
| 141 | - setBootstrapVariable QMAKE_LFLAGS | ||
| 142 | + setBootstrapEvalVariable QMAKE_CC CC "$CC_TRANSFORM" | ||
| 143 | + setBootstrapEvalVariable QMAKE_CXX CXX "$CC_TRANSFORM" | ||
| 144 | + setBootstrapEvalVariable QMAKE_CFLAGS | ||
| 145 | + setBootstrapEvalVariable QMAKE_CXXFLAGS | ||
| 146 | + setBootstrapEvalVariable QMAKE_LFLAGS | ||
| 147 | |||
| 148 | if [ "$CFG_RELEASE_QMAKE" = "yes" ]; then | ||
| 149 | setBootstrapVariable QMAKE_CFLAGS_RELEASE | ||
| 150 | diff --git a/mkspecs/linux-oe-g++/qmake.conf b/mkspecs/linux-oe-g++/qmake.conf | ||
| 151 | new file mode 100644 | ||
| 152 | index 0000000..ca26b10 | ||
| 153 | --- /dev/null | ||
| 154 | +++ b/mkspecs/linux-oe-g++/qmake.conf | ||
| 155 | @@ -0,0 +1,40 @@ | ||
| 156 | +# | ||
| 157 | +# qmake configuration for linux-g++ with modifications for building with OpenEmbedded | ||
| 158 | +# | ||
| 159 | + | ||
| 160 | +MAKEFILE_GENERATOR = UNIX | ||
| 161 | +CONFIG += incremental | ||
| 162 | +QMAKE_INCREMENTAL_STYLE = sublib | ||
| 163 | + | ||
| 164 | +include(../common/linux.conf) | ||
| 165 | + | ||
| 166 | +# QMAKE_<TOOL> (moc, uic, rcc) are gone, overwrite only ar and strip | ||
| 167 | +QMAKE_AR = $(OE_QMAKE_AR) cqs | ||
| 168 | +QMAKE_STRIP = $(OE_QMAKE_STRIP) | ||
| 169 | +QMAKE_WAYLAND_SCANNER = $(OE_QMAKE_WAYLAND_SCANNER) | ||
| 170 | + | ||
| 171 | +include(../common/gcc-base-unix.conf) | ||
| 172 | + | ||
| 173 | +# *FLAGS from gcc-base.conf | ||
| 174 | +QMAKE_CFLAGS += $(OE_QMAKE_CFLAGS) | ||
| 175 | +QMAKE_CXXFLAGS += $(OE_QMAKE_CXXFLAGS) | ||
| 176 | +QMAKE_LFLAGS += $(OE_QMAKE_LDFLAGS) | ||
| 177 | + | ||
| 178 | +include(../common/g++-unix.conf) | ||
| 179 | + | ||
| 180 | +# tc settings from g++-base.conf | ||
| 181 | +QMAKE_COMPILER = $(OE_QMAKE_COMPILER) | ||
| 182 | +QMAKE_CC = $(OE_QMAKE_CC) | ||
| 183 | +QMAKE_CXX = $(OE_QMAKE_CXX) | ||
| 184 | + | ||
| 185 | +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $(OE_QMAKE_CFLAGS) | ||
| 186 | + | ||
| 187 | +QMAKE_LINK = $(OE_QMAKE_LINK) | ||
| 188 | +QMAKE_LINK_SHLIB = $(OE_QMAKE_LINK) | ||
| 189 | +QMAKE_LINK_C = $(OE_QMAKE_LINK) | ||
| 190 | +QMAKE_LINK_C_SHLIB = $(OE_QMAKE_LINK) | ||
| 191 | + | ||
| 192 | +# for the SDK | ||
| 193 | +isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $(OE_QMAKE_QT_CONFIG) | ||
| 194 | + | ||
| 195 | +load(qt_config) | ||
| 196 | diff --git a/mkspecs/linux-oe-g++/qplatformdefs.h b/mkspecs/linux-oe-g++/qplatformdefs.h | ||
| 197 | new file mode 100644 | ||
| 198 | index 0000000..dd12003 | ||
| 199 | --- /dev/null | ||
| 200 | +++ b/mkspecs/linux-oe-g++/qplatformdefs.h | ||
| 201 | @@ -0,0 +1,100 @@ | ||
| 202 | +/**************************************************************************** | ||
| 203 | +** | ||
| 204 | +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). | ||
| 205 | +** Contact: http://www.qt-project.org/legal | ||
| 206 | +** | ||
| 207 | +** This file is part of the qmake spec of the Qt Toolkit. | ||
| 208 | +** | ||
| 209 | +** $QT_BEGIN_LICENSE:LGPL$ | ||
| 210 | +** Commercial License Usage | ||
| 211 | +** Licensees holding valid commercial Qt licenses may use this file in | ||
| 212 | +** accordance with the commercial license agreement provided with the | ||
| 213 | +** Software or, alternatively, in accordance with the terms contained in | ||
| 214 | +** a written agreement between you and Digia. For licensing terms and | ||
| 215 | +** conditions see http://qt.digia.com/licensing. For further information | ||
| 216 | +** use the contact form at http://qt.digia.com/contact-us. | ||
| 217 | +** | ||
| 218 | +** GNU Lesser General Public License Usage | ||
| 219 | +** Alternatively, this file may be used under the terms of the GNU Lesser | ||
| 220 | +** General Public License version 2.1 as published by the Free Software | ||
| 221 | +** Foundation and appearing in the file LICENSE.LGPL included in the | ||
| 222 | +** packaging of this file. Please review the following information to | ||
| 223 | +** ensure the GNU Lesser General Public License version 2.1 requirements | ||
| 224 | +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||
| 225 | +** | ||
| 226 | +** In addition, as a special exception, Digia gives you certain additional | ||
| 227 | +** rights. These rights are described in the Digia Qt LGPL Exception | ||
| 228 | +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||
| 229 | +** | ||
| 230 | +** GNU General Public License Usage | ||
| 231 | +** Alternatively, this file may be used under the terms of the GNU | ||
| 232 | +** General Public License version 3.0 as published by the Free Software | ||
| 233 | +** Foundation and appearing in the file LICENSE.GPL included in the | ||
| 234 | +** packaging of this file. Please review the following information to | ||
| 235 | +** ensure the GNU General Public License version 3.0 requirements will be | ||
| 236 | +** met: http://www.gnu.org/copyleft/gpl.html. | ||
| 237 | +** | ||
| 238 | +** | ||
| 239 | +** $QT_END_LICENSE$ | ||
| 240 | +** | ||
| 241 | +****************************************************************************/ | ||
| 242 | + | ||
| 243 | +#ifndef QPLATFORMDEFS_H | ||
| 244 | +#define QPLATFORMDEFS_H | ||
| 245 | + | ||
| 246 | +// Get Qt defines/settings | ||
| 247 | + | ||
| 248 | +#include "qglobal.h" | ||
| 249 | + | ||
| 250 | +// Set any POSIX/XOPEN defines at the top of this file to turn on specific APIs | ||
| 251 | + | ||
| 252 | +// 1) need to reset default environment if _BSD_SOURCE is defined | ||
| 253 | +// 2) need to specify POSIX thread interfaces explicitly in glibc 2.0 | ||
| 254 | +// 3) it seems older glibc need this to include the X/Open stuff | ||
| 255 | +#ifndef _GNU_SOURCE | ||
| 256 | +# define _GNU_SOURCE | ||
| 257 | +#endif | ||
| 258 | + | ||
| 259 | +#include <unistd.h> | ||
| 260 | + | ||
| 261 | + | ||
| 262 | +// We are hot - unistd.h should have turned on the specific APIs we requested | ||
| 263 | + | ||
| 264 | +#include <features.h> | ||
| 265 | +#include <pthread.h> | ||
| 266 | +#include <dirent.h> | ||
| 267 | +#include <fcntl.h> | ||
| 268 | +#include <grp.h> | ||
| 269 | +#include <pwd.h> | ||
| 270 | +#include <signal.h> | ||
| 271 | + | ||
| 272 | +#include <sys/types.h> | ||
| 273 | +#include <sys/ioctl.h> | ||
| 274 | +#include <sys/ipc.h> | ||
| 275 | +#include <sys/time.h> | ||
| 276 | +#include <sys/shm.h> | ||
| 277 | +#include <sys/socket.h> | ||
| 278 | +#include <sys/stat.h> | ||
| 279 | +#include <sys/wait.h> | ||
| 280 | +#include <netinet/in.h> | ||
| 281 | +#ifndef QT_NO_IPV6IFNAME | ||
| 282 | +#include <net/if.h> | ||
| 283 | +#endif | ||
| 284 | + | ||
| 285 | +#define QT_USE_XOPEN_LFS_EXTENSIONS | ||
| 286 | +#include "../common/posix/qplatformdefs.h" | ||
| 287 | + | ||
| 288 | +#undef QT_SOCKLEN_T | ||
| 289 | + | ||
| 290 | +#if defined(__GLIBC__) && (__GLIBC__ >= 2) | ||
| 291 | +#define QT_SOCKLEN_T socklen_t | ||
| 292 | +#else | ||
| 293 | +#define QT_SOCKLEN_T int | ||
| 294 | +#endif | ||
| 295 | + | ||
| 296 | +#if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) | ||
| 297 | +#define QT_SNPRINTF ::snprintf | ||
| 298 | +#define QT_VSNPRINTF ::vsnprintf | ||
| 299 | +#endif | ||
| 300 | + | ||
| 301 | +#endif // QPLATFORMDEFS_H | ||
| 302 | -- | ||
| 303 | 1.8.3.2 | ||
| 304 | |||
