wok-next view qt4/receipt @ rev 19953

qt4: reveipt v2
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Oct 16 15:34:21 2017 +0200 (2017-10-16)
parents 795baf180500
children 9744f36fd101
line source
1 # SliTaz package receipt v2.
3 PACKAGE="qt4"
4 SOURCE="qt-everywhere-opensource-src"
5 VERSION="4.8.6"
6 CATEGORY="meta"
7 SHORT_DESC="qt x11 toolkit"
8 MAINTAINER="allan316@gmail.com"
9 LICENSE="GPL3 LGPL2.1"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 WEB_SITE="http://qt-project.org/"
12 WGET_URL="http://download.qt-project.org/archive/qt/${VERSION%.*}/$VERSION/$TARBALL"
13 PROVIDE="qt-x11-opensource-src Qt4"
14 TAGS="qt"
16 BUILD_DEPENDS="xorg-libX11-dev dbus-dev gstreamer0-dev gst0-python-dev libmng-dev \
17 cups-dev mysql-dev unixODBC-dev mesa-dev fontconfig-dev libegl-mesa libglu-mesa \
18 libglw-mesa postgresql-dev gst0-plugins-base-dev atk-dev autoconf automake bash \
19 binutils bison bzip2-dev cairo-dev coreutils expat-dev flex fontconfig-dev \
20 freetype-dev gettext glib-dev jpeg-dev libIDL libcap-dev libpng-dev libtool \
21 libxml2-dev linux-api-headers m4 make mercurial ncurses-dev openssl-dev \
22 pango-dev patch pcre-dev perl perl-xml-parser perl-xml-simple pixman-dev \
23 pkg-config tiff-dev xorg-dev-proto xorg-dev zip unzip gtk+-dev alsa-lib-dev \
24 sqlite-dev libglu-mesa-dev libglw-mesa-dev wayland-dev"
25 SPLIT="qt4 libQt3Support libQtClucene libQtCore libQtDBus libQtDeclarative \
26 libQtDesigner libQtGui libQtHelp libQtMultimedia libQtNetwork libQtOpenGL \
27 libQtPlugins libQtScript libQtScriptTools libQtSql libQtSvg libQtTest \
28 libQtWebkit-video libQtXml qmake Qt4-dev qt4-phonon qtconfig-phonon QtDesigner \
29 qt-locale-cs qt-locale-da qt-locale-de qt-locale-es qt-locale-fr qt-locale-hu \
30 qt-locale-pl qt-locale-pt qt-locale-ru qt-locale-sl qt-locale-sv qt-locale-uk \
31 qt-locale-zh_CN qt-locale-zh_TW"
33 # Rules to configure and make the package.
34 compile_rules()
35 {
36 #ugly fix for missing files, you probably could do better
38 mkdir -p $src/src/3rdparty/webkit/Source/WebKit2/generated
40 for i in $(grep MessageReceiver.cpp $stuff/missinglist); do
41 fileprefix=${i%MessageReceiver.cpp}
42 cppfilename=$(find $src/src/3rdparty/webkit/Source/WebKit2 -name $fileprefix.cpp)
43 dname=$(dirname $cppfilename)
44 /usr/bin/python $src/src/3rdparty/webkit/Source/WebKit2/Scripts/generate-message-receiver.py $dname/$fileprefix.messages.in > $src/src/3rdparty/webkit/Source/WebKit2/generated/$i
45 done
47 for i in $(grep Messages.h $stuff/missinglist); do
48 fileprefix=${i%Messages.h}
49 hfilename=$(find $src/src/3rdparty/webkit/Source/WebKit2 -name $fileprefix.h)
50 dname=$(dirname $hfilename)
51 /usr/bin/python $src/src/3rdparty/webkit/Source/WebKit2/Scripts/generate-messages-header.py $dname/$fileprefix.messages.in > $src/src/3rdparty/webkit/Source/WebKit2/generated/$i
52 done
54 ./configure \
55 -silent \
56 -prefix /usr \
57 -confirm-license -opensource \
58 -sysconfdir /etc \
59 -plugindir /usr/lib/qt/plugins \
60 -importdir /usr/lib/qt/imports \
61 -translationdir /usr/share/qt/translations \
62 -datadir /usr/share/qt \
63 -docdir /usr/share/doc/qt \
64 -examplesdir /usr/share/doc/qt/examples \
65 -demosdir /usr/share/doc/qt/demos \
66 -release \
67 -nomake demos \
68 -nomake examples \
69 -nomake docs \
70 -system-zlib \
71 -system-libtiff \
72 -system-libpng \
73 -system-libmng \
74 -system-libjpeg \
75 -system-sqlite \
76 -scripttools \
77 -glib \
78 -phonon \
79 -optimized-qmake \
80 -opengl \
81 -gtkstyle \
82 2>&1 | sed 's/such file or directory/file/' &&
83 make $MAKEFLAGS &&
84 make INSTALL_ROOT=$DESTDIR install
85 }
87 # Rules to gen a SliTaz locale qt package.
88 genpkg_locale()
89 {
90 LICENSE="GPL3 LGPL2.1 FDL other"
91 usqt=/usr/share/qt/translations
92 mkdir -p $fs$usqt
94 for qm in $(find $install$usqt -name "*_$LOCALE.qm"); do
95 cp -a $install$usqt/${qm##*/} $fs$usqt
96 done
98 if [ x$BOOK != x ]; then
99 usqp=/usr/share/qt/phrasebooks
100 mkdir -p $fs$usqp
101 cp -a $install$usqp/$BOOK.qph $fs$usqp
102 fi
103 }
105 # Rules to gen a SliTaz package suitable for Tazpkg.
106 genpkg_rules()
107 {
108 case $PACKAGE in
109 qt4)
110 DEPENDS="glibc-locale libQtCore libQtGui libQtNetwork libQtSvg \
111 libQtXml libQtDesigner libQtScript libQt3Support \
112 libQtClucene libQtDBus libQtHelp libQtOpenGL libQtSql \
113 libQtWebkit gstreamer0"
114 # dummy tree to avoid 'tazwok cmp --cook' building loop
115 mkdir $fs/etc
116 ;;
117 libQt3Support)
118 CAT="development|Qt3 support Library"
119 DEPENDS="libQtGui libQtSql libQtXml"
120 mkdir -p $fs/usr/lib
121 cp -a $install/usr/lib/libQt3Support.so* $fs/usr/lib
122 ;;
123 libQtClucene)
124 CAT="development|Qt clucene Library"
125 DEPENDS="libQtCore"
126 mkdir -p $fs/usr/lib
127 cp -a $install/usr/lib/libQtCLucene.so* $fs/usr/lib
128 ;;
129 libQtCore)
130 CAT="development|"Qt Core files"
131 DEPENDS="glib zlib gcc-lib-base"
132 mkdir -p $fs/usr/lib
133 cp -a $install/usr/lib/libQtCore.so* $fs/usr/lib
134 ;;
135 libQtDBus)
136 CAT="development|Qt Dbus Library"
137 DEPENDS="libQtXml"
138 mkdir -p $fs/usr/lib $fs/usr/bin
139 cp -a $install/usr/lib/libQtDBus.so* $fs/usr/lib
140 cp -a $install/usr/bin/qdbus $fs/usr/bin
141 ;;
142 libQtDeclarative)
143 CAT="development|Qt Declarative Library"
144 DEPENDS="libQtCore libQtNetwork libQtGui libQtXml libQtSql \
145 libQtSvg libQtScript"
146 mkdir -p $fs/usr/lib
147 cp -a $src/lib/libQtDeclarative.so* $fs/usr/lib
148 ;;
149 libQtDesigner)
150 CAT="development|Qt Designer"
151 DEPENDS="libQtCore libQtGui libQtScript libQtXml"
152 mkdir -p $fs/usr/lib
153 cp -a $install/usr/lib/libQtDesigner*.so* $fs/usr/lib
154 ;;
155 libQtGui)
156 CAT="development|Qt Gui Library"
157 DEPENDS="libQtCore expat fontconfig freetype xorg-libICE \
158 xorg-libSM xorg-libX11 xorg-libXau xorg-libXdmcp \
159 xorg-libXext xorg-libXi xorg-libXrandr xorg-libXrender \
160 libpng"
161 mkdir -p $fs/usr/lib
162 cp -a $install/usr/lib/libQtGui.so* $fs/usr/lib
164 mkdir -p $fs/usr/lib/qt/plugins/imageformats
165 cp -a $install/usr/lib/qt/plugins/imageformats/libqjpeg.so $fs/usr/lib/qt/plugins/imageformats
166 cp -a $install/usr/lib/qt/plugins/imageformats/libqgif.so $fs/usr/lib/qt/plugins/imageformats
168 mkdir -p $fs/etc/skel/.config
169 cp -a $stuff/Trolltech.conf $fs/etc/skel/.config
170 ;;
171 libQtHelp)
172 CAT="development|Qt help Library"
173 DEPENDS="libQtGui libQtClucene libQtSql libQtXml"
174 mkdir -p $fs/usr/lib
175 cp -a $install/usr/lib/libQtHelp.so* $fs/usr/lib
176 ;;
177 libQtMultimedia)
178 CAT="development|Qt Multimedia Library"
179 DEPENDS="libQtGui alsa-lib"
180 mkdir -p $fs/usr/lib
181 cp -a $install/usr/lib/libQtMultimedia.so* $fs/usr/lib
182 ;;
183 libQtNetwork)
184 CAT="development|Qt Network Library"
185 DEPENDS="libQtCore"
186 mkdir -p $fs/usr/lib
187 cp -a $install/usr/lib/libQtNetwork.so* $fs/usr/lib
188 ;;
189 libQtOpenGL)
190 CAT="development|Qt OpenGL Library"
191 DEPENDS="libQtGui mesa libglu-mesa xorg-libXxf86vm xorg-libXdamage libdrm"
192 mkdir -p $fs/usr/lib
193 cp -a $install/usr/lib/libQtOpenGL.so* $fs/usr/lib
194 ;;
195 libQtPlugins)
196 CAT="development|qt x11 toolkit plugins"
197 DEPENDS="libQtSql libQt3Support libQtGui libQtCore libQtXml \
198 libQtNetwork libQtDBus libQtWebkit libQtScript \
199 libQtDesigner libQtOpenGL libQtScriptTools libQtSvg \
200 libQtTest libQtHelp"
201 mkdir -p $fs/usr/lib/qt
202 cp -a $install/usr/lib/qt/plugins $fs/usr/lib/qt
203 find $fs -regex \
204 '.*\(gstreamer\|libqsqlite\|qjpeg\|bqgif\|libqsvg\).*' -delete
205 ;;
206 libQtScript)
207 CAT="development|Qt Script Lib"
208 DEPENDS="libQtCore"
209 mkdir -p $fs/usr/lib
210 cp -a $install/usr/lib/libQtScript.so* $fs/usr/lib
211 ;;
212 libQtScriptTools)
213 CAT="development|Qt ScriptTools Lib"
214 DEPENDS="libQtScript libQtGui"
215 mkdir -p $fs/usr/lib
216 cp -a $install/usr/lib/libQtScriptTools.so* $fs/usr/lib
217 ;;
218 libQtSql)
219 CAT="development|Qt sql Library"
220 DEPENDS="libQtCore sqlite"
221 mkdir -p $fs/usr/lib
222 cp -a $install/usr/lib/libQtSql.so* $fs/usr/lib
224 #file from libQtPlugins usable with sqlite preinstalled in core slitaz
225 mkdir -p $fs/usr/lib/qt/plugins/sqldrivers
226 cp -a $install/usr/lib/qt/plugins/sqldrivers/libqsqlite.so $fs/usr/lib/qt/plugins/sqldrivers/libqsqlite.so
227 ;;
228 libQtSvg)
229 CAT="development|Qt Svg Library"
230 DEPENDS="libQtCore libQtGui libQtXml libpng"
231 mkdir -p $fs/usr/lib/qt/plugins/imageformats $fs/usr/lib/qt/plugins/iconengines
232 cp -a $install/usr/lib/libQtSvg.so* $fs/usr/lib
233 cp -a $install/usr/lib/qt/plugins/imageformats/libqsvg.so $fs/*/*/*/*/imageformats
234 cp -a $install/usr/lib/qt/plugins/iconengines/libqsvgicon.so $fs/*/*/*/*/iconengines
235 ;;
236 libQtTest)
237 CAT="development|Qt Test library"
238 DEPENDS="libQtCore"
239 mkdir -p $fs/usr/lib
240 cp -a $install/usr/lib/libQtTest.so* $fs/usr/lib
241 ;;
242 libQtWebkit-video)
243 CAT="multimedia|Web browser engine for Qt (with gstreamer HTML5 audio video support)"
244 DEPENDS="libQtCore libQtGui libQtNetwork libpng \
245 gst0-plugins-base gst0-plugins-good gst0-ffmpeg"
246 SUGGESTED="gst0-plugins-bad gst0-plugins-ugly"
247 mkdir -p $fs/usr/lib
248 cp -a $install/usr/lib/libQtWebKit.so* $fs/usr/lib
249 ;;
250 libQtXml)
251 CAT="development|Qt Xml library"
252 DEPENDS="libQtNetwork"
253 mkdir -p $fs/usr/lib
254 cp -a $install/usr/lib/libQtXml.so* $fs/usr/lib
255 cp -a $install/usr/lib/libQtXmlPatterns.so* $fs/usr/lib
256 ;;
257 qmake)
258 CAT="development|Qt make"
259 TAGS="qt"
260 DEPENDS="zlib gcc-lib-base"
261 mkdir -p $fs/usr/bin
262 cp -a $install/usr/bin/qmake $fs/usr/bin
263 cp -a $install/usr/bin/moc $fs/usr/bin
264 cp -a $install/usr/bin/uic $fs/usr/bin
265 ;;
266 Qt4-dev)
267 CAT="development|qt x11 toolkit"
268 SUGGESTED="libmng nvidia"
269 DEPENDS="QtDesigner jpeg tiff libpng mesa libglu-mesa \
270 freetds libmysqlclient libpostgresqlclient libunixODBC \
271 xcb-util libQt3Support libQtClucene libQtPlugins \
272 libQtDBus libQtHelp libQtOpenGL libQtScript libQtSql \
273 libQtScriptTools libQtWebkit libQtTest qtconfig \
274 gcc-lib-base"
275 mkdir -p $fs/usr/lib $fs/usr/include/private
276 cp -a $install/usr/include $fs/usr
277 cp -a $install/usr/lib/pkgconfig $fs/usr/lib
278 cp -a $install/usr/lib/*.*a $fs/usr/lib/
279 cp -a $install/usr/lib/*.prl $fs/usr/lib/
280 cp -a $install/usr/share $fs/usr
281 cp -a $install/usr/lib/qt $fs/usr/lib
283 #private qt includes
284 for i in $src/include/*/private/*; do cp $src/$(cat $i | sed 's/^#include "[./]*\([a-z].*\)"$/\1/') $fs/usr/include/private; done
286 # all qt plugins are in libQtPlugins
287 rm -rf $fs/usr/lib/qt/plugins
288 # all bin and remove QT applications designer, qmake, assistant, linguist: provide seperate packages
289 cp -a $install/usr/bin $fs/usr
290 rm $fs/usr/bin/qmake
291 rm $fs/usr/bin/designer
292 # Linguist and assistant are now part of QTDesigner packages
293 rm $fs/usr/bin/linguist
294 rm $fs/usr/bin/assistant
295 # qtconfig packaged now in separate package
296 rm $fs/usr/bin/qtconfig
297 rm $fs/usr/share/qt/translations/qtconfig*.qm
298 ;;
299 qt4-phonon)
300 CAT="multimedia|Qt phonon library"
301 DEPENDS="glib zlib gcc-lib-base"
302 SUGGESTED="gst0-plugins-good"
303 mkdir -p $fs/usr/lib
304 cp -a $install/usr/lib/libphonon.so* $fs/usr/lib
305 mkdir -p $fs/usr/lib/qt/plugins/phonon_backend
306 cp -a $install/usr/lib/qt/plugins/phonon_backend/libphonon_gstreamer.so $fs/usr/lib/qt/plugins/phonon_backend/libphonon_gstreamer.so
307 ;;
308 qtconfig-phonon)
309 CAT="x-window|Qtconfig is a tool that allows users to customize the default settings for Qt applications."
310 DEPENDS="gst0-plugins-base libQt3Support libQtNetwork libQtDBus qt4-phonon"
311 mkdir -p $fs/usr/bin $fs/usr/share/qt/translations
312 cp -a $install/usr/bin/qtconfig $fs/usr/bin
313 cp -a $install/usr/share/qt/translations/qtconfig*.qm $fs/usr/share/qt/translations
314 ;;
315 QtDesigner)
316 CAT="development|Qt Designer"
317 TAGS="qt"
318 DEPENDS="libQtCore libQtGui libQtNetwork libQtSvg libQtXml \
319 libQtDesigner libQtScript expat fontconfig freetype \
320 glib xorg-libICE xorg-libSM xorg-libX11 xorg-libXau \
321 xorg-libXdmcp xorg-libXext xorg-libXi xorg-libXrandr \
322 xorg-libXrender zlib libpng gcc-lib-base"
323 mkdir -p $fs/usr/bin \
324 $fs/usr/share/pixmaps \
325 $fs/usr/share/applications
327 cp -a $install/usr/bin/designer* $fs/usr/bin
328 cp -a $install/usr/bin/linguist* $fs/usr/bin
329 cp -a $install/usr/bin/assistant* $fs/usr/bin
331 # add missing icons
332 cp -a $src/tools/assistant/tools/assistant/images/assistant.png $fs/usr/share/pixmaps
333 cp -a $src/tools/designer/src/designer/images/designer.png $fs/usr/share/pixmaps
334 cp -a $src/tools/linguist/linguist/images/icons/linguist-16-32.png $fs/usr/share/pixmaps
336 # add .desktop files
337 cp -a stuff/* $fs/usr/share/applications
338 ;;
339 qt-locale-cs)
340 CAT="localization|Czech locale for Qt"
341 LICENSE="GPL3 LGPL2.1 FDL other"
342 LOCALE="cs"
343 BOOK=""
344 genpkg_locale
345 ;;
346 qt-locale-da)
347 CAT="localization|Danish locale for Qt"
348 LOCALE="da"
349 BOOK="danish"
350 genpkg_locale
351 ;;
352 qt-locale-de)
353 CAT="localization|German locale for Qt"
354 LOCALE="de"
355 BOOK="german"
356 genpkg_locale
357 ;;
358 qt-locale-es)
359 CAT="localization|Spanish locale for Qt"
360 LOCALE="es"
361 BOOK="spanish"
362 genpkg_locale
363 ;;
364 qt-locale-fr)
365 CAT="localization|French locale for Qt"
366 LOCALE="fr"
367 BOOK="french"
368 genpkg_locale
369 ;;
370 qt-locale-hu)
371 CAT="localization|Hungarian locale for Qt"
372 LOCALE="hu"
373 BOOK="hungarian"
374 genpkg_locale
375 ;;
376 qt-locale-pl)
377 CAT="localization|Polish locale for Qt"
378 LOCALE="pl"
379 BOOK="polish"
380 genpkg_locale
381 ;;
382 qt-locale-pt)
383 CAT="localization|Portuguese locale for Qt"
384 LOCALE="pt"
385 BOOK=""
386 genpkg_locale
387 ;;
388 qt-locale-ru)
389 CAT="localization|Russian locale for Qt"
390 LOCALE="ru"
391 BOOK="russian"
392 genpkg_locale
393 ;;
394 qt-locale-sl)
395 CAT="localization|Slovenian locale for Qt"
396 LOCALE="sl"
397 BOOK=""
398 genpkg_locale
399 ;;
400 qt-locale-sv)
401 CAT="localization|Swedish locale for Qt"
402 LOCALE="sv"
403 BOOK="swedish"
404 genpkg_locale
405 ;;
406 qt-locale-uk)
407 CAT="localization|Ukrainian locale for Qt"
408 LOCALE="uk"
409 BOOK=""
410 genpkg_locale
411 ;;
412 qt-locale-zh_CN)
413 CAT="localization|Chinese Simplified locale for Qt"
414 LOCALE="zh_CN"
415 BOOK=""
416 genpkg_locale
417 ;;
418 qt-locale-zh_TW)
419 CAT="localization|Chinese Traditional locale for Qt"
420 LOCALE="zh_TW"
421 BOOK=""
422 genpkg_locale
423 ;;
424 }
426 post_install_libQtGui()
427 {
428 for i in $(ls "$1/home" 2> /dev/null); do
429 [ -f "$1/home/$i/.config/Trolltech.conf" ] && continue
430 cp "$1/etc/skel/.config/Trolltech.conf" "$1/home/$i/.config"
431 chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.config"
432 done
433 }