diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-01-10 12:53:50 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-01-10 12:53:50 +0000 |
commit | 75424ee4ece230d824fdbf920c670ebb810caa50 (patch) | |
tree | 0715fa647b639e48e68ca118a90db27e1f2ed570 /eclass/toolchain.eclass | |
parent | Version bump (#252365). (diff) | |
download | historical-75424ee4ece230d824fdbf920c670ebb810caa50.tar.gz historical-75424ee4ece230d824fdbf920c670ebb810caa50.tar.bz2 historical-75424ee4ece230d824fdbf920c670ebb810caa50.zip |
add support for user /etc/portage/patches/
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r-- | eclass/toolchain.eclass | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 6b9f8fe11547..c60e9a5884d1 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.379 2009/01/10 12:02:56 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.380 2009/01/10 12:53:50 vapier Exp $ # # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> @@ -1082,6 +1082,7 @@ gcc_src_unpack() { do_gcc_HTB_patches do_gcc_SSP_patches do_gcc_PIE_patches + do_gcc_USER_patches ${ETYPE}_src_unpack || die "failed to ${ETYPE}_src_unpack" @@ -2047,6 +2048,22 @@ do_gcc_stub() { done } +do_gcc_USER_patches() { + local check base=${PORTAGE_CONFIGROOT}/etc/portage/patches + for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do + EPATCH_SOURCE=${base}/${CTARGET}/${check} + [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${CHOST}/${check} + [[ -r ${EPATCH_SOURCE} ]] || EPATCH_SOURCE=${base}/${check} + if [[ -d ${EPATCH_SOURCE} ]] ; then + EPATCH_SUFFIX="patch" + EPATCH_FORCE="yes" \ + EPATCH_MULTI_MSG="Applying user patches from ${EPATCH_SOURCE} ..." \ + epatch + break + fi + done +} + do_gcc_HTB_patches() { if ! want_boundschecking || \ (want_ssp && [[ ${HTB_EXCLUSIVE} == "true" ]]) |