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