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 | 1fe9d1f2882eea29c070b4fef16842313f5c5a56 (patch) | |
tree | 754fc76e7005abd750767913bb551831b2cead7b /eclass/toolchain.eclass | |
parent | Version bump (#252365). (diff) | |
download | gentoo-2-1fe9d1f2882eea29c070b4fef16842313f5c5a56.tar.gz gentoo-2-1fe9d1f2882eea29c070b4fef16842313f5c5a56.tar.bz2 gentoo-2-1fe9d1f2882eea29c070b4fef16842313f5c5a56.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" ]]) |