/[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.36 Revision 1.39
1# Copyright 2007-2009 Gentoo Foundation 1# Copyright 2007-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.36 2009/05/29 14:48:00 hwoarang Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.39 2009/06/27 12:37:32 yngwin 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>,
9# Caleb Tennis <caleb@gentoo.org> 9# Caleb Tennis <caleb@gentoo.org>
10# @BLURB: Eclass for Qt4 split ebuilds. 10# @BLURB: Eclass for Qt4 split ebuilds.
11# @DESCRIPTION: 11# @DESCRIPTION:
12# This eclass contains various functions that are used when building Qt4 12# This eclass contains various functions that are used when building Qt4
13 13
14inherit eutils multilib toolchain-funcs flag-o-matic versionator 14inherit base eutils multilib toolchain-funcs flag-o-matic versionator
15 15
16IUSE="${IUSE} custom-cxxflags debug pch" 16IUSE="${IUSE} custom-cxxflags debug pch"
17RDEPEND=" 17RDEPEND="
18 !<x11-libs/qt-assistant-${PV} 18 !<x11-libs/qt-assistant-${PV}
19 !>x11-libs/qt-assistant-${PV}-r9999 19 !>x11-libs/qt-assistant-${PV}-r9999
56esac 56esac
57MY_P=qt-x11-${SRCTYPE}-${MY_PV} 57MY_P=qt-x11-${SRCTYPE}-${MY_PV}
58S=${WORKDIR}/${MY_P} 58S=${WORKDIR}/${MY_P}
59 59
60HOMEPAGE="http://www.qtsoftware.com/" 60HOMEPAGE="http://www.qtsoftware.com/"
61SRC_URI="http://download.qtsoftware.com/qt/source/${MY_P}.tar.bz2" 61SRC_URI="http://get.qtsoftware.com/qt/source/${MY_P}.tar.bz2"
62 62
63case "${PV}" in 63case "${PV}" in
64 4.4.?) SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-headers.tar.bz2" ;; 64 4.4.?) SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-headers.tar.bz2" ;;
65 *) ;; 65 *) ;;
66esac 66esac
162 if [[ $EAPI != 2 ]]; then 162 if [[ $EAPI != 2 ]]; then
163 qt4-build_src_prepare 163 qt4-build_src_prepare
164 fi 164 fi
165} 165}
166 166
167# @ECLASS-VARIABLE: PATCHES
168# @DESCRIPTION:
169# In case you have patches to apply, specify them in PATCHES variable. Make sure
170# to specify the full path. This variable is necessary for src_prepare phase.
171# example:
172# PATCHES="${FILESDIR}"/mypatch.patch
173# ${FILESDIR}"/mypatch2.patch"
174#
167 175
168# @FUNCTION: qt4-build_src_prepare 176# @FUNCTION: qt4-build_src_prepare
169# @DESCRIPTION: 177# @DESCRIPTION:
170# Prepare the sources before the configure phase. Strip CFLAGS if necessary, and fix 178# Prepare the sources before the configure phase. Strip CFLAGS if necessary, and fix
171# source files in order to respect CFLAGS/CXXFLAGS/LDFLAGS specified on /etc/make.conf. 179# source files in order to respect CFLAGS/CXXFLAGS/LDFLAGS specified on /etc/make.conf.
209 sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \ 217 sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
210 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \ 218 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
211 -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \ 219 -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \
212 -i "${S}"/mkspecs/common/g++.conf || die "sed ${S}/mkspecs/common/g++.conf failed" 220 -i "${S}"/mkspecs/common/g++.conf || die "sed ${S}/mkspecs/common/g++.conf failed"
213 221
222 base_src_prepare
214} 223}
215 224
216# @FUNCTION: qt4-build_src_configure 225# @FUNCTION: qt4-build_src_configure
217# @DESCRIPTION: 226# @DESCRIPTION:
218# Default configure phase 227# Default configure phase
280 alpha|arm|ia64|mips|s390|sparc) myconf="${myconf} -arch $(tc-arch)" ;; 289 alpha|arm|ia64|mips|s390|sparc) myconf="${myconf} -arch $(tc-arch)" ;;
281 hppa|sh) myconf="${myconf} -arch generic" ;; 290 hppa|sh) myconf="${myconf} -arch generic" ;;
282 *) die "$(tc-arch) is unsupported by this eclass. Please file a bug." ;; 291 *) die "$(tc-arch) is unsupported by this eclass. Please file a bug." ;;
283 esac 292 esac
284 293
285 # Bug 261412 Qt configure detects archs by uname
286 case "$(tc-arch)" in
287 ppc) myconf="${myconf} -platform linux-g++-32";;
288 esac
289
290 myconf="${myconf} -stl -verbose -largefile -confirm-license -no-rpath 294 myconf="${myconf} -platform $(qt_mkspecs_dir) -stl -verbose -largefile -confirm-license -no-rpath
291 -prefix ${QTPREFIXDIR} -bindir ${QTBINDIR} -libdir ${QTLIBDIR} 295 -prefix ${QTPREFIXDIR} -bindir ${QTBINDIR} -libdir ${QTLIBDIR}
292 -datadir ${QTDATADIR} -docdir ${QTDOCDIR} -headerdir ${QTHEADERDIR} 296 -datadir ${QTDATADIR} -docdir ${QTDOCDIR} -headerdir ${QTHEADERDIR}
293 -plugindir ${QTPLUGINDIR} -sysconfdir ${QTSYSCONFDIR} 297 -plugindir ${QTPLUGINDIR} -sysconfdir ${QTSYSCONFDIR}
294 -translationdir ${QTTRANSDIR} -examplesdir ${QTEXAMPLESDIR} 298 -translationdir ${QTTRANSDIR} -examplesdir ${QTEXAMPLESDIR}
295 -demosdir ${QTDEMOSDIR} -silent -fast 299 -demosdir ${QTDEMOSDIR} -silent -fast
296 $([[ ${PN} == qt-xmlpatterns ]] || echo -no-exceptions) 300 $([[ ${PN} == qt-xmlpatterns ]] || echo -no-exceptions)
297 -reduce-relocations -nomake examples -nomake demos" 301 -reduce-relocations -nomake examples -nomake demos"
298 302
299 # Make eclass 4.5.{1,2} ready 303 # Make eclass 4.5.{1,2} ready
300 case "${MY_PV}" in 304 case "${MY_PV}" in
301 4.5.1 | 4.5.2) 305 4.5.1 | 4.5.2)
302 myconf="${myconf} -opensource" 306 myconf="${myconf} -opensource"
303 ;; 307 ;;
507 rmdir "${D}"/${QTLIBDIR}/pkgconfig 511 rmdir "${D}"/${QTLIBDIR}/pkgconfig
508} 512}
509 513
510# @FUNCTION: qt_use 514# @FUNCTION: qt_use
511# @USAGE: < flag > [ feature ] [ enableval ] 515# @USAGE: < flag > [ feature ] [ enableval ]
512# @DESCRIPTION: 516# @DESCRIPTION:
513# This will echo "${enableval}-${feature}" if <flag> is enabled, or 517# This will echo "${enableval}-${feature}" if <flag> is enabled, or
514# "-no-${feature} if the flag is disabled. If [feature] is not specified <flag> 518# "-no-${feature} if the flag is disabled. If [feature] is not specified <flag>
515# will be used for that. If [enableval] is not specified, it omits the 519# will be used for that. If [enableval] is not specified, it omits the
516# assignment-part 520# assignment-part
517qt_use() { 521qt_use() {
599 fi 603 fi
600} 604}
601 605
602# @FUNCTION: qt_mkspecs_dir 606# @FUNCTION: qt_mkspecs_dir
603# @RETURN: the specs-directory w/o path 607# @RETURN: the specs-directory w/o path
604# @DESCRIPTION: 608# @DESCRIPTION:
605# Allows us to define which mkspecs dir we want to use. 609# Allows us to define which mkspecs dir we want to use.
606qt_mkspecs_dir() { 610qt_mkspecs_dir() {
607 # Allows us to define which mkspecs dir we want to use. 611 # Allows us to define which mkspecs dir we want to use.
608 local spec 612 local spec
609 613

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.20