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