dev-qt/qttest: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / eclass / libtool.eclass
1 # Copyright 1999-2018 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 # @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
8 # @BLURB: quickly update bundled libtool code
9 # @DESCRIPTION:
10 # This eclass patches ltmain.sh distributed with libtoolized packages with the
11 # relink and portage patch among others
12 #
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.
16
17 if [[ -z ${_LIBTOOL_ECLASS} ]]; then
18 _LIBTOOL_ECLASS=1
19
20 case ${EAPI:-0} in
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" ;;
24 esac
25
26 inherit toolchain-funcs
27
28 # @FUNCTION: elibtoolize
29 # @USAGE: [dirs] [--portage] [--reverse-deps] [--patch-only] [--remove-internal-dep=xxx] [--shallow] [--no-uclibc]
30 # @DESCRIPTION:
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.
34 #
35 # If the --shallow option is used, then only ${S}/ltmain.sh will be patched.
36 #
37 # The other options should be avoided in general unless you know what's going on.
38 elibtoolize() {
39         type -P eltpatch &>/dev/null || die "eltpatch not found; is app-portage/elt-patches installed?"
40
41         ELT_LOGDIR=${T} \
42         LD=$(tc-getLD) \
43         eltpatch "${@}" || die "eltpatch failed"
44 }
45
46 uclibctoolize() { die "Use elibtoolize"; }
47 darwintoolize() { die "Use elibtoolize"; }
48
49 fi