Magellan Linux

Contents of /branches/R11-unstable/extras/qt4/qt4-4.8.6-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 25756 - (show annotations) (download)
Tue Nov 25 04:15:52 2014 UTC (9 years, 5 months ago) by niro
File size: 20971 byte(s)
-release branches/R11-unstable
1 # $Id$
2
3 PNAME="qt4"
4 PVER="4.8.6"
5 PBUILD="r2"
6
7 PCAT="x11-libs"
8
9 DESCRIPTION="Qt: Cross-Platform Rich Client Development Framework."
10 HOMEPAGE="http://qt-project.org/"
11
12 # build phonon or not (yes/no), disabled atm
13 QT4_PHONON="no"
14 SPECIAL_VARS="QT4_PHONON"
15
16 # use kde-qt patches or not (yes/no), disabled atm
17 KDE_QT_PATCHES="no"
18 # snapshot id of the patches
19 KDE_QT_SNAPSHOT_ID="8fa76375a2f030ecf8aa23c917f51f04333a1b2c"
20
21 # load qt4 here to overide all depends
22 # include kde4 to get the right KDEDIR for phonon!
23 sminclude mtools qt4 kde4 xdg fdo-mime
24
25 DEPEND_CORE=">= dev-libs/openssl-1.0.1
26 >= app-crypt/ca-certificates-2014
27 >= dev-libs/glib2-2.42
28 >= dev-libs/icu-54
29 >= sys-libs/zlib-1.2.8
30 >= sys-libs/libstdc++-4.8"
31
32 DEPEND_GUI="${DEPEND_CORE}
33 >= x11-libs/libICE-1
34 >= x11-libs/libSM-1.1
35 >= x11-libs/libXau-1
36 >= x11-libs/libxcb-1.10
37 >= x11-libs/libXdmcp-1
38 >= x11-libs/libX11-1.6
39 >= x11-libs/libXcursor-1.1
40 >= x11-libs/libXext-1.3
41 >= x11-libs/libXfont-1.4
42 >= x11-libs/libXfixes-5
43 >= x11-libs/libXft-2.2
44 >= x11-libs/libXi-1.7
45 >= x11-libs/libXinerama-1
46 >= x11-libs/libXrandr-1.3
47 >= x11-libs/libXrender-0.9
48 >= media-libs/libjpeg-8
49 >= media-libs/giflib-5.0
50 >= media-libs/libmng-2
51 >= media-libs/libpng-1.5
52 >= media-libs/libtiff-4
53 >= media-libs/freetype-2.5
54 >= media-libs/fontconfig-2.11
55 >= net-print/libcups-1.7
56 >= media-libs/nas-1.9"
57
58 DEPEND_SQL=">= dev-db/sqlite-3.8
59 >= dev-db/mysql-libs-5.5
60 >= dev-db/unixodbc-2.3"
61
62 DEPEND_DBUS=">= sys-apps/dbus-1.8"
63
64 DEPEND_OPENGL=">= virtual/opengl"
65
66 DEPEND_MULTIMEDIA=">= media-libs/alsa-lib-1.0.28"
67
68 DEPEND_BEARER=">= net-misc/networkmanager-0.9.10"
69
70 SDEPEND="${DEPEND_CORE}
71 ${DEPEND_GUI}
72 ${DEPEND_SQL}
73 ${DEPEND_DBUS}
74 ${DEPEND_OPENGL}
75 ${DEPEND_MULTIMEDIA}
76 ${DEPEND_BEARER}
77 >= sys-dev/bison-2.5
78 >= x11-proto/xineramaproto-1.1
79 >= x11-proto/xextproto-7
80 >= x11-proto/inputproto-2
81 >= dev-util/pkgconfig-0.25
82 >= dev-libs/expat-2
83 >= media-libs/lcms-1.19"
84
85 if [[ ${QT4_PHONON} = yes ]]
86 then
87 DEPEND_PHONON="${DEPEND_DBUS}
88 >= media-libs/gstreamer1.0-1.0
89 >= media-libs/gstreamer1.0-plugins-base-1.0
90 >= media-libs/gstreamer1.0-plugins-good-1.0"
91
92 SDEPEND+="
93 ${DEPEND_PHONON}"
94 fi
95
96 SRCFILE="${PNAME/4/}-everywhere-opensource-src-${PVER}.tar.gz"
97 SRCDIR="${BUILDDIR}/${PNAME/4/}-everywhere-opensource-src-${PVER}"
98
99 SPLIT_PACKAGES="qt4-core
100 qt4-dbus
101 qt4-script
102 qt4-gui
103 qt4-svg
104 qt4-sql
105 qt4-xmlpatterns
106 qt4-opengl
107 qt4-qt3support
108 qt4-webkit
109 qt4-test
110 qt4-multimedia
111 qt4-help
112 qt4-assistant
113 qt4-declarative
114 qt4-designer
115 qt4-linguist
116 qt4-pixeltool
117 qt4-qdbusviewer
118 qt4-bearer"
119
120 if [[ ${QT4_PHONON} = yes ]]
121 then
122 SPLIT_PACKAGES+="qt4-phonon"
123 fi
124
125 SRC_URI=(
126 http://download.qt-project.org/official_releases/qt/${PVER%.*}/${PVER}/${SRCFILE}
127 mirror://${PNAME}/${SRCFILE}
128 mirror://${PNAME}/qt-4.5.1-no-hardcoded_fonts.patch
129 mirror://${PNAME}/qt-4.8.1-improve-cups-support.patch
130 mirror://${PNAME}/qt-4.8.5-CVE-2013-4549.patch
131 )
132
133 # add phonon patches
134 if [[ ${QT4_PHONON} = yes ]]
135 then
136 SRC_URI+=( mirror://${PNAME}/qt-4.5.3-phonon-2.patch )
137 fi
138
139 # use kde-qt?
140 if [[ ${KDE_QT_PATCHES} = yes ]]
141 then
142 SRC_URI+=( mirror://${PNAME}/qt-${PVER}-kde-qt-${KDE_QT_SNAPSHOT_ID}.patch )
143 fi
144
145 UP2DATE="updatecmd ${HOMEPAGE}/downloads | grep 4. | firsttarball gz"
146
147 #
148 ## global vars ##
149 #
150 # install prefix
151 # get this one from qt4.sminc, QTDIR gets overridden later on
152 export QT_PREFIX="${QTDIR}"
153 # source location
154 export QTDIR="${SRCDIR}"
155 export LD_LIBRARY_PATH="${QTDIR}/lib"
156 export PATH="${QTDIR}/bin:${PATH}"
157 export PLATFORM="linux-g++"
158 [[ ${ARCH} = x86_64 ]] && export PLATFORM="linux-g++-64"
159 # etc dir
160 export QT_SYSCONFDIR="/etc/${PNAME}"
161 # envfile
162 export QT_ENVFILE="/etc/env.d/45${PNAME}"
163 #
164 # do not export QMAKE from qt4.sminc
165 unset QMAKE
166 # do not run postinstall/remove from kde4 include
167 unset -f postinstall
168 unset -f postremove
169
170 split_info_qt4-core()
171 {
172 DESCRIPTION="Qt4: Cross-Platform Rich Client Development Framework."
173 DEPEND="${DEPEND_CORE}"
174 }
175
176 split_info_qt4-gui()
177 {
178 DESCRIPTION="The GUI module for the Qt4 toolkit."
179 DEPEND="== x11-libs/qt4-core-${PVER}
180 == x11-libs/qt4-script-${PVER}
181 == x11-libs/qt4-dbus-${PVER}
182 ${DEPEND_GUI}"
183 }
184
185 split_info_qt4-svg()
186 {
187 DESCRIPTION="The SVG module for the Qt4 toolkit."
188 DEPEND="== x11-libs/qt4-core-${PVER}
189 == x11-libs/qt4-gui-${PVER}"
190 }
191
192 split_info_qt4-sql()
193 {
194 DESCRIPTION="The SQL module for the Qt4 toolkit."
195 DEPEND="== x11-libs/qt4-core-${PVER}
196 ${DEPEND_SQL}"
197 }
198
199 split_info_qt4-script()
200 {
201 DESCRIPTION="The ECMAScript module for the Qt4 toolkit."
202 DEPEND="== x11-libs/qt4-core-${PVER}"
203 }
204
205 split_info_qt4-xmlpatterns()
206 {
207 DESCRIPTION="The patternist module for the Qt toolkit."
208 DEPEND="== x11-libs/qt4-core-${PVER}"
209 }
210
211 split_info_qt4-dbus()
212 {
213 DESCRIPTION="The DBus module for the Qt4 toolkit."
214 DEPEND="== x11-libs/qt4-core-${PVER}
215 ${DEPEND_DBUS}"
216 }
217
218 split_info_qt4-opengl()
219 {
220 DESCRIPTION="The OpenGL module for the Qt4 toolkit."
221 DEPEND="== x11-libs/qt4-core-${PVER}
222 == x11-libs/qt4-gui-${PVER}
223 ${DEPEND_OPENGL}"
224 }
225
226 if [[ ${QT4_PHONON} = yes ]]
227 then
228 split_info_qt4-phonon()
229 {
230 DESCRIPTION="The Phonon module for the Qt4 toolkit."
231 DEPEND="== x11-libs/qt4-gui-${PVER}
232 == x11-libs/qt4-dbus-${PVER}
233 ${DEPEND_PHONON}"
234
235 PROVIDE="virtual/phonon"
236 }
237
238 preinstall_qt4-phonon()
239 {
240 if [[ -n $(magequery -n phonon) ]]
241 then
242 die "please uninstall kde-base/phonon first!"
243 fi
244 }
245
246 postinstall_qt4-phonon()
247 {
248 # breaks compilation if the old phonon symlink from kde-phonon exist
249 if [[ -L ${MROOT}/opt/kde4/lib/libphonon.so ]]
250 then
251 rm ${MROOT}/opt/kde4/lib/libphonon.so
252 fi
253 }
254 fi
255
256 split_info_qt4-qt3support()
257 {
258 DESCRIPTION="The Qt3 support module for the Qt toolkit."
259 DEPEND="== x11-libs/qt4-core-${PVER}
260 == x11-libs/qt4-gui-${PVER}
261 == x11-libs/qt4-sql-${PVER}"
262 if [[ ${QT4_PHONON} = yes ]]
263 then
264 DEPEND+="
265 == x11-libs/qt4-phonon-${PVER}"
266 fi
267 }
268
269 split_info_qt4-webkit()
270 {
271 DESCRIPTION="The Webkit module for the Qt4 toolkit."
272 DEPEND="== x11-libs/qt4-core-${PVER}
273 == x11-libs/qt4-dbus-${PVER}
274 == x11-libs/qt4-gui-${PVER}
275 == x11-libs/qt4-xmlpatterns-${PVER}"
276 if [[ ${QT4_PHONON} = yes ]]
277 then
278 DEPEND+="
279 == x11-libs/qt4-phonon-${PVER}"
280 fi
281 }
282
283 split_info_qt4-test()
284 {
285 DESCRIPTION="The testing framework module for the Qt4 toolkit."
286 DEPEND="== x11-libs/qt4-core-${PVER}"
287 }
288
289 split_info_qt4-multimedia()
290 {
291 DESCRIPTION="The Multimedia module for the Qt4 toolkit."
292 DEPEND="== x11-libs/qt4-core-${PVER}
293 == x11-libs/qt4-gui-${PVER}
294 ${DEPEND_MULTIMEDIA}"
295 }
296
297 split_info_qt4-help()
298 {
299 DESCRIPTION="The assistant help module for the Qt4 toolkit."
300 DEPEND="x11-libs/qt4-core-${PVER}
301 == x11-libs/qt4-gui-${PVER}
302 == x11-libs/qt4-sql-${PVER}"
303 }
304
305 split_info_qt4-assistant()
306 {
307 DESCRIPTION="The assistant help module for the Qt4 toolkit."
308 DEPEND="x11-libs/qt4-core-${PVER}
309 == x11-libs/qt4-gui-${PVER}
310 == x11-libs/qt4-help-${PVER}
311 == x11-libs/qt4-sql-${PVER}
312 == x11-libs/qt4-webkit-${PVER}"
313 PCAT="x11-apps"
314 }
315
316 split_info_qt4-declarative()
317 {
318 DESCRIPTION="The Declarative module for the Qt4 toolkit."
319 DEPEND="== x11-libs/qt4-core-${PVER}
320 == x11-libs/qt4-gui-${PVER}
321 == x11-libs/qt4-multimedia-${PVER}
322 == x11-libs/qt4-opengl-${PVER}
323 == x11-libs/qt4-script-${PVER}
324 == x11-libs/qt4-sql-${PVER}
325 == x11-libs/qt4-svg-${PVER}
326 == x11-libs/qt4-webkit-${PVER}
327 == x11-libs/qt4-qt3support-${PVER}
328 == x11-libs/qt4-xmlpatterns-${PVER}"
329 }
330
331 split_info_qt4-designer()
332 {
333 DESCRIPTION="WYSIWYG tool for designing and building Qt-based GUIs."
334 DEPEND="== x11-libs/qt4-core-${PVER}
335 == x11-libs/qt4-gui-${PVER}
336 == x11-libs/qt4-script-${PVER}
337 == x11-libs/qt4-declarative-${PVER}
338 == x11-libs/qt4-qt3support-${PVER}
339 == x11-libs/qt4-webkit-${PVER}"
340 if [[ ${QT4_PHONON} = yes ]]
341 then
342 DEPEND+="
343 == x11-libs/qt4-phonon-${PVER}"
344 fi
345 PCAT="x11-apps"
346 }
347
348 split_info_qt4-linguist()
349 {
350 DESCRIPTION="Graphical tool for translating Qt applications."
351 DEPEND="== x11-libs/qt4-core-${PVER}
352 == x11-libs/qt4-gui-${PVER}
353 == x11-apps/qt4-designer-${PVER}"
354 PCAT="x11-apps"
355 }
356
357 split_info_qt4-pixeltool()
358 {
359 DESCRIPTION="Qt screen magnifier."
360 DEPEND="== x11-libs/qt4-core-${PVER}
361 == x11-libs/qt4-gui-${PVER}"
362 PCAT="x11-apps"
363 }
364
365 split_info_qt4-qdbusviewer()
366 {
367 DESCRIPTION="Graphical tool that lets you introspect D-Bus objects and messages."
368 DEPEND="== x11-libs/qt4-core-${PVER}
369 == x11-libs/qt4-gui-${PVER}
370 == x11-libs/qt4-dbus-${PVER}"
371 PCAT="x11-apps"
372 }
373
374 split_info_qt4-bearer()
375 {
376 DESCRIPTION="The network bearer plugins for the Qt toolkit."
377 DEPEND="== x11-libs/qt4-core-${PVER}
378 == x11-libs/qt4-dbus-${PVER}
379 ${DEPEND_BEARER}"
380 }
381
382 install_qt_target()
383 {
384 local targets
385 local i
386
387 targets="$@"
388
389 for i in ${targets}
390 do
391 mmake -C ${i} INSTALL_ROOT=${BINDIR} install || die "install of target '${i}' failed"
392 done
393 }
394
395 src_prepare()
396 {
397 munpack ${SRCFILE} || die
398 cd ${SRCDIR}
399
400 # security fix
401 mpatch qt-4.8.5-CVE-2013-4549.patch || die
402
403 # no hardcoded font-aliases
404 # see: https://cvs.fedoraproject.org/viewvc/rpms/qt4/F-8/qt-x11-opensource-src-4.3.4-no-hardcoded-font-aliases.patch?view=markup
405 mpatch qt-4.5.1-no-hardcoded_fonts.patch || die
406
407 # improve cups support
408 mpatch qt-4.8.1-improve-cups-support.patch || die
409
410 if [[ ${QT4_PHONON} = yes ]]
411 then
412 # install service files needed by kde
413 mpatch qt-4.5.3-phonon-2.patch || die
414 # fix variable kdelocation from the patch
415 sed -i "s:@@KDEDIR@@:${KDEDIR}:g" ${SRCDIR}/src/plugins/phonon/gstreamer/gstreamer.pro || die
416 fi
417
418 if [[ ${KDE_QT_PATCHES} = yes ]]
419 then
420 # kdeqt patches from http://gitorious.org/+kde-developers/qt/kde-qt
421 mpatch qt-${PVER}-kde-qt-${KDE_QT_SNAPSHOT_ID}.patch || die
422 fi
423
424 # set our cflags and fix up our header and lib locations
425 cd ${SRCDIR}/mkspecs/${PLATFORM}
426 sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
427 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
428 -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
429 -e 's:$(QTDIR)/include:&/qt${PVER%%.*}:' \
430 -e "s:\$(QTDIR)/lib:\$(QTDIR)/$(mlibdir):" \
431 qmake.conf \
432 || die
433
434 # fix libdir to lib64 on 64bit arches
435 sed -i "s:/lib$:/$(mlibdir):" qmake.conf || die
436
437 # disable rpath
438 sed -i "s:QMAKE_RPATH.*=.*:QMAKE_RPATH=:" qmake.conf || die
439
440 # get rid of /usr/X11R6
441 sed -i "s:X11R6/::" qmake.conf || die
442
443 # same goes for the g++ definitions
444 # they where moved to an extra file with qt4
445 cd ${SRCDIR}/mkspecs/common
446 sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CPPFLAGS} ${CFLAGS} ${ASFLAGS}:" \
447 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CPPFLAGS} ${CXXFLAGS} ${ASFLAGS}:" \
448 -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
449 -e 's:$(QTDIR)/include:&/qt${PVER%%.*}:' \
450 -e "s:\$(QTDIR)/lib:\$(QTDIR)/$(mlibdir):" \
451 g++.conf \
452 || die
453
454 # fix libdir to lib64 on 64bit arches
455 sed -i "s:/lib$:/$(mlibdir):" g++.conf || die
456
457 # disable rpath
458 sed -i "s:QMAKE_RPATH.*=.*:QMAKE_RPATH=:" g++.conf || die
459
460 # get rid of /usr/X11R6
461 sed -i "s:X11R6/::" linux.conf || die
462 }
463
464 src_compile()
465 {
466 cd ${SRCDIR}
467 local myconf
468
469 # add missing lib64 search path on 64bit arches
470 [[ $(mlibdir) != lib ]] && myconf="-L/usr/$(mlibdir)"
471
472 # enable this only for binutils >=2.18
473 [[ $(ld -v | sed 's/.*\ \([0-9].[0-9].*\)/\1/') > 2.17 ]] && myconf+=" -reduce-relocations"
474
475 # enable static if requested
476 mqueryfeature "static" && myconf+=" -static"
477 # always build shared libs
478 myconf+=" -shared"
479
480 # disable openvg atm
481 myconf+=" -no-openvg"
482
483 if [[ ${QT4_PHONON} = yes ]]
484 then
485 myconf+=" -phonon"
486 myconf+=" -phonon-backend"
487 else
488 myconf+=" -no-phonon"
489 myconf+=" -no-phonon-backend"
490 fi
491
492 ./configure \
493 -prefix ${QT_PREFIX} \
494 -sysconfdir ${QT_SYSCONFDIR} \
495 -datadir ${QT_PREFIX}/share/qt${PVER%%.*} \
496 -docdir ${QT_PREFIX}/share/doc/qt${PVER%%.*}-${PVER} \
497 -headerdir ${QT_PREFIX}/include/qt${PVER%%.*} \
498 -plugindir ${QT_PREFIX}/$(mlibdir)/qt${PVER%%.*}/plugins \
499 -importdir ${QT_PREFIX}/$(mlibdir)/qt${PVER%%.*}/imports \
500 -libdir ${QT_PREFIX}/$(mlibdir) \
501 -datadir ${QT_PREFIX}/share/qt${PVER%%.*} \
502 -translationdir ${QT_PREFIX}/share/qt${PVER%%.*}/translations \
503 -confirm-license \
504 -opensource \
505 -platform ${PLATFORM} \
506 -xplatform ${PLATFORM} \
507 -verbose \
508 -silent \
509 -fast \
510 -release \
511 -no-separate-debug-info \
512 -optimized-qmake \
513 -system-libjpeg \
514 -system-libmng \
515 -system-libpng \
516 -system-libtiff \
517 -system-zlib \
518 -system-nas-sound \
519 -system-sqlite \
520 -nomake examples \
521 -nomake demos \
522 -nomake docs \
523 -no-rpath \
524 -no-pch \
525 -qt3support \
526 -stl \
527 -lpthread \
528 -largefile \
529 -sm \
530 -xrender \
531 -opengl \
532 -cups \
533 -dbus-linked \
534 -openssl \
535 -webkit \
536 -svg \
537 -icu \
538 -xmlpatterns \
539 -declarative \
540 -plugin-sql-sqlite \
541 -plugin-sql-mysql \
542 -plugin-sql-odbc \
543 -I/usr/include/mysql \
544 -L/usr/$(mlibdir)/mysql \
545 -graphicssystem raster \
546 ${myconf} \
547 || die
548
549 mmake all || die
550 }
551
552 src_install_qt4-core()
553 {
554 cd ${SRCDIR}
555
556 install_qt_target \
557 src/tools/bootstrap \
558 src/tools/moc \
559 src/tools/rcc \
560 src/tools/uic \
561 src/corelib \
562 src/xml \
563 src/network \
564 src/plugins/codecs \
565 tools/linguist/lrelease \
566 tools/linguist/lupdate \
567 tools/linguist/lconvert
568
569 # install missing qmake
570 mmake INSTALL_ROOT=${BINDIR} install_qmake || die
571 mlink qmake ${QT_PREFIX}/bin/qmake${PVER%%.*} || die
572
573 # install missing findtr
574 minstallexec ${SRCDIR}/bin/findtr ${QT_PREFIX}/bin || die
575
576 # install all spec files
577 mmake INSTALL_ROOT=${BINDIR} install_mkspecs || die
578
579 # remove unneeded specs
580 echo "removing unneeded specs ..."
581 install -d ${BUILDDIR}/keep
582 mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/default ${BUILDDIR}/keep || die
583 mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/common ${BUILDDIR}/keep || die
584 mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/features ${BUILDDIR}/keep || die
585 mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/qws ${BUILDDIR}/keep || die
586 mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/${PLATFORM} ${BUILDDIR}/keep || die
587 if [[ ${ARCH} = x86_64 ]]
588 then
589 mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/linux-g++ ${BUILDDIR}/keep || die
590 fi
591 mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/qconfig.pri ${BUILDDIR}/keep || die
592 rm -rf ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/* || die
593 mv ${BUILDDIR}/keep/* ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs || die
594
595 # fix qmake cache file
596 minstalldir ${QT_PREFIX}/share/qt${PVER%%.*} || die
597 sed "s:${SRCDIR}:${QT_PREFIX}:g" ${SRCDIR}/.qmake.cache > ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/.qmake.cache || die
598
599 # # some needed symlinks
600 # mlink libqt-mt.so ${QT_PREFIX}/$(mlibdir)/libqt.so || die
601
602 # generate translations and install them
603 # use freshly built libraries
604 LD_LIBRARY_PATH=${SRCDIR}/lib ${SRCDIR}/bin/lrelease translations/*.ts || die
605 minstalldir ${QT_PREFIX}/share/qt${PVER%%.*}/translations || die
606 minstallfile translations/\*.qm ${QT_PREFIX}/share/qt${PVER%%.*}/translations || die
607
608 # keep the qt4 sysdir
609 mkeepdir ${QT_SYSCONFDIR} || die
610
611 # environ vars
612 minstalldir /etc/env.d || die
613 MCONFIG=${QT_ENVFILE}
614 mclearconfig || die
615 maddconfig "QMAKESPEC=\"${PLATFORM}\"" || die
616 maddconfig "QTDIR=\"${QT_PREFIX}\"" || die
617
618 if [[ ${QT_PREFIX} != /usr ]]
619 then
620 # overwrite the env file here, there may be one in usr
621 # and we want this as system-wide default
622 mclearconfig || die
623 maddconfig "PATH=\"${QT_PREFIX}/bin\"" || die
624 maddconfig "ROOTPATH=\"${QT_PREFIX}/bin\"" || die
625 maddconfig "LDPATH=\"${QT_PREFIX}/$(mlibdir)\"" || die
626 maddconfig "MANPATH=\"${QT_PREFIX}/share/man\"" || die
627 maddconfig "PKG_CONFIG_PATH=\"${QT_PREFIX}/$(mlibdir)/pkgconfig\"" || die
628 fi
629
630 minstalldocs GPL* changes-${PVER} LICENSE* OPENSOURCE* README* || die
631 }
632
633 src_install_qt4-gui()
634 {
635 cd ${SRCDIR}
636
637 install_qt_target \
638 src/gui \
639 src/scripttools \
640 src/plugins/imageformats/gif \
641 src/plugins/imageformats/ico \
642 src/plugins/imageformats/jpeg \
643 src/plugins/imageformats/mng \
644 src/plugins/imageformats/tiff \
645 src/plugins/imageformats/tga \
646 src/plugins/inputmethods \
647 src/plugins/accessible/widgets \
648 src/plugins/graphicssystems/trace \
649 tools/qttracereplay \
650 tools/qtconfig
651
652 # desktop icon
653 minstallpixmap tools/qtconfig/images/appicon.png qtconfig.png || die
654 minstall_desktop_icon \
655 --name "QT4 Config" \
656 --file "qt4-qtconfig" \
657 --comment "Configure Qt4 behavior, styles, fonts" \
658 --exec qtconfig \
659 --icon qtconfig \
660 --categories "Qt,Settings,DesktopSettings" \
661 || die
662 }
663
664 src_install_qt4-svg()
665 {
666 cd ${SRCDIR}
667
668 install_qt_target \
669 src/svg \
670 src/plugins/imageformats/svg \
671 src/plugins/iconengines/svgiconengine
672 }
673
674 src_install_qt4-sql()
675 {
676 cd ${SRCDIR}
677
678 install_qt_target src/sql src/plugins/sqldrivers
679 }
680
681 src_install_qt4-script()
682 {
683 cd ${SRCDIR}
684
685 install_qt_target src/script
686 }
687
688 src_install_qt4-xmlpatterns()
689 {
690 cd ${SRCDIR}
691
692 install_qt_target \
693 src/xmlpatterns \
694 tools/xmlpatterns \
695 tools/xmlpatternsvalidator
696 }
697
698 src_install_qt4-dbus()
699 {
700 cd ${SRCDIR}
701
702 install_qt_target \
703 src/dbus \
704 tools/qdbus/qdbus \
705 tools/qdbus/qdbusxml2cpp \
706 tools/qdbus/qdbuscpp2xml
707 }
708
709 src_install_qt4-opengl()
710 {
711 cd ${SRCDIR}
712
713 install_qt_target src/opengl src/plugins/graphicssystems/opengl
714 }
715
716 if [[ ${QT4_PHONON} = yes ]]
717 then
718 src_install_qt4-phonon()
719 {
720 cd ${SRCDIR}
721
722 install_qt_target \
723 src/phonon \
724 src/plugins/phonon
725
726 # needed symlink; kde-4.4 includes from Phonon/*
727 if [[ ! -e ${BINDIR}/${QT_PREFIX}/include/qt/Phonon ]]
728 then
729 mlink phonon ${QT_PREFIX}/include/qt/Phonon || die
730 fi
731 }
732 fi
733
734 src_install_qt4-qt3support()
735 {
736 cd ${SRCDIR}
737
738 install_qt_target \
739 src/qt3support \
740 src/tools/uic3 \
741 tools/porting
742 }
743
744 src_install_qt4-webkit()
745 {
746 cd ${SRCDIR}
747
748 install_qt_target \
749 src/3rdparty/webkit/Source/JavaScriptCore \
750 src/3rdparty/webkit/Source/WebCore \
751 src/3rdparty/webkit/Source/WebKit/qt
752 }
753
754 src_install_qt4-test()
755 {
756 cd ${SRCDIR}
757
758 install_qt_target src/testlib
759 }
760
761 src_install_qt4-multimedia()
762 {
763 cd ${SRCDIR}
764
765 install_qt_target src/multimedia
766 }
767
768 src_install_qt4-help()
769 {
770 cd ${SRCDIR}
771
772 install_qt_target \
773 tools/assistant/lib/fulltextsearch \
774 tools/assistant/lib \
775 tools/assistant/tools/qhelpgenerator \
776 tools/assistant/tools/qcollectiongenerator \
777 tools/assistant/tools/qhelpconverter \
778 tools/qdoc3
779 }
780
781 src_install_qt4-assistant()
782 {
783 cd ${SRCDIR}
784
785 install_qt_target tools/assistant/tools/assistant
786
787 # desktop icon
788 minstallpixmap tools/assistant/tools/assistant/images/assistant.png || die
789 minstall_desktop_icon \
790 --name "QT4 Assistant" \
791 --file "qt4-assistant" \
792 --comment "Shows Qt4 documentation and examples" \
793 --exec assistant \
794 --icon assistant \
795 --categories "Qt,Development,Documentation" \
796 || die
797 }
798
799 src_install_qt4-declarative()
800 {
801 cd ${SRCDIR}
802
803 install_qt_target \
804 src/declarative \
805 src/imports \
806 src/plugins/qmltooling \
807 tools/qml \
808 tools/qmlplugindump \
809 src/3rdparty/webkit/Source/WebKit/qt/declarative
810 }
811
812 src_install_qt4-designer()
813 {
814 cd ${SRCDIR}
815
816 install_qt_target tools/designer
817
818 # desktop icon
819 minstallpixmap tools/designer/src/designer/images/designer.png || die
820 minstall_desktop_icon \
821 --name "QT4 Designer" \
822 --file "qt4-designer" \
823 --comment "Design GUIs for Qt4 applications" \
824 --exec designer \
825 --icon designer \
826 --categories "Qt,Development,GUIDesigner" \
827 || die
828 }
829
830 src_install_qt4-linguist()
831 {
832 cd ${SRCDIR}
833
834 install_qt_target tools/linguist/linguist
835
836 # desktop icon
837 minstallpixmap tools/linguist/linguist/images/icons/linguist-128-32.png linguist.png || die
838 minstall_desktop_icon \
839 --name "QT4 Linguist" \
840 --file "qt4-linguist" \
841 --comment "Add translations to Qt4 applications" \
842 --exec linguist \
843 --icon linguist \
844 --categories "Qt,Development,Translation" \
845 || die
846 }
847
848 src_install_qt4-pixeltool()
849 {
850 cd ${SRCDIR}
851
852 install_qt_target tools/pixeltool
853 }
854
855 src_install_qt4-qdbusviewer()
856 {
857 cd ${SRCDIR}
858
859 install_qt_target tools/qdbus/qdbusviewer
860
861 # desktop icon
862 minstallpixmap tools/qdbus/qdbusviewer/images/qdbusviewer-128.png qdbusviewer.png || die
863 minstall_desktop_icon \
864 --name "QT4 QDbusViewer" \
865 --file "qt4-qdbusviewer" \
866 --comment "Debug D-Bus applications" \
867 --exec qdbusviewer \
868 --icon qdbusviewer \
869 --categories "Qt,Development,Debugger" \
870 || die
871 }
872
873 src_install_qt4-bearer()
874 {
875 cd ${SRCDIR}
876
877 install_qt_target \
878 src/plugins/bearer/generic \
879 src/plugins/bearer/networkmanager
880 }
881
882 postinstall_qt4-gui()
883 {
884 xdg_update_icon_resource
885 fdo-mime_update_desktop_db
886 }
887
888 postinstall_qt4-designer()
889 {
890 xdg_update_icon_resource
891 fdo-mime_update_desktop_db
892 }
893
894 postinstall_qt4-linguist()
895 {
896 xdg_update_icon_resource
897 fdo-mime_update_desktop_db
898 }
899
900 postinstall_qt4-pixeltool()
901 {
902 xdg_update_icon_resource
903 fdo-mime_update_desktop_db
904 }
905
906 postremove_qt4-gui()
907 {
908 xdg_update_icon_resource
909 fdo-mime_update_desktop_db
910 }
911
912 postremove_qt4-designer()
913 {
914 xdg_update_icon_resource
915 fdo-mime_update_desktop_db
916 }
917
918 postremove_qt4-linguist()
919 {
920 xdg_update_icon_resource
921 fdo-mime_update_desktop_db
922 }
923
924 postremove_qt4-pixeltool()
925 {
926 xdg_update_icon_resource
927 fdo-mime_update_desktop_db
928 }