Gentoo Archives: gentoo-commits

From: "Tomas Chvatal (scarabeus)" <scarabeus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: kde4-base.eclass kde4-functions.eclass kde4-meta.eclass
Date: Sun, 01 Mar 2009 11:44:13
Message-Id: E1Ldk5Z-0003RH-9d@stork.gentoo.org
1 scarabeus 09/03/01 11:44:09
2
3 Modified: kde4-base.eclass kde4-functions.eclass
4 kde4-meta.eclass
5 Log:
6 Update kde4 eclasses. Was in testing for month now so hope all problems squashed. Resolves some annoying issues and enhance deps.
7
8 Revision Changes Path
9 1.30 eclass/kde4-base.eclass
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-base.eclass?rev=1.30&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-base.eclass?rev=1.30&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-base.eclass?r1=1.29&r2=1.30
14
15 Index: kde4-base.eclass
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v
18 retrieving revision 1.29
19 retrieving revision 1.30
20 diff -u -r1.29 -r1.30
21 --- kde4-base.eclass 10 Feb 2009 20:07:24 -0000 1.29
22 +++ kde4-base.eclass 1 Mar 2009 11:44:09 -0000 1.30
23 @@ -1,6 +1,6 @@
24 -# Copyright 2007-2008 Gentoo Foundation
25 +# Copyright 2007-2009 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.29 2009/02/10 20:07:24 scarabeus Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.30 2009/03/01 11:44:09 scarabeus Exp $
29
30 # @ECLASS: kde4-base.eclass
31 # @MAINTAINER:
32 @@ -16,7 +16,7 @@
33 inherit base cmake-utils eutils multilib kde4-functions
34
35 get_build_type
36 -if [[ $BUILD_TYPE = live ]]; then
37 +if [[ ${BUILD_TYPE} = live ]]; then
38 inherit subversion
39 fi
40
41 @@ -59,15 +59,36 @@
42 }
43 kde4-base_set_qt_dependencies
44
45 -# Set the cmake dependencies
46 -# Quite a few packages fail with cmake-2.4 even for KDE 4.1, so we just require 2.6.2
47 -CMAKEDEPEND=">=dev-util/cmake-2.6.2"
48 +# Xorg
49 +COMMONDEPEND="${COMMONDEPEND}
50 + >=x11-base/xorg-server-1.5.2
51 +"
52 +
53 +# X11 libs
54 +COMMONDEPEND="${COMMONDEPEND}
55 + x11-libs/libXext
56 + x11-libs/libXt
57 + x11-libs/libXxf86vm
58 +"
59 +
60 +# localization deps
61 +# DISABLED UNTIL PMS decide correct approach :(
62 +if [[ -n ${KDE_LINGUAS} ]]; then
63 + LNG_DEP=""
64 + for _lng in ${KDE_LINGUAS}; do
65 + # there must be or due to issue if lingua is not present in kde-l10n so
66 + # it wont die but pick kde-l10n as-is.
67 + LNG_DEP="${LNG_DEP}
68 + || ( kde-base/kde-l10n[linguas_${_lng},kdeprefix=] kde-base/kde-l10n[kdeprefix=] )"
69 + done
70 +fi
71
72 -# Set the common dependencies
73 -DEPEND="${DEPEND} ${COMMONDEPEND} ${CMAKEDEPEND}
74 +# Set common dependencies for all ebuilds that inherit this eclass
75 +DEPEND="${DEPEND} ${COMMONDEPEND}
76 + >=dev-util/cmake-2.6.2
77 dev-util/pkgconfig
78 - x11-libs/libXt
79 - x11-proto/xf86vidmodeproto"
80 + >=sys-apps/sandbox-1.3.2
81 +"
82 RDEPEND="${RDEPEND} ${COMMONDEPEND}"
83
84 if [[ $BUILD_TYPE = live ]]; then
85 @@ -137,7 +158,7 @@
86 # @CODE
87 # Note: default minimal version is kde-4.1, which means that the apps will work
88 # with any KDE version >=${KDE_MINIMAL}
89 -KDE_MINIMAL="${KDE_MINIMAL:=4.1}"
90 +KDE_MINIMAL="${KDE_MINIMAL:=4.2}"
91 export KDE_MINIMAL
92
93 # FIXME: the code section, explanation of live. The last sentence needs other
94 @@ -166,7 +187,7 @@
95 latest)
96 if [[ $KDEBASE = kde-base ]]; then
97 case ${PV} in
98 - 4.2.6*)
99 + 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
100 _kdedir="4.3"
101 _pv="-${PV}:4.3"
102 _pvn="-${PV}"
103 @@ -198,7 +219,7 @@
104 ;;
105 *)
106 die "NEED_KDE=latest not supported for PV=${PV}" ;;
107 - esac
108 + esac
109 _operator=">="
110 else
111 # this creates dependency on any version of kde4
112 @@ -216,7 +237,7 @@
113 _pvn="-${NEED_KDE}"
114 export NEED_KDE="live"
115 ;;
116 - 4.2.6*)
117 + 4.3 | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
118 _kdedir="4.3"
119 _pv="-${NEED_KDE}:4.3"
120 _pvn="-${NEED_KDE}"
121 @@ -258,10 +279,9 @@
122 esac
123
124 if [[ ${NEED_KDE} != none ]]; then
125 -
126 #Set the SLOT
127 - if [[ -n $KDEBASE ]]; then
128 - if [[ $NEED_KDE = live ]]; then
129 + if [[ -n ${KDEBASE} ]]; then
130 + if [[ ${NEED_KDE} = live ]]; then
131 SLOT="live"
132 else
133 case ${KMNAME} in
134 @@ -286,12 +306,13 @@
135 *)
136 case ${PV} in
137 9999*) SLOT="live" ;;
138 + 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;;
139 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;;
140 4.1* | 4.0.9* | 4.0.8*) SLOT="4.1" ;;
141 *) SLOT="4.1" ;;
142 esac
143 ;;
144 - esac
145 + esac
146 fi
147 fi
148
149 @@ -309,21 +330,21 @@
150
151 # Adding kdelibs, kdepimlibs and kdebase-data deps to all other packages.
152 # We only need to add the dependencies if ${PN} is not "kdelibs" or "kdepimlibs"
153 - if [[ $PN != kdelibs ]]; then
154 + if [[ ${PN} != kdelibs ]]; then
155 DEPEND="${DEPEND}
156 kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] )
157 !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )"
158 RDEPEND="${RDEPEND}
159 kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] )
160 !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )"
161 - if [[ $PN != kdepimlibs ]]; then
162 + if [[ ${PN} != kdepimlibs ]]; then
163 DEPEND="${DEPEND}
164 kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix] )
165 !kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pvn}[-kdeprefix] )"
166 RDEPEND="${RDEPEND}
167 kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix] )
168 !kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pvn}[-kdeprefix] )"
169 - if [[ $PN != kdebase-data ]]; then
170 + if [[ ${PN} != kdebase-data ]]; then
171 RDEPEND="${RDEPEND}
172 kdeprefix? ( ${_operator}kde-base/kdebase-data${_pv}[kdeprefix] )
173 !kdeprefix? ( ${_operator}kde-base/kdebase-data${_pvn}[-kdeprefix] )"
174 @@ -335,11 +356,12 @@
175
176 # Fetch section - If the ebuild's category is not 'kde-base' and if it is not a
177 # koffice ebuild, the URI should be set in the ebuild itself
178 -case ${SLOT} in
179 +case ${BUILD_TYPE} in
180 live)
181 + SRC_URI=""
182 ESVN_MIRROR=${ESVN_MIRROR:=svn://anonsvn.kde.org/home/kde}
183 # Split ebuild, or extragear stuff
184 - if [[ -n $KMNAME ]]; then
185 + if [[ -n ${KMNAME} ]]; then
186 ESVN_PROJECT="${KMNAME}"
187 if [[ -z ${KMNOMODULE} && -z ${KMMODULE} ]]; then
188 KMMODULE="${PN}"
189 @@ -347,31 +369,22 @@
190 # Split kde-base/ ebuilds: (they reside in trunk/KDE)
191 case ${KMNAME} in
192 kdebase-*)
193 - ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/kdebase/${KMNAME#kdebase-}/"
194 + ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/kdebase/${KMNAME#kdebase-}"
195 ;;
196 kdereview)
197 - ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}/"
198 + ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
199 ;;
200 kde*)
201 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/${KMNAME}"
202 ;;
203 extragear*|playground*)
204 - case ${PN} in
205 - *-plasma)
206 - ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}/"
207 - ESVN_PROJECT="${KMNAME}/${KMMODULE}/"
208 - ;;
209 - *)
210 - ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}/"
211 - ;;
212 - esac
213 - ;;
214 + ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
215 + ;;
216 koffice)
217 ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
218 ;;
219 *)
220 - # Extragear material
221 - ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}/"
222 + ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
223 ;;
224 esac
225 else
226 @@ -383,9 +396,14 @@
227 ESVN_UP_FREQ=${ESVN_UP_FREQ:-1}
228 ;;
229 *)
230 - if [[ -n $KDEBASE ]]; then
231 + if [[ -n ${KDEBASE} ]]; then
232 if [[ -n ${KMNAME} ]]; then
233 - _kmname=${KMNAME}
234 + case ${KMNAME} in
235 + kdebase-apps)
236 + _kmname="kdebase" ;;
237 + *)
238 + _kmname=${KMNAME} ;;
239 + esac
240 else
241 _kmname=${PN}
242 fi
243 @@ -394,11 +412,7 @@
244 case ${KDEBASE} in
245 kde-base)
246 case ${PV} in
247 - 4.2.60)
248 - SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.svn912032tar.bz2" ;;
249 - 4.2.61)
250 - SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.svn917530.tar.bz2" ;;
251 - 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*)
252 + 4.2.6* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*)
253 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
254 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
255 esac
256 @@ -408,8 +422,8 @@
257 ;;
258 esac
259 fi
260 - unset _kmname _kmname_pv
261 - fi
262 + unset _kmname _kmname_pv
263 + fi
264 ;;
265 esac
266
267 @@ -432,14 +446,14 @@
268 # errors and die if any required flags listed in $QT4_BUILT_WITH_USE_CHECK or
269 # $KDE4_BUILT_WITH_USE_CHECK are missing.
270 kde4-base_pkg_setup() {
271 - debug-print-function $FUNCNAME "$@"
272 + debug-print-function ${FUNCNAME} "$@"
273
274 # Don't set KDEHOME during compile, it will cause access violations
275 unset KDEHOME
276
277 # Search for best suitable kde installation for misc kde package.
278 # Computation based on NEED_KDE and KDE_MINIMAL
279 - [[ ${NEED_KDE} = latest || ${NEED_KDE} = none ]] && get_latest_kdedir
280 + [[ ${KDEBASE} != kde-base ]] && [[ ${NEED_KDE} = latest || ${NEED_KDE} = none ]] && get_latest_kdedir
281
282 # Set PREFIX
283 if use kdeprefix; then
284 @@ -451,7 +465,7 @@
285 fi
286 # Set the prefix based on KDEDIR
287 # Make it a consequence of kdeprefix
288 - PREFIX=$KDEDIR
289 + PREFIX=${KDEDIR}
290
291 unset _kdedir
292
293 @@ -459,7 +473,7 @@
294 [[ -n ${QT4_BUILT_WITH_USE_CHECK} || -n ${KDE4_BUILT_WITH_USE_CHECK[@]} ]] && \
295 die "built_with_use illegal in this EAPI!"
296
297 - if [[ $BUILD_TYPE = live && -z $I_KNOW_WHAT_I_AM_DOING ]]; then
298 + if [[ ${BUILD_TYPE} = live && -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
299 echo
300 elog "WARNING! This is an experimental live ebuild of ${KMNAME:-${PN}}"
301 elog "Use it at your own risk."
302 @@ -471,30 +485,14 @@
303 # @FUNCTION: kde4-base_src_unpack
304 # @DESCRIPTION:
305 # This function unpacks the source tarballs for KDE4 applications.
306 -#
307 -# If no argument is passed to this function, then standard src_unpack is
308 -# executed. Otherwise, options are passed to base_src_unpack.
309 kde4-base_src_unpack() {
310 - debug-print-function $FUNCNAME "$@"
311 + debug-print-function ${FUNCNAME} "$@"
312
313 - if [[ $BUILD_TYPE = live ]]; then
314 + if [[ ${BUILD_TYPE} = live ]]; then
315 migrate_store_dir
316 subversion_src_unpack
317 else
318 - [[ -z $KDE_S ]] && KDE_S="${S}"
319 - if [[ -z $* ]]; then
320 - # Unpack first and deal with KDE patches after examing possible patch sets.
321 - # To be picked up, patches need to conform to the guidelines stated before.
322 - # Monolithic ebuilds will use the split ebuild patches.
323 - [[ -d "${KDE_S}" ]] || unpack ${A}
324 - fi
325 - # Updated cmake dir
326 - if [[ -d "${WORKDIR}/cmake" && -d "${KDE_S}/cmake" ]]; then
327 - ebegin "Updating cmake/ directory..."
328 - rm -rf "${KDE_S}/cmake" || die "Unable to remove old cmake/ directory"
329 - ln -s "${WORKDIR}/cmake" "${KDE_S}/cmake" || die "Unable to symlink the new cmake/ directory"
330 - eend 0
331 - fi
332 + base_src_unpack
333 fi
334 }
335
336 @@ -507,7 +505,7 @@
337 debug-print-function ${FUNCNAME} "$@"
338
339 # Only enable selected languages, used for KDE extragear apps.
340 - if [[ -n $KDE_LINGUAS ]]; then
341 + if [[ -n ${KDE_LINGUAS} ]]; then
342 enable_selected_linguas
343 fi
344
345 @@ -515,12 +513,12 @@
346 base_src_prepare
347
348 # Save library dependencies
349 - if [[ -n $KMSAVELIBS ]] ; then
350 + if [[ -n ${KMSAVELIBS} ]] ; then
351 save_library_dependencies
352 fi
353
354 # Inject library dependencies
355 - if [[ -n $KMLOADLIBS ]] ; then
356 + if [[ -n ${KMLOADLIBS} ]] ; then
357 load_library_dependencies
358 fi
359 }
360 @@ -549,7 +547,7 @@
361 mycmakeargs="${mycmakeargs} -DKDE4_BUILD_TESTS=OFF"
362
363 # Set distribution name
364 - [[ $PN = kdelibs ]] && mycmakeargs="${mycmakeargs} -DKDE_DISTRIBUTION_TEXT=Gentoo"
365 + [[ ${PN} = kdelibs ]] && mycmakeargs="${mycmakeargs} -DKDE_DISTRIBUTION_TEXT=Gentoo"
366
367 # runpath linking
368 mycmakeargs="${mycmakeargs} -DKDE4_USE_ALWAYS_FULL_RPATH=ON"
369 @@ -562,26 +560,22 @@
370
371 # Set environment
372 QTEST_COLORED=1
373 - QT_PLUGIN_PATH=${KDEDIR}/$(get_libdir)/kde4/plugins/
374 + QT_PLUGIN_PATH="${KDEDIR}/$(get_libdir)/kde4/plugins/"
375
376 - # hardcode path to *.cmake KDE files
377 + # Hardcode path to *.pc KDE files
378 export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}${KDEDIR}/$(get_libdir)/pkgconfig"
379
380 - # additonal arguments for KOFFICE
381 - if [[ $KMNAME = koffice ]]; then
382 - case ${PN} in
383 - koffice-data) : ;;
384 - *)
385 - mycmakeargs="${mycmakeargs}
386 - -DWITH_OpenEXR=ON
387 - $(cmake-utils_use_with crypt QCA2)
388 - $(cmake-utils_use_with opengl OpenGL)"
389 - if use crypt; then
390 - mycmakeargs="${mycmakeargs}
391 - -DQCA2_LIBRARIES=/usr/$(get_libdir)/qca2/libqca.so.2"
392 - fi
393 - ;;
394 - esac
395 + # Override some environment variables
396 + PATH="${KDEDIR}/bin:${PATH}"
397 + LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}"
398 +
399 + # Set cmake prefixes to allow buildsystem to localize valid KDE installation when more are present
400 + if use kdeprefix; then
401 + mycmakeargs="${mycmakeargs}
402 + -DCMAKE_SYSTEM_INCLUDE_PATH=${KDEDIR}/include
403 + -DCMAKE_SYSTEM_LIBRARY_PATH=${KDEDIR}/$(get_libdir)
404 + -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}
405 + -DCMAKE_SYSTEM_PROGRAM_PATH=${KDEDIR}/bin"
406 fi
407
408 [ -e CMakeLists.txt ] && cmake-utils_src_configure
409 @@ -604,7 +598,7 @@
410 debug-print-function ${FUNCNAME} "$@"
411
412 if [[ -d "$WORKDIR/${PN}_build" ]]; then
413 - pushd "${WORKDIR}"/${PN}_build > /dev/null
414 + pushd "${WORKDIR}/${PN}_build" > /dev/null
415 fi
416 [ -e [Mm]akefile ] && cmake-utils_src_make "$@"
417 }
418 @@ -617,7 +611,8 @@
419
420 # Override this value, set in kde4-base_src_configure()
421 mycmakeargs="${mycmakeargs} -DKDE4_BUILD_TESTS=ON"
422 - cmake-utils_src_compile
423 + cmake-utils_src_configure
424 + kde4-base_src_compile
425
426 cmake-utils_src_test
427 }
428 @@ -628,13 +623,13 @@
429 kde4-base_src_install() {
430 debug-print-function ${FUNCNAME} "$@"
431
432 - if [[ -n $KMSAVELIBS ]] ; then
433 + if [[ -n ${KMSAVELIBS} ]] ; then
434 install_library_dependencies
435 fi
436
437 kde4-base_src_make_doc
438 if [[ -d "$WORKDIR/${PN}_build" ]]; then
439 - pushd "${WORKDIR}"/${PN}_build > /dev/null
440 + pushd "${WORKDIR}/${PN}_build" > /dev/null
441 fi
442 [ -e [Mm]akefile ] && cmake-utils_src_install
443 }
444 @@ -647,12 +642,12 @@
445
446 local doc
447 for doc in AUTHORS ChangeLog* README* NEWS TODO; do
448 - [[ -s $doc ]] && dodoc ${doc}
449 + [[ -s ${doc} ]] && dodoc ${doc}
450 done
451
452 - if [[ -z $KMNAME ]]; then
453 + if [[ -z ${KMNAME} ]]; then
454 for doc in {apps,runtime,workspace,.}/*/{AUTHORS,README*}; do
455 - if [[ -s $doc ]]; then
456 + if [[ -s ${doc} ]]; then
457 local doc_complete=${doc}
458 doc="${doc#*/}"
459 newdoc "$doc_complete" "${doc%/*}.${doc##*/}"
460 @@ -663,7 +658,7 @@
461 if [[ -n ${KDEBASE} && -d "${D}/usr/share/doc/${PF}" ]]; then
462 # work around bug #97196
463 dodir /usr/share/doc/kde && \
464 - mv "${D}"/usr/share/doc/${PF} "${D}"/usr/share/doc/kde/ || \
465 + mv "${D}/usr/share/doc/${PF}" "${D}"/usr/share/doc/kde/ || \
466 die "Failed to move docs to kde/ failed."
467 fi
468 }
469 @@ -672,6 +667,8 @@
470 # @DESCRIPTION:
471 # Function to rebuild the KDE System Configuration Cache after an application has been installed.
472 kde4-base_pkg_postinst() {
473 + debug-print-function ${FUNCNAME} "$@"
474 +
475 buildsycoca
476 }
477
478 @@ -679,5 +676,7 @@
479 # @DESCRIPTION:
480 # Function to rebuild the KDE System Configuration Cache after an application has been removed.
481 kde4-base_pkg_postrm() {
482 + debug-print-function ${FUNCNAME} "$@"
483 +
484 buildsycoca
485 }
486
487
488
489 1.13 eclass/kde4-functions.eclass
490
491 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-functions.eclass?rev=1.13&view=markup
492 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-functions.eclass?rev=1.13&content-type=text/plain
493 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-functions.eclass?r1=1.12&r2=1.13
494
495 Index: kde4-functions.eclass
496 ===================================================================
497 RCS file: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v
498 retrieving revision 1.12
499 retrieving revision 1.13
500 diff -u -r1.12 -r1.13
501 --- kde4-functions.eclass 10 Feb 2009 20:07:24 -0000 1.12
502 +++ kde4-functions.eclass 1 Mar 2009 11:44:09 -0000 1.13
503 @@ -1,6 +1,6 @@
504 # Copyright 1999-2008 Gentoo Foundation
505 # Distributed under the terms of the GNU General Public License v2
506 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.12 2009/02/10 20:07:24 scarabeus Exp $
507 +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.13 2009/03/01 11:44:09 scarabeus Exp $
508
509 # @ECLASS: kde4-functions.eclass
510 # @MAINTAINER:
511 @@ -38,7 +38,7 @@
512 # @DESCRIPTION:
513 # The slots used by all KDE versions later than 4.0. The live-ebuilds use
514 # KDE_LIVE_SLOTS instead.
515 -KDE_SLOTS=( kde-4 4.1 4.2 )
516 +KDE_SLOTS=( kde-4 4.1 4.2 4.3 )
517
518 # @ECLASS-VARIABLE: KDE_LIVE_SLOTS
519 # @DESCRIPTION:
520 @@ -64,7 +64,7 @@
521
522 ebegin "Running kbuildsycoca4 to build global database"
523 # This is needed because we support multiple kde versions installed together.
524 - XDG_DATA_DIRS="/usr/share:${KDEDIRS//:/\/share:}/share:/usr/local/share" \
525 + XDG_DATA_DIRS="/usr/share:${KDEDIR}/share:/usr/local/share" \
526 DISPLAY="" DBUS_SESSION_BUS_ADDRESS="" \
527 ${KDEDIR}/bin/kbuildsycoca4 --global --noincremental &> /dev/null
528 eend $?
529 @@ -102,14 +102,6 @@
530 # but this default can be overridden by defining KDE_LINGUAS_DIR.
531 enable_selected_linguas() {
532 local lingua sr_mess wp
533 - # inform user about kde-l10n for full translation.
534 - if ! has_version kde-base/kde-l10n; then
535 - echo
536 - elog "For fully translated application you should also emerge"
537 - elog "kde-base/kde-l10n package which ships translated kde core"
538 - elog "strings."
539 - echo
540 - fi
541
542 # ebuild overridable linguas directory definition
543 KDE_LINGUAS_DIR=${KDE_LINGUAS_DIR:=${S}/po}
544 @@ -150,63 +142,6 @@
545 done
546 }
547
548 -# @FUNCTION: koffice_fix_libraries
549 -# @DESCRIPTION:
550 -# replace the weird koffice lib search with hardcoded one, so it
551 -# actually builds and works.
552 -koffice_fix_libraries() {
553 - local LIB_ARRAY R_QT_kostore R_BAS_kostore R_BAS_koodf R_KROSS_kokross R_QT_komain
554 - local R_CMS_pigmentcms R_BAS_pigmentcms R_BAS_koresources R_BAS_flake R_BAS_koguiutils
555 - local R_BAS_kopageapp R_BAS_kotext R_BAS_kowmf libname R
556 - case ${PN} in
557 - koffice-data|koffice-libs)
558 - ;;
559 - *)
560 - ### basic array
561 - LIB_ARRAY="kostore koodf kokross komain pigmentcms koresources flake koguiutils kopageapp kotext kowmf"
562 - ### dep array
563 - R_QT_kostore="\"/usr/$(get_libdir)/qt4/libQtCore.so\"
564 - \"/usr/$(get_libdir)/qt4/libQtXml.so\"
565 - \"${KDEDIR}/$(get_libdir)/libkdecore.so\""
566 - R_BAS_kostore="libkostore ${R_QT_kostore}"
567 - R_BAS_koodf="libkoodf ${R_BAS_kostore}"
568 - R_KROSS_kokross="
569 - \"${KDEDIR}/$(get_libdir)/libkrossui.so\"
570 - \"${KDEDIR}/$(get_libdir)/libkrosscore.so\""
571 - R_BAS_kokross="libkokross ${R_BAS_koodf} ${R_KROSS_kokross}"
572 - R_QT_komain="\"/usr/$(get_libdir)/qt4/libQtGui.so\""
573 - R_BAS_komain="libkomain ${R_BAS_koodf} ${R_QT_komain}"
574 - R_CMS_pigmentcms="\"/usr/$(get_libdir)/liblcms.so\""
575 - R_BAS_pigmentcms="libpigmentcms ${R_BAS_komain} ${R_CMS_pigmentcms}"
576 - R_BAS_koresources="libkoresources ${R_BAS_pigmentcms}"
577 - R_BAS_flake="libflake ${R_BAS_pigmentcms}"
578 - R_BAS_koguiutils="libkoguiutils libkoresources libflake ${R_BAS_pigmentcms}"
579 - R_BAS_kopageapp="libkopageapp ${R_BAS_koguitls}"
580 - R_BAS_kotext="libkotext libkoresources libflake ${R_BAS_pigmentcms}"
581 - ### additional unmentioned stuff
582 - R_BAS_kowmf="libkowmf"
583 - for libname in ${LIB_ARRAY}; do
584 - ebegin "Fixing library ${libname} with hardcoded path"
585 - for libpath in $(eval "echo \$R_BAS_${libname}"); do
586 - if [[ "${libpath}" != "\"/usr/"* ]]; then
587 - R="${R} \"${KDEDIR}/$(get_libdir)/${libpath}.so\""
588 - else
589 - R="${R} ${libpath}"
590 - fi
591 - done
592 - find "${S}" -name CMakeLists.txt -print| xargs -i \
593 - sed -i \
594 - -e "s: ${libname} : ${R} :g" \
595 - -e "s: ${libname}): ${R}):g" \
596 - -e "s:(${libname} :(${R} :g" \
597 - -e "s:(${libname}):(${R}):g" \
598 - -e "s: ${libname}$: ${R}:g" \
599 - {} || die "Fixing library names failed."
600 - eend $?
601 - done
602 - ;;
603 - esac
604 -}
605 # @FUNCTION: get_build_type
606 # @DESCRIPTION:
607 # Determine whether we are using live ebuild or tbzs.
608 @@ -229,16 +164,16 @@
609 case ${KDE_WANTED} in
610 # note this will need to be updated as stable moves and so on
611 live)
612 - _versions="9999 4.1.69 4.1.0"
613 + _versions="9999 4.2.61 4.2.0 4.1.0"
614 ;;
615 snapshot)
616 - _versions="4.1.69 4.1.0 9999"
617 + _versions="4.2.61 4.2.0 4.1.0 9999"
618 ;;
619 testing)
620 - _versions="4.1.0 4.1.69 9999"
621 + _versions="4.2.0 4.1.0 4.2.61 9999"
622 ;;
623 stable)
624 - _versions="4.1.0 4.1.69 9999"
625 + _versions="4.2.0 4.1.0 4.1.61 9999"
626 ;;
627 *) die "KDE_WANTED=${KDE_WANTED} not supported here." ;;
628 esac
629 @@ -252,7 +187,11 @@
630 _kdedir="live"
631 break
632 ;;
633 - 4.1.69)
634 + 4.3.0 | 4.2.61)
635 + _kdedir="4.3"
636 + break
637 + ;;
638 + 4.2.0 | 4.1.61)
639 _kdedir="4.2"
640 break
641 ;;
642 @@ -263,6 +202,8 @@
643 esac
644 fi
645 done
646 +
647 + debug-print-function ${FUNCNAME} "$@" "KDE_WANTED=${KDE_WANTED} -> _kdedir=${_kdedir}"
648 }
649
650 # @FUNCTION: migrate_store_dir
651
652
653
654 1.11 eclass/kde4-meta.eclass
655
656 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-meta.eclass?rev=1.11&view=markup
657 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-meta.eclass?rev=1.11&content-type=text/plain
658 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-meta.eclass?r1=1.10&r2=1.11
659
660 Index: kde4-meta.eclass
661 ===================================================================
662 RCS file: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v
663 retrieving revision 1.10
664 retrieving revision 1.11
665 diff -u -r1.10 -r1.11
666 --- kde4-meta.eclass 12 Jan 2009 19:40:34 -0000 1.10
667 +++ kde4-meta.eclass 1 Mar 2009 11:44:09 -0000 1.11
668 @@ -1,6 +1,6 @@
669 -# Copyright 1999-2008 Gentoo Foundation
670 +# Copyright 1999-2009 Gentoo Foundation
671 # Distributed under the terms of the GNU General Public License v2
672 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.10 2009/01/12 19:40:34 scarabeus Exp $
673 +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.11 2009/03/01 11:44:09 scarabeus Exp $
674 #
675 # @ECLASS: kde4-meta.eclass
676 # @MAINTAINER:
677 @@ -12,17 +12,6 @@
678 # You must define KMNAME to use this eclass, and do so before inheriting it. All other variables are optional.
679 # Do not include the same item in more than one of KMMODULE, KMMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY.
680
681 -# we want opengl optional in each koffice package
682 -if [[ $KMNAME = koffice ]]; then
683 - case ${PN} in
684 - koffice-data)
685 - ;;
686 - *)
687 - OPENGL_REQUIRED=optional
688 - ;;
689 - esac
690 -fi
691 -
692 inherit kde4-base versionator
693
694 EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
695 @@ -51,25 +40,26 @@
696 kdepim)
697 DEPEND="${DEPEND} dev-libs/boost app-office/akonadi-server"
698 RDEPEND="${RDEPEND} dev-libs/boost"
699 - if [[ $PN != kode ]]; then
700 - DEPEND="${DEPEND} >=kde-base/kode-${PV}:${SLOT}"
701 - RDEPEND="${RDEPEND} >=kde-base/kode-${PV}:${SLOT}"
702 + if [[ ${PN} != kode ]]; then
703 + DEPEND="${DEPEND} >=kde-base/kode-${PV}:${SLOT}[kdeprefix=]"
704 + RDEPEND="${RDEPEND} >=kde-base/kode-${PV}:${SLOT}[kdeprefix=]"
705 fi
706 case ${PN} in
707 akregator|kaddressbook|kjots|kmail|kmobiletools|knode|knotes|korganizer|ktimetracker)
708 IUSE="+kontact"
709 - DEPEND="${DEPEND} kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT} )"
710 - RDEPEND="${RDEPEND} kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT} )"
711 + DEPEND="${DEPEND} kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] )"
712 + RDEPEND="${RDEPEND} kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] )"
713 ;;
714 esac
715 ;;
716 kdegames)
717 - if [[ $PN != libkdegames ]]; then
718 - DEPEND="${DEPEND} >=kde-base/libkdegames-${PV}:${SLOT}"
719 - RDEPEND="${RDEPEND} >=kde-base/libkdegames-${PV}:${SLOT}"
720 + if [[ ${PN} != libkdegames ]]; then
721 + DEPEND="${DEPEND} >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=]"
722 + RDEPEND="${RDEPEND} >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=]"
723 fi
724 ;;
725 koffice)
726 + [[ ${PN} != koffice-data ]] && IUSE="debug"
727 case ${PV} in
728 9999*) DEPEND="${DEPEND} !app-office/${PN}:2" ;;
729 1.9*|2*) DEPEND="${DEPEND} !app-office/${PN}:live" ;;
730 @@ -84,12 +74,18 @@
731 RDEPEND="${RDEPEND} media-libs/lcms"
732 ;;
733 *)
734 - IUSE="+crypt"
735 - DEPEND="${DEPEND} crypt? ( >=app-crypt/qca-2 )"
736 - RDEPEND="${RDEPEND} crypt? ( >=app-crypt/qca-2 )"
737 - if [[ $PN != koffice-libs ]]; then
738 - DEPEND="${DEPEND} >=app-office/koffice-libs-${PV}:${SLOT}"
739 - RDEPEND="${RDEPEND} >=app-office/koffice-libs-${PV}:${SLOT}"
740 + DEPEND="${DEPEND}
741 + dev-cpp/eigen:2
742 + media-gfx/imagemagick[openexr?]
743 + media-libs/fontconfig
744 + media-libs/freetype:2
745 + "
746 + RDEPEND="${DEPEND}"
747 + if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then
748 + DEPEND="${DEPEND}
749 + >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]"
750 + RDEPEND="${RDEPEND}
751 + >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]"
752 fi
753 ;;
754 esac
755 @@ -99,6 +95,17 @@
756 debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies"
757 debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies"
758
759 +# Useful to build kde4-meta style stuff from extragear/playground (plasmoids etc)
760 +case ${SLOT} in
761 + live)
762 + case ${KMNAME} in
763 + extragear*|playground*)
764 + ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
765 + ;;
766 + esac
767 + ;;
768 +esac
769 +
770 # @ECLASS-VARIABLE: KMNAME
771 # @DESCRIPTION:
772 # Name of the parent-module (e.g. kdebase, kdepim, ...). You _must_ set it
773 @@ -120,8 +127,8 @@
774 # Example usage: If you're installing subdirectories of a package, like plugins,
775 # you mark the top subdirectory (containing the package) as $KMEXTRACTONLY, and
776 # set KMNOMODULE="true".
777 -if [[ -z $KMMODULE && $KMNOMODULE != true ]]; then
778 - KMMODULE=$PN
779 +if [[ -z ${KMMODULE} && ${KMNOMODULE} != true ]]; then
780 + KMMODULE=${PN}
781 fi
782
783 # @ECLASS-VARIABLE: KMEXTRA
784 @@ -153,6 +160,8 @@
785 # Currently just calls its equivalent in kde4-base.eclass(5). Use this one in
786 # split ebuilds.
787 kde4-meta_pkg_setup() {
788 + debug-print-function ${FUNCNAME} "$@"
789 +
790 kde4-base_pkg_setup
791 }
792
793 @@ -161,10 +170,11 @@
794 # This function unpacks the source for split ebuilds. See also
795 # kde4-meta-src_extract.
796 kde4-meta_src_unpack() {
797 - debug-print-function ${FUNCNAME} "$@"
798 - if [[ $BUILD_TYPE = live ]]; then
799 + debug-print-function ${FUNCNAME} "$@"
800 +
801 + if [[ ${BUILD_TYPE} = live ]]; then
802 migrate_store_dir
803 - S="${WORKDIR}/${PN}-${PV}"
804 + S="${WORKDIR}/${P}"
805 mkdir -p "${S}"
806 ESVN_RESTRICT="export" subversion_src_unpack
807 subversion_wc_info
808 @@ -183,7 +193,9 @@
809 # Also see KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY and
810 # KMTARPARAMS.
811 kde4-meta_src_extract() {
812 - if [[ $BUILD_TYPE = live ]]; then
813 + debug-print-function ${FUNCNAME} "$@"
814 +
815 + if [[ ${BUILD_TYPE} = live ]]; then
816 local rsync_options subdir kmnamedir targetdir
817 # Export working copy to ${S}
818 einfo "Exporting parts of working copy to ${S}"
819 @@ -211,12 +223,13 @@
820 || die "${ESVN}: can't export subdirectory '${subdir}' to '${S}/${targetdir}'."
821 done
822
823 - if [[ $KMNAME = kdebase-runtime && $PN != kdebase-data ]]; then
824 + if [[ ${KMNAME} = kdebase-runtime && ${PN} != kdebase-data ]]; then
825 sed -i -e '/^install(PROGRAMS[[:space:]]*[^[:space:]]*\/kde4[[:space:]]/s/^/#DONOTINSTALL /' \
826 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
827 fi
828 else
829 - local abort tarball tarfile f extractlist
830 + local abort tarball tarfile f extractlist moduleprefix
831 +
832 case $KMNAME in
833 kdebase-apps)
834 tarball="${KMNAME#-apps}-${PV}.tar.bz2"
835 @@ -225,7 +238,7 @@
836 tarball="${KMNAME}-${PV}.tar.bz2"
837 ;;
838 esac
839 - tarfile="${DISTDIR}"/${tarball}
840 + tarfile="${DISTDIR}/${tarball}"
841
842 ebegin "Unpacking parts of ${tarball} to ${WORKDIR}"
843
844 @@ -240,30 +253,28 @@
845 KMTARPARAMS="${KMTARPARAMS} -j"
846
847 pushd "${WORKDIR}" > /dev/null
848 - [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf $tarfile $KMTARPARAMS $extractlist >&2
849 - tar -xpf $tarfile $KMTARPARAMS $extractlist 2> /dev/null
850 + [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2
851 + tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null
852
853 - # Default $S is based on $P; rename the extracted directory to match $S
854 + # Default $S is based on $P; rename the extracted directory to match $S if necessary
855 mv ${KMNAME}-${PV} ${P} || die "Died while moving \"${KMNAME}-${PV}\" to \"${P}\""
856
857 popd > /dev/null
858
859 eend $?
860
861 + # We need to clear it here to make verification below work
862 + unset moduleprefix
863 +
864 if [[ -n ${KDE4_STRICTER} ]]; then
865 for f in $(__list_needed_subdirectories fatal); do
866 - if [[ ! -e ${S}/${f#*/} ]]; then
867 + if [[ ! -e "${S}/${f#*/}" ]]; then
868 eerror "'${f#*/}' is missing"
869 abort=true
870 fi
871 done
872 [[ -n ${abort} ]] && die "There were missing files."
873 fi
874 - kde4-base_src_unpack
875 - fi
876 - # fix koffice linking
877 - if [[ $KMNAME = koffice ]]; then
878 - koffice_fix_libraries
879 fi
880 }
881
882 @@ -305,17 +316,11 @@
883 ConfigureChecks.cmake
884 config-workspace.h.cmake
885 config-X11.h.cmake
886 - startkde.cmake"
887 - case ${SLOT} in
888 - 4.2)
889 - KMEXTRACTONLY="${KMEXTRACTONLY}
890 - KDE4WorkspaceConfig.cmake.in"
891 - ;;
892 - *) : ;;
893 - esac
894 + startkde.cmake
895 + KDE4WorkspaceConfig.cmake.in"
896 ;;
897 kdegames)
898 - if [[ ${PN} != "libkdegames" ]]; then
899 + if [[ ${PN} != libkdegames ]]; then
900 KMEXTRACTONLY="${KMEXTRACTONLY}
901 libkdegames"
902 fi
903 @@ -337,20 +342,6 @@
904 config-openexr.h.cmake
905 config-opengl.h.cmake
906 config-prefix.h.cmake"
907 - case ${PN} in
908 - koffice-libs|koffice-data)
909 - ;;
910 - *)
911 - # add basic extract for all packages
912 - KMEXTRACTONLY="${KMEXTRACTONLY}
913 - filters/
914 - libs/
915 - plugins/"
916 - if [[ ${PN} != "kplato" ]]; then
917 - KMEXTRA="${KMEXTRA} filters/${PN}"
918 - fi
919 - ;;
920 - esac
921 ;;
922 esac
923 # Don't install cmake modules for split ebuilds, to avoid collisions.
924 @@ -388,12 +379,12 @@
925 done
926
927 # Expand KMMODULE
928 - if [[ -n $KMMODULE ]]; then
929 + if [[ -n ${KMMODULE} ]]; then
930 kmmodule_expanded="${KMMODULE}"
931 j=$(dirname ${KMMODULE})
932 while [[ ${j} != "." ]]; do
933 - kmmodule_expanded="${kmmodule_expanded} $j/CMakeLists.txt";
934 - j=$(dirname $j)
935 + kmmodule_expanded="${kmmodule_expanded} ${j}/CMakeLists.txt";
936 + j=$(dirname ${j})
937 done
938 fi
939
940 @@ -411,17 +402,16 @@
941 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmmodule_expanded: ${kmmodule_expanded}"
942 debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmcompileonly_expanded: ${kmcompileonly_expanded}"
943
944 -
945 case ${PV} in
946 scm|9999*) : ;;
947 *) topdir="${KMNAME}-${PV}/" ;;
948 esac
949 -
950 # Create final list of stuff to extract
951 + # We append topleveldir only when specified (usually for tarballs)
952 for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \
953 ${KMEXTRACTONLY}
954 do
955 - extractlist="${extractlist} ${topdir}${i}"
956 + extractlist="${extractlist} ${topdir}${moduleprefix}${i}"
957 done
958
959 echo ${extractlist}
960 @@ -460,7 +450,7 @@
961 # @FUNCTION: kde4-meta_change_cmakelists
962 # @DESCRIPTION:
963 kde4-meta_change_cmakelists() {
964 - debug-print-function ${FUNCNAME} "$@"
965 + debug-print-function ${FUNCNAME} "$@"
966
967 pushd "${S}" > /dev/null
968
969 @@ -526,23 +516,21 @@
970 # COLLISION PROTECT section
971 # Install the startkde script just once, as a part of kde-base/kdebase-startkde,
972 # not as a part of every package.
973 - if [[ ${PN} != "kdebase-startkde" && -f "${S}"/CMakeLists.txt ]]; then
974 + if [[ ${PN} != kdebase-startkde && -f "${S}"/CMakeLists.txt ]]; then
975 # The startkde script moved to kdebase-workspace for KDE4 versions > 3.93.0.
976 sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \
977 die "${LINENO}: sed died in the kdebase-startkde collision prevention section"
978 fi
979 # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82
980 - if [[ ${SLOT} == 4.2 ]] || [[ ${PV} == 9999 ]]; then
981 - if [[ ${PN} != libkworkspace ]]; then
982 - sed -i -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \
983 - CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip EXPORT section"
984 - fi
985 + if [[ ${PN} != libkworkspace ]]; then
986 + sed -i -e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \
987 + CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip EXPORT section"
988 fi
989 ;;
990 kdebase-runtime)
991 # COLLISION PROTECT section
992 # Only install the kde4 script as part of kde-base/kdebase-data
993 - if [[ ${PN} != "kdebase-data" && -f "${S}"/CMakeLists.txt ]]; then
994 + if [[ ${PN} != kdebase-data && -f "${S}"/CMakeLists.txt ]]; then
995 sed -i -e '/^install(PROGRAMS[[:space:]]*[^[:space:]]*\/kde4[[:space:]]/s/^/#DONOTINSTALL /' \
996 "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
997 fi
998 @@ -556,6 +544,16 @@
999 ;;
1000 esac
1001 ;;
1002 + koffice)
1003 + # prevent collisions
1004 + if [[ ${PN} != koffice-data ]]; then
1005 + sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \
1006 + "${S}"/cmake/modules/CMakeLists.txt || \
1007 + die "${LINENO}: sed died in collision prevention section"
1008 + sed -i -n -e '1h;1!H;${g;s/install(.\+config-openexr.h.\+)//;p}' \
1009 + "${S}"/CMakeLists.txt || \
1010 + die "${LINENO}: sed died in collision prevention section"
1011 + fi
1012 esac
1013
1014 popd > /dev/null
1015 @@ -566,7 +564,7 @@
1016 # Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split
1017 # ebuilds.
1018 kde4-meta_src_configure() {
1019 - debug-print-function ${FUNCNAME} "$@"
1020 + debug-print-function ${FUNCNAME} "$@"
1021
1022 kde4-base_src_configure
1023 }
1024 @@ -576,7 +574,7 @@
1025 # General function for compiling split KDE4 applications.
1026 # Overrides kde4-base_src_compile.
1027 kde4-meta_src_compile() {
1028 - debug-print-function ${FUNCNAME} "$@"
1029 + debug-print-function ${FUNCNAME} "$@"
1030
1031 kde4-base_src_make
1032 }
1033 @@ -603,12 +601,6 @@
1034 if [[ -n ${KMSAVELIBS} ]]; then
1035 install_library_dependencies
1036 fi
1037 -
1038 - # remove unvanted koffice stuff
1039 - if [[ $KMNAME = koffice && $PN != koffice-data ]]; then
1040 - rm "$D/$KDEDIR/include/config-openexr.h"
1041 - rm "$D/$KDEDIR/share/apps/cmake/modules/FindKOfficeLibs.cmake"
1042 - fi
1043 }
1044
1045 # @FUNCTION: kde4-meta_src_make_doc
1046 @@ -616,11 +608,11 @@
1047 # This function searches in ${S}/${KMMODULE},
1048 # and tries to install "AUTHORS ChangeLog* README* NEWS todo" if these files exist.
1049 kde4-meta_src_make_doc() {
1050 - debug-print-function $FUNCNAME "$@"
1051 + debug-print-function ${FUNCNAME} "$@"
1052
1053 local doc
1054 for doc in AUTHORS ChangeLog* README* NEWS TODO; do
1055 - [[ -s ${KMMODULE}/$doc ]] && newdoc "${KMMODULE}/${doc}" "${doc}.${KMMODULE##*/}"
1056 + [[ -s ${KMMODULE}/${doc} ]] && newdoc "${KMMODULE}/${doc}" "${doc}.${KMMODULE##*/}"
1057 done
1058
1059 kde4-base_src_make_doc
1060 @@ -631,6 +623,8 @@
1061 # Currently just calls its equivalent in kde4-base.eclass(5). Use this in split
1062 # ebuilds.
1063 kde4-meta_pkg_postinst() {
1064 + debug-print-function ${FUNCNAME} "$@"
1065 +
1066 kde4-base_pkg_postinst
1067 }
1068
1069 @@ -639,6 +633,7 @@
1070 # Currently just calls its equivalent in kde4-base.eclass(5). Use this in split
1071 # ebuilds.
1072 kde4-meta_pkg_postrm() {
1073 + debug-print-function ${FUNCNAME} "$@"
1074 +
1075 kde4-base_pkg_postrm
1076 }
1077 -