qt: don't ship debug bits in plugin packages
[vuplus_openembedded] / packages / qt / qt-x11-free-common.inc
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
7 S = "${WORKDIR}/qt-x11-free-${PV}"
8
9 inherit qmake-base qt3x11
10
11 export QTDIR = "${S}"
12 STAGING_QT_DIR = "${STAGING_DIR}/${HOST_SYS}/qt3"
13 ARCH_i686 = "x86"
14 EXTRA_OEMAKE = "-e"
15
16 QT_CONFIG_FLAGS = "-release -shared -qt-zlib -no-nas-sound -no-sm -qt-libpng -no-gif -no-xinerama \
17                    -no-tablet -no-xkb -no-dlopen-opengl -no-nis -no-cups -thread -plugin-sql-mysql -verbose"
18
19 EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake -after INCPATH+=${STAGING_INCDIR} \
20              INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \
21              QMAKESPEC="${QMAKESPEC}" LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \
22              AR="${TARGET_PREFIX}ar cqs" \
23              MOC="${STAGING_BINDIR_NATIVE}/moc3" UIC="${STAGING_BINDIR_NATIVE}/uic3" MAKE="make -e"'
24
25 do_configure() {
26         echo "yes" | ./configure -prefix ${prefix} ${QT_CONFIG_FLAGS} -fast \
27                 -L${STAGING_LIBDIR} -I${STAGING_INCDIR} -I${STAGING_INCDIR}/freetype2 -I${STAGING_INCDIR}/mysql
28         # force regenerate
29         rm -f src/qtmain.pro
30         cat Makefile >makefile
31         find . -name "Makefile"|xargs rm -f
32         (cd src && qmake -spec ${QMAKESPEC} )
33         (cd plugins/src && qmake -spec ${QMAKESPEC} )
34         (cd tools && qmake -spec ${QMAKESPEC} )
35         (cd tools/qvfb && qmake -spec ${QMAKESPEC} )
36 }
37
38 do_compile() {
39         unset CFLAGS
40         unset CXXFLAGS
41         oe_runmake -C src ${EXTRA_ENV}
42         oe_runmake -C plugins/src ${EXTRA_ENV}
43         oe_runmake -C tools ${EXTRA_ENV}
44         oe_runmake -C tools/qvfb ${EXTRA_ENV}
45 }
46
47 do_stage() {
48         install -d ${STAGING_QT_DIR}/bin
49         ln -sf ${STAGING_BINDIR_NATIVE}/moc3 ${STAGING_QT_DIR}/bin/moc
50         ln -sf ${STAGING_BINDIR_NATIVE}/uic3 ${STAGING_QT_DIR}/bin/uic
51         ln -sf ${STAGING_BINDIR_NATIVE}/qmake ${STAGING_QT_DIR}/bin/qmake
52         install -d ${STAGING_QT_DIR}/lib
53         oe_soinstall lib/libqt-mt.so.${PV} ${STAGING_QT_DIR}/lib
54         install -d ${STAGING_QT_DIR}/include/private
55         for f in include/*.h
56         do
57                 install -m 0644 $f ${STAGING_QT_DIR}/include/
58         done
59         for f in include/private/*.h
60         do
61                 install -m 0644 $f ${STAGING_QT_DIR}/include/private
62         done
63         for f in lib/*.prl
64         do
65                 install -m 0644 $f ${STAGING_QT_DIR}/lib
66         done
67 }
68
69 do_install() {
70         install -d ${D}${libdir}/
71         oe_soinstall lib/libqt-mt.so.${PV} ${D}${libdir}/
72         install -d ${D}${bindir}/
73         install -m 0755 bin/designer bin/assistant tools/qvfb/qvfb bin/qtconfig ${D}${bindir}
74         install -d ${D}${prefix}/plugins/
75         cp -pPR plugins/imageformats plugins/sqldrivers plugins/designer ${D}${prefix}/plugins/
76 }
77
78 PACKAGES =+ "qt-x11-plugins-imageformats qt-x11-plugins-sqldrivers qt-x11-plugins-designer \
79              qt-x11-designer qt-x11-assistant qt-x11-qvfb qt-x11-qtconfig qt-x11-plugins-debug"
80 FILES_qt-x11-plugins-imageformats = "${prefix}/plugins/imageformats/*.so"
81 FILES_qt-x11-plugins-sqldrivers = "${prefix}/plugins/sqldrivers/*.so"
82 FILES_qt-x11-plugins-designer = "${prefix}/plugins/designer/*.so"
83 FILES_qt-x11-designer = "${bindir}/designer"
84 FILES_qt-x11-assistant = "${bindir}/assistant"
85 FILES_qt-x11-qvfb = "${bindir}/qvfb"
86 FILES_qt-x11-qtconfig = "${bindir}/qtconfig"
87 FILES_qt-x11-plugins-debug += "${prefix}/plugins/*/.debug"
88