Contents of /trunk/extras/qt4/qt4-4.8.7-r6.smage2
Parent Directory | Revision Log
Revision 31396 -
(show annotations)
(download)
Fri Jun 29 10:25:50 2018 UTC (5 years, 11 months ago) by niro
File size: 22427 byte(s)
Fri Jun 29 10:25:50 2018 UTC (5 years, 11 months ago) by niro
File size: 22427 byte(s)
-icu-62.1 rebuild
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.8" |
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 | mpatch qt-4.8.7-openssl-1.1.patch || die |
447 | |
448 | if [[ ${QT4_PHONON} = yes ]] |
449 | then |
450 | # install service files needed by kde |
451 | mpatch qt-4.5.3-phonon-2.patch || die |
452 | # fix variable kdelocation from the patch |
453 | sed -i "s:@@KDEDIR@@:${KDEDIR}:g" ${SRCDIR}/src/plugins/phonon/gstreamer/gstreamer.pro || die |
454 | fi |
455 | |
456 | if [[ ${KDE_QT_PATCHES} = yes ]] |
457 | then |
458 | # kdeqt patches from http://gitorious.org/+kde-developers/qt/kde-qt |
459 | mpatch qt-${PVER}-kde-qt-${KDE_QT_SNAPSHOT_ID}.patch || die |
460 | fi |
461 | |
462 | # set our cflags and fix up our header and lib locations |
463 | cd ${SRCDIR}/mkspecs/${PLATFORM} |
464 | sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \ |
465 | -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \ |
466 | -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \ |
467 | -e 's:$(QTDIR)/include:&/qt${PVER%%.*}:' \ |
468 | -e "s:\$(QTDIR)/lib:\$(QTDIR)/$(mlibdir):" \ |
469 | qmake.conf \ |
470 | || die |
471 | |
472 | # fix libdir to lib64 on 64bit arches |
473 | sed -i "s:/lib$:/$(mlibdir):" qmake.conf || die |
474 | |
475 | # disable rpath |
476 | sed -i "s:QMAKE_RPATH.*=.*:QMAKE_RPATH=:" qmake.conf || die |
477 | |
478 | # get rid of /usr/X11R6 |
479 | sed -i "s:X11R6/::" qmake.conf || die |
480 | |
481 | # same goes for the g++ definitions |
482 | # they where moved to an extra file with qt4 |
483 | cd ${SRCDIR}/mkspecs/common |
484 | sed -i -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CPPFLAGS} ${CFLAGS} ${ASFLAGS}:" \ |
485 | -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CPPFLAGS} ${CXXFLAGS} ${ASFLAGS}:" \ |
486 | -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \ |
487 | -e 's:$(QTDIR)/include:&/qt${PVER%%.*}:' \ |
488 | -e "s:\$(QTDIR)/lib:\$(QTDIR)/$(mlibdir):" \ |
489 | g++.conf \ |
490 | || die |
491 | |
492 | # fix libdir to lib64 on 64bit arches |
493 | sed -i "s:/lib$:/$(mlibdir):" g++.conf || die |
494 | |
495 | # disable rpath |
496 | sed -i "s:QMAKE_RPATH.*=.*:QMAKE_RPATH=:" g++.conf || die |
497 | |
498 | # get rid of /usr/X11R6 |
499 | sed -i "s:X11R6/::" linux.conf || die |
500 | } |
501 | |
502 | src_compile() |
503 | { |
504 | cd ${SRCDIR} |
505 | local myconf |
506 | |
507 | # add missing lib64 search path on 64bit arches |
508 | [[ $(mlibdir) != lib ]] && myconf="-L/usr/$(mlibdir)" |
509 | |
510 | # enable this only for binutils >=2.18 |
511 | [[ $(ld -v | sed 's/.*\ \([0-9].[0-9].*\)/\1/') > 2.17 ]] && myconf+=" -reduce-relocations" |
512 | |
513 | # enable static if requested |
514 | mqueryfeature "static" && myconf+=" -static" |
515 | # always build shared libs |
516 | myconf+=" -shared" |
517 | |
518 | # disable openvg atm |
519 | myconf+=" -no-openvg" |
520 | |
521 | if [[ ${QT4_PHONON} = yes ]] |
522 | then |
523 | myconf+=" -phonon" |
524 | myconf+=" -phonon-backend" |
525 | else |
526 | myconf+=" -no-phonon" |
527 | myconf+=" -no-phonon-backend" |
528 | fi |
529 | |
530 | ./configure \ |
531 | -prefix ${QT_PREFIX} \ |
532 | -sysconfdir ${QT_SYSCONFDIR} \ |
533 | -datadir ${QT_PREFIX}/share/qt${PVER%%.*} \ |
534 | -docdir ${QT_PREFIX}/share/doc/qt${PVER%%.*}-${PVER} \ |
535 | -headerdir ${QT_PREFIX}/include/qt${PVER%%.*} \ |
536 | -plugindir ${QT_PREFIX}/$(mlibdir)/qt${PVER%%.*}/plugins \ |
537 | -importdir ${QT_PREFIX}/$(mlibdir)/qt${PVER%%.*}/imports \ |
538 | -libdir ${QT_PREFIX}/$(mlibdir) \ |
539 | -datadir ${QT_PREFIX}/share/qt${PVER%%.*} \ |
540 | -translationdir ${QT_PREFIX}/share/qt${PVER%%.*}/translations \ |
541 | -confirm-license \ |
542 | -opensource \ |
543 | -platform ${PLATFORM} \ |
544 | -xplatform ${PLATFORM} \ |
545 | -verbose \ |
546 | -silent \ |
547 | -fast \ |
548 | -release \ |
549 | -no-separate-debug-info \ |
550 | -optimized-qmake \ |
551 | -system-libjpeg \ |
552 | -system-libmng \ |
553 | -system-libpng \ |
554 | -system-libtiff \ |
555 | -system-zlib \ |
556 | -system-nas-sound \ |
557 | -system-sqlite \ |
558 | -nomake examples \ |
559 | -nomake demos \ |
560 | -nomake docs \ |
561 | -no-rpath \ |
562 | -no-pch \ |
563 | -qt3support \ |
564 | -stl \ |
565 | -lpthread \ |
566 | -largefile \ |
567 | -sm \ |
568 | -xrender \ |
569 | -opengl \ |
570 | -cups \ |
571 | -dbus-linked \ |
572 | -openssl \ |
573 | -webkit \ |
574 | -svg \ |
575 | -icu \ |
576 | -xmlpatterns \ |
577 | -declarative \ |
578 | -plugin-sql-sqlite \ |
579 | -plugin-sql-mysql \ |
580 | -plugin-sql-odbc \ |
581 | -I/usr/include/mysql \ |
582 | -L/usr/$(mlibdir)/mysql \ |
583 | -graphicssystem raster \ |
584 | ${myconf} \ |
585 | || die |
586 | |
587 | mmake all || die |
588 | } |
589 | |
590 | src_install_qt4-core() |
591 | { |
592 | cd ${SRCDIR} |
593 | |
594 | install_qt_target \ |
595 | src/tools/bootstrap \ |
596 | src/tools/moc \ |
597 | src/tools/rcc \ |
598 | src/tools/uic \ |
599 | src/corelib \ |
600 | src/xml \ |
601 | src/network \ |
602 | src/plugins/codecs \ |
603 | tools/linguist/lrelease \ |
604 | tools/linguist/lupdate \ |
605 | tools/linguist/lconvert |
606 | |
607 | # install missing qmake |
608 | mmake INSTALL_ROOT=${BINDIR} install_qmake || die |
609 | mlink qmake ${QT_PREFIX}/bin/qmake${PVER%%.*} || die |
610 | |
611 | # install missing findtr |
612 | minstallexec ${SRCDIR}/bin/findtr ${QT_PREFIX}/bin || die |
613 | |
614 | # install all spec files |
615 | mmake INSTALL_ROOT=${BINDIR} install_mkspecs || die |
616 | |
617 | # remove unneeded specs |
618 | echo "removing unneeded specs ..." |
619 | install -d ${BUILDDIR}/keep |
620 | mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/default ${BUILDDIR}/keep || die |
621 | mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/common ${BUILDDIR}/keep || die |
622 | mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/features ${BUILDDIR}/keep || die |
623 | mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/qws ${BUILDDIR}/keep || die |
624 | mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/${PLATFORM} ${BUILDDIR}/keep || die |
625 | if [[ ${ARCH} = x86_64 ]] |
626 | then |
627 | mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/linux-g++ ${BUILDDIR}/keep || die |
628 | fi |
629 | mv ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/qconfig.pri ${BUILDDIR}/keep || die |
630 | rm -rf ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs/* || die |
631 | mv ${BUILDDIR}/keep/* ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/mkspecs || die |
632 | |
633 | # fix qmake cache file |
634 | minstalldir ${QT_PREFIX}/share/qt${PVER%%.*} || die |
635 | sed "s:${SRCDIR}:${QT_PREFIX}:g" ${SRCDIR}/.qmake.cache > ${BINDIR}/${QT_PREFIX}/share/qt${PVER%%.*}/.qmake.cache || die |
636 | |
637 | # # some needed symlinks |
638 | # mlink libqt-mt.so ${QT_PREFIX}/$(mlibdir)/libqt.so || die |
639 | |
640 | # generate translations and install them |
641 | # use freshly built libraries |
642 | LD_LIBRARY_PATH=${SRCDIR}/lib ${SRCDIR}/bin/lrelease translations/*.ts || die |
643 | minstalldir ${QT_PREFIX}/share/qt${PVER%%.*}/translations || die |
644 | minstallfile translations/\*.qm ${QT_PREFIX}/share/qt${PVER%%.*}/translations || die |
645 | |
646 | # keep the qt4 sysdir |
647 | mkeepdir ${QT_SYSCONFDIR} || die |
648 | |
649 | # environ vars |
650 | minstalldir /etc/env.d || die |
651 | MCONFIG=${QT_ENVFILE} |
652 | mclearconfig || die |
653 | maddconfig "QMAKESPEC=\"${PLATFORM}\"" || die |
654 | maddconfig "QTDIR=\"${QT_PREFIX}\"" || die |
655 | |
656 | if [[ ${QT_PREFIX} != /usr ]] |
657 | then |
658 | # overwrite the env file here, there may be one in usr |
659 | # and we want this as system-wide default |
660 | mclearconfig || die |
661 | maddconfig "PATH=\"${QT_PREFIX}/bin\"" || die |
662 | maddconfig "ROOTPATH=\"${QT_PREFIX}/bin\"" || die |
663 | maddconfig "LDPATH=\"${QT_PREFIX}/$(mlibdir)\"" || die |
664 | maddconfig "MANPATH=\"${QT_PREFIX}/share/man\"" || die |
665 | maddconfig "PKG_CONFIG_PATH=\"${QT_PREFIX}/$(mlibdir)/pkgconfig\"" || die |
666 | fi |
667 | |
668 | minstalldocs GPL* changes-${PVER} LICENSE* OPENSOURCE* README* || die |
669 | } |
670 | |
671 | src_install_qt4-gui() |
672 | { |
673 | cd ${SRCDIR} |
674 | |
675 | install_qt_target \ |
676 | src/gui \ |
677 | src/scripttools \ |
678 | src/plugins/imageformats/gif \ |
679 | src/plugins/imageformats/ico \ |
680 | src/plugins/imageformats/jpeg \ |
681 | src/plugins/imageformats/mng \ |
682 | src/plugins/imageformats/tiff \ |
683 | src/plugins/imageformats/tga \ |
684 | src/plugins/inputmethods \ |
685 | src/plugins/accessible/widgets \ |
686 | src/plugins/graphicssystems/trace \ |
687 | tools/qttracereplay \ |
688 | tools/qtconfig |
689 | |
690 | # desktop icon |
691 | minstallpixmap tools/qtconfig/images/appicon.png qtconfig.png || die |
692 | minstall_desktop_icon \ |
693 | --name "QT4 Config" \ |
694 | --file "qt4-qtconfig" \ |
695 | --comment "Configure Qt4 behavior, styles, fonts" \ |
696 | --exec qtconfig \ |
697 | --icon qtconfig \ |
698 | --categories "Qt,Settings,DesktopSettings" \ |
699 | || die |
700 | } |
701 | |
702 | src_install_qt4-svg() |
703 | { |
704 | cd ${SRCDIR} |
705 | |
706 | install_qt_target \ |
707 | src/svg \ |
708 | src/plugins/imageformats/svg \ |
709 | src/plugins/iconengines/svgiconengine |
710 | } |
711 | |
712 | src_install_qt4-sql() |
713 | { |
714 | cd ${SRCDIR} |
715 | |
716 | install_qt_target src/sql src/plugins/sqldrivers |
717 | } |
718 | |
719 | src_install_qt4-script() |
720 | { |
721 | cd ${SRCDIR} |
722 | |
723 | install_qt_target src/script |
724 | } |
725 | |
726 | src_install_qt4-xmlpatterns() |
727 | { |
728 | cd ${SRCDIR} |
729 | |
730 | install_qt_target \ |
731 | src/xmlpatterns \ |
732 | tools/xmlpatterns \ |
733 | tools/xmlpatternsvalidator |
734 | } |
735 | |
736 | src_install_qt4-dbus() |
737 | { |
738 | cd ${SRCDIR} |
739 | |
740 | install_qt_target \ |
741 | src/dbus \ |
742 | tools/qdbus/qdbus \ |
743 | tools/qdbus/qdbusxml2cpp \ |
744 | tools/qdbus/qdbuscpp2xml |
745 | } |
746 | |
747 | src_install_qt4-opengl() |
748 | { |
749 | cd ${SRCDIR} |
750 | |
751 | install_qt_target src/opengl src/plugins/graphicssystems/opengl |
752 | } |
753 | |
754 | if [[ ${QT4_PHONON} = yes ]] |
755 | then |
756 | src_install_qt4-phonon() |
757 | { |
758 | cd ${SRCDIR} |
759 | |
760 | install_qt_target \ |
761 | src/phonon \ |
762 | src/plugins/phonon |
763 | |
764 | # needed symlink; kde-4.4 includes from Phonon/* |
765 | if [[ ! -e ${BINDIR}/${QT_PREFIX}/include/qt/Phonon ]] |
766 | then |
767 | mlink phonon ${QT_PREFIX}/include/qt/Phonon || die |
768 | fi |
769 | } |
770 | fi |
771 | |
772 | src_install_qt4-qt3support() |
773 | { |
774 | cd ${SRCDIR} |
775 | |
776 | install_qt_target \ |
777 | src/qt3support \ |
778 | src/tools/uic3 \ |
779 | tools/porting |
780 | } |
781 | |
782 | src_install_qt4-webkit() |
783 | { |
784 | cd ${SRCDIR} |
785 | |
786 | install_qt_target \ |
787 | src/3rdparty/webkit/Source/JavaScriptCore \ |
788 | src/3rdparty/webkit/Source/WebCore \ |
789 | src/3rdparty/webkit/Source/WebKit/qt |
790 | } |
791 | |
792 | src_install_qt4-test() |
793 | { |
794 | cd ${SRCDIR} |
795 | |
796 | install_qt_target src/testlib |
797 | } |
798 | |
799 | src_install_qt4-multimedia() |
800 | { |
801 | cd ${SRCDIR} |
802 | |
803 | install_qt_target src/multimedia |
804 | } |
805 | |
806 | src_install_qt4-help() |
807 | { |
808 | cd ${SRCDIR} |
809 | |
810 | install_qt_target \ |
811 | tools/assistant/lib/fulltextsearch \ |
812 | tools/assistant/lib \ |
813 | tools/assistant/tools/qhelpgenerator \ |
814 | tools/assistant/tools/qcollectiongenerator \ |
815 | tools/assistant/tools/qhelpconverter \ |
816 | tools/qdoc3 |
817 | } |
818 | |
819 | src_install_qt4-assistant() |
820 | { |
821 | cd ${SRCDIR} |
822 | |
823 | install_qt_target tools/assistant/tools/assistant |
824 | |
825 | # desktop icon |
826 | minstallpixmap tools/assistant/tools/assistant/images/assistant.png || die |
827 | minstall_desktop_icon \ |
828 | --name "QT4 Assistant" \ |
829 | --file "qt4-assistant" \ |
830 | --comment "Shows Qt4 documentation and examples" \ |
831 | --exec assistant \ |
832 | --icon assistant \ |
833 | --categories "Qt,Development,Documentation" \ |
834 | || die |
835 | } |
836 | |
837 | src_install_qt4-declarative() |
838 | { |
839 | cd ${SRCDIR} |
840 | |
841 | install_qt_target \ |
842 | src/declarative \ |
843 | src/imports \ |
844 | src/plugins/qmltooling \ |
845 | tools/qml \ |
846 | tools/qmlplugindump \ |
847 | src/3rdparty/webkit/Source/WebKit/qt/declarative |
848 | } |
849 | |
850 | src_install_qt4-designer() |
851 | { |
852 | cd ${SRCDIR} |
853 | |
854 | install_qt_target tools/designer |
855 | |
856 | # desktop icon |
857 | minstallpixmap tools/designer/src/designer/images/designer.png || die |
858 | minstall_desktop_icon \ |
859 | --name "QT4 Designer" \ |
860 | --file "qt4-designer" \ |
861 | --comment "Design GUIs for Qt4 applications" \ |
862 | --exec designer \ |
863 | --icon designer \ |
864 | --categories "Qt,Development,GUIDesigner" \ |
865 | || die |
866 | } |
867 | |
868 | src_install_qt4-linguist() |
869 | { |
870 | cd ${SRCDIR} |
871 | |
872 | install_qt_target tools/linguist/linguist |
873 | |
874 | # desktop icon |
875 | minstallpixmap tools/linguist/linguist/images/icons/linguist-128-32.png linguist.png || die |
876 | minstall_desktop_icon \ |
877 | --name "QT4 Linguist" \ |
878 | --file "qt4-linguist" \ |
879 | --comment "Add translations to Qt4 applications" \ |
880 | --exec linguist \ |
881 | --icon linguist \ |
882 | --categories "Qt,Development,Translation" \ |
883 | || die |
884 | } |
885 | |
886 | src_install_qt4-pixeltool() |
887 | { |
888 | cd ${SRCDIR} |
889 | |
890 | install_qt_target tools/pixeltool |
891 | } |
892 | |
893 | src_install_qt4-qdbusviewer() |
894 | { |
895 | cd ${SRCDIR} |
896 | |
897 | install_qt_target tools/qdbus/qdbusviewer |
898 | |
899 | # desktop icon |
900 | minstallpixmap tools/qdbus/qdbusviewer/images/qdbusviewer-128.png qdbusviewer.png || die |
901 | minstall_desktop_icon \ |
902 | --name "QT4 QDbusViewer" \ |
903 | --file "qt4-qdbusviewer" \ |
904 | --comment "Debug D-Bus applications" \ |
905 | --exec qdbusviewer \ |
906 | --icon qdbusviewer \ |
907 | --categories "Qt,Development,Debugger" \ |
908 | || die |
909 | } |
910 | |
911 | src_install_qt4-bearer() |
912 | { |
913 | cd ${SRCDIR} |
914 | |
915 | install_qt_target \ |
916 | src/plugins/bearer/generic \ |
917 | src/plugins/bearer/networkmanager |
918 | } |
919 | |
920 | postinstall_qt4-gui() |
921 | { |
922 | xdg_update_icon_resource |
923 | fdo-mime_update_desktop_db |
924 | } |
925 | |
926 | postinstall_qt4-designer() |
927 | { |
928 | xdg_update_icon_resource |
929 | fdo-mime_update_desktop_db |
930 | } |
931 | |
932 | postinstall_qt4-linguist() |
933 | { |
934 | xdg_update_icon_resource |
935 | fdo-mime_update_desktop_db |
936 | } |
937 | |
938 | postinstall_qt4-pixeltool() |
939 | { |
940 | xdg_update_icon_resource |
941 | fdo-mime_update_desktop_db |
942 | } |
943 | |
944 | postremove_qt4-gui() |
945 | { |
946 | xdg_update_icon_resource |
947 | fdo-mime_update_desktop_db |
948 | } |
949 | |
950 | postremove_qt4-designer() |
951 | { |
952 | xdg_update_icon_resource |
953 | fdo-mime_update_desktop_db |
954 | } |
955 | |
956 | postremove_qt4-linguist() |
957 | { |
958 | xdg_update_icon_resource |
959 | fdo-mime_update_desktop_db |
960 | } |
961 | |
962 | postremove_qt4-pixeltool() |
963 | { |
964 | xdg_update_icon_resource |
965 | fdo-mime_update_desktop_db |
966 | } |