/[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.79 Revision 1.86
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.79 2010/08/08 11:34:20 armin76 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.86 2010/11/13 20:30:26 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>,
15inherit base eutils multilib toolchain-funcs flag-o-matic versionator 15inherit base eutils multilib toolchain-funcs flag-o-matic versionator
16 16
17MY_PV=${PV/_/-} 17MY_PV=${PV/_/-}
18if version_is_at_least 4.5.99999999; then 18if version_is_at_least 4.5.99999999; then
19 MY_P=qt-everywhere-opensource-src-${MY_PV} 19 MY_P=qt-everywhere-opensource-src-${MY_PV}
20 [[ ${CATEGORY}/${PN} != x11-libs/qt-xmlpatterns ]] && IUSE="+exceptions" 20 [[ ${CATEGORY}/${PN} != x11-libs/qt-xmlpatterns ]] &&
21 [[ ${CATEGORY}/${PN} != x11-themes/qgtkstyle ]] &&
22 IUSE="+exceptions"
21else 23else
22 MY_P=qt-x11-opensource-src-${MY_PV} 24 MY_P=qt-x11-opensource-src-${MY_PV}
23fi 25fi
24 26
25HOMEPAGE="http://qt.nokia.com/" 27HOMEPAGE="http://qt.nokia.com/"
26SRC_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"
27 29
28LICENSE="|| ( LGPL-2.1 GPL-3 )" 30LICENSE="|| ( LGPL-2.1 GPL-3 )"
31IUSE+=" debug"
32[[ ${CATEGORY}/${PN} != x11-themes/qgtkstyle ]] &&
29IUSE+=" debug pch aqua" 33 IUSE+=" pch aqua"
30 34
31RDEPEND=" 35RDEPEND="
32 !<x11-libs/qt-assistant-${PV} 36 !<x11-libs/qt-assistant-${PV}
33 !>x11-libs/qt-assistant-${PV}-r9999 37 !>x11-libs/qt-assistant-${PV}-r9999
34 !<x11-libs/qt-core-${PV} 38 !<x11-libs/qt-core-${PV}
81 fi 85 fi
82 fi 86 fi
83 87
84 if [[ "${PN}" == "qt-webkit" ]]; then 88 if [[ "${PN}" == "qt-webkit" ]]; then
85 eshopts_push -s extglob 89 eshopts_push -s extglob
86 if is-flagq '-g?(gdb)?([0-9])'; then 90 if is-flagq '-g?(gdb)?([1-9])'; then
87 echo 91 echo
88 ewarn "You have enabled debug info (probably have -g or -ggdb in your \$C{,XX}FLAGS)." 92 ewarn "You have enabled debug info (probably have -g or -ggdb in your \$C{,XX}FLAGS)."
89 ewarn "You may experience really long compilation times and/or increased memory usage." 93 ewarn "You may experience really long compilation times and/or increased memory usage."
90 ewarn "If compilation fails, please try removing -g{,gdb} before reporting a bug." 94 ewarn "If compilation fails, please try removing -g{,gdb} before reporting a bug."
91 ewarn "For more info check out bug #307861" 95 ewarn "For more info check out bug #307861"
194 if [[ ${CHOST} == *86*-apple-darwin* ]] ; then 198 if [[ ${CHOST} == *86*-apple-darwin* ]] ; then
195 # qmake bus errors with -O2 but -O3 works 199 # qmake bus errors with -O2 but -O3 works
196 replace-flags -O2 -O3 200 replace-flags -O2 -O3
197 fi 201 fi
198 202
199 if [[ ${CHOST} == arm* ]] ; then
200 # Fails on arm with -Os, bug 331641
201 # This can be removed once qt-4.7 is stable or the bug on gcc is fixed
202 replace-flags -Os -O2
203 fi
204
205 # Bug 178652 203 # Bug 178652
206 if [[ $(gcc-major-version) == 3 ]] && use amd64; then 204 if [[ $(gcc-major-version) == 3 ]] && use amd64; then
207 ewarn "Appending -fno-gcse to CFLAGS/CXXFLAGS" 205 ewarn "Appending -fno-gcse to CFLAGS/CXXFLAGS"
208 append-flags -fno-gcse 206 append-flags -fno-gcse
209 fi 207 fi
222 ewarn "Appending -mminimal-toc to CFLAGS/CXXFLAGS" 220 ewarn "Appending -mminimal-toc to CFLAGS/CXXFLAGS"
223 append-flags -mminimal-toc 221 append-flags -mminimal-toc
224 fi 222 fi
225 223
226 # Bug 282984 && Bug 295530 224 # Bug 282984 && Bug 295530
227 sed -e "s:\(^SYSTEM_VARIABLES\):CC=$(tc-getCC)\nCXX=$(tc-getCXX)\nCFLAGS=\"${CFLAGS}\"\nCXXFLAGS=\"${CXXFLAGS}\"\nLDFLAGS=\"${LDFLAGS}\"\n\1:" \ 225 sed -e "s:\(^SYSTEM_VARIABLES\):CC="$(tc-getCC)"\nCXX="$(tc-getCXX)"\nCFLAGS=\"${CFLAGS}\"\nCXXFLAGS=\"${CXXFLAGS}\"\nLDFLAGS=\"${LDFLAGS}\"\n\1:" \
228 -i configure || die "sed qmake compilers failed" 226 -i configure || die "sed qmake compilers failed"
229 # bug 321335 227 # bug 321335
230 if version_is_at_least 4.6; then 228 if version_is_at_least 4.6; then
231 find ./config.tests/unix -name "*.test" -type f -exec grep -lZ \$MAKE '{}' \; | \ 229 find ./config.tests/unix -name "*.test" -type f -exec grep -lZ \$MAKE '{}' \; | \
232 xargs -0 \ 230 xargs -0 \
233 sed -e "s:\(\$MAKE\):\1 CC=$(tc-getCC) CXX=$(tc-getCXX) LD=$(tc-getCXX) LINK=$(tc-getCXX):g" \ 231 sed -e "s:\(\$MAKE\):\1 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getCXX)" LINK="$(tc-getCXX)":g" \
234 -i || die "sed test compilers failed" 232 -i || die "sed test compilers failed"
235 fi 233 fi
236 234
237 # Bug 172219 235 # Bug 172219
238 sed -e "s:X11R6/::" \ 236 sed -e "s:X11R6/::" \
287 sed -i -e '/PLATFORM=solaris-cc/s/cc/g++/' configure || die 285 sed -i -e '/PLATFORM=solaris-cc/s/cc/g++/' configure || die
288 # don't flirt with non-Prefix stuff, we're quite possessive 286 # don't flirt with non-Prefix stuff, we're quite possessive
289 sed -i -e '/^QMAKE_\(LIB\|INC\)DIR\(_X11\|_OPENGL\|\)\t/s/=.*$/=/' \ 287 sed -i -e '/^QMAKE_\(LIB\|INC\)DIR\(_X11\|_OPENGL\|\)\t/s/=.*$/=/' \
290 mkspecs/$(qt_mkspecs_dir)/qmake.conf || die 288 mkspecs/$(qt_mkspecs_dir)/qmake.conf || die
291 # strip predefined CFLAGS from qmake ( bug #312689 ) 289 # strip predefined CFLAGS from qmake ( bug #312689 )
292 sed -i '/^QMAKE_CFLAGS_\(RELEASE\|DEBUG\)/s:+=.*:+=:' mkspecs/common/g++.conf 290 sed -i '/^QMAKE_CFLAGS_RELEASE/s:+=.*:+=:' mkspecs/common/g++.conf
293 291
294 base_src_prepare 292 base_src_prepare
295} 293}
296 294
297# @FUNCTION: qt4-build_src_configure 295# @FUNCTION: qt4-build_src_configure
333 fi 331 fi
334 else 332 else
335 # freetype2 include dir is non-standard, thus include it on configure 333 # freetype2 include dir is non-standard, thus include it on configure
336 # use -I from configure 334 # use -I from configure
337 myconf+=" $(pkg-config --cflags freetype2)" 335 myconf+=" $(pkg-config --cflags freetype2)"
336 fi
337
338 # Disable SSE4.x, since auto-detection is currently broken
339 # Upstream bug http://bugreports.qt.nokia.com/browse/QTBUG-13623
340 if version_is_at_least 4.7.1; then
341 myconf+=" -no-sse4.1 -no-sse4.2"
338 fi 342 fi
339 343
340 echo ./configure ${myconf} 344 echo ./configure ${myconf}
341 ./configure ${myconf} || die "./configure failed" 345 ./configure ${myconf} || die "./configure failed"
342 myconf="" 346 myconf=""

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

  ViewVC Help
Powered by ViewVC 1.1.20