Gentoo Archives: gentoo-commits

From: Davide Pesavento <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qt:master commit in: dev-qt/qtcore/, dev-qt/qttranslations/, eclass/
Date: Tue, 27 May 2014 10:49:01
Message-Id: 1401134526.b909c2828fc465fa6951eed7bbca970cb16d3420.pesa@gentoo
1 commit: b909c2828fc465fa6951eed7bbca970cb16d3420
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 26 20:02:06 2014 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Mon May 26 20:02:06 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=b909c282
7
8 [dev-qt/qtcore:4] Split translations into dev-qt/qttranslations.
9
10 ---
11 dev-qt/qtcore/qtcore-4.8.9999.ebuild | 19 ++--------
12 .../qttranslations/qttranslations-4.8.9999.ebuild | 36 ++++++++++++++++++
13 eclass/qt4-build-multilib.eclass | 43 ++++++++++++----------
14 3 files changed, 63 insertions(+), 35 deletions(-)
15
16 diff --git a/dev-qt/qtcore/qtcore-4.8.9999.ebuild b/dev-qt/qtcore/qtcore-4.8.9999.ebuild
17 index 12b17dd..cbb48a3 100644
18 --- a/dev-qt/qtcore/qtcore-4.8.9999.ebuild
19 +++ b/dev-qt/qtcore/qtcore-4.8.9999.ebuild
20 @@ -24,6 +24,7 @@ DEPEND="
21 "
22 RDEPEND="${DEPEND}"
23 PDEPEND="
24 + ~dev-qt/qttranslations-${PV}
25 qt3support? ( ~dev-qt/qtgui-${PV}[aqua=,debug=,glib=,qt3support] )
26 "
27
28 @@ -48,7 +49,6 @@ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
29 include
30 src/plugins/plugins.pro
31 src/plugins/qpluginbase.pri
32 - src/src.pro
33 src/3rdparty/des
34 src/3rdparty/harfbuzz
35 src/3rdparty/md4
36 @@ -59,9 +59,8 @@ QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
37 src/declarative
38 src/gui
39 src/script
40 - tools/shared
41 - tools/linguist/shared
42 - translations"
43 + tools/linguist
44 + tools/shared"
45
46 QCONFIG_DEFINE="QT_ZLIB"
47
48 @@ -136,17 +135,5 @@ src_install() {
49 || die "sed for qconfig.h failed"
50 fi
51
52 - # use freshly built libraries
53 - local DYLD_FPATH=
54 - [[ -d "${S}"/lib/QtCore.framework ]] \
55 - && DYLD_FPATH=$(for x in "${S}"/lib/*.framework; do echo -n ":$x"; done)
56 - DYLD_LIBRARY_PATH="${S}/lib${DYLD_FPATH}" \
57 - LD_LIBRARY_PATH="${S}/lib" \
58 - "${S}"/bin/lrelease translations/*.ts \
59 - || die "generating translations failed"
60 -
61 - insinto "${QT4_TRANSLATIONDIR#${EPREFIX}}"
62 - doins translations/*.qm
63 -
64 keepdir "${QT4_SYSCONFDIR#${EPREFIX}}"
65 }
66
67 diff --git a/dev-qt/qttranslations/qttranslations-4.8.9999.ebuild b/dev-qt/qttranslations/qttranslations-4.8.9999.ebuild
68 new file mode 100644
69 index 0000000..77e8103
70 --- /dev/null
71 +++ b/dev-qt/qttranslations/qttranslations-4.8.9999.ebuild
72 @@ -0,0 +1,36 @@
73 +# Copyright 1999-2014 Gentoo Foundation
74 +# Distributed under the terms of the GNU General Public License v2
75 +# $Header: $
76 +
77 +EAPI=5
78 +
79 +inherit qt4-build-multilib
80 +
81 +DESCRIPTION="Translation files for the Qt toolkit"
82 +
83 +if [[ ${QT4_BUILD_TYPE} == live ]]; then
84 + KEYWORDS=""
85 +else
86 + 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"
87 +fi
88 +
89 +IUSE=""
90 +
91 +DEPEND="
92 + ~dev-qt/qtcore-${PV}
93 +"
94 +RDEPEND="${DEPEND}"
95 +
96 +QT4_TARGET_DIRECTORIES="translations"
97 +QT4_EXTRACT_DIRECTORIES="${QT4_TARGET_DIRECTORIES}
98 + src
99 + tools"
100 +
101 +src_configure() {
102 + cd translations || die
103 + "${QT4_BINDIR}"/qmake || die
104 +}
105 +
106 +src_compile() {
107 + emake -C translations
108 +}
109
110 diff --git a/eclass/qt4-build-multilib.eclass b/eclass/qt4-build-multilib.eclass
111 index b35f334..acf3166 100644
112 --- a/eclass/qt4-build-multilib.eclass
113 +++ b/eclass/qt4-build-multilib.eclass
114 @@ -41,8 +41,10 @@ case ${PV} in
115 ;;
116 esac
117
118 -IUSE="aqua debug pch"
119 -[[ ${CATEGORY}/${PN} != dev-qt/qtxmlpatterns ]] && IUSE+=" +exceptions"
120 +if [[ ${PN} != qttranslations ]]; then
121 + IUSE="aqua debug pch"
122 + [[ ${PN} != qtxmlpatterns ]] && IUSE+=" +exceptions"
123 +fi
124
125 DEPEND="virtual/pkgconfig"
126 if [[ ${QT4_BUILD_TYPE} == live ]]; then
127 @@ -93,7 +95,7 @@ qt4-build-multilib_src_unpack() {
128 ewarn
129 fi
130
131 - if [[ ${CATEGORY}/${PN} == dev-qt/qtwebkit ]]; then
132 + if [[ ${PN} == qtwebkit ]]; then
133 eshopts_push -s extglob
134 if is-flagq '-g?(gdb)?([1-9])'; then
135 ewarn
136 @@ -153,18 +155,18 @@ qt4-build-multilib_src_prepare() {
137 QTDIR="." ./bin/syncqt || die "syncqt failed"
138 fi
139
140 - if [[ ${CATEGORY}/${PN} != dev-qt/qtcore ]]; then
141 + if [[ ${PN} != qtcore ]]; then
142 skip_qmake_build
143 skip_project_generation
144 - symlink_binaries_to_buildtree
145 + symlink_tools_to_buildtree
146 fi
147
148 # skip X11 tests in non-gui packages to avoid spurious dependencies
149 - if has ${PN} qtbearer qtcore qtdbus qtscript qtsql qttest qtxmlpatterns; then
150 + if has ${PN} qtbearer qtcore qtdbus qtscript qtsql qttest qttranslations qtxmlpatterns; then
151 sed -i -e '/^if.*PLATFORM_X11.*CFG_GUI/,/^fi$/d' configure || die
152 fi
153
154 - if use aqua; then
155 + if use_if_iuse aqua; then
156 # provide a proper macx-g++-64
157 use x64-macos && ln -s macx-g++ mkspecs/$(qt_mkspecs_dir)
158
159 @@ -327,7 +329,7 @@ qt4-build-multilib_src_configure() {
160 conf+=" -platform $(qt_mkspecs_dir)"
161
162 # debug/release
163 - if use debug; then
164 + if use_if_iuse debug; then
165 conf+=" -debug"
166 else
167 conf+=" -release"
168 @@ -341,7 +343,7 @@ qt4-build-multilib_src_configure() {
169 use prefix || conf+=" -no-rpath"
170
171 # precompiled headers don't work on hardened, where the flag is masked
172 - conf+=" $(qt_use pch)"
173 + conf+=" $(in_iuse pch && qt_use pch || echo -no-pch)"
174
175 # -reduce-relocations
176 # This flag seems to introduce major breakage to applications,
177 @@ -356,7 +358,7 @@ qt4-build-multilib_src_configure() {
178 conf+=" -liconv"
179 fi
180
181 - if use aqua; then
182 + if use_if_iuse aqua; then
183 # On (snow) leopard use the new (frameworked) cocoa code.
184 if [[ ${CHOST##*-darwin} -ge 9 ]]; then
185 conf+=" -cocoa -framework"
186 @@ -366,7 +368,7 @@ qt4-build-multilib_src_configure() {
187 conf+=" -F${QT4_LIBDIR}"
188
189 # We are crazy and build cocoa + qt3support :-)
190 - if use qt3support; then
191 + if use_if_iuse qt3support; then
192 sed -e "/case \"\$PLATFORM,\$CFG_MAC_COCOA\" in/,/;;/ s|CFG_QT3SUPPORT=\"no\"|CFG_QT3SUPPORT=\"yes\"|" \
193 -i configure || die
194 fi
195 @@ -416,7 +418,7 @@ qt4-build-multilib_src_compile() {
196 # Runs tests only in target directories.
197 qt4-build-multilib_src_test() {
198 # QtMultimedia does not have any test suite (bug #332299)
199 - [[ ${CATEGORY}/${PN} == dev-qt/qtmultimedia ]] && return
200 + [[ ${PN} == qtmultimedia ]] && return
201
202 local dir
203 for dir in ${QT4_TARGET_DIRECTORIES}; do
204 @@ -549,7 +551,7 @@ install_qconfigs() {
205 # @DESCRIPTION:
206 # Generates gentoo-specific qconfig.{h,pri}.
207 generate_qconfigs() {
208 - if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} || ${CATEGORY}/${PN} == dev-qt/qtcore ]]; then
209 + if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} || ${PN} == qtcore ]]; then
210 local x qconfig_add qconfig_remove qconfig_new
211 for x in "${ROOT}${QT4_DATADIR}"/mkspecs/gentoo/*-qconfig.pri; do
212 [[ -f ${x} ]] || continue
213 @@ -620,13 +622,16 @@ skip_project_generation() {
214 sed -i -e "s:echo \"Finding:exit 0\n\necho \"Finding:g" "${S}"/configure || die
215 }
216
217 -# @FUNCTION: symlink_binaries_to_buildtree
218 +# @FUNCTION: symlink_tools_to_buildtree
219 # @INTERNAL
220 # @DESCRIPTION:
221 # Symlinks generated binaries to buildtree, so they can be used during compilation time.
222 -symlink_binaries_to_buildtree() {
223 - for bin in qmake moc uic rcc; do
224 - ln -s "${QT4_BINDIR}"/${bin} "${S}"/bin/ || die "symlinking ${bin} to ${S}/bin failed"
225 +symlink_tools_to_buildtree() {
226 + local bin
227 + for bin in "${QT4_BINDIR}"/{qmake,moc,rcc,uic}; do
228 + if [[ -e ${bin} ]]; then
229 + ln -s "${bin}" "${S}"/bin/ || die "failed to symlink ${bin}"
230 + fi
231 done
232 }
233
234 @@ -663,7 +668,7 @@ fix_library_files() {
235 # For MacOS X we need to add some symlinks when frameworks are
236 # being used, to avoid complications with some more or less stupid packages.
237 fix_includes() {
238 - if use aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
239 + if use_if_iuse aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
240 local frw dest f h rdir
241 # Some packages tend to include <Qt/...>
242 dodir "${QT4_HEADERDIR#${EPREFIX}}"/Qt
243 @@ -717,7 +722,7 @@ qt_mkspecs_dir() {
244 *-netbsd*)
245 spec=netbsd ;;
246 *-darwin*)
247 - if use aqua; then
248 + if use_if_iuse aqua; then
249 # mac with carbon/cocoa
250 spec=macx
251 else