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