| 1 | # Copyright 1999-2008 Gentoo Foundation |
1 | # Copyright 1999-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/base.eclass,v 1.44 2010/01/13 09:51:53 scarabeus Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/base.eclass,v 1.45 2010/01/20 12:57:13 spatz Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: base.eclass |
5 | # @ECLASS: base.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # QA Team <qa@gentoo.org> |
7 | # QA Team <qa@gentoo.org> |
| 8 | # |
8 | # |
| … | |
… | |
| 72 | |
72 | |
| 73 | pushd "${S}" > /dev/null |
73 | pushd "${S}" > /dev/null |
| 74 | if [[ "$(declare -p PATCHES 2>/dev/null 2>&1)" == "declare -a"* ]]; then |
74 | if [[ "$(declare -p PATCHES 2>/dev/null 2>&1)" == "declare -a"* ]]; then |
| 75 | for x in "${PATCHES[@]}"; do |
75 | for x in "${PATCHES[@]}"; do |
| 76 | debug-print "$FUNCNAME: applying patch from ${x}" |
76 | debug-print "$FUNCNAME: applying patch from ${x}" |
| 77 | [[ -f "${x}" ]] && epatch "${x}" |
|
|
| 78 | if [[ -d "${x}" ]]; then |
77 | if [[ -d "${x}" ]]; then |
| 79 | # Use standardized names and locations with bulk patching |
78 | # Use standardized names and locations with bulk patching |
| 80 | # Patch directory is ${WORKDIR}/patch |
79 | # Patch directory is ${WORKDIR}/patch |
| 81 | # See epatch() in eutils.eclass for more documentation |
80 | # See epatch() in eutils.eclass for more documentation |
| 82 | EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch} |
81 | EPATCH_SUFFIX=${EPATCH_SUFFIX:=patch} |
| … | |
… | |
| 86 | # variable and restore later |
85 | # variable and restore later |
| 87 | oldval=${EPATCH_SOURCE} |
86 | oldval=${EPATCH_SOURCE} |
| 88 | EPATCH_SOURCE=${x} |
87 | EPATCH_SOURCE=${x} |
| 89 | epatch |
88 | epatch |
| 90 | EPATCH_SOURCE=${oldval} |
89 | EPATCH_SOURCE=${oldval} |
|
|
90 | else |
|
|
91 | epatch "${x}" |
| 91 | fi |
92 | fi |
| 92 | done |
93 | done |
| 93 | else |
94 | else |
| 94 | for x in ${PATCHES}; do |
95 | for x in ${PATCHES}; do |
| 95 | debug-print "$FUNCNAME: patching from ${x}" |
96 | debug-print "$FUNCNAME: patching from ${x}" |