conf/distro/jlime-donkey.conf : Added parted & Dialog to distro_rdepends
[vuplus_openembedded] / packages / qt / qt-x11-free_3.3.6.bb
1 DESCRIPTION = "Qt/X11 Version ${PV} is a full fledged cross-platform application framework"
2 SECTION = "x11/libs"
3 PRIORITY = "optional"
4 LICENSE = "GPL QPL"
5 HOMEPAGE = "http://www.trolltech.com"
6 DEPENDS = "uicmoc3-native freetype virtual/libx11 xft libxext libxrender libxrandr libxcursor mysql"
7 PROVIDES = "qt3x11"
8 PR = "r0"
9
10 SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-free-${PV}.tar.bz2 \
11            file://configure.patch;patch=1 \
12            file://no-examples.patch;patch=1 \
13            file://gcc4_1-HACK.patch;patch=1"
14 S = "${WORKDIR}/qt-x11-free-${PV}"
15
16 inherit qmake-base qt3x11
17
18 export QTDIR = "${S}"
19 STAGING_QT_DIR = "${STAGING_DIR}/${HOST_SYS}/qt3"
20 ARCH_i686 = "x86"
21 EXTRA_OEMAKE = "-e"
22
23 QT_CONFIG_FLAGS = "-release -shared -qt-zlib -no-nas-sound -no-sm -qt-libpng -no-gif -no-xinerama \
24                    -no-tablet -no-xkb -no-dlopen-opengl -no-nis -no-cups -thread -plugin-sql-mysql -verbose"
25
26 EXTRA_ENV = 'QMAKE="${STAGING_BINDIR}/qmake -after INCPATH+=${STAGING_INCDIR} \
27              INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \
28              QMAKESPEC="${QMAKESPEC}" LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \
29              AR="${TARGET_PREFIX}ar cqs" \
30              MOC="${STAGING_BINDIR}/moc3" UIC="${STAGING_BINDIR}/uic3" MAKE="make -e"'
31
32 do_configure() {
33         echo "yes" | ./configure -prefix ${prefix} ${QT_CONFIG_FLAGS} -fast \
34                 -L${STAGING_LIBDIR} -I${STAGING_INCDIR} -I${STAGING_INCDIR}/freetype2 -I${STAGING_INCDIR}/mysql
35         # force regenerate
36         rm -f src/qtmain.pro
37         cat Makefile >makefile
38         find . -name "Makefile"|xargs rm -f
39         (cd src && qmake -spec ${QMAKESPEC} )
40         (cd plugins/src && qmake -spec ${QMAKESPEC} )
41         (cd tools && qmake -spec ${QMAKESPEC} )
42         (cd tools/qvfb && qmake -spec ${QMAKESPEC} )
43 }
44
45 do_compile() {
46         unset CFLAGS
47         unset CXXFLAGS
48         oe_runmake -C src ${EXTRA_ENV}
49         oe_runmake -C plugins/src ${EXTRA_ENV}
50         oe_runmake -C tools ${EXTRA_ENV}
51         oe_runmake -C tools/qvfb ${EXTRA_ENV}
52 }
53
54 do_stage() {
55         install -d ${STAGING_QT_DIR}/bin
56         ln -sf ${STAGING_BINDIR}/moc3 ${STAGING_QT_DIR}/bin/moc
57         ln -sf ${STAGING_BINDIR}/uic3 ${STAGING_QT_DIR}/bin/uic
58         ln -sf ${STAGING_BINDIR}/qmake ${STAGING_QT_DIR}/bin/qmake
59         install -d ${STAGING_QT_DIR}/lib
60         oe_soinstall lib/libqt-mt.so.${PV} ${STAGING_QT_DIR}/lib
61         install -d ${STAGING_QT_DIR}/include/private
62         for f in include/*.h
63         do
64                 install -m 0644 $f ${STAGING_QT_DIR}/include/
65         done
66         for f in include/private/*.h
67         do
68                 install -m 0644 $f ${STAGING_QT_DIR}/include/private
69         done
70         for f in lib/*.prl
71         do
72                 install -m 0644 $f ${STAGING_QT_DIR}/lib
73         done
74 }
75
76 do_install() {
77         install -d ${D}${libdir}/
78         oe_soinstall lib/libqt-mt.so.${PV} ${D}${libdir}/
79         install -d ${D}${bindir}/
80         install -m 0755 bin/designer bin/assistant tools/qvfb/qvfb bin/qtconfig ${D}${bindir}
81         install -d ${D}${prefix}/plugins/
82         cp -pPR plugins/imageformats plugins/sqldrivers plugins/designer ${D}${prefix}/plugins/
83 }
84
85 PACKAGES =+ "qt-x11-plugins-imageformats qt-x11-plugins-sqldrivers qt-x11-plugins-designer \
86              qt-x11-designer qt-x11-assistant qt-x11-qvfb qt-x11-qtconfig"
87 FILES_qt-x11-plugins-imageformats = "${prefix}/plugins/imageformats"
88 FILES_qt-x11-plugins-sqldrivers = "${prefix}/plugins/sqldrivers"
89 FILES_qt-x11-plugins-designer = "${prefix}/plugins/designer"
90 FILES_qt-x11-designer = "${bindir}/designer"
91 FILES_qt-x11-assistant = "${bindir}/assistant"
92 FILES_qt-x11-qvfb = "${bindir}/qvfb"
93 FILES_qt-x11-qtconfig = "${bindir}/qtconfig"