1 NONDEV_PACKAGES += "${QT_BASE_LIB}core4 ${QT_BASE_LIB}gui4 ${QT_BASE_LIB}network4 \
2 ${QT_BASE_LIB}sql4 ${QT_BASE_LIB}svg4 ${QT_BASE_LIB}test4 ${QT_BASE_LIB}xml4 \
3 ${QT_BASE_LIB}designer4 ${QT_BASE_LIB}designercomponents4 \
4 ${QT_BASE_LIB}3support4 ${QT_BASE_LIB}assistantclient4 ${QT_BASE_LIB}script4 \
5 ${QT_BASE_LIB}dbus4 ${QT_BASE_LIB}opengl4 \
6 ${QT_BASE_NAME}-assistant ${QT_BASE_NAME}-common \
7 ${QT_BASE_NAME}-designer \
8 ${QT_BASE_NAME}-demos ${QT_BASE_NAME}-examples \
9 ${QT_BASE_NAME}-linguist \
10 ${QT_BASE_NAME}-pixeltool ${QT_BASE_NAME}-dbus \
11 ${QT_BASE_NAME}-plugins-accessible \
12 ${QT_BASE_NAME}-plugins-codecs \
13 ${QT_BASE_NAME}-plugins-decorations \
14 ${QT_BASE_NAME}-plugins-designer \
15 ${QT_BASE_NAME}-plugins-gfxdrivers \
16 ${QT_BASE_NAME}-plugins-mousedrivers \
17 ${QT_BASE_NAME}-plugins-iconengines \
18 ${QT_BASE_NAME}-plugins-imageformats \
19 ${QT_BASE_NAME}-plugins-inputmethods \
20 ${QT_BASE_NAME}-plugins-sqldrivers \
21 ${QT_BASE_NAME}-plugins-styles \
22 ${QT_BASE_NAME}-fonts "
24 DEV_PACKAGES += "${QT_BASE_LIB}core4-dev \
25 ${QT_BASE_LIB}gui4-dev \
26 ${QT_BASE_LIB}network4-dev \
27 ${QT_BASE_LIB}sql4-dev \
28 ${QT_BASE_LIB}svg4-dev \
29 ${QT_BASE_LIB}test4-dev \
30 ${QT_BASE_LIB}xml4-dev \
31 ${QT_BASE_LIB}designer4-dev \
32 ${QT_BASE_LIB}designercomponents4-dev \
33 ${QT_BASE_LIB}3support4-dev \
34 ${QT_BASE_LIB}assistantclient4-dev \
35 ${QT_BASE_LIB}script4-dev \
36 ${QT_BASE_LIB}dbus4-dev \
37 ${QT_BASE_LIB}opengl4-dev \
38 ${QT_BASE_LIB}uitools4-dev"
40 DBG_PACKAGES += "${QT_BASE_LIB}core4-dbg \
41 ${QT_BASE_LIB}gui4-dbg \
42 ${QT_BASE_LIB}network4-dbg \
43 ${QT_BASE_LIB}sql4-dbg \
44 ${QT_BASE_LIB}svg4-dbg \
45 ${QT_BASE_LIB}test4-dbg \
46 ${QT_BASE_LIB}xml4-dbg \
47 ${QT_BASE_LIB}designer4-dbg \
48 ${QT_BASE_LIB}designercomponents4-dbg \
49 ${QT_BASE_LIB}3support4-dbg \
50 ${QT_BASE_LIB}assistantclient4-dbg \
51 ${QT_BASE_LIB}script4-dbg \
52 ${QT_BASE_LIB}dbus4-dbg \
53 ${QT_BASE_LIB}opengl4-dbg \
54 ${QT_BASE_NAME}-plugins-accessible-dbg \
55 ${QT_BASE_NAME}-plugins-codecs-dbg \
56 ${QT_BASE_NAME}-plugins-decorations-dbg \
57 ${QT_BASE_NAME}-plugins-designer-dbg \
58 ${QT_BASE_NAME}-plugins-gfxdrivers-dbg \
59 ${QT_BASE_NAME}-plugins-mousedrivers-dbg \
60 ${QT_BASE_NAME}-plugins-iconengines-dbg \
61 ${QT_BASE_NAME}-plugins-imageformats-dbg \
62 ${QT_BASE_NAME}-plugins-inputmethods-dbg \
63 ${QT_BASE_NAME}-plugins-sqldrivers-dbg \
64 ${QT_BASE_NAME}-plugins-styles-dbg"
67 PACKAGES += "${DEV_PACKAGES} ${NONDEV_PACKAGES} ${DBG_PACKAGES}"
69 ALLOW_EMPTY_${PN} = "1"
71 FILES_${PN}-dev = " ${includedir}/${QT_DIR_NAME}/Qt/*"
72 FILES_${PN}-dbg = "${bindir}/*/.debug "
73 RDEPENDS_${PN} = "${NONDEV_PACKAGES}"
74 RDEPENDS_${PN}-dev = "${DEV_PACKAGES}"
75 RDEPENDS_${PN}-dbg = "${DBG_PACKAGES}"
77 def qt_default_dev(name):
78 return """${libdir}/libQt%(name)s${QT_LIBINFIX}.la
79 ${libdir}/libQt%(name)s${QT_LIBINFIX}.prl
80 ${libdir}/libQt%(name)s${QT_LIBINFIX}.so
81 ${includedir}/${QT_DIR_NAME}/Qt%(name)s*
82 ${libdir}/pkgconfig/Qt%(name)s${QT_LIBINFIX}.pc""" % locals()
85 FILES_${QT_BASE_LIB}core4 = "${libdir}/libQtCore${QT_LIBINFIX}.so.*"
86 FILES_${QT_BASE_LIB}core4-dev = "${@qt_default_dev('Core')}"
87 FILES_${QT_BASE_LIB}core4-dbg = "${libdir}/.debug/libQtCore*"
88 FILES_${QT_BASE_LIB}gui4 = "${libdir}/libQtGui${QT_LIBINFIX}.so.*"
89 FILES_${QT_BASE_LIB}gui4-dev = "${@qt_default_dev('Gui')}"
90 FILES_${QT_BASE_LIB}gui4-dbg = "${libdir}/.debug/libQtGui*"
91 FILES_${QT_BASE_LIB}network4 = "${libdir}/libQtNetwork${QT_LIBINFIX}.so.*"
92 FILES_${QT_BASE_LIB}network4-dev = "${@qt_default_dev('Network')}"
93 FILES_${QT_BASE_LIB}network4-dbg = "${libdir}/.debug/libQtNetwork${QT_LIBINFIX}*"
94 FILES_${QT_BASE_LIB}sql4 = "${libdir}/libQtSql${QT_LIBINFIX}.so.*"
95 FILES_${QT_BASE_LIB}sql4-dev = "${@qt_default_dev('Sql')}"
96 FILES_${QT_BASE_LIB}sql4-dbg = "${libdir}/.debug/libQtSql*"
97 FILES_${QT_BASE_LIB}svg4 = "${libdir}/libQtSvg${QT_LIBINFIX}.so.*"
98 FILES_${QT_BASE_LIB}svg4-dev = "${@qt_default_dev('Svg')}"
99 FILES_${QT_BASE_LIB}svg4-dbg = "${libdir}/.debug/libQtSvg*"
100 FILES_${QT_BASE_LIB}test4 = "${libdir}/libQtTest${QT_LIBINFIX}.so.*"
101 FILES_${QT_BASE_LIB}test4-dev = "${@qt_default_dev('Test')}"
102 FILES_${QT_BASE_LIB}test4-dbg = "${libdir}/.debug/libQtTest*"
103 FILES_${QT_BASE_LIB}xml4 = "${libdir}/libQtXml${QT_LIBINFIX}.so.*"
104 FILES_${QT_BASE_LIB}xml4-dev = "${@qt_default_dev('Xml')}"
105 FILES_${QT_BASE_LIB}xml4-dbg = "${libdir}/.debug/libQtXml*"
106 FILES_${QT_BASE_LIB}designer4 = "${libdir}/libQtDesigner${QT_LIBINFIX}.so.*"
107 FILES_${QT_BASE_LIB}designer4-dev = "${@qt_default_dev('Designer')}"
108 FILES_${QT_BASE_LIB}designer4-dbg = "${libdir}/.debug/libQtDesigner*"
109 FILES_${QT_BASE_LIB}designercomponents4 = "${libdir}/libQtDesignerComponents${QT_LIBINFIX}.so.*"
110 FILES_${QT_BASE_LIB}designercomponents4-dev = "${@qt_default_dev('DesignerComponents')}"
111 FILES_${QT_BASE_LIB}designercomponents4-dbg = "${libdir}/.debug/libQtDesignerComponents*"
112 FILES_${QT_BASE_LIB}3support4 = "${libdir}/libQt3Support${QT_LIBINFIX}.so.*"
113 FILES_${QT_BASE_LIB}3support4-dev = "${@qt_default_dev('3Support')}"
114 FILES_${QT_BASE_LIB}3support4-dbg = "${libdir}/.debug/libQt3Support*"
115 FILES_${QT_BASE_LIB}assistantclient4 = "${libdir}/libQtAssistantClient${QT_LIBINFIX}.so.*"
116 FILES_${QT_BASE_LIB}assistantclient4-dev = "${@qt_default_dev('AssistantClient')} ${includedir}/${QT_DIR_NAME}/QtAssistant*"
117 FILES_${QT_BASE_LIB}assistantclient4-dbg = "${libdir}/.debug/libQtAssistantClient*"
118 FILES_${QT_BASE_LIB}script4 = "${libdir}/libQtScript${QT_LIBINFIX}.so.*"
119 FILES_${QT_BASE_LIB}script4-dev = "${@qt_default_dev('Script')}"
120 FILES_${QT_BASE_LIB}script4-dbg = "${libdir}/.debug/libQtScript*"
121 FILES_${QT_BASE_LIB}dbus4 = "${libdir}/libQtDBus${QT_LIBINFIX}.so.*"
122 FILES_${QT_BASE_LIB}dbus4-dev = "${@qt_default_dev('DBus')}"
123 FILES_${QT_BASE_LIB}dbus4-dbg = "${libdir}/.debug/libQtDBus*"
124 FILES_${QT_BASE_LIB}opengl4 = "${libdir}/libQtOpenGL${QT_LIBINFIX}.so.*"
125 FILES_${QT_BASE_LIB}opengl4-dev = "${@qt_default_dev('OpenGL')}"
126 FILES_${QT_BASE_LIB}opengl4-dbg = "${libdir}/.debug/libQtOpenGL*"
127 FILES_${QT_BASE_LIB}uitools4-dev = "${libdir}/libQtUiTools* ${includedir}/${QT_DIR_NAME}/QtUiTools* ${libdir}/pkgconfig/QtUiTools${QT_LIBINFIX}.pc"
129 # meta packages for the plugins
130 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-accessible = "1"
131 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-accessible-dbg = "1"
132 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-codecs = "1"
133 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-codecs-dbg = "1"
134 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-decorations = "1"
135 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-decorations-dbg = "1"
136 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-designer = "1"
137 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-designer-dbg = "1"
138 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-gfxdrivers = "1"
139 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-gfxdrivers-dbg = "1"
140 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-mousedrivers = "1"
141 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-mousedrivers-dbg = "1"
142 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-iconengines = "1"
143 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-iconengines-dbg = "1"
144 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-imageformats = "1"
145 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-imageformats-dbg = "1"
146 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-inputmethods = "1"
147 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-inputmethods-dbg = "1"
148 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-sqldrivers = "1"
149 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-sqldrivers-dbg = "1"
150 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-styles = "1"
151 ALLOW_EMPTY_${QT_BASE_NAME}-plugins-styles-dbg = "1"
153 FILES_${QT_BASE_NAME}-assistant = "${bindir}/*assistant*"
154 FILES_${QT_BASE_NAME}-designer = "${bindir}/*designer*"
155 FILES_${QT_BASE_NAME}-linguist = "${bindir}/*linguist* ${bindir}/lrelease ${bindir}/lupdate ${bindir}/qm2ts"
156 FILES_${QT_BASE_NAME}-pixeltool = "${bindir}/pixeltool"
157 FILES_${QT_BASE_NAME}-dbus = "${bindir}/qdbus ${bindir}/qdbusxml2cpp ${bindir}/qdbuscpp2xml ${bindir}/qdbusviewer"
159 FILES_${QT_BASE_NAME}-common = "${bindir}/qtconfig"
160 FILES_${QT_BASE_NAME}-examples = "${bindir}/${QT_DIR_NAME}/examples/*"
161 FILES_${QT_BASE_NAME}-demos = "${bindir}/qtdemo ${bindir}/${QT_DIR_NAME}/demos/*"
163 FILES_${QT_BASE_NAME}-fonts = "${libdir}/fonts"
165 python populate_packages_prepend() {
166 translation_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/translations/', d)
167 translation_name = bb.data.expand('${QT_BASE_NAME}-translation-%s', d)
168 do_split_packages(d, translation_dir, '^qt_(.*)\.qm$', translation_name, '{PN} translation for %s', extra_depends='' )
170 phrasebook_dir = bb.data.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/', d)
171 phrasebook_name = bb.data.expand('${QT_BASE_NAME}-phrasebook-%s', d)
172 do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '{PN} phrasebook for %s', extra_depends='' )
174 # Package all the plugins and their -dbg version and create a meta package
176 def qtopia_split(path, name, glob, meta_name):
178 Split the package into a normal and -dbg package and then add the
179 new packages to the meta package.
181 plugin_dir = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/' % path, d)
182 plugin_dir_dbg = bb.data.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug/' % path, d)
183 if not os.path.exists("%s%s" % (bb.data.expand('${D}',d), plugin_dir)):
184 bb.note("The path does not exist:", bb.data.expand('${D}', d), plugin_dir)
187 plugin_name = bb.data.expand('${QT_BASE_NAME}-plugin-%s-%%s' % name, d)
188 plugin_name_dbg= bb.data.expand('${QT_BASE_NAME}-plugin-%s-%%s-dbg' % name, d)
189 print plugin_name, plugin_name_dbg, glob
192 dev_hook = lambda a,pkg,b,c,d:dev_packages.append(pkg)
194 dbg_hook = lambda a,pkg,b,c,d:dbg_packages.append(pkg)
195 do_split_packages(d, plugin_dir, glob, plugin_name, '{PN} %s for %%s' % name, extra_depends='', hook=dev_hook)
196 do_split_packages(d, plugin_dir_dbg, glob, plugin_name_dbg, '{PN} %s for %%s' % name, extra_depends='', hook=dbg_hook)
198 print meta_name, dev_packages, dbg_packages
199 bb.data.setVar("RDEPENDS_%s" % meta_name, " ".join(dev_packages), d)
200 bb.data.setVar("RDEPENDS_%s-dbg" % meta_name, " ".join(dbg_packages), d)
202 qtopia_split('accessible', 'accessible', '^libq(.*)\.so$', "${QT_BASE_NAME}-plugins-accessible")
203 qtopia_split('codecs', 'codec', '^libq(.*)\.so$', "${QT_BASE_NAME}-plugins-codecs")
204 qtopia_split('decorations', 'decoration', '^libqdecoration(.*)\.so$', "${QT_BASE_NAME}-plugins-decorations")
205 qtopia_split('designer', 'designer', '^lib(.*)\.so$', "${QT_BASE_NAME}-plugins-designer")
206 qtopia_split('gfxdrivers', 'gfxdriver', '^libqgfx(.*)\.so$', "${QT_BASE_NAME}-plugins-gfxdrivers")
207 qtopia_split('mousedrivers','mousedriver', '^libq(.*)mousedriver\.so$', "${QT_BASE_NAME}-plugins-mousedrivers")
208 qtopia_split('iconengines', 'iconengine', '^libq(.*)\.so$', "${QT_BASE_NAME}-plugins-iconengines")
209 qtopia_split('imageformats','imageformat', '^libq(.*)\.so$', "${QT_BASE_NAME}-plugins-imageformats")
210 qtopia_split('inputmethods','inputmethod', '^libq(.*)\.so$', "${QT_BASE_NAME}-plugins-inputmethods")
211 qtopia_split('sqldrivers', 'sqldriver', '^libq(.*)\.so$', "${QT_BASE_NAME}-plugins-sqldrivers")
212 qtopia_split('styles', 'style', '^libq(.*)\.so$', "${QT_BASE_NAME}-plugins-styles")
217 oe_runmake install INSTALL_ROOT=${D}
219 # These are host binaries, we should only use them in staging
220 rm -rf ${D}/${bindir}/qmake
222 # XXX, FIXME, TODO: package the demos and examples properly
223 rm -rf ${D}/${bindir}/${QT_DIR_NAME}
224 rm -rf ${D}/${datadir}/${QT_DIR_NAME}/mkspecs
226 install -d ${D}/${libdir}/fonts
227 touch ${D}/${libdir}/fonts/fontdir