/[gentoo-x86]/eclass/kde4-base.eclass
Gentoo

Diff of /eclass/kde4-base.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.10 Revision 1.17
1# Copyright 2007-2008 Gentoo Foundation 1# Copyright 2007-2008 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/kde4-base.eclass,v 1.10 2008/04/14 13:23:14 zlin Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.17 2008/11/21 17:06:03 jmbsvicetto Exp $
4 4
5# @ECLASS: kde4-base.eclass 5# @ECLASS: kde4-base.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# kde@gentoo.org 7# kde@gentoo.org
8# @BLURB: This eclass provides functions for kde 4.0 ebuilds 8# @BLURB: This eclass provides functions for kde 4.X ebuilds
9# @DESCRIPTION: 9# @DESCRIPTION:
10# The kde4-base.eclass provides support for building KDE4 monolithic ebuilds 10# The kde4-base.eclass provides support for building KDE4 monolithic ebuilds
11# and KDE4 applications. 11# and KDE4 applications.
12# 12#
13# NOTE: This eclass uses the SLOT dependencies from EAPI="1" or compatible, 13# NOTE: This eclass uses the SLOT dependencies from EAPI="1" or compatible,
14# hence you must define EAPI="1" in the ebuild, before inheriting any eclasses. 14# and use deps from EAPI="2", hence you must define EAPI="2" in the ebuild,
15# before inheriting any eclasses.
15 16
16inherit base eutils multilib cmake-utils kde4-functions 17inherit base cmake-utils eutils kde4-functions multilib
17 18
19case "${EAPI}" in
20 2)
21 EXPORT_FUNCTIONS pkg_setup src_unpack src_configure src_compile src_test src_install pkg_postinst pkg_postrm
22 ;;
23 *)
18EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_postinst pkg_postrm 24 EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_postinst pkg_postrm
25 ;;
26esac
19 27
28# Set the qt dependencies
20kde4-base_set_qt_dependencies() { 29kde4-base_set_qt_dependencies() {
21 local qt qtcore qtgui qt3support qtsvg qttest qtopengl qtdepend qtopengldepend 30 local qt qtcore qtgui qt3support qtdepend qtopengldepend
22 31
23 # use dependencies 32 # use dependencies
24 case "${EAPI}" in 33 case "${EAPI}" in
25 kdebuild-1) 34 2 | 2_pre3 | 2_pre2 | 2_pre1)
26 qt="[accessibility][dbus][debug?][gif][jpeg][png][qt3support][ssl][zlib]" 35
27 qtcore="[debug?][qt3support][ssl]" 36 qt="["
28 qtgui="[accessibility][dbus][debug?]"
29 qt3support="[accessibility][debug?]"
30 qtsvg="[debug?]"
31 qttest="[debug?]"
32 qtopengl="[debug?]"
33 case "${OPENGL_REQUIRED}" in 37 case "${OPENGL_REQUIRED}" in
34 always) 38 always)
35 qt="${qt}[opengl]" 39 qt="${qt}opengl,"
36 ;; 40 ;;
37 optional) 41 optional)
38 qt="${qt}[opengl?]" 42 qt="${qt}opengl?,"
39 ;; 43 ;;
40 esac 44 esac
45 qt="${qt}accessibility,dbus,gif,jpeg,png,qt3support,ssl,zlib]"
46 qtcore="[qt3support,ssl]"
47 qtgui="[accessibility,dbus]"
48 qt3support="[accessibility]"
41 ;; 49 ;;
42 esac 50 esac
43 51
44 # split qt 52 # split qt
45 qtdepend=" 53 qtdepend="
54 !x11-libs/qt-phonon
46 x11-libs/qt-core:4${qtcore} 55 x11-libs/qt-core:4${qtcore}
47 x11-libs/qt-gui:4${qtgui} 56 x11-libs/qt-gui:4${qtgui}
48 x11-libs/qt-qt3support:4${qt3support} 57 x11-libs/qt-qt3support:4${qt3support}
58 x11-libs/qt-script:4
49 x11-libs/qt-svg:4${qtsvg} 59 x11-libs/qt-svg:4
50 x11-libs/qt-test:4${qttest}" 60 x11-libs/qt-test:4"
51 qtopengldepend="x11-libs/qt-opengl:4${qtopengl}" 61 qtopengldepend="x11-libs/qt-opengl:4"
52 62
53 # allow monolithic qt for PV < 4.1 63 # allow monolithic qt for PV < 4.1
54 case "${PV}" in 64 case "${PV}" in
55 scm|9999.4|4.1*) : ;; 65 scm|9999*|4.1*|4.0.9*|4.0.8*) : ;;
56 *) 66 *)
57 qtdepend="|| ( ( ${qtdepend} ) >=x11-libs/qt-4.3.3:4${qt} )" 67 qtdepend="|| ( ( ${qtdepend} ) >=x11-libs/qt-4.3.3:4${qt} )"
58 qtopengldepend="|| ( ${qtopengldepend} >=x11-libs/qt-4.3.3:4 )" 68 qtopengldepend="|| ( ${qtopengldepend} >=x11-libs/qt-4.3.3:4 )"
59 ;; 69 ;;
60 esac 70 esac
77 87
78 COMMONDEPEND="${COMMONDEPEND} ${qtdepend}" 88 COMMONDEPEND="${COMMONDEPEND} ${qtdepend}"
79} 89}
80kde4-base_set_qt_dependencies 90kde4-base_set_qt_dependencies
81 91
92# Set the cmake dependencies
93case "${PV}" in
94 9999*)
95 CMAKEDEPEND=">=dev-util/cmake-2.6"
96 ;;
97 *)
98 CMAKEDEPEND=">=dev-util/cmake-2.4.7-r1"
99 ;;
100esac
101
102# Set the common dependencies
82DEPEND="${DEPEND} ${COMMONDEPEND} 103DEPEND="${DEPEND} ${COMMONDEPEND} ${CMAKEDEPEND}
83 >=dev-util/cmake-2.4.7-r1
84 dev-util/pkgconfig 104 dev-util/pkgconfig
105 kde-base/automoc
85 x11-libs/libXt 106 x11-libs/libXt
86 x11-proto/xf86vidmodeproto" 107 x11-proto/xf86vidmodeproto"
87RDEPEND="${RDEPEND} ${COMMONDEPEND}" 108RDEPEND="${RDEPEND} ${COMMONDEPEND}"
109
110# Add the kdeprefix use flag
111case "${EAPI}" in
112 2 | 2_pre3 | 2_pre2 | 2_pre1)
113 IUSE="${IUSE} kdeprefix"
114 ;;
115esac
88 116
89# @ECLASS-VARIABLE: OPENGL_REQUIRED 117# @ECLASS-VARIABLE: OPENGL_REQUIRED
90# @DESCRIPTION: 118# @DESCRIPTION:
91# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'. 119# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'.
92# This variable must be set before inheriting any eclasses. Defaults to 'never'. 120# This variable must be set before inheriting any eclasses. Defaults to 'never'.
144case ${NEED_KDE} in 172case ${NEED_KDE} in
145 latest) 173 latest)
146 # Should only be used by 'kde-base'-ebuilds 174 # Should only be used by 'kde-base'-ebuilds
147 if [[ "${KDEBASE}" == "kde-base" ]]; then 175 if [[ "${KDEBASE}" == "kde-base" ]]; then
148 case ${PV} in 176 case ${PV} in
149 3.9*) _kdedir="3.9" ;; 177 4.1*| 4.0.9* | 4.0.8*)
178 _kdedir="4.1"
179 _pv="-${PV}:4.1" ;;
180 4.0*)
150 4*) _kdedir="4.0" ;; 181 _kdedir="4.0"
182 _pv="-${PV}:kde-4" ;;
183 3.9*)
184 _kdedir="3.9"
185 _pv="-${PV}:kde-4" ;;
186 *)
151 *) die "NEED_KDE=latest not supported for PV=${PV}" ;; 187 die "NEED_KDE=latest not supported for PV=${PV}" ;;
152 esac 188 esac
153 _operator=">=" 189 _operator=">="
154 _pv="-${PV}:kde-4"
155 else 190 else
191 case ${PV} in
192 4.1 | 4.0.9* | 4.0.8*) _kdedir="4.1" ;;
156 _kdedir="4.0" 193 4.0*) _kdedir="4.0" ;;
157 _pv=":kde-4" 194 3.9*) _kdedir="3.9" ;;
195 *) die "NEED_KDE=latest not supported for PV=${PV}" ;;
196 esac
158 fi 197 fi
159 ;; 198 ;;
160 scm|svn|9999*|:kde-svn) 199
200 # NEED_KDE=":${SLOT}"
201 :kde-svn)
161 _kdedir="svn" 202 _kdedir="svn"
162 _pv=":kde-svn" 203 _pv="-${NEED_KDE}"
163 export NEED_KDE="svn" 204 export NEED_KDE="svn"
164 ;; 205 ;;
206 :4.1)
207 _kdedir="4.1"
208 _pv="${NEED_KDE}"
209 ;;
210 :kde-4)
211 _kdedir="4.0"
212 _pv="${NEED_KDE}"
213 ;;
214
215 # NEED_KDE="${PV}:${SLOT}"
165 *:kde-svn) 216 *:kde-svn)
166 _kdedir="svn" 217 _kdedir="svn"
167 _operator=">=" 218 _operator=">="
168 _pv="-${NEED_KDE}" 219 _pv="-${NEED_KDE}"
169 export NEED_KDE="svn" 220 export NEED_KDE="svn"
170 ;; 221 ;;
171 # The ebuild handles dependencies, KDEDIR, SLOT. 222 *:4.1)
172 none)
173 :
174 ;;
175 # NEED_KDE=":${SLOT}"
176 :kde-4)
177 _kdedir="4.0" 223 _kdedir="4.1"
224 _operator=">="
178 _pv="${NEED_KDE}" 225 _pv="-${NEED_KDE}"
179 ;; 226 ;;
180 # NEED_KDE="${PV}:${SLOT}"
181 *:kde-4) 227 *:kde-4)
182 _kdedir="4.0" 228 _kdedir="4.0"
183 _operator=">=" 229 _operator=">="
184 _pv="-${NEED_KDE}" 230 _pv="-${NEED_KDE}"
185 ;; 231 ;;
232
233 # NEED_KDE="${PV}"
234 scm|svn|9999*)
235 _kdedir="svn"
236 _operator=">="
237 _pv="-${NEED_KDE}:kde-svn"
238 export NEED_KDE="svn"
239 ;;
240 4.1 | 4.0.9* | 4.0.8*)
241 _kdedir="4.1"
242 _operator=">="
243 _pv="-${NEED_KDE}:4.1"
244 ;;
245 4.0* | 4)
246 _kdedir="4.0"
247 _operator=">="
248 _pv="-${NEED_KDE}:kde-4"
249 ;;
186 3.9*) 250 3.9*)
187 _kdedir="3.9" 251 _kdedir="3.9"
188 _operator=">=" 252 _operator=">="
189 _pv="-${NEED_KDE}:kde-4" 253 _pv="-${NEED_KDE}:kde-4"
190 ;; 254 ;;
255
256 # The ebuild handles dependencies, KDEDIR, SLOT.
257 none)
258 :
259 ;;
260
191 4*) 261 *)
192 _kdedir="4.0"
193 _operator=">="
194 _pv="-${NEED_KDE}:kde-4"
195 ;;
196 *) die "NEED_KDE=${NEED_KDE} currently not supported." 262 die "NEED_KDE=${NEED_KDE} currently not supported."
197 ;; 263 ;;
198esac 264esac
199 265
200if [[ ${NEED_KDE} != none ]]; then 266if [[ ${NEED_KDE} != none ]]; then
201 KDEDIR="/usr/kde/${_kdedir}"
202 KDEDIRS="/usr:/usr/local:${KDEDIR}"
203 267
268 #Set the SLOT
204 if [[ -n ${KDEBASE} ]]; then 269 if [[ -n ${KDEBASE} ]]; then
205 if [[ ${NEED_KDE} = svn ]]; then 270 if [[ ${NEED_KDE} = svn ]]; then
206 SLOT="kde-svn" 271 SLOT="kde-svn"
207 else 272 else
273 case ${PV} in
274 4.1* | 4.0.9* | 4.0.8*) SLOT="4.1" ;;
208 SLOT="kde-4" 275 *) SLOT="kde-4" ;;
209 fi 276 esac
210 fi 277 fi
278 fi
279
280 # Block install of other SLOTS unless kdeprefix
281 case "${EAPI}" in
282 2 | 2_pre3 | 2_pre2 | 2_pre1)
283 for KDE_SLOT in ${KDE_SLOTS[@]}; do
284 # block non kdeprefix ${PN} on other slots
285 if [[ ${SLOT} != ${KDE_SLOT} ]]; then
286 DEPEND="${DEPEND}
287 !kdeprefix? ( !kde-base/${PN}:${KDE_SLOT}[-kdeprefix] )"
288 RDEPEND="${RDEPEND}
289 !kdeprefix? ( !kde-base/${PN}:${KDE_SLOT}[-kdeprefix] )"
290 fi
291 done
292 ;;
293 esac
211 294
212 # We only need to add the dependencies if ${PN} is not "kdelibs" or "kdepimlibs" 295 # We only need to add the dependencies if ${PN} is not "kdelibs" or "kdepimlibs"
213 if [[ ${PN} != "kdelibs" ]]; then 296 if [[ ${PN} != "kdelibs" ]]; then
214 DEPEND="${DEPEND} 297 case "${EAPI}" in
298 2 | 2_pre3 | 2_pre2 | 2_pre1)
299 DEPEND="${DEPEND} ${_operator}kde-base/kdelibs${_pv}[kdeprefix=]"
300 RDEPEND="${RDEPEND} ${_operator}kde-base/kdelibs${_pv}[kdeprefix=]"
301 ;;
302 *)
215 ${_operator}kde-base/kdelibs${_pv}" 303 DEPEND="${DEPEND} ${_operator}kde-base/kdelibs${_pv}"
216 RDEPEND="${RDEPEND}
217 ${_operator}kde-base/kdelibs${_pv}" 304 RDEPEND="${RDEPEND} ${_operator}kde-base/kdelibs${_pv}"
305 ;;
306 esac
218 if [[ ${PN} != "kdepimlibs" ]]; then 307 if [[ ${PN} != "kdepimlibs" ]]; then
219 DEPEND="${DEPEND} 308 case "${EAPI}" in
309 2 | 2_pre3 | 2_pre2 | 2_pre1)
310 DEPEND="${DEPEND} ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix=]"
311 RDEPEND="${RDEPEND} ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix=]"
312 ;;
313 *)
220 ${_operator}kde-base/kdepimlibs${_pv}" 314 DEPEND="${DEPEND} ${_operator}kde-base/kdepimlibs${_pv}"
221 RDEPEND="${RDEPEND}
222 ${_operator}kde-base/kdepimlibs${_pv}" 315 RDEPEND="${RDEPEND} ${_operator}kde-base/kdepimlibs${_pv}"
223 fi 316 esac
224 fi 317 fi
318 fi
225 319
226 unset _operator _pv _kdedir 320 unset _operator _pv
227fi 321fi
228 322
229# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a 323# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a
230# koffice ebuild, the URI should be set in the ebuild itself 324# koffice ebuild, the URI should be set in the ebuild itself
231if [[ -n ${KDEBASE} ]]; then 325if [[ -n ${KDEBASE} ]]; then
237 _kmname_pv="${_kmname}-${PV}" 331 _kmname_pv="${_kmname}-${PV}"
238 if [[ ${NEED_KDE} != "svn" ]]; then 332 if [[ ${NEED_KDE} != "svn" ]]; then
239 case ${KDEBASE} in 333 case ${KDEBASE} in
240 kde-base) 334 kde-base)
241 case ${PV} in 335 case ${PV} in
336 4.0.9* | 4.0.8*)
337 SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
242 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2";; 338 *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2";;
243 esac 339 esac
244 ;; 340 ;;
245 koffice) 341 koffice)
246 SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2" 342 SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2"
247 ;; 343 ;;
249 fi 345 fi
250 unset _kmname _kmname_pv 346 unset _kmname _kmname_pv
251fi 347fi
252 348
253debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}" 349debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
254debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND ${DEPEND} - before blockers"
255
256# Monolithic ebuilds should add blockers for split ebuilds in the same slot.
257# If KMNAME is not set then this is not a split package
258if [[ -n ${KDEBASE} && -z ${KMNAME} ]]; then
259 for _x in $(get-child-packages ${CATEGORY}/${PN}); do
260 DEPEND="${DEPEND} !${_x}:${SLOT}"
261 RDEPEND="${RDEPEND} !${_x}:${SLOT}"
262 done
263 unset _x
264fi
265
266debug-print "${BASH_SOURCE} ${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND ${DEPEND} - after blockers"
267 350
268# @ECLASS-VARIABLE: PREFIX 351# @ECLASS-VARIABLE: PREFIX
269# @DESCRIPTION: 352# @DESCRIPTION:
270# Set the installation PREFIX. All kde-base ebuilds go into the KDE4 installation directory. 353# Set the installation PREFIX. All kde-base ebuilds go into the KDE4 installation directory.
271# Applications installed by the other ebuilds go into /usr/ by default, this value 354# Applications installed by the other ebuilds go into /usr/ by default, this value
272# can be superseded by defining PREFIX before inheriting kde4-base. 355# can be superseded by defining PREFIX before inheriting kde4-base.
273if [[ -n ${KDEBASE} ]]; then 356# This value is set on pkg_setup
274 PREFIX=${KDEDIR} 357PREFIX=""
275else
276 # if PREFIX is not defined we set it to the default value of /usr
277 PREFIX="${PREFIX:-/usr}"
278fi
279 358
280debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SLOT ${SLOT} - KDEDIR ${KDEDIR} - KDEDIRS ${KDEDIRS}- PREFIX ${PREFIX} - NEED_KDE ${NEED_KDE}" 359debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SLOT ${SLOT} - NEED_KDE ${NEED_KDE}"
281 360
282# @FUNCTION: kde4-base_pkg_setup 361# @FUNCTION: kde4-base_pkg_setup
283# @DESCRIPTION: 362# @DESCRIPTION:
284# Adds flags needed by all of KDE 4 to $QT4_BUILT_WITH_USE_CHECK. Uses 363# Adds flags needed by all of KDE 4 to $QT4_BUILT_WITH_USE_CHECK. Uses
285# kde4-functions_check_use from kde4-functions.eclass to print appropriate 364# kde4-functions_check_use from kde4-functions.eclass to print appropriate
286# errors and die if any required flags listed in $QT4_BUILT_WITH_USE_CHECK or 365# errors and die if any required flags listed in $QT4_BUILT_WITH_USE_CHECK or
287# $KDE4_BUILT_WITH_USE_CHECK are missing. 366# $KDE4_BUILT_WITH_USE_CHECK are missing.
288kde4-base_pkg_setup() { 367kde4-base_pkg_setup() {
289 debug-print-function $FUNCNAME "$@" 368 debug-print-function $FUNCNAME "$@"
290 369
370 # Don't set KDEHOME during compile, it will cause access violations
371 unset KDEHOME
372
373 if [[ ${NEED_KDE} != none ]]; then
374
375 # Set PREFIX
376 case "${EAPI}" in
377 2 | 2_pre3 | 2_pre2 | 2_pre1)
378 if use kdeprefix; then
379 KDEDIR="/usr/kde/${_kdedir}"
380 KDEDIRS="/usr:/usr/local:${KDEDIR}"
381 else
382 KDEDIR="/usr"
383 KDEDIRS="/usr:/usr/local"
384 fi
385 ;;
386 *)
387 KDEDIR="/usr"
388 KDEDIRS="/usr:/usr/local"
389 ;;
390 esac
391 fi
392
393 # Set the prefix based on KDEDIR
394 # Make it a consequence of kdeprefix
395 PREFIX=${KDEDIR}
396
397 unset _kdedir
398
291 case "${EAPI}" in 399 case "${EAPI}" in
292 kdebuild-1) 400 2 | 2_pre3 | 2_pre2 | 2_pre1)
293 [[ -n ${QT4_BUILT_WITH_USE_CHECK} || -n ${KDE4_BUILT_WITH_USE_CHECK} ]] && \ 401 [[ -n ${QT4_BUILT_WITH_USE_CHECK} || -n ${KDE4_BUILT_WITH_USE_CHECK[@]} ]] && \
294 die "built_with_use illegal in this EAPI!" 402 die "built_with_use illegal in this EAPI!"
295 ;; 403 ;;
296 *) 404 *)
405 # Make KDE4_BUILT_WITH_USE_CHECK an array if it isn't already
406 local line kde4_built_with_use_check=()
407 if [[ -n ${KDE4_BUILT_WITH_USE_CHECK[@]} && $(declare -p KDE4_BUILT_WITH_USE_CHECK) != 'declare -a '* ]]; then
408 while read line; do
409 [[ -z ${line} ]] && continue
410 kde4_built_with_use_check+=("${line}")
411 done <<< "${KDE4_BUILT_WITH_USE_CHECK}"
412 KDE4_BUILT_WITH_USE_CHECK=("${kde4_built_with_use_check[@]}")
413 fi
414
297 # KDE4 applications require qt4 compiled with USE="accessibility dbus gif jpeg png qt3support ssl zlib". 415 # KDE4 applications require qt4 compiled with USE="accessibility dbus gif jpeg png qt3support ssl zlib".
298 if has_version '<x11-libs/qt-4.4_alpha:4'; then 416 if has_version '<x11-libs/qt-4.4_alpha:4'; then
299 QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} accessibility dbus gif jpeg png qt3support ssl zlib" 417 QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} accessibility dbus gif jpeg png qt3support ssl zlib"
300 else 418 else
301 KDE4_BUILT_WITH_USE_CHECK="${KDE4_BUILT_WITH_USE_CHECK} 419 KDE4_BUILT_WITH_USE_CHECK=("${KDE4_BUILT_WITH_USE_CHECK[@]}"
302 x11-libs/qt-core qt3support ssl 420 "x11-libs/qt-core qt3support ssl"
303 x11-libs/qt-gui accessibility dbus 421 "x11-libs/qt-gui accessibility dbus"
304 x11-libs/qt-qt3support accessibility" 422 "x11-libs/qt-qt3support accessibility")
305 fi
306
307 if has debug ${IUSE//+} && use debug; then
308 if has_version '<x11-libs/qt-4.4.0_alpha:4'; then
309 QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} debug"
310 else
311 KDE4_BUILT_WITH_USE_CHECK="${KDE4_BUILT_WITH_USE_CHECK}
312 x11-libs/qt-core:4 debug
313 x11-libs/qt-gui:4 debug
314 x11-libs/qt-qt3support:4 debug
315 x11-libs/qt-svg:4 debug
316 x11-libs/qt-test:4 debug"
317 if has opengl ${IUSE//+} && use opengl || [[ ${OPENGL_REQUIRED} == always ]]; then
318 KDE4_BUILT_WITH_USE_CHECK="${KDE4_BUILT_WITH_USE_CHECK}
319 x11-libs/qt-opengl:4 debug"
320 fi
321 fi
322 fi 423 fi
323 424
324 if has opengl ${IUSE//+} && use opengl || [[ ${OPENGL_REQUIRED} == always ]]; then 425 if has opengl ${IUSE//+} && use opengl || [[ ${OPENGL_REQUIRED} == always ]]; then
325 if has_version '<x11-libs/qt-4.4.0_alpha:4'; then 426 if has_version '<x11-libs/qt-4.4.0_alpha:4'; then
326 QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} opengl" 427 QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} opengl"
361 _packages="${_packages//${CATEGORY}\//} ${PN}" 462 _packages="${_packages//${CATEGORY}\//} ${PN}"
362 else 463 else
363 _packages="${PN}" 464 _packages="${PN}"
364 fi 465 fi
365 if [[ $(declare -p PATCHES) != 'declare -a '* ]]; then 466 if [[ $(declare -p PATCHES) != 'declare -a '* ]]; then
366 PATCHES=(${PATCHES}) 467 die "PATCHES needs to be an array!"
367 fi 468 fi
368 for _p in ${_packages}; do 469 for _p in ${_packages}; do
369 for _f in "${_patchdir}"/${_p}-${PV}-*{diff,patch}; do 470 for _f in "${_patchdir}"/${_p}-${PV}-*{diff,patch}; do
370 [[ -e ${_f} ]] && PATCHES+=("${_f}") 471 [[ -e ${_f} ]] && PATCHES+=("${_f}")
371 done 472 done
399 if [[ -z $* ]]; then 500 if [[ -z $* ]]; then
400 # Unpack first and deal with KDE patches after examing possible patch sets. 501 # Unpack first and deal with KDE patches after examing possible patch sets.
401 # To be picked up, patches need to conform to the guidelines stated before. 502 # To be picked up, patches need to conform to the guidelines stated before.
402 # Monolithic ebuilds will use the split ebuild patches. 503 # Monolithic ebuilds will use the split ebuild patches.
403 [[ -d "${KDE_S}" ]] || unpack ${A} 504 [[ -d "${KDE_S}" ]] || unpack ${A}
404 kde4-base_apply_patches 505 base_src_unpack $*
405 else 506 else
406 # Call base_src_unpack, which unpacks and patches 507 # Call base_src_unpack, which unpacks and patches
407 # step by step transparently as defined in the ebuild. 508 # step by step transparently as defined in the ebuild.
408 base_src_unpack $* 509 base_src_unpack $*
409 fi 510 fi
425# @FUNCTION: kde4-base_src_compile 526# @FUNCTION: kde4-base_src_compile
426# @DESCRIPTION: 527# @DESCRIPTION:
427# General function for compiling KDE4 applications. 528# General function for compiling KDE4 applications.
428kde4-base_src_compile() { 529kde4-base_src_compile() {
429 debug-print-function ${FUNCNAME} "$@" 530 debug-print-function ${FUNCNAME} "$@"
430 531 case "${EAPI}" in
532 2)
533 ;;
534 *)
431 kde4-base_src_configure 535 kde4-base_src_configure
432 kde4-base_src_make 536 ;;
537 esac
538 if [[ -d ${WORKDIR}/${PN}_build ]]; then
539 pushd "${WORKDIR}"/${PN}_build > /dev/null
540 fi
541 [ -e [Mm]akefile ] && kde4-base_src_make
433} 542}
434 543
435# @FUNCTION: kde4-base_src_configure 544# @FUNCTION: kde4-base_src_configure
436# @DESCRIPTION: 545# @DESCRIPTION:
437# Function for configuring the build of KDE4 applications. 546# Function for configuring the build of KDE4 applications.
460 mycmakeargs="${mycmakeargs} -DKDE4_USE_ALWAYS_FULL_RPATH=ON" 569 mycmakeargs="${mycmakeargs} -DKDE4_USE_ALWAYS_FULL_RPATH=ON"
461 570
462 # Here we set the install prefix 571 # Here we set the install prefix
463 mycmakeargs="${mycmakeargs} -DCMAKE_INSTALL_PREFIX=${PREFIX}" 572 mycmakeargs="${mycmakeargs} -DCMAKE_INSTALL_PREFIX=${PREFIX}"
464 573
574 # If prefix is /usr, sysconf needs to be /etc, not /usr/etc
575 [[ "${PREFIX}" == "/usr" ]] && mycmakeargs="${mycmakeargs} -DSYSCONF_INSTALL_DIR=/etc"
576
465 # Set environment 577 # Set environment
466 QTEST_COLORED=1 578 QTEST_COLORED=1
467 QT_PLUGIN_PATH=${KDEDIR}/$(get_libdir)/kde4/plugins/ 579 QT_PLUGIN_PATH=${KDEDIR}/$(get_libdir)/kde4/plugins/
468 580
469 cmake-utils_src_configureout 581 # hardcode path to *.cmake KDE files
582 PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}${KDEDIR}/$(get_libdir)/pkgconfig"
583
584 [ -e CMakeLists.txt ] && cmake-utils_src_configureout
470} 585}
471 586
472# @FUNCTION: kde4-base_src_make 587# @FUNCTION: kde4-base_src_make
473# @DESCRIPTION: 588# @DESCRIPTION:
474# Function for building KDE4 applications. 589# Function for building KDE4 applications.
497# Function for installing KDE4 applications. 612# Function for installing KDE4 applications.
498kde4-base_src_install() { 613kde4-base_src_install() {
499 debug-print-function ${FUNCNAME} "$@" 614 debug-print-function ${FUNCNAME} "$@"
500 615
501 kde4-base_src_make_doc 616 kde4-base_src_make_doc
502 cmake-utils_src_install 617 if [[ -d ${WORKDIR}/${PN}_build ]]; then
618 pushd "${WORKDIR}"/${PN}_build > /dev/null
619 fi
620 [ -e [Mm]akefile ] && cmake-utils_src_install
503} 621}
504 622
505# @FUNCTION: kde4-base_src_make_doc 623# @FUNCTION: kde4-base_src_make_doc
506# @DESCRIPTION: 624# @DESCRIPTION:
507# Function for installing the documentation of KDE4 applications. 625# Function for installing the documentation of KDE4 applications.

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20