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

Contents of /eclass/gnuconfig.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Tue Feb 18 09:00:45 2003 UTC (11 years, 10 months ago) by carpaski
Branch: MAIN
Changes since 1.4: +2 -2 lines
If description is set... don't overwrite it...
Fixes to everything but ASPELL and KDE-SOURCE

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

  ViewVC Help
Powered by ViewVC 1.1.20