| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.103 2011/12/10 17:28:16 pesa Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.106 2011/12/21 22:47:35 pesa Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: qt4-build.eclass |
5 | # @ECLASS: qt4-build.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Qt herd <qt@gentoo.org> |
7 | # Qt herd <qt@gentoo.org> |
| 8 | # @BLURB: Eclass for Qt4 split ebuilds. |
8 | # @BLURB: Eclass for Qt4 split ebuilds. |
| … | |
… | |
| 365 | # freetype2 include dir is non-standard, thus include it on configure |
365 | # freetype2 include dir is non-standard, thus include it on configure |
| 366 | # use -I from configure |
366 | # use -I from configure |
| 367 | myconf+=" $(pkg-config --cflags freetype2)" |
367 | myconf+=" $(pkg-config --cflags freetype2)" |
| 368 | fi |
368 | fi |
| 369 | |
369 | |
| 370 | # Disable SSE4.x, since auto-detection is currently broken |
|
|
| 371 | # Upstream bug http://bugreports.qt.nokia.com/browse/QTBUG-13623 |
|
|
| 372 | [[ ${PV} == "4.7.1" ]] && myconf+=" -no-sse4.1 -no-sse4.2" |
|
|
| 373 | |
|
|
| 374 | echo ./configure ${myconf} |
370 | echo ./configure ${myconf} |
| 375 | ./configure ${myconf} || die "./configure failed" |
371 | ./configure ${myconf} || die "./configure failed" |
| 376 | myconf="" |
372 | myconf="" |
| 377 | |
373 | |
| 378 | prepare_directories ${QT4_TARGET_DIRECTORIES} |
374 | prepare_directories ${QT4_TARGET_DIRECTORIES} |
| … | |
… | |
| 449 | QTPCDIR=${EPREFIX}/usr/$(get_libdir)/pkgconfig |
445 | QTPCDIR=${EPREFIX}/usr/$(get_libdir)/pkgconfig |
| 450 | QTDATADIR=${EPREFIX}/usr/share/qt4 |
446 | QTDATADIR=${EPREFIX}/usr/share/qt4 |
| 451 | QTDOCDIR=${EPREFIX}/usr/share/doc/qt-${PV} |
447 | QTDOCDIR=${EPREFIX}/usr/share/doc/qt-${PV} |
| 452 | QTHEADERDIR=${EPREFIX}/usr/include/qt4 |
448 | QTHEADERDIR=${EPREFIX}/usr/include/qt4 |
| 453 | QTPLUGINDIR=${QTLIBDIR}/plugins |
449 | QTPLUGINDIR=${QTLIBDIR}/plugins |
|
|
450 | QTIMPORTDIR=${QTLIBDIR}/imports |
| 454 | QTSYSCONFDIR=${EPREFIX}/etc/qt4 |
451 | QTSYSCONFDIR=${EPREFIX}/etc/qt4 |
| 455 | QTTRANSDIR=${QTDATADIR}/translations |
452 | QTTRANSDIR=${QTDATADIR}/translations |
| 456 | QTEXAMPLESDIR=${QTDATADIR}/examples |
453 | QTEXAMPLESDIR=${QTDATADIR}/examples |
| 457 | QTDEMOSDIR=${QTDATADIR}/demos |
454 | QTDEMOSDIR=${QTDATADIR}/demos |
| 458 | QT_INSTALL_PREFIX=${EPREFIX}/usr/$(get_libdir)/qt4 |
455 | QT_INSTALL_PREFIX=${EPREFIX}/usr/$(get_libdir)/qt4 |
| … | |
… | |
| 503 | |
500 | |
| 504 | # exceptions USE flag |
501 | # exceptions USE flag |
| 505 | local exceptions="-exceptions" |
502 | local exceptions="-exceptions" |
| 506 | in_iuse exceptions && exceptions="$(qt_use exceptions)" |
503 | in_iuse exceptions && exceptions="$(qt_use exceptions)" |
| 507 | |
504 | |
|
|
505 | # bug 380415 |
|
|
506 | version_is_at_least 4.8 && myconf+=" -no-rpath" |
|
|
507 | |
| 508 | # note about -reduce-relocations: |
508 | # note about -reduce-relocations: |
| 509 | # That flag seems to introduce major breakage to applications, |
509 | # That flag seems to introduce major breakage to applications, |
| 510 | # mostly to be seen as a core dump with the message "QPixmap: Must |
510 | # mostly to be seen as a core dump with the message "QPixmap: Must |
| 511 | # construct a QApplication before a QPaintDevice" on Solaris |
511 | # construct a QApplication before a QPaintDevice" on Solaris |
| 512 | # -- Daniel Vergien |
512 | # -- Daniel Vergien |
| … | |
… | |
| 515 | myconf+=" -platform $(qt_mkspecs_dir) -stl -verbose -largefile -confirm-license |
515 | myconf+=" -platform $(qt_mkspecs_dir) -stl -verbose -largefile -confirm-license |
| 516 | -prefix ${QTPREFIXDIR} -bindir ${QTBINDIR} -libdir ${QTLIBDIR} |
516 | -prefix ${QTPREFIXDIR} -bindir ${QTBINDIR} -libdir ${QTLIBDIR} |
| 517 | -datadir ${QTDATADIR} -docdir ${QTDOCDIR} -headerdir ${QTHEADERDIR} |
517 | -datadir ${QTDATADIR} -docdir ${QTDOCDIR} -headerdir ${QTHEADERDIR} |
| 518 | -plugindir ${QTPLUGINDIR} -sysconfdir ${QTSYSCONFDIR} |
518 | -plugindir ${QTPLUGINDIR} -sysconfdir ${QTSYSCONFDIR} |
| 519 | -translationdir ${QTTRANSDIR} -examplesdir ${QTEXAMPLESDIR} |
519 | -translationdir ${QTTRANSDIR} -examplesdir ${QTEXAMPLESDIR} |
| 520 | -demosdir ${QTDEMOSDIR} -silent -fast -opensource |
520 | -demosdir ${QTDEMOSDIR} -importdir ${QTIMPORTDIR} -silent -fast -opensource |
| 521 | ${exceptions} |
521 | ${exceptions} |
| 522 | -nomake examples -nomake demos" |
522 | -nomake examples -nomake demos" |
| 523 | |
523 | |
| 524 | echo "${myconf}" |
524 | echo "${myconf}" |
| 525 | } |
525 | } |
| … | |
… | |
| 534 | einfo "Running qmake in: ${x}" |
534 | einfo "Running qmake in: ${x}" |
| 535 | # avoid running over the maximum argument number, bug #299810 |
535 | # avoid running over the maximum argument number, bug #299810 |
| 536 | { |
536 | { |
| 537 | echo "${S}"/mkspecs/common/*.conf |
537 | echo "${S}"/mkspecs/common/*.conf |
| 538 | find "${S}" -name '*.pr[io]' |
538 | find "${S}" -name '*.pr[io]' |
| 539 | } | xargs sed -i -e "s:\$\$\[QT_INSTALL_LIBS\]:${EPREFIX}/usr/$(get_libdir)/qt4:g" || die |
539 | } | xargs sed -i \ |
|
|
540 | -e "s:\$\$\[QT_INSTALL_LIBS\]:${QTLIBDIR}:g" \ |
|
|
541 | -e "s:\$\$\[QT_INSTALL_PLUGINS\]:${QTPLUGINDIR}:g" \ |
|
|
542 | || die |
| 540 | "${S}"/bin/qmake "LIBS+=-L${QTLIBDIR}" "CONFIG+=nostrip" || die "qmake failed" |
543 | "${S}"/bin/qmake "LIBS+=-L${QTLIBDIR}" "CONFIG+=nostrip" || die "qmake failed" |
| 541 | popd >/dev/null |
544 | popd >/dev/null |
| 542 | done |
545 | done |
| 543 | } |
546 | } |
| 544 | |
547 | |