1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
4 # @ECLASS: libtool.eclass
6 # base-system@gentoo.org
7 # @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
8 # @BLURB: quickly update bundled libtool code
10 # This eclass patches ltmain.sh distributed with libtoolized packages with the
11 # relink and portage patch among others
13 # Note, this eclass does not require libtool as it only applies patches to
14 # generated libtool files. We do not run the libtoolize program because that
15 # requires a regeneration of the main autotool files in order to work properly.
17 if [[ -z ${_LIBTOOL_ECLASS} ]]; then
21 0|1|2|3|4|5|6) DEPEND=">=app-portage/elt-patches-20170815" ;;
22 7) BDEPEND=">=app-portage/elt-patches-20170815" ;;
23 *) die "${ECLASS}: EAPI ${EAPI} not supported" ;;
26 inherit toolchain-funcs
28 # @FUNCTION: elibtoolize
29 # @USAGE: [dirs] [--portage] [--reverse-deps] [--patch-only] [--remove-internal-dep=xxx] [--shallow] [--no-uclibc]
31 # Apply a smorgasbord of patches to bundled libtool files. This function
32 # should always be safe to run. If no directories are specified, then
33 # ${S} will be searched for appropriate files.
35 # If the --shallow option is used, then only ${S}/ltmain.sh will be patched.
37 # The other options should be avoided in general unless you know what's going on.
39 type -P eltpatch &>/dev/null || die "eltpatch not found; is app-portage/elt-patches installed?"
43 eltpatch "${@}" || die "eltpatch failed"
46 uclibctoolize() { die "Use elibtoolize"; }
47 darwintoolize() { die "Use elibtoolize"; }