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

Contents of /eclass/gnuconfig.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Fri Oct 25 19:55:52 2002 UTC (12 years, 1 month ago) by vapier
Branch: MAIN
Changes since 1.1: +2 -2 lines
Header updates/cleanups

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

  ViewVC Help
Powered by ViewVC 1.1.20