update qt4 eclass

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@2866 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2011-03-13 11:56:12 +00:00
parent 149e21d2cf
commit 7cc6a29c47
1 changed files with 25 additions and 13 deletions

View File

@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.87 2010/11/13 20:50:57 wired Exp $
# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.90 2011/03/10 23:45:51 wired Exp $
# @ECLASS: qt4-build.eclass
# @MAINTAINER:
@ -220,13 +220,13 @@ qt4-build_src_prepare() {
fi
# Bug 282984 && Bug 295530
sed -e "s:\(^SYSTEM_VARIABLES\):CC="$(tc-getCC)"\nCXX="$(tc-getCXX)"\nCFLAGS=\"${CFLAGS}\"\nCXXFLAGS=\"${CXXFLAGS}\"\nLDFLAGS=\"${LDFLAGS}\"\n\1:" \
sed -e "s:\(^SYSTEM_VARIABLES\):CC=\"$(tc-getCC)\"\nCXX=\"$(tc-getCXX)\"\nCFLAGS=\"${CFLAGS}\"\nCXXFLAGS=\"${CXXFLAGS}\"\nLDFLAGS=\"${LDFLAGS}\"\n\1:" \
-i configure || die "sed qmake compilers failed"
# bug 321335
if version_is_at_least 4.6; then
find ./config.tests/unix -name "*.test" -type f -exec grep -lZ \$MAKE '{}' \; | \
xargs -0 \
sed -e "s:\(\$MAKE\):\1 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getCXX)" LINK="$(tc-getCXX)":g" \
sed -e "s:\(\$MAKE\):\1 CC=\"$(tc-getCC)\" CXX=\"$(tc-getCXX)\" LD=\"$(tc-getCXX)\" LINK=\"$(tc-getCXX)\":g" \
-i || die "sed test compilers failed"
fi
@ -335,13 +335,13 @@ qt4-build_src_configure() {
# Disable SSE4.x, since auto-detection is currently broken
# Upstream bug http://bugreports.qt.nokia.com/browse/QTBUG-13623
if version_is_at_least 4.7.1; then
myconf+=" -no-sse4.1 -no-sse4.2"
fi
[[ ${PV} == "4.7.1" ]] && myconf+=" -no-sse4.1 -no-sse4.2"
echo ./configure ${myconf}
./configure ${myconf} || die "./configure failed"
myconf=""
prepare_directories ${QT4_TARGET_DIRECTORIES}
}
# @FUNCTION: qt4-build_src_compile
@ -495,6 +495,25 @@ standard_configure_options() {
echo "${myconf}"
}
# @FUNCTION: prepare_directories
# @USAGE: < directories >
# @DESCRIPTION:
# Generates makefiles for the directories set in $QT4_TARGET_DIRECTORIES
prepare_directories() {
for x in "$@"; do
pushd "${S}"/${x} >/dev/null
einfo "running qmake in: $x"
# avoid running over the maximum argument number, bug #299810
{
echo "${S}"/mkspecs/common/*.conf
find "${S}" -name '*.pr[io]'
} | xargs sed -i -e "s:\$\$\[QT_INSTALL_LIBS\]:${EPREFIX}/usr/$(get_libdir)/qt4:g" || die
"${S}"/bin/qmake "LIBS+=-L${QTLIBDIR}" "CONFIG+=nostrip" || die "qmake failed"
popd >/dev/null
done
}
# @FUNCTION: build_directories
# @USAGE: < directories >
# @DESCRIPTION:
@ -502,12 +521,6 @@ standard_configure_options() {
build_directories() {
for x in "$@"; do
pushd "${S}"/${x} >/dev/null
# avoid running over the maximum argument number, bug #299810
{
echo "${S}"/mkspecs/common/*.conf
find "${S}" -name '*.pr[io]'
} | xargs sed -i -e "s:\$\$\[QT_INSTALL_LIBS\]:${EPREFIX}/usr/$(get_libdir)/qt4:g" || die
"${S}"/bin/qmake "LIBS+=-L${QTLIBDIR}" "CONFIG+=nostrip" || die "qmake failed"
emake CC="$(tc-getCC)" \
CXX="$(tc-getCXX)" \
LINK="$(tc-getCXX)" || die "emake failed"
@ -770,7 +783,6 @@ qt_mkspecs_dir() {
ewarn "Unknown Arch $ABI."
fi
echo "${spec}"
}