From: Sergei Trofimovich Date: Sat, 19 Oct 2019 10:06:55 +0000 (+0100) Subject: toolchain.eclass: move gentoo patches into own helper X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e6d87e5e333e77ffc69cbf14d2c0e8f923a5d6c8;p=gentoo.git toolchain.eclass: move gentoo patches into own helper Cleanup. No functional change. Signed-off-by: Sergei Trofimovich --- 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