Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 23283 - (hide annotations) (download)
Fri Nov 7 08:11:28 2014 UTC (9 years, 6 months ago) by niro
Original Path: trunk/extras/qt4/qt4-4.8.6-r2.smage2
File size: 20570 byte(s)
-fully reworked package, split tools from libs and fixed missing icu dep and removed duplicate plugin files from split_packages and added missing desktop files for some tools
1 niro 23283 # $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
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     -libdir ${QT_PREFIX}/$(mlibdir) \
500     -datadir ${QT_PREFIX}/share/qt${PVER%%.*} \
501     -translationdir ${QT_PREFIX}/share/qt/translations \
502     -confirm-license \
503     -opensource \
504     -platform ${PLATFORM} \
505     -xplatform ${PLATFORM} \
506     -verbose \
507     -silent \
508     -fast \
509     -release \
510     -no-separate-debug-info \
511     -optimized-qmake \
512     -system-libjpeg \
513     -system-libmng \
514     -system-libpng \
515     -system-libtiff \
516     -system-zlib \
517     -system-nas-sound \
518     -system-sqlite \
519     -nomake examples \
520     -nomake demos \
521     -nomake docs \
522     -no-rpath \
523     -no-pch \
524     -qt3support \
525     -stl \
526     -lpthread \
527     -largefile \
528     -sm \
529     -xrender \
530     -opengl \
531     -cups \
532     -dbus-linked \
533     -openssl \
534     -webkit \
535     -svg \
536     -icu \
537     -xmlpatterns \
538     -declarative \
539     -plugin-sql-sqlite \
540     -plugin-sql-mysql \
541     -plugin-sql-odbc \
542     -I/usr/include/mysql \
543     -L/usr/$(mlibdir)/mysql \
544     -graphicssystem raster \
545     ${myconf} \
546     || die
547    
548     mmake all || die
549     }
550    
551     src_install_qt4-core()
552     {
553     cd ${SRCDIR}
554    
555     install_qt_target \
556     src/tools/bootstrap \
557     src/tools/moc \
558     src/tools/rcc \
559     src/tools/uic \
560     src/corelib \
561     src/xml \
562     src/network \
563     src/plugins/codecs \
564     tools/linguist/lrelease \
565     tools/linguist/lupdate \
566     tools/linguist/lconvert
567    
568     # install missing qmake
569     mmake INSTALL_ROOT=${BINDIR} install_qmake || die
570     mlink qmake ${QT_PREFIX}/bin/qmake${PVER%%.*} || die
571    
572     # install missing findtr
573     minstallexec ${SRCDIR}/bin/findtr ${QT_PREFIX}/bin || die
574    
575     # install all spec files
576     mmake INSTALL_ROOT=${BINDIR} install_mkspecs || die
577    
578     # remove unneeded specs
579     echo "removing unneeded specs ..."
580     install -d ${BUILDDIR}/keep
581     mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/default ${BUILDDIR}/keep || die
582     mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/common ${BUILDDIR}/keep || die
583     mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/features ${BUILDDIR}/keep || die
584     mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/qws ${BUILDDIR}/keep || die
585     mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/${PLATFORM} ${BUILDDIR}/keep || die
586     if [[ ${ARCH} = x86_64 ]]
587     then
588     mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/linux-g++ ${BUILDDIR}/keep || die
589     fi
590     mv ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/qconfig.pri ${BUILDDIR}/keep || die
591     rm -rf ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs/* || die
592     mv ${BUILDDIR}/keep/* ${BINDIR}/${QT_PREFIX}/share/qt/mkspecs || die
593    
594     # fix qmake cache file
595     minstalldir ${QT_PREFIX}/share/qt${PVER%%.*} || die
596     sed "s:${SRCDIR}:${QT_PREFIX}:g" ${SRCDIR}/.qmake.cache > ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/.qmake.cache || die
597    
598     # # some needed symlinks
599     # mlink libqt-mt.so ${QT_PREFIX}/$(mlibdir)/libqt.so || die
600    
601     # generate translations and install them
602     # use freshly built libraries
603     LD_LIBRARY_PATH=${SRCDIR}/lib ${SRCDIR}/bin/lrelease translations/*.ts || die
604     minstalldir ${QT_PREFIX}/share/qt${PVER%%.*}/translations || die
605     minstallfile translations/\*.qm ${QT_PREFIX}/share/qt/translations || die
606    
607     # keep the qt4 sysdir
608     mkeepdir ${QT_SYSCONFDIR} || die
609    
610     # environ vars
611     minstalldir /etc/env.d || die
612     MCONFIG=${QT_ENVFILE}
613     mclearconfig || die
614     maddconfig "QMAKESPEC=\"${PLATFORM}\"" || die
615     maddconfig "QTDIR=\"${QT_PREFIX}\"" || die
616    
617     if [[ ${QT_PREFIX} != /usr ]]
618     then
619     # overwrite the env file here, there may be one in usr
620     # and we want this as system-wide default
621     mclearconfig || die
622     maddconfig "PATH=\"${QT_PREFIX}/bin\"" || die
623     maddconfig "ROOTPATH=\"${QT_PREFIX}/bin\"" || die
624     maddconfig "LDPATH=\"${QT_PREFIX}/$(mlibdir)\"" || die
625     maddconfig "MANPATH=\"${QT_PREFIX}/share/man\"" || die
626     maddconfig "PKG_CONFIG_PATH=\"${QT_PREFIX}/$(mlibdir)/pkgconfig\"" || die
627     fi
628    
629     minstalldocs GPL* changes-${PVER} LICENSE* OPENSOURCE* README* || die
630     }
631    
632     src_install_qt4-gui()
633     {
634     cd ${SRCDIR}
635    
636     install_qt_target \
637     src/gui \
638     src/scripttools \
639     src/plugins/imageformats/gif \
640     src/plugins/imageformats/ico \
641     src/plugins/imageformats/jpeg \
642     src/plugins/imageformats/mng \
643     src/plugins/imageformats/tiff \
644     src/plugins/imageformats/tga \
645     src/plugins/inputmethods \
646     src/plugins/accessible/widgets \
647     src/plugins/graphicssystems/trace \
648     tools/qttracereplay \
649     tools/qtconfig
650    
651     # desktop icon
652     minstallpixmap tools/qtconfig/images/appicon.png qtconfig.png || die
653     minstall_desktop_icon \
654     --name "QT4 Config" \
655     --file "qt4-qtconfig" \
656     --comment "Configure Qt4 behavior, styles, fonts" \
657     --exec qtconfig \
658     --icon qtconfig \
659     --categories "Qt,Settings,DesktopSettings" \
660     || die
661     }
662    
663     src_install_qt4-svg()
664     {
665     cd ${SRCDIR}
666    
667     install_qt_target \
668     src/svg \
669     src/plugins/imageformats/svg \
670     src/plugins/iconengines/svgiconengine
671     }
672    
673     src_install_qt4-sql()
674     {
675     cd ${SRCDIR}
676    
677     install_qt_target src/sql src/plugins/sqldrivers
678     }
679    
680     src_install_qt4-script()
681     {
682     cd ${SRCDIR}
683    
684     install_qt_target src/script
685     }
686    
687     src_install_qt4-xmlpatterns()
688     {
689     cd ${SRCDIR}
690    
691     install_qt_target \
692     src/xmlpatterns \
693     tools/xmlpatterns \
694     tools/xmlpatternsvalidator
695     }
696    
697     src_install_qt4-dbus()
698     {
699     cd ${SRCDIR}
700    
701     install_qt_target \
702     src/dbus \
703     tools/qdbus/qdbus \
704     tools/qdbus/qdbusxml2cpp \
705     tools/qdbus/qdbuscpp2xml
706     }
707    
708     src_install_qt4-opengl()
709     {
710     cd ${SRCDIR}
711    
712     install_qt_target src/opengl src/plugins/graphicssystems/opengl
713     }
714    
715     if [[ ${QT4_PHONON} = yes ]]
716     then
717     src_install_qt4-phonon()
718     {
719     cd ${SRCDIR}
720    
721     install_qt_target \
722     src/phonon \
723     src/plugins/phonon
724    
725     # needed symlink; kde-4.4 includes from Phonon/*
726     if [[ ! -e ${BINDIR}/${QT_PREFIX}/include/qt/Phonon ]]
727     then
728     mlink phonon ${QT_PREFIX}/include/qt/Phonon || die
729     fi
730     }
731     fi
732    
733     src_install_qt4-qt3support()
734     {
735     cd ${SRCDIR}
736    
737     install_qt_target \
738     src/qt3support \
739     src/tools/uic3 \
740     tools/porting
741     }
742    
743     src_install_qt4-webkit()
744     {
745     cd ${SRCDIR}
746    
747     install_qt_target \
748     src/3rdparty/webkit/Source/JavaScriptCore \
749     src/3rdparty/webkit/Source/WebCore \
750     src/3rdparty/webkit/Source/WebKit/qt
751     }
752    
753     src_install_qt4-test()
754     {
755     cd ${SRCDIR}
756    
757     install_qt_target src/testlib
758     }
759    
760     src_install_qt4-multimedia()
761     {
762     cd ${SRCDIR}
763    
764     install_qt_target src/multimedia
765     }
766    
767     src_install_qt4-help()
768     {
769     cd ${SRCDIR}
770    
771     install_qt_target \
772     tools/assistant/lib/fulltextsearch \
773     tools/assistant/lib \
774     tools/assistant/tools/qhelpgenerator \
775     tools/assistant/tools/qcollectiongenerator \
776     tools/assistant/tools/qhelpconverter \
777     tools/qdoc3
778     }
779    
780     src_install_qt4-assistant()
781     {
782     cd ${SRCDIR}
783    
784     install_qt_target tools/assistant/tools/assistant
785    
786     # desktop icon
787     minstallpixmap tools/assistant/tools/assistant/images/assistant.png || die
788     minstall_desktop_icon \
789     --name "QT4 Assistant" \
790     --file "qt4-assistant" \
791     --comment "Shows Qt4 documentation and examples" \
792     --exec assistant \
793     --icon assistant \
794     --categories "Qt,Development,Documentation" \
795     || die
796     }
797    
798     src_install_qt4-declarative()
799     {
800     cd ${SRCDIR}
801    
802     install_qt_target \
803     src/declarative \
804     src/imports \
805     src/plugins/qmltooling \
806     tools/qml \
807     tools/qmlplugindump \
808     src/3rdparty/webkit/Source/WebKit/qt/declarative
809     }
810    
811     src_install_qt4-designer()
812     {
813     cd ${SRCDIR}
814    
815     install_qt_target tools/designer
816    
817     # desktop icon
818     minstallpixmap tools/designer/src/designer/images/designer.png || die
819     minstall_desktop_icon \
820     --name "QT4 Designer" \
821     --file "qt4-designer" \
822     --comment "Design GUIs for Qt4 applications" \
823     --exec designer \
824     --icon designer \
825     --categories "Qt,Development,GUIDesigner" \
826     || die
827     }
828    
829     src_install_qt4-linguist()
830     {
831     cd ${SRCDIR}
832    
833     install_qt_target tools/linguist/linguist
834    
835     # desktop icon
836     minstallpixmap tools/linguist/linguist/images/icons/linguist-128-32.png linguist.png || die
837     minstall_desktop_icon \
838     --name "QT4 Linguist" \
839     --file "qt4-linguist" \
840     --comment "Add translations to Qt4 applications" \
841     --exec linguist \
842     --icon linguist \
843     --categories "Qt,Development,Translation" \
844     || die
845     }
846    
847     src_install_qt4-pixeltool()
848     {
849     cd ${SRCDIR}
850    
851     install_qt_target tools/pixeltool
852     }
853    
854     src_install_qt4-pixeltool()
855     {
856     cd ${SRCDIR}
857    
858     install_qt_target tools/qdbus/qdbusviewer
859    
860     # desktop icon
861     minstallpixmap tools/qdbus/qdbusviewer/images/qdbusviewer-128.png qdbusviewer.png || die
862     minstall_desktop_icon \
863     --name "QT4 QDbusViewer" \
864     --file "qt4-qdbusviewer" \
865     --comment "Debug D-Bus applications" \
866     --exec qdbusviewer \
867     --icon qdbusviewer \
868     --categories "Qt,Development,Debugger" \
869     || die
870     }
871    
872     src_install_qt4-bearer()
873     {
874     cd ${SRCDIR}
875    
876     install_qt_target \
877     src/plugins/bearer/generic \
878     src/plugins/bearer/networkmanager
879     }
880    
881     postinstall_qt4-gui()
882     {
883     fdo-mime_update_desktop_db
884     }
885    
886     postinstall_qt4-designer()
887     {
888     fdo-mime_update_desktop_db
889     }
890    
891     postinstall_qt4-linguist()
892     {
893     fdo-mime_update_desktop_db
894     }
895    
896     postinstall_qt4-pixeltool()
897     {
898     fdo-mime_update_desktop_db
899     }
900    
901     postremove_qt4-gui()
902     {
903     fdo-mime_update_desktop_db
904     }
905    
906     postremove_qt4-designer()
907     {
908     fdo-mime_update_desktop_db
909     }
910    
911     postremove_qt4-linguist()
912     {
913     fdo-mime_update_desktop_db
914     }
915    
916     postremove_qt4-pixeltool()
917     {
918     fdo-mime_update_desktop_db
919     }