/[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.86 Revision 1.91
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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.86 2010/11/13 20:30:26 wired Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.91 2011/07/08 11:35:01 ssuominen Exp $
4 4
5# @ECLASS: qt4-build.eclass 5# @ECLASS: qt4-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Ben de Groot <yngwin@gentoo.org>, 7# Ben de Groot <yngwin@gentoo.org>,
8# Markos Chandras <hwoarang@gentoo.org>, 8# Markos Chandras <hwoarang@gentoo.org>,
26 26
27HOMEPAGE="http://qt.nokia.com/" 27HOMEPAGE="http://qt.nokia.com/"
28SRC_URI="http://get.qt.nokia.com/qt/source/${MY_P}.tar.gz" 28SRC_URI="http://get.qt.nokia.com/qt/source/${MY_P}.tar.gz"
29 29
30LICENSE="|| ( LGPL-2.1 GPL-3 )" 30LICENSE="|| ( LGPL-2.1 GPL-3 )"
31IUSE+=" debug"
32[[ ${CATEGORY}/${PN} != x11-themes/qgtkstyle ]] &&
33 IUSE+=" pch aqua" 31IUSE+=" debug pch aqua"
34 32
35RDEPEND=" 33RDEPEND="
36 !<x11-libs/qt-assistant-${PV} 34 !<x11-libs/qt-assistant-${PV}
37 !>x11-libs/qt-assistant-${PV}-r9999 35 !>x11-libs/qt-assistant-${PV}-r9999
38 !<x11-libs/qt-core-${PV} 36 !<x11-libs/qt-core-${PV}
174 die "visibility fixing sed failed" 172 die "visibility fixing sed failed"
175 fi 173 fi
176 # fix libx11 dependency on non X packages 174 # fix libx11 dependency on non X packages
177 if version_is_at_least "4.7.0_beta2"; then 175 if version_is_at_least "4.7.0_beta2"; then
178 local NOLIBX11PKG="qt-core qt-dbus qt-script qt-sql qt-test qt-xmlpatterns" 176 local NOLIBX11PKG="qt-core qt-dbus qt-script qt-sql qt-test qt-xmlpatterns"
179 hasq ${PN} ${NOLIBX11PKG} && qt_nolibx11 177 has ${PN} ${NOLIBX11PKG} && qt_nolibx11
180 [[ ${PN} == "qt-assistant" ]] && qt_assistant_cleanup 178 [[ ${PN} == "qt-assistant" ]] && qt_assistant_cleanup
181 fi 179 fi
182 180
183 if use aqua; then 181 if use aqua; then
184 # provide a proper macx-g++-64 182 # provide a proper macx-g++-64
220 ewarn "Appending -mminimal-toc to CFLAGS/CXXFLAGS" 218 ewarn "Appending -mminimal-toc to CFLAGS/CXXFLAGS"
221 append-flags -mminimal-toc 219 append-flags -mminimal-toc
222 fi 220 fi
223 221
224 # Bug 282984 && Bug 295530 222 # Bug 282984 && Bug 295530
225 sed -e "s:\(^SYSTEM_VARIABLES\):CC="$(tc-getCC)"\nCXX="$(tc-getCXX)"\nCFLAGS=\"${CFLAGS}\"\nCXXFLAGS=\"${CXXFLAGS}\"\nLDFLAGS=\"${LDFLAGS}\"\n\1:" \ 223 sed -e "s:\(^SYSTEM_VARIABLES\):CC=\"$(tc-getCC)\"\nCXX=\"$(tc-getCXX)\"\nCFLAGS=\"${CFLAGS}\"\nCXXFLAGS=\"${CXXFLAGS}\"\nLDFLAGS=\"${LDFLAGS}\"\n\1:" \
226 -i configure || die "sed qmake compilers failed" 224 -i configure || die "sed qmake compilers failed"
227 # bug 321335 225 # bug 321335
228 if version_is_at_least 4.6; then 226 if version_is_at_least 4.6; then
229 find ./config.tests/unix -name "*.test" -type f -exec grep -lZ \$MAKE '{}' \; | \ 227 find ./config.tests/unix -name "*.test" -type f -exec grep -lZ \$MAKE '{}' \; | \
230 xargs -0 \ 228 xargs -0 \
231 sed -e "s:\(\$MAKE\):\1 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getCXX)" LINK="$(tc-getCXX)":g" \ 229 sed -e "s:\(\$MAKE\):\1 CC=\"$(tc-getCC)\" CXX=\"$(tc-getCXX)\" LD=\"$(tc-getCXX)\" LINK=\"$(tc-getCXX)\":g" \
232 -i || die "sed test compilers failed" 230 -i || die "sed test compilers failed"
233 fi 231 fi
234 232
235 # Bug 172219 233 # Bug 172219
236 sed -e "s:X11R6/::" \ 234 sed -e "s:X11R6/::" \
335 myconf+=" $(pkg-config --cflags freetype2)" 333 myconf+=" $(pkg-config --cflags freetype2)"
336 fi 334 fi
337 335
338 # Disable SSE4.x, since auto-detection is currently broken 336 # Disable SSE4.x, since auto-detection is currently broken
339 # Upstream bug http://bugreports.qt.nokia.com/browse/QTBUG-13623 337 # Upstream bug http://bugreports.qt.nokia.com/browse/QTBUG-13623
340 if version_is_at_least 4.7.1; then 338 [[ ${PV} == "4.7.1" ]] && myconf+=" -no-sse4.1 -no-sse4.2"
341 myconf+=" -no-sse4.1 -no-sse4.2"
342 fi
343 339
344 echo ./configure ${myconf} 340 echo ./configure ${myconf}
345 ./configure ${myconf} || die "./configure failed" 341 ./configure ${myconf} || die "./configure failed"
346 myconf="" 342 myconf=""
343
344 prepare_directories ${QT4_TARGET_DIRECTORIES}
347} 345}
348 346
349# @FUNCTION: qt4-build_src_compile 347# @FUNCTION: qt4-build_src_compile
350# @DESCRIPTION: Actual compile phase 348# @DESCRIPTION: Actual compile phase
351qt4-build_src_compile() { 349qt4-build_src_compile() {
495 -nomake examples -nomake demos" 493 -nomake examples -nomake demos"
496 494
497 echo "${myconf}" 495 echo "${myconf}"
498} 496}
499 497
500# @FUNCTION: build_directories 498# @FUNCTION: prepare_directories
501# @USAGE: < directories > 499# @USAGE: < directories >
502# @DESCRIPTION: 500# @DESCRIPTION:
503# Compiles the code in $QT4_TARGET_DIRECTORIES 501# Generates makefiles for the directories set in $QT4_TARGET_DIRECTORIES
504build_directories() { 502prepare_directories() {
505 for x in "$@"; do 503 for x in "$@"; do
506 pushd "${S}"/${x} >/dev/null 504 pushd "${S}"/${x} >/dev/null
505 einfo "running qmake in: $x"
507 # avoid running over the maximum argument number, bug #299810 506 # avoid running over the maximum argument number, bug #299810
508 { 507 {
509 echo "${S}"/mkspecs/common/*.conf 508 echo "${S}"/mkspecs/common/*.conf
510 find "${S}" -name '*.pr[io]' 509 find "${S}" -name '*.pr[io]'
511 } | xargs sed -i -e "s:\$\$\[QT_INSTALL_LIBS\]:${EPREFIX}/usr/$(get_libdir)/qt4:g" || die 510 } | xargs sed -i -e "s:\$\$\[QT_INSTALL_LIBS\]:${EPREFIX}/usr/$(get_libdir)/qt4:g" || die
512 "${S}"/bin/qmake "LIBS+=-L${QTLIBDIR}" "CONFIG+=nostrip" || die "qmake failed" 511 "${S}"/bin/qmake "LIBS+=-L${QTLIBDIR}" "CONFIG+=nostrip" || die "qmake failed"
512 popd >/dev/null
513 done
514}
515
516
517# @FUNCTION: build_directories
518# @USAGE: < directories >
519# @DESCRIPTION:
520# Compiles the code in $QT4_TARGET_DIRECTORIES
521build_directories() {
522 for x in "$@"; do
523 pushd "${S}"/${x} >/dev/null
513 emake CC="$(tc-getCC)" \ 524 emake CC="$(tc-getCC)" \
514 CXX="$(tc-getCXX)" \ 525 CXX="$(tc-getCXX)" \
515 LINK="$(tc-getCXX)" || die "emake failed" 526 LINK="$(tc-getCXX)" || die "emake failed"
516 popd >/dev/null 527 popd >/dev/null
517 done 528 done
588 599
589 # generate list of QT_CONFIG entries from the existing list 600 # generate list of QT_CONFIG entries from the existing list
590 # including qconfig_add and excluding qconfig_remove 601 # including qconfig_add and excluding qconfig_remove
591 for x in $(sed -n 's/^QT_CONFIG +=//p' \ 602 for x in $(sed -n 's/^QT_CONFIG +=//p' \
592 "${ROOT}${QTDATADIR}"/mkspecs/qconfig.pri) ${qconfig_add}; do 603 "${ROOT}${QTDATADIR}"/mkspecs/qconfig.pri) ${qconfig_add}; do
593 hasq ${x} ${qconfig_remove} || qconfig_new+=" ${x}" 604 has ${x} ${qconfig_remove} || qconfig_new+=" ${x}"
594 done 605 done
595 606
596 # replace the existing QT_CONFIG list with qconfig_new 607 # replace the existing QT_CONFIG list with qconfig_new
597 if ! sed -i -e "s/QT_CONFIG +=.*/QT_CONFIG += ${qconfig_new}/" \ 608 if ! sed -i -e "s/QT_CONFIG +=.*/QT_CONFIG += ${qconfig_new}/" \
598 "${ROOT}${QTDATADIR}"/mkspecs/qconfig.pri; then 609 "${ROOT}${QTDATADIR}"/mkspecs/qconfig.pri; then

Legend:
Removed from v.1.86  
changed lines
  Added in v.1.91

  ViewVC Help
Powered by ViewVC 1.1.20