* [gentoo-commits] proj/qt:master commit in: dev-qt/qtcore/, dev-qt/qttranslations/, eclass/
@ 2014-05-27 10:48 Davide Pesavento
0 siblings, 0 replies; only message in thread
From: Davide Pesavento @ 2014-05-27 10:48 UTC (permalink / raw
To: gentoo-commits
commit: b909c2828fc465fa6951eed7bbca970cb16d3420
Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
AuthorDate: Mon May 26 20:02:06 2014 +0000
Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Mon May 26 20:02:06 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=b909c282
[dev-qt/qtcore:4] Split translations into dev-qt/qttranslations.
---
dev-qt/qtcore/qtcore-4.8.9999.ebuild | 19 ++--------
.../qttranslations/qttranslations-4.8.9999.ebuild | 36 ++++++++++++++++++
eclass/qt4-build-multilib.eclass | 43 ++++++++++++----------
3 files changed, 63 insertions(+), 35 deletions(-)
diff --git a/dev-qt/qtcore/qtcore-4.8.9999.ebuild b/dev-qt/qtcore/qtcore-4.8.9999.ebuild
index 12b17dd..cbb48a3 100644
--- a/dev-qt/qtcore/qtcore-4.8.9999.ebuild
+++ b/dev-qt/qtcore/qtcore-4.8.9999.ebuild
@@ -24,6 +24,7 @@ DEPEND="
"
RDEPEND="${DEPEND}"
PDEPEND="
+ ~dev-qt/qttranslations-${PV}
qt3support? ( ~dev-qt/qtgui-${PV}[aqua=,debug=,glib=,qt3support] )
"
@@ -48,7 +49,6 @@ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
include
src/plugins/plugins.pro
src/plugins/qpluginbase.pri
- src/src.pro
src/3rdparty/des
src/3rdparty/harfbuzz
src/3rdparty/md4
@@ -59,9 +59,8 @@ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
src/declarative
src/gui
src/script
- tools/shared
- tools/linguist/shared
- translations"
+ tools/linguist
+ tools/shared"
QCONFIG_DEFINE="QT_ZLIB"
@@ -136,17 +135,5 @@ src_install() {
|| die "sed for qconfig.h failed"
fi
- # use freshly built libraries
- local DYLD_FPATH=
- [[ -d "${S}"/lib/QtCore.framework ]] \
- && DYLD_FPATH=$(for x in "${S}"/lib/*.framework; do echo -n ":$x"; done)
- DYLD_LIBRARY_PATH="${S}/lib${DYLD_FPATH}" \
- LD_LIBRARY_PATH="${S}/lib" \
- "${S}"/bin/lrelease translations/*.ts \
- || die "generating translations failed"
-
- insinto "${QT4_TRANSLATIONDIR#${EPREFIX}}"
- doins translations/*.qm
-
keepdir "${QT4_SYSCONFDIR#${EPREFIX}}"
}
diff --git a/dev-qt/qttranslations/qttranslations-4.8.9999.ebuild b/dev-qt/qttranslations/qttranslations-4.8.9999.ebuild
new file mode 100644
index 0000000..77e8103
--- /dev/null
+++ b/dev-qt/qttranslations/qttranslations-4.8.9999.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit qt4-build-multilib
+
+DESCRIPTION="Translation files for the Qt toolkit"
+
+if [[ ${QT4_BUILD_TYPE} == live ]]; then
+ KEYWORDS=""
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+fi
+
+IUSE=""
+
+DEPEND="
+ ~dev-qt/qtcore-${PV}
+"
+RDEPEND="${DEPEND}"
+
+QT4_TARGET_DIRECTORIES="translations"
+QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
+ src
+ tools"
+
+src_configure() {
+ cd translations || die
+ "${QT4_BINDIR}"/qmake || die
+}
+
+src_compile() {
+ emake -C translations
+}
diff --git a/eclass/qt4-build-multilib.eclass b/eclass/qt4-build-multilib.eclass
index b35f334..acf3166 100644
--- a/eclass/qt4-build-multilib.eclass
+++ b/eclass/qt4-build-multilib.eclass
@@ -41,8 +41,10 @@ case ${PV} in
;;
esac
-IUSE="aqua debug pch"
-[[ ${CATEGORY}/${PN} != dev-qt/qtxmlpatterns ]] && IUSE+=" +exceptions"
+if [[ ${PN} != qttranslations ]]; then
+ IUSE="aqua debug pch"
+ [[ ${PN} != qtxmlpatterns ]] && IUSE+=" +exceptions"
+fi
DEPEND="virtual/pkgconfig"
if [[ ${QT4_BUILD_TYPE} == live ]]; then
@@ -93,7 +95,7 @@ qt4-build-multilib_src_unpack() {
ewarn
fi
- if [[ ${CATEGORY}/${PN} == dev-qt/qtwebkit ]]; then
+ if [[ ${PN} == qtwebkit ]]; then
eshopts_push -s extglob
if is-flagq '-g?(gdb)?([1-9])'; then
ewarn
@@ -153,18 +155,18 @@ qt4-build-multilib_src_prepare() {
QTDIR="." ./bin/syncqt || die "syncqt failed"
fi
- if [[ ${CATEGORY}/${PN} != dev-qt/qtcore ]]; then
+ if [[ ${PN} != qtcore ]]; then
skip_qmake_build
skip_project_generation
- symlink_binaries_to_buildtree
+ symlink_tools_to_buildtree
fi
# skip X11 tests in non-gui packages to avoid spurious dependencies
- if has ${PN} qtbearer qtcore qtdbus qtscript qtsql qttest qtxmlpatterns; then
+ if has ${PN} qtbearer qtcore qtdbus qtscript qtsql qttest qttranslations qtxmlpatterns; then
sed -i -e '/^if.*PLATFORM_X11.*CFG_GUI/,/^fi$/d' configure || die
fi
- if use aqua; then
+ if use_if_iuse aqua; then
# provide a proper macx-g++-64
use x64-macos && ln -s macx-g++ mkspecs/$(qt_mkspecs_dir)
@@ -327,7 +329,7 @@ qt4-build-multilib_src_configure() {
conf+=" -platform $(qt_mkspecs_dir)"
# debug/release
- if use debug; then
+ if use_if_iuse debug; then
conf+=" -debug"
else
conf+=" -release"
@@ -341,7 +343,7 @@ qt4-build-multilib_src_configure() {
use prefix || conf+=" -no-rpath"
# precompiled headers don't work on hardened, where the flag is masked
- conf+=" $(qt_use pch)"
+ conf+=" $(in_iuse pch && qt_use pch || echo -no-pch)"
# -reduce-relocations
# This flag seems to introduce major breakage to applications,
@@ -356,7 +358,7 @@ qt4-build-multilib_src_configure() {
conf+=" -liconv"
fi
- if use aqua; then
+ if use_if_iuse aqua; then
# On (snow) leopard use the new (frameworked) cocoa code.
if [[ ${CHOST##*-darwin} -ge 9 ]]; then
conf+=" -cocoa -framework"
@@ -366,7 +368,7 @@ qt4-build-multilib_src_configure() {
conf+=" -F${QT4_LIBDIR}"
# We are crazy and build cocoa + qt3support :-)
- if use qt3support; then
+ if use_if_iuse qt3support; then
sed -e "/case \"\$PLATFORM,\$CFG_MAC_COCOA\" in/,/;;/ s|CFG_QT3SUPPORT=\"no\"|CFG_QT3SUPPORT=\"yes\"|" \
-i configure || die
fi
@@ -416,7 +418,7 @@ qt4-build-multilib_src_compile() {
# Runs tests only in target directories.
qt4-build-multilib_src_test() {
# QtMultimedia does not have any test suite (bug #332299)
- [[ ${CATEGORY}/${PN} == dev-qt/qtmultimedia ]] && return
+ [[ ${PN} == qtmultimedia ]] && return
local dir
for dir in ${QT4_TARGET_DIRECTORIES}; do
@@ -549,7 +551,7 @@ install_qconfigs() {
# @DESCRIPTION:
# Generates gentoo-specific qconfig.{h,pri}.
generate_qconfigs() {
- if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} || ${CATEGORY}/${PN} == dev-qt/qtcore ]]; then
+ if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} || ${PN} == qtcore ]]; then
local x qconfig_add qconfig_remove qconfig_new
for x in "${ROOT}${QT4_DATADIR}"/mkspecs/gentoo/*-qconfig.pri; do
[[ -f ${x} ]] || continue
@@ -620,13 +622,16 @@ skip_project_generation() {
sed -i -e "s:echo \"Finding:exit 0\n\necho \"Finding:g" "${S}"/configure || die
}
-# @FUNCTION: symlink_binaries_to_buildtree
+# @FUNCTION: symlink_tools_to_buildtree
# @INTERNAL
# @DESCRIPTION:
# Symlinks generated binaries to buildtree, so they can be used during compilation time.
-symlink_binaries_to_buildtree() {
- for bin in qmake moc uic rcc; do
- ln -s "${QT4_BINDIR}"/${bin} "${S}"/bin/ || die "symlinking ${bin} to ${S}/bin failed"
+symlink_tools_to_buildtree() {
+ local bin
+ for bin in "${QT4_BINDIR}"/{qmake,moc,rcc,uic}; do
+ if [[ -e ${bin} ]]; then
+ ln -s "${bin}" "${S}"/bin/ || die "failed to symlink ${bin}"
+ fi
done
}
@@ -663,7 +668,7 @@ fix_library_files() {
# For MacOS X we need to add some symlinks when frameworks are
# being used, to avoid complications with some more or less stupid packages.
fix_includes() {
- if use aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
+ if use_if_iuse aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
local frw dest f h rdir
# Some packages tend to include <Qt/...>
dodir "${QT4_HEADERDIR#${EPREFIX}}"/Qt
@@ -717,7 +722,7 @@ qt_mkspecs_dir() {
*-netbsd*)
spec=netbsd ;;
*-darwin*)
- if use aqua; then
+ if use_if_iuse aqua; then
# mac with carbon/cocoa
spec=macx
else
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-27 10:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-27 10:48 [gentoo-commits] proj/qt:master commit in: dev-qt/qtcore/, dev-qt/qttranslations/, eclass/ Davide Pesavento
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox