summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-11-22 19:24:25 -0500
committerMike Frysinger <vapier@gentoo.org>2015-11-22 19:24:33 -0500
commitcdcebd4db4693bb994dc682b72a3eb593a08e4bf (patch)
treeea8d1b41378692680a5086115f68e07cb4db267f /eclass/eutils.eclass
parentkernel-2.eclass: use experimental in global scope (diff)
downloadgentoo-cdcebd4db4693bb994dc682b72a3eb593a08e4bf.tar.gz
gentoo-cdcebd4db4693bb994dc682b72a3eb593a08e4bf.tar.bz2
gentoo-cdcebd4db4693bb994dc682b72a3eb593a08e4bf.zip
eutils.eclass: copy over logic from libtool.eclass to find ELT-patches dir #517752
Diffstat (limited to 'eclass/eutils.eclass')
-rw-r--r--eclass/eutils.eclass16
1 files changed, 15 insertions, 1 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index a08aee40f7ee..6457501c6b08 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1403,6 +1403,20 @@ built_with_use() {
[[ ${opt} = "-a" ]]
}
+# If an overlay has eclass overrides, but doesn't actually override the
+# libtool.eclass, we'll have ECLASSDIR pointing to the active overlay's
+# eclass/ dir, but libtool.eclass is still in the main Gentoo tree. So
+# add a check to locate the ELT-patches/ regardless of what's going on.
+# Note: Duplicated in libtool.eclass.
+_EUTILS_ECLASSDIR_LOCAL=${BASH_SOURCE[0]%/*}
+eutils_elt_patch_dir() {
+ local d="${ECLASSDIR}/ELT-patches"
+ if [[ ! -d ${d} ]] ; then
+ d="${_EUTILS_ECLASSDIR_LOCAL}/ELT-patches"
+ fi
+ echo "${d}"
+}
+
# @FUNCTION: epunt_cxx
# @USAGE: [dir to scan]
# @DESCRIPTION:
@@ -1416,7 +1430,7 @@ epunt_cxx() {
ebegin "Removing useless C++ checks"
local f p any_found
while IFS= read -r -d '' f; do
- for p in "${PORTDIR}"/eclass/ELT-patches/nocxx/*.patch ; do
+ for p in "$(eutils_elt_patch_dir)"/nocxx/*.patch ; do
if patch --no-backup-if-mismatch -p1 "${f}" "${p}" >/dev/null ; then
any_found=1
break