/[gentoo-x86]/eclass/qt4-build.eclass
Gentoo

Diff of /eclass/qt4-build.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.106 Revision 1.108
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.106 2011/12/21 22:47:35 pesa Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.108 2011/12/25 18:49:52 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.
176# source files in order to respect CFLAGS/CXXFLAGS/LDFLAGS specified on /etc/make.conf. 176# source files in order to respect CFLAGS/CXXFLAGS/LDFLAGS specified on /etc/make.conf.
177qt4-build_src_prepare() { 177qt4-build_src_prepare() {
178 setqtenv 178 setqtenv
179 cd "${S}" 179 cd "${S}"
180 180
181 # fix qt 4.7 regression that skips -fvisibility=hidden
182 if version_is_at_least "4.7.0_beta1"; then
183 sed -e "s/^gcc|g++)/*gcc|*g++)/" \
184 -i config.tests/unix/fvisibility.test ||
185 die "visibility fixing sed failed"
186 fi
187
188 if version_is_at_least "4.7"; then 181 if version_is_at_least "4.7"; then
189 # fix libX11 dependency on non X packages 182 # fix libX11 dependency on non X packages
190 local nolibx11_pkgs="qt-core qt-dbus qt-script qt-sql qt-test qt-xmlpatterns" 183 local nolibx11_pkgs="qt-core qt-dbus qt-script qt-sql qt-test qt-xmlpatterns"
191 has ${PN} ${nolibx11_pkgs} && qt_nolibx11 184 has ${PN} ${nolibx11_pkgs} && qt_nolibx11
192 185
461# @FUNCTION: standard_configure_options 454# @FUNCTION: standard_configure_options
462# @DESCRIPTION: 455# @DESCRIPTION:
463# Sets up some standard configure options, like libdir (if necessary), whether 456# Sets up some standard configure options, like libdir (if necessary), whether
464# debug info is wanted or not. 457# debug info is wanted or not.
465standard_configure_options() { 458standard_configure_options() {
466 local myconf= 459 local myconf="-prefix ${QTPREFIXDIR} -bindir ${QTBINDIR} -libdir ${QTLIBDIR}
460 -docdir ${QTDOCDIR} -headerdir ${QTHEADERDIR} -plugindir ${QTPLUGINDIR}
461 -importdir ${QTIMPORTDIR} -datadir ${QTDATADIR} -translationdir ${QTTRANSDIR}
462 -sysconfdir ${QTSYSCONFDIR} -examplesdir ${QTEXAMPLESDIR} -demosdir ${QTDEMOSDIR}
463 -opensource -confirm-license -shared -fast -largefile -stl -verbose
464 -platform $(qt_mkspecs_dir) -nomake examples -nomake demos"
467 465
468 [[ $(get_libdir) != lib ]] && myconf+=" -L${EPREFIX}/usr/$(get_libdir)" 466 [[ $(get_libdir) != lib ]] && myconf+=" -L${EPREFIX}/usr/$(get_libdir)"
469 467
470 # Disable visibility explicitly if gcc version isn't 4 468 # debug/release
471 if [[ $(gcc-major-version) -lt 4 ]]; then
472 myconf+=" -no-reduce-exports"
473 fi
474
475 # precompiled headers doesn't work on hardened, where the flag is masked.
476 myconf+=" $(qt_use pch)"
477
478 if use debug; then 469 if use debug; then
479 myconf+=" -debug" 470 myconf+=" -debug"
480 else 471 else
481 myconf+=" -release" 472 myconf+=" -release"
482 fi 473 fi
483 myconf+=" -no-separate-debug-info" 474 myconf+=" -no-separate-debug-info"
475
476 # exceptions USE flag
477 local exceptions="-exceptions"
478 in_iuse exceptions && exceptions="$(qt_use exceptions)"
479 myconf+=" ${exceptions}"
480
481 # disable RPATH on Qt >= 4.8 (bug 380415)
482 version_is_at_least 4.8 && myconf+=" -no-rpath"
483
484 # precompiled headers don't work on hardened, where the flag is masked
485 myconf+=" $(qt_use pch)"
486
487 # -reduce-relocations
488 # This flag seems to introduce major breakage to applications,
489 # mostly to be seen as a core dump with the message "QPixmap: Must
490 # construct a QApplication before a QPaintDevice" on Solaris.
491 # -- Daniel Vergien
492 [[ ${CHOST} != *-solaris* ]] && myconf+=" -reduce-relocations"
484 493
485 use aqua && myconf+=" -no-framework" 494 use aqua && myconf+=" -no-framework"
486 495
487 # ARCH is set on Gentoo. Qt now falls back to generic on an unsupported 496 # ARCH is set on Gentoo. Qt now falls back to generic on an unsupported
488 # $(tc-arch). Therefore we convert it to supported values. 497 # $(tc-arch). Therefore we convert it to supported values.
495 x86|x86-*) myconf+=" -arch i386" ;; 504 x86|x86-*) myconf+=" -arch i386" ;;
496 alpha|arm|ia64|mips|s390) myconf+=" -arch $(tc-arch)" ;; 505 alpha|arm|ia64|mips|s390) myconf+=" -arch $(tc-arch)" ;;
497 hppa|sh) myconf+=" -arch generic" ;; 506 hppa|sh) myconf+=" -arch generic" ;;
498 *) die "$(tc-arch) is unsupported by this eclass. Please file a bug." ;; 507 *) die "$(tc-arch) is unsupported by this eclass. Please file a bug." ;;
499 esac 508 esac
500
501 # exceptions USE flag
502 local exceptions="-exceptions"
503 in_iuse exceptions && exceptions="$(qt_use exceptions)"
504
505 # bug 380415
506 version_is_at_least 4.8 && myconf+=" -no-rpath"
507
508 # note about -reduce-relocations:
509 # That flag seems to introduce major breakage to applications,
510 # mostly to be seen as a core dump with the message "QPixmap: Must
511 # construct a QApplication before a QPaintDevice" on Solaris
512 # -- Daniel Vergien
513 [[ ${CHOST} != *-solaris* ]] && myconf+=" -reduce-relocations"
514
515 myconf+=" -platform $(qt_mkspecs_dir) -stl -verbose -largefile -confirm-license
516 -prefix ${QTPREFIXDIR} -bindir ${QTBINDIR} -libdir ${QTLIBDIR}
517 -datadir ${QTDATADIR} -docdir ${QTDOCDIR} -headerdir ${QTHEADERDIR}
518 -plugindir ${QTPLUGINDIR} -sysconfdir ${QTSYSCONFDIR}
519 -translationdir ${QTTRANSDIR} -examplesdir ${QTEXAMPLESDIR}
520 -demosdir ${QTDEMOSDIR} -importdir ${QTIMPORTDIR} -silent -fast -opensource
521 ${exceptions}
522 -nomake examples -nomake demos"
523 509
524 echo "${myconf}" 510 echo "${myconf}"
525} 511}
526 512
527# @FUNCTION: prepare_directories 513# @FUNCTION: prepare_directories

Legend:
Removed from v.1.106  
changed lines
  Added in v.1.108

  ViewVC Help
Powered by ViewVC 1.1.20