blob: 2a41f8ab298a3564a0cd520f464c6ec8ab11bdc6 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Qt version 4 tools and support files for the build host"
2DEPENDS = "zlib-native dbus-native"
3SECTION = "libs"
4HOMEPAGE = "http://qt-project.org/"
5PROVIDES = "qt4-tools-native"
6
7LICENSE = "LGPLv2.1 | GPLv3"
8LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
9 file://LICENSE.GPL3;md5=6e1694ee338db410417517884918d4d2 \
10 file://LGPL_EXCEPTION.txt;md5=0145c4d1b6f96a661c2c139dfb268fb6"
11
12inherit native
13
14SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-everywhere-opensource-src-${PV}.tar.gz \
15 file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
16 file://0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch \
17 file://0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch \
18 file://0021-configure-make-qt4-native-work-with-long-building-pa.patch \
19 file://g++.conf \
20 file://linux.conf \
21 "
22S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
23
24EXTRA_OECONF = "-prefix ${prefix} \
25 -bindir ${bindir} \
26 -libdir ${libdir} \
27 -datadir ${datadir}/qt4 \
28 -sysconfdir ${sysconfdir}/qt4 \
29 -docdir ${docdir}/qt4 \
30 -headerdir ${includedir}/qt4 \
31 -plugindir ${libdir}/qt4/plugins \
32 -importdir ${libdir}/qt4/imports \
33 -translationdir ${datadir}/qt4/translations \
34 -examplesdir ${bindir}/qt4/examples \
35 -demosdir ${bindir}/qt4/demos \
36 -L ${STAGING_LIBDIR_NATIVE} \
37 -I ${STAGING_INCDIR_NATIVE} \
38 -qt-libjpeg -system-zlib \
39 -no-libjpeg -no-libpng -no-libmng -no-libtiff \
40 -no-accessibility \
41 -no-cups \
42 -no-nas-sound \
43 -no-nis -no-openssl \
44 -verbose -release \
45 -embedded -no-freetype -no-glib -no-iconv \
46 -exceptions -xmlpatterns \
47 -qt3support \
48 -no-fast -silent -no-rpath"
49
50# yank default -e, otherwise we get the following error:
51# moc_qbuffer.cpp: No such file or directory
52EXTRA_OEMAKE = " "
53
54do_configure() {
55 # Avoid problems with Qt 4.8.0 configure setting QMAKE_LINK from LD (since we want the linker to be g++)
56 unset LD
57
58 (echo o; echo yes) | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
59}
60
61TOBUILD = "\
62 src/tools/moc \
63 src/corelib \
64 src/sql \
65 src/xml \
66 src/network \
67 src/tools/uic \
68 src/tools/rcc \
69 src/xmlpatterns \
70 src/dbus \
71 src/gui \
72 src/testlib \
73 src/qt3support \
74 src/tools/uic3 \
75 tools/linguist/lconvert \
76 tools/linguist/lrelease \
77 tools/linguist/lupdate \
78 tools/qdbus/qdbuscpp2xml \
79 tools/qdbus/qdbusxml2cpp \
80 tools/xmlpatterns \
81"
82
83do_compile() {
84 for i in ${TOBUILD}; do
85 cd ${S}/$i && oe_runmake CC="${CC}" CXX="${CXX}"
86 done
87}
88
89do_install() {
90 install -d ${D}${bindir}/
91 install -m 0755 bin/qmake ${D}${bindir}/qmake2
92 for i in moc uic uic3 rcc lconvert lrelease lupdate qdbuscpp2xml qdbusxml2cpp xmlpatterns; do
93 install -m 0755 bin/${i} ${D}${bindir}/${i}4
94 done
95
96 install -d ${D}${datadir}/qt4/
97 cp -PfR mkspecs ${D}${datadir}/qt4/
98 ln -sf linux-g++ ${D}${datadir}/qt4/mkspecs/${BUILD_OS}-oe-g++
99 if [ -f ${D}${datadir}/qt4/mkspecs/common/g++-unix.conf ] ; then
100 # mkspecs were refactored for 4.8.0
101 cp -f ${WORKDIR}/g++.conf ${D}${datadir}/qt4/mkspecs/common/g++-unix.conf
102 else
103 cp -f ${WORKDIR}/g++.conf ${D}${datadir}/qt4/mkspecs/common/g++.conf
104 fi
105 cp -f ${WORKDIR}/linux.conf ${D}${datadir}/qt4/mkspecs/common/
106
107 install -m 0644 tools/porting/src/q3porting.xml ${D}${datadir}/qt4/
108
109 for i in ${TOBUILD}; do
110 cd ${S}/$i && oe_runmake install INSTALL_ROOT=${D}
111 done
112}