89242bbaeea0fdc2c9b6e8a5222740b09337f265
[openembedded.git] / recipes / qt4 / qt-4.6.2.inc
1 DEFAULT_PREFERENCE = "-1"
2
3 FILESPATHPKG .= ":qt-${PV}"
4
5 SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \
6            file://0001-cross-compile.patch;patch=1 \
7            file://0002-fix-resinit-declaration.patch;patch=1 \
8            file://0004-no-qmake.patch;patch=1 \
9            file://0006-freetype-host-includes.patch;patch=1 \
10            file://0008-qt-lib-infix.patch;patch=1 \
11            file://0009-support-2bpp.patch;patch=1 \
12            file://0010-no-simpledecoration-example.patch;patch=1 \
13            file://fix-config-tests.patch;patch=1 \
14            file://qt-config.patch;patch=1 \
15            file://g++.conf \
16            file://linux.conf \
17            "
18
19 S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
20
21 do_configure_prepend() {
22     for pro in $(find ${S} -name "*.pro") ; do
23         sed -i 's:$$QT_BUILD_TREE/bin/lrelease:${OE_QMAKE_LRELEASE}:g' $pro
24     done
25
26     sed -i s:SEDME:${S}: ${WORKDIR}/linux.conf
27     sed -i \
28     -e /QMAKE_MOC\ /d \
29     -e /QMAKE_UIC\ /d \
30     -e /QMAKE_UIC3\ /d \
31     -e /QMAKE_RCC\ /d \
32     ${S}/configure
33 }
34
35 do_configure_append() {
36     sed -e '/QMAKE_TARGET /d' -e '/TARGET /d' -i ${S}/translations/Makefile
37 }
38
39 QT_GLFLAGS ?= ""
40 QT_CONFIG_FLAGS += " -no-rpath -qt3support -reduce-relocations -silent ${QT_GLFLAGS}"
41
42 do_compile() {
43     unset CFLAGS CXXFLAGS
44     oe_runmake ${EXTRA_ENV}
45 }
46
47 do_install_append() {
48         install -d ${D}${bindir}
49         for i in rcc uic moc ; do
50                 install -m 0755 ${S}/bin/$i ${D}${bindir}/
51         done
52 }
53
54 LICENSE = "LGPLv2.1 GPLv3"
55 SRC_URI += " \
56             file://hack-out-pg_config.patch;patch=1"