/[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.42 Revision 1.46
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.42 2009/07/13 19:55:30 hwoarang Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.46 2009/10/02 16:39:41 wired 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# Alex Alexander <wired@gentoo.org>
10# @BLURB: Eclass for Qt4 split ebuilds. 11# @BLURB: Eclass for Qt4 split ebuilds.
11# @DESCRIPTION: 12# @DESCRIPTION:
12# This eclass contains various functions that are used when building Qt4 13# This eclass contains various functions that are used when building Qt4
13 14
14inherit base eutils multilib toolchain-funcs flag-o-matic versionator 15inherit base eutils multilib toolchain-funcs flag-o-matic versionator
55 ;; 56 ;;
56esac 57esac
57MY_P=qt-x11-${SRCTYPE}-${MY_PV} 58MY_P=qt-x11-${SRCTYPE}-${MY_PV}
58S=${WORKDIR}/${MY_P} 59S=${WORKDIR}/${MY_P}
59 60
60HOMEPAGE="http://www.qtsoftware.com/" 61HOMEPAGE="http://qt.nokia.com/"
61SRC_URI="http://get.qtsoftware.com/qt/source/${MY_P}.tar.bz2" 62SRC_URI="http://get.qt.nokia.com/qt/source/${MY_P}.tar.bz2"
63if version_is_at_least 4.5.3 ${PV} ; then
64 SRC_URI="${SRC_URI/bz2/gz}"
65fi
62 66
63case "${PV}" in 67case "${PV}" in
64 4.4.?) SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-headers.tar.bz2" ;; 68 4.4.?) SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-headers.tar.bz2" ;;
65 *) ;; 69 *) ;;
66esac 70esac
108# @FUNCTION: qt4-build_src_unpack 112# @FUNCTION: qt4-build_src_unpack
109# @DESCRIPTION: 113# @DESCRIPTION:
110# Unpacks the sources 114# Unpacks the sources
111qt4-build_src_unpack() { 115qt4-build_src_unpack() {
112 setqtenv 116 setqtenv
113 local target targets licenses 117 local target targets licenses tar_pkg tar_args
114 if version_is_at_least 4.5 ${PV} ; then 118 if version_is_at_least 4.5 ${PV} ; then
115 licenses="LICENSE.GPL3 LICENSE.LGPL" 119 licenses="LICENSE.GPL3 LICENSE.LGPL"
116 else 120 else
117 licenses="LICENSE.GPL2 LICENSE.GPL3" 121 licenses="LICENSE.GPL2 LICENSE.GPL3"
118 fi 122 fi
120 src/{qbase,qt_targets,qt_install}.pri bin config.tests mkspecs qmake \ 124 src/{qbase,qt_targets,qt_install}.pri bin config.tests mkspecs qmake \
121 ${QT4_EXTRACT_DIRECTORIES}; do 125 ${QT4_EXTRACT_DIRECTORIES}; do
122 targets="${targets} ${MY_P}/${target}" 126 targets="${targets} ${MY_P}/${target}"
123 done 127 done
124 128
125 echo tar xjpf "${DISTDIR}"/${MY_P}.tar.bz2 ${targets} 129 tar_pkg=${MY_P}.tar.bz2
126 tar xjpf "${DISTDIR}"/${MY_P}.tar.bz2 ${targets} 130 tar_args="xjpf"
131 if version_is_at_least 4.5.3 ${PV} ; then
132 tar_pkg=${tar_pkg/bz2/gz}
133 tar_args="xzpf"
134 fi
135
136 echo tar ${tar_args} "${DISTDIR}"/${tar_pkg} ${targets}
137 tar ${tar_args} "${DISTDIR}"/${tar_pkg} ${targets}
127 138
128 case "${PV}" in 139 case "${PV}" in
129 4.4.?) 140 4.4.?)
130 echo tar xjpf "${DISTDIR}"/${MY_P}-headers.tar.bz2 141 echo tar xjpf "${DISTDIR}"/${MY_P}-headers.tar.bz2
131 tar xjpf "${DISTDIR}"/${MY_P}-headers.tar.bz2 142 tar xjpf "${DISTDIR}"/${MY_P}-headers.tar.bz2
198 setqtenv 209 setqtenv
199 myconf="$(standard_configure_options) ${myconf}" 210 myconf="$(standard_configure_options) ${myconf}"
200 211
201 echo ./configure ${myconf} 212 echo ./configure ${myconf}
202 ./configure ${myconf} || die "./configure failed" 213 ./configure ${myconf} || die "./configure failed"
214 myconf=""
203} 215}
204 216
205# @FUNCTION: qt4-build_src_compile 217# @FUNCTION: qt4-build_src_compile
206# @DESCRIPTION: Actual compile phase 218# @DESCRIPTION: Actual compile phase
207qt4-build_src_compile() { 219qt4-build_src_compile() {
292 -translationdir ${QTTRANSDIR} -examplesdir ${QTEXAMPLESDIR} 304 -translationdir ${QTTRANSDIR} -examplesdir ${QTEXAMPLESDIR}
293 -demosdir ${QTDEMOSDIR} -silent -fast 305 -demosdir ${QTDEMOSDIR} -silent -fast
294 $([[ ${PN} == qt-xmlpatterns ]] || echo -no-exceptions) 306 $([[ ${PN} == qt-xmlpatterns ]] || echo -no-exceptions)
295 -reduce-relocations -nomake examples -nomake demos" 307 -reduce-relocations -nomake examples -nomake demos"
296 308
297 # Make eclass 4.5.{1,2} ready 309 # Make eclass 4.5.x ready
298 case "${MY_PV}" in 310 case "${MY_PV}" in
299 4.5.1 | 4.5.2) 311 4.5.?)
300 myconf="${myconf} -opensource" 312 myconf="${myconf} -opensource"
301 ;; 313 ;;
302 esac 314 esac
303 315
304 echo "${myconf}" 316 echo "${myconf}"

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.46

  ViewVC Help
Powered by ViewVC 1.1.20