wok-next view qt4/receipt @ rev 21037

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