commit: 83f46749d45ee192cfc575b0b2b94cf281ce97b9
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 7 01:13:00 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 7 01:15:51 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83f46749
libtool.eclass: add LIBTOOL_DEPEND
The motivation here is to allow autotools.eclass consumers setting
AUTOTOOLS_AUTO_DEPEND=no to not have a useless app-portage/elt-patches
dependency.
Prompted by a discussion with Eli Schwartz <eschwartz <AT> gentoo.org>.
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/libtool.eclass | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass
index 6565faf07e83..7f21ac11575a 100644
--- a/eclass/libtool.eclass
+++ b/eclass/libtool.eclass
@@ -22,10 +22,23 @@ case ${EAPI} in
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
-BDEPEND=">=app-portage/elt-patches-20250306"
-
inherit toolchain-funcs
+# @ECLASS_VARIABLE: LIBTOOL_DEPEND
+# @OUTPUT_VARIABLE
+# @DESCRIPTION:
+# Contains dependency on app-portage/elt-patches in *DEPEND format.
+LIBTOOL_DEPEND="app-portage/elt-patches"
+
+# @ECLASS_VARIABLE: LIBTOOL_AUTO_DEPEND
+# @PRE_INHERIT
+# @DESCRIPTION:
+# Set to 'no' to disable automatically adding to DEPEND. This lets
+# ebuilds form conditional depends by using ${LIBTOOL_DEPEND} in
+# their own DEPEND string.
+: "${LIBTOOL_AUTO_DEPEND:=yes}"
+[[ ${LIBTOOL_AUTO_DEPEND} != "no" ]] && BDEPEND=${LIBTOOL_DEPEND}
+
# @FUNCTION: elibtoolize
# @USAGE: [dirs] [--portage] [--reverse-deps] [--patch-only]
[--remove-internal-dep=xxx] [--shallow] [--no-uclibc]
# @DESCRIPTION: