Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/devmanual:master commit in: general-concepts/autotools/
Date: Tue, 21 Jan 2014 17:09:24
Message-Id: 1390324020.de224473100c442774072427618a9718fa29df12.jlec@gentoo
1 commit: de224473100c442774072427618a9718fa29df12
2 Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 21 17:07:00 2014 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 21 17:07:00 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=de224473
7
8 Use eauto* functions instead of plain tools in example
9
10 Bump to EAPI=5 and reference to autotools.eclass.
11
12 Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
13
14 ---
15 general-concepts/autotools/text.xml | 17 ++++++++++-------
16 1 file changed, 10 insertions(+), 7 deletions(-)
17
18 diff --git a/general-concepts/autotools/text.xml b/general-concepts/autotools/text.xml
19 index 6fb7bd8..7ae2024 100644
20 --- a/general-concepts/autotools/text.xml
21 +++ b/general-concepts/autotools/text.xml
22 @@ -97,6 +97,8 @@ The <c>autoreconf</c> tool supposedly runs <c>autoconf</c> (and <c>automake</c>,
23 <c>autoheader</c>, <c>aclocal</c>, <c>autopoint</c> and <c>libtoolize</c>) as necessary.
24 Sometimes it works. Some packages ship a shell script named <c>autogen.sh</c> which
25 does the same thing (this is <e>not</e> related to <c>autogen</c>).
26 +The autotools.eclass contains helper functions for the stand-alone tools with their
27 +corresponding names e.g. <c>eautoconf</c> and <c>eautomake</c>.
28 </p>
29
30 <warning>
31 @@ -122,22 +124,23 @@ either <c>Makefile.am</c> or <c>configure.ac</c>:
32 </p>
33
34 <codesample lang="ebuild">
35 -src_unpack() {
36 - unpack ${A}
37 - cd "${S}"
38 +EAPI="5"
39
40 +inherit autotools
41 +
42 +src_prepare() {
43 # Remove problematic LDFLAGS declaration
44 - sed -i -e '/^LDFLAGS/d' src/Makefile.am
45 + sed -i -e '/^LDFLAGS/d' src/Makefile.am || die
46
47 # Rerun autotools
48 einfo "Regenerating autotools files..."
49 - WANT_AUTOCONF=2.5 autoconf || die "autoconf failed"
50 - WANT_AUTOMAKE=1.9 automake || die "automake failed"
51 + WANT_AUTOCONF=2.5 eautoconf
52 + WANT_AUTOMAKE=1.9 eautomake
53 }
54
55 src_compile() {
56 econf $(use_enable nls)
57 - emake || die "emake failed"
58 + emake
59 }
60 </codesample>