/[gentoo-x86]/eclass/gnuconfig.eclass
Gentoo

Contents of /eclass/gnuconfig.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Fri Oct 25 19:57:51 2002 UTC (11 years, 10 months ago) by vapier
Branch: MAIN
CVS Tags: GENTOO_1_4_SNAP_2003010800
Changes since 1.2: +1 -2 lines
Header updates/cleanups

1 wwoods 1.1 # Copyright 1999-2002 Gentoo Technologies, Inc.
2 vapier 1.2 # Distributed under the terms of the GNU General Public License v2
3 wwoods 1.1 # Author: Will Woods <wwoods@gentoo.org>
4 vapier 1.3 # $Header: /home/cvsroot/gentoo-x86/eclass/gnuconfig.eclass,v 1.2 2002/10/25 19:55:52 vapier Exp $
5 wwoods 1.1 # This eclass updates config.guess and config.sub. This is useful if
6     # configure dies from misguessing your canonical system name (CHOST).
7    
8     ECLASS=gnuconfig
9     INHERITED="$INHERITED $ECLASS"
10    
11     newdepend sys-devel/automake
12    
13     DESCRIPTION="Based on the ${ECLASS} eclass"
14    
15     # Copy the newest available config.{guess|sub} on the system over any old
16     # ones in the source dir
17     gnuconfig_update() {
18     local configsubs_dir="$(gnuconfig_findnewest)"
19     local sub
20     local f
21     einfo "Using GNU config files from ${configsubs_dir}"
22     for sub in config.sub config.guess ; do
23     for f in `find ${S} -name "${sub}"`; do
24     einfo "Updating ${f/$S\//}"
25     cp -f ${configsubs_dir}/${sub} ${f}
26     done
27     done
28     }
29    
30     # this searches the standard locations for the newest config.{sub|guess}, and
31     # returns the directory where they can be found.
32     gnuconfig_findnewest() {
33     local locations="/usr/share/automake-1.6/config.sub \
34     /usr/share/automake-1.5/config.sub \
35     /usr/share/automake-1.4/config.sub \
36     /usr/share/libtool/config.sub"
37     grep -s '^timestamp' ${locations} | sort -n -t\' -k2 | tail -1 | sed 's,/config.sub:.*$,,'
38     }

  ViewVC Help
Powered by ViewVC 1.1.20