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