wok-next view qt4/receipt @ rev 21720

qt4: replaced libIDL by libidl
author Hans-G?nter Theisgen
date Wed Aug 05 09:22:38 2020 +0100 (2020-08-05)
parents 12eb4c026405
children
line source
1 # SliTaz package receipt v2.
3 PACKAGE="qt4"
4 VERSION="4.8.7"
5 CATEGORY="meta"
6 SHORT_DESC="Qt x11 toolkit"
7 MAINTAINER="allan316@gmail.com"
8 LICENSE="GPL3 LGPL2.1"
9 WEB_SITE="https://www.qt.io/developers/"
11 SOURCE="qt-everywhere-opensource-src"
12 TARBALL="$SOURCE-$VERSION.tar.gz"
13 WGET_URL="http://download.qt-project.org/archive/qt/${VERSION%.*}/$VERSION/$TARBALL"
15 BUILD_DEPENDS="alsa-lib-dev atk-dev autoconf automake bash binutils bison bzip2-dev
16 cairo-dev coreutils cups-dev dbus-dev expat-dev flex fontconfig-dev
17 freetype-dev gettext-dev glib-dev glu glu-dev glw glw-dev
18 gst0-plugins-base-dev gst0-python-dev gstreamer0-dev gtk2-dev jpeg-dev
19 libcap-dev libidl libmng-dev libpng-dev libtool libx11-dev libxml2-dev
20 linux-api-headers m4 make mercurial mesa-dev mesa-libegl mysql-dev
21 ncurses-dev openssl-dev pango-dev patch pcre-dev perl perl-xml-parser
22 perl-xml-simple pixman-dev postgresql-dev sqlite3-dev tiff-dev
23 unixODBC-dev unzip wayland-dev xorg-dev xorg-dev-proto zip"
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 {
34 export CXXFLAGS="$CXXFLAGS -std=gnu++98"
36 #ugly fix for missing files, you probably could do better
37 mkdir -p $src/src/3rdparty/webkit/Source/WebKit2/generated
39 for i in $(grep MessageReceiver.cpp $stuff/missinglist)
40 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)
48 do
49 fileprefix=${i%Messages.h}
50 hfilename=$(find $src/src/3rdparty/webkit/Source/WebKit2 -name $fileprefix.h)
51 dname=$(dirname $hfilename)
52 /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
53 done
55 ./configure \
56 -silent \
57 -prefix /usr \
58 -confirm-license \
59 -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 &&
85 make $MAKEFLAGS &&
86 make INSTALL_ROOT=$install install
87 }
89 # Generate 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")
97 do
98 cp -a $install$usqt/${qm##*/} $fs$usqt
99 done
101 if [ x$BOOK != x ]
102 then
103 usqp=/usr/share/qt/phrasebooks
104 mkdir -p $fs$usqp
105 cp -a $install$usqp/$BOOK.qph $fs$usqp
106 fi
107 }
109 genpkg_rules()
110 {
111 case $PACKAGE in
112 qt4)
113 DEPENDS="glibc-locale libQtCore libQtGui libQtNetwork libQtSvg \
114 libQtXml libQtDesigner libQtScript libQt3Support libQtClucene \
115 libQtDBus libQtHelp libQtOpenGL libQtSql libQtWebkit gstreamer0"
116 PROVIDE="qt-x11-opensource-src Qt4"
117 TAGS="qt"
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 libice \
160 libsm libx11 libxau libxdmcp \
161 libxext libxi libxrandr libxrender \
162 libpng"
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 libxxf86vm 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 libpng"
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 libpng \
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 libtiff libpng mesa glu \
272 freetds libmysqlclient libpostgresqlclient libunixODBC \
273 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/*
287 do
288 cp $src/$(cat $i | sed 's/^#include "[./]*\([a-z].*\)"$/\1/') $fs/usr/include/private #"MC
289 done
291 # all qt plugins are in libQtPlugins
292 rm -rf $fs/usr/lib/qt/plugins
293 # all bin and remove QT applications designer, qmake, assistant, linguist: provide seperate packages
294 cp -a $install/usr/bin $fs/usr
295 rm $fs/usr/bin/qmake
296 rm $fs/usr/bin/designer
297 # Linguist and assistant are now part of QTDesigner packages
298 rm $fs/usr/bin/linguist
299 rm $fs/usr/bin/assistant
300 # qtconfig packaged now in separate package
301 rm $fs/usr/bin/qtconfig
302 rm $fs/usr/share/qt/translations/qtconfig*.qm
303 ;;
304 qt4-phonon)
305 CAT="multimedia|Qt phonon library"
306 DEPENDS="glib zlib gcc-lib-base"
307 SUGGESTED="gst0-plugins-good"
308 mkdir -p $fs/usr/lib
309 cp -a $install/usr/lib/libphonon.so* $fs/usr/lib
310 mkdir -p $fs/usr/lib/qt/plugins/phonon_backend
311 cp -a $install/usr/lib/qt/plugins/phonon_backend/libphonon_gstreamer.so $fs/usr/lib/qt/plugins/phonon_backend/libphonon_gstreamer.so
312 ;;
313 qtconfig-phonon)
314 CAT="x-window|Qtconfig is a tool that allows users to customize the default settings for Qt applications."
315 DEPENDS="gst0-plugins-base libQt3Support libQtNetwork libQtDBus qt4-phonon"
316 mkdir -p $fs/usr/bin $fs/usr/share/qt/translations
317 cp -a $install/usr/bin/qtconfig $fs/usr/bin
318 cp -a $install/usr/share/qt/translations/qtconfig*.qm $fs/usr/share/qt/translations
319 ;;
320 QtDesigner)
321 CAT="development|Qt Designer"
322 TAGS="qt"
323 DEPENDS="libQtCore libQtGui libQtNetwork libQtSvg libQtXml \
324 libQtDesigner libQtScript expat fontconfig freetype \
325 glib libice libsm libx11 libxau \
326 libxdmcp libxext libxi libxrandr \
327 libxrender zlib libpng gcc-lib-base"
328 mkdir -p $fs/usr/bin \
329 $fs/usr/share/pixmaps \
330 $fs/usr/share/applications
332 cp -a $install/usr/bin/designer* $fs/usr/bin
333 cp -a $install/usr/bin/linguist* $fs/usr/bin
334 cp -a $install/usr/bin/assistant* $fs/usr/bin
336 # add missing icons
337 cp -a $src/tools/assistant/tools/assistant/images/assistant.png $fs/usr/share/pixmaps
338 cp -a $src/tools/designer/src/designer/images/designer.png $fs/usr/share/pixmaps
339 cp -a $src/tools/linguist/linguist/images/icons/linguist-16-32.png $fs/usr/share/pixmaps
341 # add .desktop files
342 cp -a $stuff/* $fs/usr/share/applications
343 ;;
344 qt-locale-cs)
345 CAT="localization|Czech locale for Qt"
346 LICENSE="GPL3 LGPL2.1 FDL other"
347 LOCALE="cs" BOOK="" genpkg_locale
348 ;;
349 qt-locale-da)
350 CAT="localization|Danish locale for Qt"
351 LOCALE="da" BOOK="danish" genpkg_locale
352 ;;
353 qt-locale-de)
354 CAT="localization|German locale for Qt"
355 LOCALE="de" BOOK="german" genpkg_locale
356 ;;
357 qt-locale-es)
358 CAT="localization|Spanish locale for Qt"
359 LOCALE="es" BOOK="spanish" genpkg_locale
360 ;;
361 qt-locale-fr)
362 CAT="localization|French locale for Qt"
363 LOCALE="fr" BOOK="french" genpkg_locale
364 ;;
365 qt-locale-hu)
366 CAT="localization|Hungarian locale for Qt"
367 LOCALE="hu" BOOK="hungarian" genpkg_locale
368 ;;
369 qt-locale-pl)
370 CAT="localization|Polish locale for Qt"
371 LOCALE="pl" BOOK="polish" genpkg_locale
372 ;;
373 qt-locale-pt)
374 CAT="localization|Portuguese locale for Qt"
375 LOCALE="pt" BOOK="" genpkg_locale
376 ;;
377 qt-locale-ru)
378 CAT="localization|Russian locale for Qt"
379 LOCALE="ru" BOOK="russian" genpkg_locale
380 ;;
381 qt-locale-sl)
382 CAT="localization|Slovenian locale for Qt"
383 LOCALE="sl" BOOK="" genpkg_locale
384 ;;
385 qt-locale-sv)
386 CAT="localization|Swedish locale for Qt"
387 LOCALE="sv" BOOK="swedish" genpkg_locale
388 ;;
389 qt-locale-uk)
390 CAT="localization|Ukrainian locale for Qt"
391 LOCALE="uk" BOOK="" genpkg_locale
392 ;;
393 qt-locale-zh_CN)
394 CAT="localization|Chinese Simplified locale for Qt"
395 LOCALE="zh_CN" BOOK="" genpkg_locale
396 ;;
397 qt-locale-zh_TW)
398 CAT="localization|Chinese Traditional locale for Qt"
399 LOCALE="zh_TW" BOOK="" genpkg_locale
400 ;;
401 esac
402 }
404 post_install_libQtGui()
405 {
406 for i in $(ls "$1/home" 2>/dev/null)
407 do
408 [ -f "$1/home/$i/.config/Trolltech.conf" ] && continue
409 cp "$1/etc/skel/.config/Trolltech.conf" "$1/home/$i/.config"
410 chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.config"
411 done
412 }