diff options
Diffstat (limited to 'meta/recipes-qt/qt4/qt4.inc')
| -rw-r--r-- | meta/recipes-qt/qt4/qt4.inc | 392 |
1 files changed, 0 insertions, 392 deletions
diff --git a/meta/recipes-qt/qt4/qt4.inc b/meta/recipes-qt/qt4/qt4.inc deleted file mode 100644 index 91be769231..0000000000 --- a/meta/recipes-qt/qt4/qt4.inc +++ /dev/null | |||
| @@ -1,392 +0,0 @@ | |||
| 1 | inherit qmake_base | ||
| 2 | |||
| 3 | DEPENDS += "qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 sqlite3 tiff icu" | ||
| 4 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}" | ||
| 5 | |||
| 6 | require qt4_arch.inc | ||
| 7 | |||
| 8 | QT_DISTRO_FLAGS ?= "-no-accessibility -no-sm" | ||
| 9 | QT_DISTRO_FLAGS_linuxstdbase = "-sm" | ||
| 10 | |||
| 11 | QT_SQL_DRIVER_FLAGS ?= "-no-sql-ibase -no-sql-mysql -no-sql-psql -no-sql-odbc -no-sql-sqlite2 -plugin-sql-sqlite -system-sqlite" | ||
| 12 | |||
| 13 | QT_GLFLAGS ?= "" | ||
| 14 | |||
| 15 | |||
| 16 | QT_QT3SUPPORT ?= "-qt3support" | ||
| 17 | QT_XML ?= "-xmlpatterns" | ||
| 18 | QT_WEBKIT ?= "-webkit" | ||
| 19 | QT_PHONON ?= "-no-phonon" | ||
| 20 | QT_DBUS ?= "-qdbus" | ||
| 21 | QT_MULTIMEDIA ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', '-pulseaudio', '-no-pulseaudio', d)}" | ||
| 22 | |||
| 23 | QT_CONFIG_FLAGS += "-release -no-cups -reduce-relocations \ | ||
| 24 | -shared -no-nas-sound -no-nis \ | ||
| 25 | -system-libjpeg -system-libpng -system-libtiff -system-zlib \ | ||
| 26 | -no-pch -stl -glib -icu \ | ||
| 27 | -no-rpath -silent \ | ||
| 28 | -D USE_QTMULTIMEDIA=1 \ | ||
| 29 | ${QT_DBUS} \ | ||
| 30 | ${QT_QT3SUPPORT} \ | ||
| 31 | ${QT_WEBKIT} \ | ||
| 32 | ${QT_PHONON} \ | ||
| 33 | ${QT_XML} \ | ||
| 34 | ${QT_MULTIMEDIA} \ | ||
| 35 | ${QT_SQL_DRIVER_FLAGS} \ | ||
| 36 | ${QT_DISTRO_FLAGS} \ | ||
| 37 | ${QT_GLFLAGS}" | ||
| 38 | |||
| 39 | EXTRA_OEMAKE = "-e" | ||
| 40 | |||
| 41 | EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake2 -after \ | ||
| 42 | INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \ | ||
| 43 | QMAKESPEC="${QMAKESPEC}" LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \ | ||
| 44 | AR="${TARGET_PREFIX}ar cqs" \ | ||
| 45 | MOC="${STAGING_BINDIR_NATIVE}/moc4" UIC="${STAGING_BINDIR_NATIVE}/uic4" MAKE="make -e"' | ||
| 46 | |||
| 47 | export QT_CONF_PATH="${WORKDIR}/qt.conf" | ||
| 48 | |||
| 49 | # Library packages | ||
| 50 | QT_LIB_NAMES = "Qt3Support QtAssistantClient QtCLucene QtCore QtDBus QtDesigner QtDesignerComponents QtGui QtHelp QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtUiTools QtWebKit QtXml QtXmlPatterns phonon QtMultimedia QtOpenVG QtMediaServices QtDeclarative" | ||
| 51 | |||
| 52 | QT_EXTRA_LIBS = "pvrQWSWSEGL" | ||
| 53 | |||
| 54 | python __anonymous () { | ||
| 55 | lib_packages = [] | ||
| 56 | dev_packages = [] | ||
| 57 | dbg_packages = [] | ||
| 58 | staticdev_packages = [] | ||
| 59 | for name in d.getVar("QT_LIB_NAMES", True).split(): | ||
| 60 | pkg = d.getVar("QT_BASE_LIB", True) + name.lower().replace("qt", "").replace("_", "-") + "4" | ||
| 61 | # NOTE: the headers for QtAssistantClient are different | ||
| 62 | incname = name.replace("QtAssistantClient", "QtAssistant") | ||
| 63 | d.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s${QT_LIBINFIX}.so.*" % locals()) | ||
| 64 | d.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s${QT_LIBINFIX}.prl | ||
| 65 | ${libdir}/lib%(name)s${QT_LIBINFIX}.la | ||
| 66 | ${libdir}/lib%(name)s${QT_LIBINFIX}.so | ||
| 67 | ${includedir}/${QT_DIR_NAME}/%(incname)s | ||
| 68 | ${libdir}/pkgconfig/%(name)s${QT_LIBINFIX}.pc""" % locals()) | ||
| 69 | d.setVar("FILES_%s-staticdev" % pkg, "${libdir}/lib%(name)s${QT_LIBINFIX}.a" % locals()) | ||
| 70 | d.setVar("FILES_%s-dbg" % pkg, "${libdir}/.debug/lib%(name)s${QT_LIBINFIX}.so*" % locals()) | ||
| 71 | d.setVar("RRECOMMENDS_%s-dbg" % pkg, "${PN}-dbg") | ||
| 72 | lib_packages.append(pkg) | ||
| 73 | dev_packages.append("%s-dev" % pkg) | ||
| 74 | dbg_packages.append("%s-dbg" % pkg) | ||
| 75 | staticdev_packages.append("%s-staticdev" % pkg) | ||
| 76 | for name in d.getVar("OTHER_PACKAGES", True).split(): | ||
| 77 | dbg_packages.append("%s-dbg" % name) | ||
| 78 | staticdev_packages.append("%s-staticdev" % name) | ||
| 79 | |||
| 80 | for name in d.getVar("QT_EXTRA_LIBS", True).split(): | ||
| 81 | pkg = d.getVar("QT_BASE_LIB", True) + name.lower().replace("qt", "").replace("_", "-") + "4" | ||
| 82 | d.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s.so.*" % locals()) | ||
| 83 | d.setVar("FILES_%s-staticdev" % pkg, "${libdir}/lib%(name)s.a" % locals()) | ||
| 84 | d.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s.prl | ||
| 85 | ${libdir}/lib%(name)s.la | ||
| 86 | ${libdir}/lib%(name)s.so | ||
| 87 | ${includedir}/${QT_DIR_NAME}/%(incname)s | ||
| 88 | ${libdir}/pkgconfig/%(name)s.pc""" % locals()) | ||
| 89 | d.setVar("FILES_%s-dbg" % pkg, "${libdir}/.debug/lib%(name)s.so*" % locals()) | ||
| 90 | d.setVar("RRECOMMENDS_%s-dbg" % pkg, "${PN}-dbg") | ||
| 91 | lib_packages.append(pkg) | ||
| 92 | dev_packages.append("%s-dev" % pkg) | ||
| 93 | dbg_packages.append("%s-dbg" % pkg) | ||
| 94 | staticdev_packages.append("%s-staticdev" % pkg) | ||
| 95 | |||
| 96 | d.setVar("LIB_PACKAGES", " ".join(lib_packages)) | ||
| 97 | d.setVar("DEV_PACKAGES", " ".join(dev_packages)) | ||
| 98 | d.setVar("DBG_PACKAGES", " ".join(dbg_packages)) | ||
| 99 | d.setVar("STATICDEV_PACKAGES", " ".join(staticdev_packages)) | ||
| 100 | } | ||
| 101 | |||
| 102 | OTHER_PACKAGES = "\ | ||
| 103 | ${QT_BASE_NAME}-tools \ | ||
| 104 | ${QT_BASE_NAME}-assistant \ | ||
| 105 | ${QT_BASE_NAME}-common \ | ||
| 106 | ${QT_BASE_NAME}-dbus \ | ||
| 107 | ${QT_BASE_NAME}-demos \ | ||
| 108 | ${QT_BASE_NAME}-designer \ | ||
| 109 | ${QT_BASE_NAME}-examples \ | ||
| 110 | ${QT_BASE_NAME}-linguist \ | ||
| 111 | ${QT_BASE_NAME}-makeqpf \ | ||
| 112 | ${QT_BASE_NAME}-mkspecs \ | ||
| 113 | ${QT_BASE_NAME}-pixeltool \ | ||
| 114 | ${QT_BASE_NAME}-qmlviewer \ | ||
| 115 | ${QT_BASE_NAME}-xmlpatterns \ | ||
| 116 | ${QT_BASE_NAME}-qt3to4 \ | ||
| 117 | ${QT_BASE_NAME}-qml-plugins" | ||
| 118 | |||
| 119 | #We prepend so ${QT_BASE_NAME}-demos-doc comes before ${PN}-doc,so the packaging of FILES_ get done before. | ||
| 120 | PACKAGES =+ "${QT_BASE_NAME}-demos-doc" | ||
| 121 | PACKAGES += " \ | ||
| 122 | ${LIB_PACKAGES} \ | ||
| 123 | ${DEV_PACKAGES} \ | ||
| 124 | ${DBG_PACKAGES} \ | ||
| 125 | ${STATICDEV_PACKAGES} \ | ||
| 126 | ${OTHER_PACKAGES}" | ||
| 127 | |||
| 128 | PACKAGES_DYNAMIC += "^${QT_BASE_NAME}-plugin-.* ^${QT_BASE_NAME}-translation-.* ^${QT_BASE_NAME}-phrasebook-.*" | ||
| 129 | |||
| 130 | ALLOW_EMPTY_${PN} = "1" | ||
| 131 | FILES_${PN} = "" | ||
| 132 | NOAUTOPACKAGEDEBUG = "1" | ||
| 133 | FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" | ||
| 134 | FILES_${PN}-dbg = "/usr/src/debug/" | ||
| 135 | FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch" | ||
| 136 | RRECOMMENDS_${PN} = "${LIB_PACKAGES} ${OTHER_PACKAGES}" | ||
| 137 | RRECOMMENDS_${PN}-dev = "${DEV_PACKAGES}" | ||
| 138 | RRECOMMENDS_${PN}-dbg = "${DBG_PACKAGES}" | ||
| 139 | RRECOMMENDS_${QT_BASE_LIB}core4_append_libc-glibc = " glibc-gconv-utf-16" | ||
| 140 | RRECOMMENDS_${QT_BASE_NAME}-demos += " \ | ||
| 141 | ${QT_BASE_NAME}-examples \ | ||
| 142 | ${QT_BASE_NAME}-plugin-sqldriver-sqlite \ | ||
| 143 | ${QT_BASE_NAME}-plugin-imageformat-jpeg \ | ||
| 144 | ${QT_BASE_NAME}-qml-plugins \ | ||
| 145 | ${QT_BASE_NAME}-assistant \ | ||
| 146 | ${QT_BASE_NAME}-demos-doc" | ||
| 147 | RRECOMMENDS_${QT_BASE_NAME}-examples += " \ | ||
| 148 | ${QT_BASE_NAME}-plugin-sqldriver-sqlite \ | ||
| 149 | ${QT_BASE_NAME}-plugin-imageformat-jpeg \ | ||
| 150 | ${QT_BASE_NAME}-qml-plugins" | ||
| 151 | RRECOMMENDS_${QT_BASE_NAME}-qmlviewer += " \ | ||
| 152 | ${QT_BASE_NAME}-qml-plugins" | ||
| 153 | RRECOMMENDS_${QT_BASE_NAME}-doc += " \ | ||
| 154 | ${QT_BASE_NAME}-demos-doc" | ||
| 155 | |||
| 156 | RPROVIDES_${QT_BASE_NAME}-tools += "qmake2" | ||
| 157 | RREPLACES_${QT_BASE_NAME}-tools += "qmake2" | ||
| 158 | |||
| 159 | FILES_${QT_BASE_NAME}-tools = "${bindir}/qttracereplay ${bindir}/qdoc* ${bindir}/qmake ${bindir}/moc ${bindir}/uic* ${bindir}/rcc" | ||
| 160 | FILES_${QT_BASE_NAME}-tools-dbg = "${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc* ${bindir}/.debug/qmake ${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc" | ||
| 161 | FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant* ${bindir}/qcollectiongenerator ${bindir}/qhelpconverter ${bindir}/qhelpgenerator" | ||
| 162 | FILES_${QT_BASE_NAME}-assistant-dbg = "${bindir}/.debug/*assistant* ${bindir}/.debug/qcollectiongenerator ${bindir}/.debug/qhelpconverter ${bindir}/.debug/qhelpgenerator" | ||
| 163 | FILES_${QT_BASE_NAME}-common = "${bindir}/qtconfig" | ||
| 164 | FILES_${QT_BASE_NAME}-common-dbg = "${bindir}/.debug/qtconfig" | ||
| 165 | FILES_${QT_BASE_NAME}-dbus = "${bindir}/qdbus ${bindir}/qdbusxml2cpp ${bindir}/qdbuscpp2xml ${bindir}/qdbusviewer" | ||
| 166 | FILES_${QT_BASE_NAME}-dbus-dbg = "${bindir}/.debug/qdbus ${bindir}/.debug/qdbusxml2cpp ${bindir}/.debug/qdbuscpp2xml ${bindir}/.debug/qdbusviewer" | ||
| 167 | FILES_${QT_BASE_NAME}-demos = "${bindir}/qtdemo* ${bindir}/${QT_DIR_NAME}/demos/*" | ||
| 168 | FILES_${QT_BASE_NAME}-demos-staticdev = "${bindir}/${QT_DIR_NAME}/demos/shared/libdemo_shared.a" | ||
| 169 | FILES_${QT_BASE_NAME}-demos-dbg = "${bindir}/.debug/qtdemo* ${bindir}/${QT_DIR_NAME}/demos/.debug/* ${bindir}/${QT_DIR_NAME}/demos/*/.debug ${bindir}/${QT_DIR_NAME}/demos/*/*/.debug ${bindir}/${QT_DIR_NAME}/demos/*/*/*/.debug" | ||
| 170 | FILES_${QT_BASE_NAME}-designer = "${bindir}/*designer*" | ||
| 171 | FILES_${QT_BASE_NAME}-designer-dbg = "${bindir}/.debug/*designer*" | ||
| 172 | FILES_${QT_BASE_NAME}-examples = "${bindir}/${QT_DIR_NAME}/examples/*" | ||
| 173 | FILES_${QT_BASE_NAME}-examples-staticdev = "${bindir}/${QT_DIR_NAME}/examples/tools/plugandpaint/plugins/libpnp_basictools.a" | ||
| 174 | FILES_${QT_BASE_NAME}-examples-dbg = "${bindir}/${QT_DIR_NAME}/examples/.debug ${bindir}/${QT_DIR_NAME}/examples/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/declarative/*/*/*/*/*/.debug/* ${bindir}/${QT_DIR_NAME}/examples/declarative/*/*/*/*/.debug/*" | ||
| 175 | FILES_${QT_BASE_NAME}-linguist = "${bindir}/*linguist* ${bindir}/lrelease ${bindir}/lupdate ${bindir}/lconvert ${bindir}/qm2ts" | ||
| 176 | FILES_${QT_BASE_NAME}-linguist-dbg = "${bindir}/.debug/*linguist* ${bindir}/.debug/lrelease ${bindir}/.debug/lupdate ${bindir}/.debug/lconvert ${bindir}/.debug/qm2ts" | ||
| 177 | FILES_${QT_BASE_NAME}-pixeltool = "${bindir}/pixeltool" | ||
| 178 | FILES_${QT_BASE_NAME}-pixeltool-dbg = "${bindir}/.debug/pixeltool" | ||
| 179 | FILES_${QT_BASE_NAME}-qt3to4 = "${bindir}/qt3to4 ${datadir}/${QT_DIR_NAME}/q3porting.xml" | ||
| 180 | FILES_${QT_BASE_NAME}-qt3to4-dbg = "${bindir}/.debug/qt3to4" | ||
| 181 | FILES_${QT_BASE_NAME}-qmlviewer = "${bindir}/qmlviewer" | ||
| 182 | FILES_${QT_BASE_NAME}-qmlviewer-dbg = "${bindir}/.debug/qmlviewer" | ||
| 183 | FILES_${QT_BASE_NAME}-makeqpf = "${bindir}/makeqpf" | ||
| 184 | FILES_${QT_BASE_NAME}-makeqpf-dbg = "${bindir}/.debug/makeqpf" | ||
| 185 | FILES_${QT_BASE_NAME}-mkspecs = "${datadir}/${QT_DIR_NAME}/mkspecs/* ${datadir}/${QT_DIR_NAME}/environment-setup" | ||
| 186 | FILES_${QT_BASE_NAME}-xmlpatterns = "${bindir}/xmlpatterns*" | ||
| 187 | FILES_${QT_BASE_NAME}-xmlpatterns-dbg = "${bindir}/.debug/xmlpatterns*" | ||
| 188 | FILES_${QT_BASE_NAME}-qml-plugins = "${libdir}/${QT_DIR_NAME}/imports/* ${libdir}/${QT_DIR_NAME}/plugins/qmltooling/*" | ||
| 189 | FILES_${QT_BASE_NAME}-qml-plugins-dbg = "${libdir}/${QT_DIR_NAME}/imports/*/*/*/.debug/* ${libdir}/${QT_DIR_NAME}/imports/*/.debug ${libdir}/${QT_DIR_NAME}/plugins/qmltooling/.debug" | ||
| 190 | INSANE_SKIP_${MLPREFIX}${QT_BASE_NAME}-examples += "libdir" | ||
| 191 | INSANE_SKIP_${MLPREFIX}${QT_BASE_NAME}-examples-dbg += "libdir" | ||
| 192 | |||
| 193 | # License options, to be set by the recipe if different values are needed | ||
| 194 | QT_LICENSE_FILE ?= "" | ||
| 195 | QT_LICENSE_FLAGS ?= "-opensource" | ||
| 196 | |||
| 197 | do_configure() { | ||
| 198 | unset QMAKESPEC | ||
| 199 | unset QTDIR | ||
| 200 | |||
| 201 | set_arch | ||
| 202 | set_endian | ||
| 203 | |||
| 204 | if [ ! -e bin/qmake ]; then | ||
| 205 | ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake | ||
| 206 | fi | ||
| 207 | |||
| 208 | if [ ! -e mkspecs/${TARGET_OS}-oe-g++ ]; then | ||
| 209 | ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++ | ||
| 210 | fi | ||
| 211 | |||
| 212 | if [ -f mkspecs/common/g++-unix.conf ] ; then | ||
| 213 | # mkspecs were refactored for 4.8.0 | ||
| 214 | cp -f ${WORKDIR}/g++.conf mkspecs/common/g++-unix.conf | ||
| 215 | else | ||
| 216 | cp -f ${WORKDIR}/g++.conf mkspecs/common/g++.conf | ||
| 217 | fi | ||
| 218 | cp -f ${WORKDIR}/linux.conf mkspecs/common/ | ||
| 219 | |||
| 220 | echo "[Paths]" > $QT_CONF_PATH | ||
| 221 | echo "Prefix=${prefix}" >> $QT_CONF_PATH | ||
| 222 | echo "Documentation=${docdir}/${QT_DIR_NAME}" >> $QT_CONF_PATH | ||
| 223 | echo "Headers=${includedir}/${QT_DIR_NAME}" >> $QT_CONF_PATH | ||
| 224 | echo "Libraries=${libdir}" >> $QT_CONF_PATH | ||
| 225 | echo "Binaries=${bindir}" >> $QT_CONF_PATH | ||
| 226 | echo "Plugins=${libdir}/${QT_DIR_NAME}/plugins" >> $QT_CONF_PATH | ||
| 227 | echo "Imports=${libdir}/${QT_DIR_NAME}/imports" >> $QT_CONF_PATH | ||
| 228 | echo "Data=${datadir}/${QT_DIR_NAME}" >> $QT_CONF_PATH | ||
| 229 | echo "Translations=${datadir}/${QT_DIR_NAME}/translations" >> $QT_CONF_PATH | ||
| 230 | echo "Settings=${sysconfdir}/${QT_DIR_NAME}" >> $QT_CONF_PATH | ||
| 231 | echo "Examples=${bindir}/${QT_DIR_NAME}/examples" >> $QT_CONF_PATH | ||
| 232 | echo "Demos=${bindir}/${QT_DIR_NAME}/demos" >> $QT_CONF_PATH | ||
| 233 | |||
| 234 | ${EXTRA_QMAKE_MUNGE}|| true | ||
| 235 | |||
| 236 | echo yes | QT_LICENSE_FILE="${QT_LICENSE_FILE}" ./configure -v \ | ||
| 237 | -prefix ${prefix} \ | ||
| 238 | -bindir ${bindir} \ | ||
| 239 | -libdir ${libdir} \ | ||
| 240 | -datadir ${datadir}/${QT_DIR_NAME} \ | ||
| 241 | -sysconfdir ${sysconfdir}/${QT_DIR_NAME} \ | ||
| 242 | -docdir ${docdir}/${QT_DIR_NAME} \ | ||
| 243 | -headerdir ${includedir}/${QT_DIR_NAME} \ | ||
| 244 | -plugindir ${libdir}/${QT_DIR_NAME}/plugins \ | ||
| 245 | -importdir ${libdir}/${QT_DIR_NAME}/imports \ | ||
| 246 | -translationdir ${datadir}/${QT_DIR_NAME}/translations \ | ||
| 247 | -examplesdir ${bindir}/${QT_DIR_NAME}/examples \ | ||
| 248 | -demosdir ${bindir}/${QT_DIR_NAME}/demos \ | ||
| 249 | -platform ${TARGET_OS}-oe-g++ \ | ||
| 250 | -xplatform ${TARGET_OS}-oe-g++ \ | ||
| 251 | ${QT_ENDIAN} \ | ||
| 252 | -crossarch ${QT_ARCH} \ | ||
| 253 | ${QT_LICENSE_FLAGS} \ | ||
| 254 | ${QT_CONFIG_FLAGS} -no-fast \ | ||
| 255 | -L${STAGING_LIBDIR} -I${STAGING_INCDIR} \ | ||
| 256 | -I${STAGING_INCDIR}/freetype2 | ||
| 257 | } | ||
| 258 | |||
| 259 | do_compile() { | ||
| 260 | # Fixup missing wsegl header in some SGX SDKs | ||
| 261 | if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then | ||
| 262 | cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/ | ||
| 263 | fi | ||
| 264 | |||
| 265 | unset CFLAGS CXXFLAGS | ||
| 266 | |||
| 267 | oe_runmake ${EXTRA_ENV} | ||
| 268 | |||
| 269 | # Build target qmake | ||
| 270 | export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++" | ||
| 271 | cd ${S}/qmake | ||
| 272 | ${OE_QMAKE_QMAKE} | ||
| 273 | oe_runmake CC="${CC}" CXX="${CXX}" | ||
| 274 | cd ${S} | ||
| 275 | } | ||
| 276 | |||
| 277 | python populate_packages_prepend() { | ||
| 278 | translation_dir = d.expand('${datadir}/${QT_DIR_NAME}/translations/') | ||
| 279 | translation_name = d.expand('${QT_BASE_NAME}-translation-%s') | ||
| 280 | do_split_packages(d, translation_dir, '^(assistant|designer|linguist|qt|qtconfig|qvfb|qtscript)_(.*)\.qm$', translation_name, '${PN} translation for %s', extra_depends='' ) | ||
| 281 | |||
| 282 | phrasebook_dir = d.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/') | ||
| 283 | phrasebook_name = d.expand('${QT_BASE_NAME}-phrasebook-%s') | ||
| 284 | |||
| 285 | if os.path.exists("%s%s" % (d.expand('${D}'), phrasebook_dir)): | ||
| 286 | do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' ) | ||
| 287 | else: | ||
| 288 | bb.note("The path does not exist:", d.expand('${D}'), phrasebook_dir) | ||
| 289 | |||
| 290 | # Package all the plugins and their -dbg version and create a meta package | ||
| 291 | def qtopia_split(path, name, glob): | ||
| 292 | """ | ||
| 293 | Split the package into a normal and -dbg package and then add the | ||
| 294 | new packages to the meta package. | ||
| 295 | """ | ||
| 296 | plugin_dir = d.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/' % path) | ||
| 297 | if not os.path.exists("%s%s" % (d.expand('${D}'), plugin_dir)): | ||
| 298 | bb.note("The path does not exist:", d.expand('${D}'), plugin_dir) | ||
| 299 | return | ||
| 300 | |||
| 301 | plugin_name = d.expand('${QT_BASE_NAME}-plugin-%s-%%s' % name) | ||
| 302 | dev_packages = [] | ||
| 303 | dev_hook = lambda file,pkg,b,c,d:dev_packages.append((file,pkg)) | ||
| 304 | do_split_packages(d, plugin_dir, glob, plugin_name, '${PN} %s for %%s' % name, extra_depends='', hook=dev_hook) | ||
| 305 | # Create a -dbg package as well | ||
| 306 | plugin_dir_dbg = d.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug' % path) | ||
| 307 | packages = d.getVar('PACKAGES', False) | ||
| 308 | for (file,package) in dev_packages: | ||
| 309 | packages = "%s %s-dbg" % (packages, package) | ||
| 310 | file_name = os.path.join(plugin_dir_dbg, os.path.basename(file)) | ||
| 311 | d.setVar("FILES_%s-dbg" % package, file_name) | ||
| 312 | d.setVar("DESCRIPTION_%s-dbg" % package, "${PN} %s for %s" % (name, package)) | ||
| 313 | |||
| 314 | d.setVar('PACKAGES', packages) | ||
| 315 | |||
| 316 | qtopia_split('accessible', 'accessible', '^libq(.*)\.so$') | ||
| 317 | qtopia_split('codecs', 'codec', '^libq(.*)\.so$') | ||
| 318 | qtopia_split('decorations', 'decoration', '^libqdecoration(.*)\.so$') | ||
| 319 | qtopia_split('designer', 'designer', '^lib(.*)\.so$') | ||
| 320 | qtopia_split('gfxdrivers', 'gfxdriver', '^libq(.*)\.so$') | ||
| 321 | qtopia_split('graphicssystems','graphicssystems', '^libq(.*)\.so$') | ||
| 322 | qtopia_split('kbddrivers', 'kbddriver', '^libq(.*)kbddriver\.so$') | ||
| 323 | qtopia_split('mousedrivers', 'mousedriver', '^libq(.*)mousedriver\.so$') | ||
| 324 | qtopia_split('iconengines', 'iconengine', '^libq(.*)\.so$') | ||
| 325 | qtopia_split('imageformats', 'imageformat', '^libq(.*)\.so$') | ||
| 326 | qtopia_split('inputmethods', 'inputmethod', '^libq(.*)\.so$') | ||
| 327 | qtopia_split('sqldrivers', 'sqldriver', '^libq(.*)\.so$') | ||
| 328 | qtopia_split('script', 'script', '^libqtscript(.*)\.so$') | ||
| 329 | qtopia_split('styles', 'style', '^libq(.*)\.so$') | ||
| 330 | qtopia_split('phonon_backend','phonon-backend','^libphonon_(.*)\.so$') | ||
| 331 | qtopia_split('bearer', 'bearer', '^libq(.*)bearer\.so$') | ||
| 332 | } | ||
| 333 | |||
| 334 | do_install() { | ||
| 335 | oe_runmake install INSTALL_ROOT=${D} | ||
| 336 | |||
| 337 | # Install a proper target version of qmake | ||
| 338 | rm ${D}/${bindir}/qmake | ||
| 339 | install -m 0755 bin/qmake2 ${D}${bindir}/qmake | ||
| 340 | |||
| 341 | # fix pkgconfig, libtool and prl files | ||
| 342 | sed -i -e 's#-L${S}/lib/\?##g' \ | ||
| 343 | -e 's#-L${STAGING_LIBDIR}/\?##g' \ | ||
| 344 | -e 's#STAGING_LIBDIR}#libdir}'#g \ | ||
| 345 | -e 's#-L${libdir}/\?##g' \ | ||
| 346 | -e s#'$(OE_QMAKE_LIBS_X11)'#"${OE_QMAKE_LIBS_X11}"#g \ | ||
| 347 | -e 's#" -Wl,-rpath-link,${S}/lib/\?"##g' \ | ||
| 348 | -e 's#" -Wl,-rpath-link,${libdir}/\?"##g' \ | ||
| 349 | -e 's#Iin#I${in#g' \ | ||
| 350 | -e 's#-L\.\./\.\./WebCore/release\s\+-L\.\./\.\./JavaScriptCore/release\s\+-lwebcore##g' \ | ||
| 351 | -e 's#-ljscore##g' \ | ||
| 352 | ${D}${libdir}/*.la ${D}${libdir}/*.prl ${D}${libdir}/pkgconfig/*.pc | ||
| 353 | |||
| 354 | # fix pkgconfig files | ||
| 355 | sed -i -e s#"moc_location=.*$"#"moc_location=${bindir}/moc4"# \ | ||
| 356 | -e s#"uic_location=.*$"#"uic_location=${bindir}/uic4"# \ | ||
| 357 | ${D}${libdir}/pkgconfig/*.pc | ||
| 358 | for name in ${QT_LIB_NAMES}; do | ||
| 359 | sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc | ||
| 360 | done | ||
| 361 | |||
| 362 | # QT abuses $includedir to point to its headers, which breaks pkgconfig sysroot, so manually fix it up here: | ||
| 363 | for pc in ${D}${libdir}/pkgconfig/*.pc ; do | ||
| 364 | sed -i -e "s:prefix}/include/${QT_DIR_NAME}/$(basename $pc .pc):prefix}/include:" \ | ||
| 365 | -e 's:IP{:I${:g' $pc | ||
| 366 | done | ||
| 367 | |||
| 368 | #Append an E to the qtdemo file | ||
| 369 | if [ -n "${QT_LIBINFIX}" ] ; then | ||
| 370 | [ -f ${D}${bindir}/qtdemo ] && mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX} | ||
| 371 | fi | ||
| 372 | |||
| 373 | script="${D}/${datadir}/${QT_DIR_NAME}/environment-setup" | ||
| 374 | touch $script | ||
| 375 | echo 'export QT_DIR_NAME=${QT_DIR_NAME}' >> $script | ||
| 376 | echo 'export QT_LIBINFIX=${QT_LIBINFIX}' >> $script | ||
| 377 | echo 'export OE_QMAKE_AR=ar' >> $script | ||
| 378 | echo 'export OE_QMAKE_CC=gcc' >> $script | ||
| 379 | echo 'export OE_QMAKE_CXX=g++' >> $script | ||
| 380 | echo 'export OE_QMAKE_LINK=g++' >> $script | ||
| 381 | echo 'export OE_QMAKE_LIBDIR_QT=${libdir}' >> $script | ||
| 382 | echo 'export OE_QMAKE_INCDIR_QT=${includedir}/${QT_DIR_NAME}' >> $script | ||
| 383 | echo 'export OE_QMAKE_MOC=${bindir}/moc' >> $script | ||
| 384 | echo 'export OE_QMAKE_UIC=${bindir}/uic' >> $script | ||
| 385 | echo 'export OE_QMAKE_UIC3=${bindir}/uic3' >> $script | ||
| 386 | echo 'export OE_QMAKE_RCC=${bindir}/rcc' >> $script | ||
| 387 | echo 'export OE_QMAKE_QDBUSCPP2XML=${bindir}/qdbuscpp2xml' >> $script | ||
| 388 | echo 'export OE_QMAKE_QDBUSXML2CPP=${bindir}/qdbusxml2cpp' >> $script | ||
| 389 | echo 'export OE_QMAKE_QT_CONFIG=${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script | ||
| 390 | echo 'export QMAKESPEC=${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script | ||
| 391 | chmod 0755 $script | ||
| 392 | } | ||
