/[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.47 Revision 1.49
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.47 2009/10/03 19:29:04 ayoy Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.49 2009/11/09 19:30:40 ayoy 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>,
44 !>x11-libs/qt-webkit-${PV}-r9999 44 !>x11-libs/qt-webkit-${PV}-r9999
45 !<x11-libs/qt-xmlpatterns-${PV} 45 !<x11-libs/qt-xmlpatterns-${PV}
46 !>x11-libs/qt-xmlpatterns-${PV}-r9999 46 !>x11-libs/qt-xmlpatterns-${PV}-r9999
47" 47"
48case "${PV}" in 48case "${PV}" in
49 4.?.?_rc*) 49 4.?.?_rc* | 4.?.?_beta* )
50 SRCTYPE="${SRCTYPE:-opensource-src}" 50 SRCTYPE="${SRCTYPE:-opensource-src}"
51 MY_PV="${PV/_rc/-rc}" 51 MY_PV="${PV/_/-}"
52 ;; 52 ;;
53 *) 53 *)
54 SRCTYPE="${SRCTYPE:-opensource-src}" 54 SRCTYPE="${SRCTYPE:-opensource-src}"
55 MY_PV="${PV}" 55 MY_PV="${PV}"
56 ;; 56 ;;
57esac 57esac
58
59if version_is_at_least 4.5.99999999 ${PV} ; then
60 MY_P="qt-everywhere-${SRCTYPE}-${MY_PV}"
61else
58MY_P=qt-x11-${SRCTYPE}-${MY_PV} 62 MY_P="qt-x11-${SRCTYPE}-${MY_PV}"
63fi
59S=${WORKDIR}/${MY_P} 64S=${WORKDIR}/${MY_P}
60 65
61HOMEPAGE="http://qt.nokia.com/" 66HOMEPAGE="http://qt.nokia.com/"
62SRC_URI="http://get.qt.nokia.com/qt/source/${MY_P}.tar.bz2"
63if version_is_at_least 4.5.3 ${PV} ; then 67if version_is_at_least 4.5.3 ${PV} ; then
64 SRC_URI="${SRC_URI/bz2/gz}" 68 SRC_URI="http://get.qt.nokia.com/qt/source/${MY_P}.tar.gz"
69else
70 SRC_URI="http://get.qt.nokia.com/qt/source/${MY_P}.tar.bz2"
65fi 71fi
66 72
67case "${PV}" in 73case "${PV}" in
68 4.4.?) SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-headers.tar.bz2" ;; 74 4.4.?) SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-headers.tar.bz2" ;;
69 *) ;; 75 *) ;;
183 ewarn "Appending -fno-stack-protector to CXXFLAGS" 189 ewarn "Appending -fno-stack-protector to CXXFLAGS"
184 append-cxxflags -fno-stack-protector 190 append-cxxflags -fno-stack-protector
185 # Bug 253127 191 # Bug 253127
186 sed -e "/^QMAKE_CFLAGS\t/ s:$: -fno-stack-protector-all:" \ 192 sed -e "/^QMAKE_CFLAGS\t/ s:$: -fno-stack-protector-all:" \
187 -i "${S}"/mkspecs/common/g++.conf || die "sed ${S}/mkspecs/common/g++.conf failed" 193 -i "${S}"/mkspecs/common/g++.conf || die "sed ${S}/mkspecs/common/g++.conf failed"
194 fi
195
196 # Bug 261632
197 if use ppc64; then
198 ewarn "Appending -mminimal-toc to CFLAGS/CXXFLAGS"
199 append-flags -mminimal-toc
188 fi 200 fi
189 201
190 # Bug 172219 202 # Bug 172219
191 sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \ 203 sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
192 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \ 204 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
295 alpha|arm|ia64|mips|s390|sparc) myconf="${myconf} -arch $(tc-arch)" ;; 307 alpha|arm|ia64|mips|s390|sparc) myconf="${myconf} -arch $(tc-arch)" ;;
296 hppa|sh) myconf="${myconf} -arch generic" ;; 308 hppa|sh) myconf="${myconf} -arch generic" ;;
297 *) die "$(tc-arch) is unsupported by this eclass. Please file a bug." ;; 309 *) die "$(tc-arch) is unsupported by this eclass. Please file a bug." ;;
298 esac 310 esac
299 311
312 # 4.6: build qt-core with exceptions or qt-xmlpatterns won't build
313 local exceptions=
314 case "${PV}" in
315 4.6.*)
316 if [[ ${PN} != "qt-core" ]] && [[ ${PN} != "qt-xmlpatterns" ]]; then
317 exceptions="-no-exceptions"
318 fi
319 ;;
320 *)
321 [[ ${PN} == "qt-xmlpatterns" ]] || exceptions="-no-exceptions"
322 ;;
323 esac
324
300 myconf="${myconf} -platform $(qt_mkspecs_dir) -stl -verbose -largefile -confirm-license -no-rpath 325 myconf="${myconf} -platform $(qt_mkspecs_dir) -stl -verbose -largefile -confirm-license -no-rpath
301 -prefix ${QTPREFIXDIR} -bindir ${QTBINDIR} -libdir ${QTLIBDIR} 326 -prefix ${QTPREFIXDIR} -bindir ${QTBINDIR} -libdir ${QTLIBDIR}
302 -datadir ${QTDATADIR} -docdir ${QTDOCDIR} -headerdir ${QTHEADERDIR} 327 -datadir ${QTDATADIR} -docdir ${QTDOCDIR} -headerdir ${QTHEADERDIR}
303 -plugindir ${QTPLUGINDIR} -sysconfdir ${QTSYSCONFDIR} 328 -plugindir ${QTPLUGINDIR} -sysconfdir ${QTSYSCONFDIR}
304 -translationdir ${QTTRANSDIR} -examplesdir ${QTEXAMPLESDIR} 329 -translationdir ${QTTRANSDIR} -examplesdir ${QTEXAMPLESDIR}
305 -demosdir ${QTDEMOSDIR} -silent -fast 330 -demosdir ${QTDEMOSDIR} -silent -fast
306 $([[ ${PN} == qt-xmlpatterns ]] || echo -no-exceptions) 331 ${exceptions}
307 -reduce-relocations -nomake examples -nomake demos" 332 -reduce-relocations -nomake examples -nomake demos"
308 333
309 # Make eclass 4.5.x ready 334 # Make eclass >= 4.5.x ready
310 case "${MY_PV}" in 335 case "${MY_PV}" in
311 4.5.?) 336 4.5.* | 4.6.* )
312 myconf="${myconf} -opensource" 337 myconf="${myconf} -opensource"
313 ;; 338 ;;
314 esac 339 esac
315 340
316 echo "${myconf}" 341 echo "${myconf}"

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.49

  ViewVC Help
Powered by ViewVC 1.1.20