/[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.143 Revision 1.144
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 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.143 2013/03/02 21:44:33 pesa Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.144 2013/03/03 00:22:56 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.
39 SRC_URI="http://releases.qt-project.org/qt4/source/${MY_P}.tar.gz" 39 SRC_URI="http://releases.qt-project.org/qt4/source/${MY_P}.tar.gz"
40 ;; 40 ;;
41esac 41esac
42 42
43IUSE="aqua debug pch" 43IUSE="aqua debug pch"
44[[ ${CATEGORY}/${PN} != dev-qt/qtwebkit ]] && IUSE+=" c++0x"
44[[ ${CATEGORY}/${PN} != x11-libs/qt-xmlpatterns ]] && IUSE+=" +exceptions" 45[[ ${CATEGORY}/${PN} != dev-qt/qtxmlpatterns ]] && IUSE+=" +exceptions"
45[[ ${CATEGORY}/${PN} != x11-libs/qt-webkit ]] && IUSE+=" c++0x"
46 46
47DEPEND="virtual/pkgconfig" 47DEPEND="virtual/pkgconfig"
48if [[ ${QT4_BUILD_TYPE} == live ]]; then 48if [[ ${QT4_BUILD_TYPE} == live ]]; then
49 DEPEND+=" dev-lang/perl" 49 DEPEND+=" dev-lang/perl"
50fi 50fi
101 101
102 if ! version_is_at_least 4.1 $(gcc-version); then 102 if ! version_is_at_least 4.1 $(gcc-version); then
103 ewarn "Using a GCC version lower than 4.1 is not supported." 103 ewarn "Using a GCC version lower than 4.1 is not supported."
104 fi 104 fi
105 105
106 if [[ ${PN} == qt-webkit ]]; then 106 if [[ ${CATEGORY}/${PN} == dev-qt/qtwebkit ]]; then
107 eshopts_push -s extglob 107 eshopts_push -s extglob
108 if is-flagq '-g?(gdb)?([1-9])'; then 108 if is-flagq '-g?(gdb)?([1-9])'; then
109 echo 109 echo
110 ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)." 110 ewarn "You have enabled debug info (probably have -g or -ggdb in your CFLAGS/CXXFLAGS)."
111 ewarn "You may experience really long compilation times and/or increased memory usage." 111 ewarn "You may experience really long compilation times and/or increased memory usage."
159 if [[ ${QT4_BUILD_TYPE} == live ]]; then 159 if [[ ${QT4_BUILD_TYPE} == live ]]; then
160 QTDIR="." ./bin/syncqt || die "syncqt failed" 160 QTDIR="." ./bin/syncqt || die "syncqt failed"
161 fi 161 fi
162 162
163 # avoid X11 dependency in non-gui packages 163 # avoid X11 dependency in non-gui packages
164 local nolibx11_pkgs="qt-core qt-dbus qt-script qt-sql qt-test qt-xmlpatterns" 164 local nolibx11_pkgs="qtcore qtdbus qtscript qtsql qttest qtxmlpatterns"
165 has ${PN} ${nolibx11_pkgs} && qt_nolibx11 165 has ${PN} ${nolibx11_pkgs} && qt_nolibx11
166 166
167 if use aqua; then 167 if use aqua; then
168 # provide a proper macx-g++-64 168 # provide a proper macx-g++-64
169 use x64-macos && ln -s macx-g++ mkspecs/$(qt_mkspecs_dir) 169 use x64-macos && ln -s macx-g++ mkspecs/$(qt_mkspecs_dir)
171 sed -e '/^CONFIG/s:app_bundle::' \ 171 sed -e '/^CONFIG/s:app_bundle::' \
172 -e '/^CONFIG/s:plugin_no_soname:plugin_with_soname absolute_library_soname:' \ 172 -e '/^CONFIG/s:plugin_no_soname:plugin_with_soname absolute_library_soname:' \
173 -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die 173 -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die
174 fi 174 fi
175 175
176 if [[ ${PN} != qt-core ]]; then 176 if [[ ${CATEGORY}/${PN} != dev-qt/qtcore ]]; then
177 skip_qmake_build 177 skip_qmake_build
178 skip_project_generation 178 skip_project_generation
179 symlink_binaries_to_buildtree 179 symlink_binaries_to_buildtree
180 fi 180 fi
181 181
429# @FUNCTION: qt4-build_src_test 429# @FUNCTION: qt4-build_src_test
430# @DESCRIPTION: 430# @DESCRIPTION:
431# Runs tests only in target directories. 431# Runs tests only in target directories.
432qt4-build_src_test() { 432qt4-build_src_test() {
433 # QtMultimedia does not have any test suite (bug #332299) 433 # QtMultimedia does not have any test suite (bug #332299)
434 [[ ${PN} == qt-multimedia ]] && return 434 [[ ${CATEGORY}/${PN} == dev-qt/qtmultimedia ]] && return
435 435
436 for dir in ${QT4_TARGET_DIRECTORIES}; do 436 for dir in ${QT4_TARGET_DIRECTORIES}; do
437 emake -j1 check -C ${dir} 437 emake -j1 check -C ${dir}
438 done 438 done
439} 439}
621# @FUNCTION: generate_qconfigs 621# @FUNCTION: generate_qconfigs
622# @INTERNAL 622# @INTERNAL
623# @DESCRIPTION: 623# @DESCRIPTION:
624# Generates gentoo-specific qconfig.{h,pri}. 624# Generates gentoo-specific qconfig.{h,pri}.
625generate_qconfigs() { 625generate_qconfigs() {
626 if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} || ${PN} == qt-core ]]; then 626 if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} || ${CATEGORY}/${PN} == dev-qt/qtcore ]]; then
627 local x qconfig_add qconfig_remove qconfig_new 627 local x qconfig_add qconfig_remove qconfig_new
628 for x in "${ROOT}${QTDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do 628 for x in "${ROOT}${QTDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do
629 [[ -f ${x} ]] || continue 629 [[ -f ${x} ]] || continue
630 qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=//p' "${x}")" 630 qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=//p' "${x}")"
631 qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=//p' "${x}")" 631 qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=//p' "${x}")"
632 done 632 done
633 633
634 # these error checks do not use die because dying in pkg_post{inst,rm} 634 # these error checks do not use die because dying in pkg_post{inst,rm}
635 # just makes things worse. 635 # just makes things worse.
636 if [[ -e "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qconfig.pri ]]; then 636 if [[ -e "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qconfig.pri ]]; then
637 # start with the qconfig.pri that qt-core installed 637 # start with the qconfig.pri that qtcore installed
638 if ! cp "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qconfig.pri \ 638 if ! cp "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qconfig.pri \
639 "${ROOT}${QTDATADIR}"/mkspecs/qconfig.pri; then 639 "${ROOT}${QTDATADIR}"/mkspecs/qconfig.pri; then
640 eerror "cp qconfig failed." 640 eerror "cp qconfig failed."
641 return 1 641 return 1
642 fi 642 fi
694} 694}
695 695
696# @FUNCTION: skip_qmake_build 696# @FUNCTION: skip_qmake_build
697# @INTERNAL 697# @INTERNAL
698# @DESCRIPTION: 698# @DESCRIPTION:
699# Patches configure to skip qmake compilation, as it's already installed by qt-core. 699# Patches configure to skip qmake compilation, as it's already installed by qtcore.
700skip_qmake_build() { 700skip_qmake_build() {
701 sed -i -e "s:if true:if false:g" "${S}"/configure || die 701 sed -i -e "s:if true:if false:g" "${S}"/configure || die
702} 702}
703 703
704# @FUNCTION: skip_project_generation 704# @FUNCTION: skip_project_generation

Legend:
Removed from v.1.143  
changed lines
  Added in v.1.144

  ViewVC Help
Powered by ViewVC 1.1.20