1 |
zlin 08/04/14 13:23:15 |
2 |
|
3 |
Modified: kde4-base.eclass |
4 |
Log: |
5 |
Improved PATCHES array handling. |
6 |
|
7 |
Revision Changes Path |
8 |
1.10 eclass/kde4-base.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-base.eclass?rev=1.10&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-base.eclass?rev=1.10&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kde4-base.eclass?r1=1.9&r2=1.10 |
13 |
|
14 |
Index: kde4-base.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v |
17 |
retrieving revision 1.9 |
18 |
retrieving revision 1.10 |
19 |
diff -u -r1.9 -r1.10 |
20 |
--- kde4-base.eclass 6 Apr 2008 21:36:53 -0000 1.9 |
21 |
+++ kde4-base.eclass 14 Apr 2008 13:23:14 -0000 1.10 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 2007-2008 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.9 2008/04/06 21:36:53 zlin Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.10 2008/04/14 13:23:14 zlin Exp $ |
27 |
|
28 |
# @ECLASS: kde4-base.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -353,7 +353,7 @@ |
31 |
# If ${PATCHES} is non-zero all patches in it get applied. If there is more |
32 |
# than one patch please make ${PATCHES} an array for proper quoting. |
33 |
kde4-base_apply_patches() { |
34 |
- local _patchdir _packages _p |
35 |
+ local _patchdir _packages _p _f |
36 |
_patchdir="${WORKDIR}/patches/" |
37 |
if [[ -d "${_patchdir}" ]]; then |
38 |
if is-parent-package ${CATEGORY}/${PN} ; then |
39 |
@@ -362,21 +362,19 @@ |
40 |
else |
41 |
_packages="${PN}" |
42 |
fi |
43 |
- if [[ ${#PATCHES[@]} -gt 1 ]]; then |
44 |
- for _p in ${_packages}; do |
45 |
- PATCHES=( "${PATCHES[@]}" $(ls ${_patchdir}/${_p}-${PV}-*{diff,patch} 2>/dev/null) ) |
46 |
- if [[ -n "${KDEBASE}" ]]; then |
47 |
- PATCHES=( "${PATCHES[@]}" $(ls ${_patchdir}/${_p}-${SLOT}-*{diff,patch} 2>/dev/null) ) |
48 |
- fi |
49 |
- done |
50 |
- else |
51 |
- for _p in ${_packages}; do |
52 |
- PATCHES=(${PATCHES} $(ls ${_patchdir}/${_p}-${PV}-*{diff,patch} 2>/dev/null)) |
53 |
- if [[ -n "${KDEBASE}" ]]; then |
54 |
- PATCHES=(${PATCHES} $(ls ${_patchdir}/${_p}-${SLOT}-*{diff,patch} 2>/dev/null)) |
55 |
- fi |
56 |
- done |
57 |
+ if [[ $(declare -p PATCHES) != 'declare -a '* ]]; then |
58 |
+ PATCHES=(${PATCHES}) |
59 |
fi |
60 |
+ for _p in ${_packages}; do |
61 |
+ for _f in "${_patchdir}"/${_p}-${PV}-*{diff,patch}; do |
62 |
+ [[ -e ${_f} ]] && PATCHES+=("${_f}") |
63 |
+ done |
64 |
+ if [[ -n "${KDEBASE}" ]]; then |
65 |
+ for _f in "${_patchdir}"/${_p}-${SLOT}-*{diff,patch}; do |
66 |
+ [[ -e ${_f} ]] && PATCHES+=("${_f}") |
67 |
+ done |
68 |
+ fi |
69 |
+ done |
70 |
fi |
71 |
[[ -n ${PATCHES[@]} ]] && base_src_unpack autopatch |
72 |
} |
73 |
|
74 |
|
75 |
|
76 |
-- |
77 |
gentoo-commits@l.g.o mailing list |