| 1 | # Copyright 1999-2002 Gentoo Technologies, Inc. |
1 | # Copyright 1999-2002 Gentoo Technologies, Inc. |
| 2 | # Distributed under the terms of the GNU General Public License, v2 or later |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # Author: Martin Schlemmer <azarah@gentoo.org> |
3 | # Author: Martin Schlemmer <azarah@gentoo.org> |
| 4 | # $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.1 2001/12/31 23:43:41 azarah Exp $ |
4 | # $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.6 2002/10/25 19:55:52 vapier Exp $ |
| 5 | # The autotools eclass enables building of the apps that needs the latest autconf/automake. |
5 | # The autotools eclass enables building of the apps that needs the latest autconf/automake. |
| 6 | # |
6 | # |
| 7 | # NOTES: |
7 | # NOTES: |
| 8 | # |
8 | # |
| 9 | # This eclass was made to bridge the incompadibility problem of autoconf-2.13, |
9 | # This eclass was made to bridge the incompadibility problem of autoconf-2.13, |
| … | |
… | |
| 20 | # |
20 | # |
| 21 | # #<cut here> |
21 | # #<cut here> |
| 22 | # # Copyright 1999-2002 Gentoo Technologies, Inc. |
22 | # # Copyright 1999-2002 Gentoo Technologies, Inc. |
| 23 | # # Distributed under the terms of the GNU General Public License, v2 or later |
23 | # # Distributed under the terms of the GNU General Public License, v2 or later |
| 24 | # # Maintainer: John Doe <john@foo.com> |
24 | # # Maintainer: John Doe <john@foo.com> |
| 25 | # # $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.1 2001/12/31 23:43:41 azarah Exp $ |
25 | # # $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.6 2002/10/25 19:55:52 vapier Exp $ |
| 26 | # |
26 | # |
| 27 | # # If you need to set the versions different from in here, it *must* |
27 | # # If you need to set the versions different from in here, it *must* |
| 28 | # # be done before inherit.eclass is sourced |
28 | # # be done before inherit.eclass is sourced |
| 29 | # #ACONFVER=2.52f |
29 | # #ACONFVER=2.52f |
| 30 | # #AMAKEVER=1.5b |
30 | # #AMAKEVER=1.5b |
| 31 | # |
31 | # |
| 32 | # # Source inherit.eclass and inherit AutoTools |
32 | # # Source inherit.eclass and inherit AutoTools |
| 33 | # . /usr/portage/eclass/inherit.eclass || die |
33 | # . /usr/portage/eclass/inherit.eclass |
| 34 | # inherit autotools || die |
34 | # inherit autotools |
| 35 | # |
35 | # |
| 36 | # # This is pretty standard. |
36 | # # This is pretty standard. |
| 37 | # S=${WORKDIR}/${P} |
37 | # S=${WORKDIR}/${P} |
| 38 | # DESCRIPTION="My Application" |
38 | # DESCRIPTION="My Application" |
| 39 | # |
39 | # |
| … | |
… | |
| 69 | # } |
69 | # } |
| 70 | # #<cut here> |
70 | # #<cut here> |
| 71 | # |
71 | # |
| 72 | |
72 | |
| 73 | |
73 | |
| 74 | ECLASS=AutoTools |
74 | ECLASS=autotools |
|
|
75 | INHERITED="$INHERITED $ECLASS" |
| 75 | |
76 | |
| 76 | #[ -z "$ACONFVER" ] && ACONFVER=2.52f |
77 | #[ -z "$ACONFVER" ] && ACONFVER=2.52f |
| 77 | #[ -z "$AMAKEVER" ] && AMAKEVER=1.5b |
78 | #[ -z "$AMAKEVER" ] && AMAKEVER=1.5b |
| 78 | [ -z "$ACONFVER" ] && die "!!! You need to set \$ACONFVER *before* inheriting the eclass !!!" |
79 | [ -z "$ACONFVER" ] && die "!!! You need to set \$ACONFVER *before* inheriting the eclass !!!" |
| 79 | [ -z "$AMAKEVER" ] && die "!!! You need to set \$AMAKEVER *before* inheriting the eclass !!!" |
80 | [ -z "$AMAKEVER" ] && die "!!! You need to set \$AMAKEVER *before* inheriting the eclass !!!" |
| … | |
… | |
| 160 | |
161 | |
| 161 | install_automake() { |
162 | install_automake() { |
| 162 | |
163 | |
| 163 | cd ${AUTO_S}/automake-${AMAKEVER} || die "!!! Failed to build automake !!!" |
164 | cd ${AUTO_S}/automake-${AMAKEVER} || die "!!! Failed to build automake !!!" |
| 164 | |
165 | |
| 165 | ./configure --prefix=${AUTO_D} \ |
166 | ./configure --prefix=${AUTO_D} \ |
| 166 | --infodir=${AUTO_D}/share/info \ |
167 | --infodir=${AUTO_D}/share/info \ |
| 167 | --mandir=${AUTO_D}/share/man \ |
168 | --mandir=${AUTO_D}/share/man \ |
| 168 | --target=${CHOST} || die "!!! Failed to configure automake !!!" |
169 | --target=${CHOST} || die "!!! Failed to configure automake !!!" |
| 169 | |
170 | |
| 170 | emake || die "!!! Failed to build automake !!!" |
171 | emake || die "!!! Failed to build automake !!!" |
| 171 | |
172 | |
| 172 | make install || die "!!! Failed to install automake !!!" |
173 | make install || die "!!! Failed to install automake !!!" |
| 173 | } |
174 | } |
| 174 | |
175 | |
| 175 | install_autotools() { |
176 | install_autotools() { |
| 176 | |
177 | |
| 177 | if [ "${SRC_URI/autoconf/}" = "$SRC_URI" ] || [ "${SRC_URI/automake/}" = "$SRC_URI" ] |
178 | if [ "${SRC_URI/autoconf/}" = "$SRC_URI" ] || [ "${SRC_URI/automake/}" = "$SRC_URI" ] |