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