summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2019-10-19 11:06:55 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2019-10-19 22:20:22 +0100
commite6d87e5e333e77ffc69cbf14d2c0e8f923a5d6c8 (patch)
tree7b12f821ad73d3ba7a70e730d3e7a2f7ee9e5633 /eclass
parentmedia-fonts/konfont: Port to EAPI 7 (diff)
downloadgentoo-e6d87e5e333e77ffc69cbf14d2c0e8f923a5d6c8.tar.gz
gentoo-e6d87e5e333e77ffc69cbf14d2c0e8f923a5d6c8.tar.bz2
gentoo-e6d87e5e333e77ffc69cbf14d2c0e8f923a5d6c8.zip
toolchain.eclass: move gentoo patches into own helper
Cleanup. No functional change. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass30
1 files changed, 17 insertions, 13 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index bc7d7b1c2609..d2de666120eb 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -522,19 +522,7 @@ toolchain_src_prepare() {
export BRANDING_GCC_PKGVERSION="Gentoo ${GCC_PVR}"
cd "${S}"
- if ! use vanilla ; then
- if [[ -n ${PATCH_VER} ]] ; then
- guess_patch_type_in_dir "${WORKDIR}"/patch
- EPATCH_MULTI_MSG="Applying Gentoo patches ..." \
- epatch "${WORKDIR}"/patch
- BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION} p${PATCH_VER}"
- fi
- if [[ -n ${UCLIBC_VER} ]] ; then
- guess_patch_type_in_dir "${WORKDIR}"/uclibc
- EPATCH_MULTI_MSG="Applying uClibc patches ..." \
- epatch "${WORKDIR}"/uclibc
- fi
- fi
+ do_gcc_gentoo_patches
do_gcc_HTB_patches
do_gcc_PIE_patches
do_gcc_CYGWINPORTS_patches
@@ -650,6 +638,22 @@ guess_patch_type_in_dir() {
|| EPATCH_SUFFIX="patch"
}
+do_gcc_gentoo_patches() {
+ if ! use vanilla ; then
+ if [[ -n ${PATCH_VER} ]] ; then
+ guess_patch_type_in_dir "${WORKDIR}"/patch
+ EPATCH_MULTI_MSG="Applying Gentoo patches ..." \
+ epatch "${WORKDIR}"/patch
+ BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION} p${PATCH_VER}"
+ fi
+ if [[ -n ${UCLIBC_VER} ]] ; then
+ guess_patch_type_in_dir "${WORKDIR}"/uclibc
+ EPATCH_MULTI_MSG="Applying uClibc patches ..." \
+ epatch "${WORKDIR}"/uclibc
+ fi
+ fi
+}
+
do_gcc_HTB_patches() {
use_if_iuse boundschecking || return 0