app-admin/lastpass-cli: serve man from devspace #654846
[gentoo.git] / eclass / libtool.eclass
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # @ECLASS: libtool.eclass
5 # @MAINTAINER:
6 # base-system@gentoo.org
7 # @BLURB: quickly update bundled libtool code
8 # @DESCRIPTION:
9 # This eclass patches ltmain.sh distributed with libtoolized packages with the
10 # relink and portage patch among others
11 #
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.
15
16 if [[ -z ${_LIBTOOL_ECLASS} ]]; then
17 _LIBTOOL_ECLASS=1
18
19 DEPEND=">=app-portage/elt-patches-20170422"
20
21 inherit toolchain-funcs
22
23 # @FUNCTION: elibtoolize
24 # @USAGE: [dirs] [--portage] [--reverse-deps] [--patch-only] [--remove-internal-dep=xxx] [--shallow] [--no-uclibc]
25 # @DESCRIPTION:
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.
29 #
30 # If the --shallow option is used, then only ${S}/ltmain.sh will be patched.
31 #
32 # The other options should be avoided in general unless you know what's going on.
33 elibtoolize() {
34         type -P eltpatch &>/dev/null || die "eltpatch not found; is app-portage/elt-patches installed?"
35
36         ELT_LOGDIR=${T} \
37         LD=$(tc-getLD) \
38         eltpatch "${@}" || die "eltpatch failed"
39 }
40
41 uclibctoolize() { die "Use elibtoolize"; }
42 darwintoolize() { die "Use elibtoolize"; }
43
44 fi