summaryrefslogtreecommitdiffstats
path: root/meta/packages/gnu-config
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/gnu-config
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/gnu-config')
-rw-r--r--meta/packages/gnu-config/gnu-config-native_20050701.bb15
-rw-r--r--meta/packages/gnu-config/gnu-config/config-guess-uclibc.patch155
-rwxr-xr-xmeta/packages/gnu-config/gnu-config/gnu-configize.in267
-rw-r--r--meta/packages/gnu-config/gnu-config/uclibc.patch21
-rw-r--r--meta/packages/gnu-config/gnu-config_20050701.bb32
5 files changed, 490 insertions, 0 deletions
diff --git a/meta/packages/gnu-config/gnu-config-native_20050701.bb b/meta/packages/gnu-config/gnu-config-native_20050701.bb
new file mode 100644
index 0000000000..7ee47fe5d5
--- /dev/null
+++ b/meta/packages/gnu-config/gnu-config-native_20050701.bb
@@ -0,0 +1,15 @@
1SECTION = "base"
2include gnu-config_${PV}.bb
3
4inherit native
5
6FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gnu-config"
7
8do_stage () {
9 install -d ${STAGING_DATADIR}/gnu-config
10 cat ${WORKDIR}/gnu-configize.in | \
11 sed -e 's,@gnu-configdir@,${STAGING_DATADIR}/gnu-config,' \
12 -e 's,@autom4te_perllibdir@,${STAGING_DATADIR}/autoconf,' > ${STAGING_BINDIR}/gnu-configize
13 chmod 755 ${STAGING_BINDIR}/gnu-configize
14 install -m 0644 config.guess config.sub ${STAGING_DATADIR}/gnu-config/
15}
diff --git a/meta/packages/gnu-config/gnu-config/config-guess-uclibc.patch b/meta/packages/gnu-config/gnu-config/config-guess-uclibc.patch
new file mode 100644
index 0000000000..b322157e9b
--- /dev/null
+++ b/meta/packages/gnu-config/gnu-config/config-guess-uclibc.patch
@@ -0,0 +1,155 @@
1Patch courtesy gentoo-portage/sys-devel/gnuconfig/files/automake-1.8.5-config-guess-uclibc.patch.
2
3updated to 20050516 by Marcin 'Hrw' Juszkiewicz (by hand)
4
5Index: config/config.guess
6===================================================================
7--- config.guess.original 2005-05-16 13:43:19 +0200
8+++ config.guess 2005-05-16 13:45:26 +0200
9@@ -138,6 +138,19 @@
10 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
11 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
12
13+# Detect uclibc systems.
14+
15+LIBC="gnu"
16+if [ -f /usr/include/bits/uClibc_config.h ]
17+then
18+ LIBC=uclibc
19+ if [ -n `grep "#define __UCLIBC_CONFIG_VERSION__" /usr/include/bits/uClibc_config.h` ]
20+ then
21+ UCLIBC_SUBVER=`sed -n "/#define __UCLIBC_CONFIG_VERSION__ /s///p" /usr/include/bits/uClibc_config.h`
22+ LIBC=$LIBC$UCLIBC_SUBVER
23+ fi
24+fi
25+
26 # Note: order is significant - the case branches are not exclusive.
27
28 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
29@@ -847,7 +860,7 @@
30 echo ${UNAME_MACHINE}-pc-minix
31 exit ;;
32 arm*:Linux:*:*)
33- echo ${UNAME_MACHINE}-unknown-linux-gnu
34+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
35 exit ;;
36 cris:Linux:*:*)
37 echo cris-axis-linux-gnu
38@@ -856,16 +869,16 @@
39 echo crisv32-axis-linux-gnu
40 exit ;;
41 frv:Linux:*:*)
42- echo frv-unknown-linux-gnu
43+ echo frv-unknown-linux-${LIBC}
44 exit ;;
45 ia64:Linux:*:*)
46- echo ${UNAME_MACHINE}-unknown-linux-gnu
47+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
48 exit ;;
49 m32r*:Linux:*:*)
50- echo ${UNAME_MACHINE}-unknown-linux-gnu
51+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
52 exit ;;
53 m68*:Linux:*:*)
54- echo ${UNAME_MACHINE}-unknown-linux-gnu
55+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
56 exit ;;
57 mips:Linux:*:*)
58 eval $set_cc_for_build
59@@ -884,7 +897,7 @@
60 #endif
61 EOF
62 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
63- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
64+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
65 ;;
66 mips64:Linux:*:*)
67 eval $set_cc_for_build
68@@ -903,13 +916,13 @@
69 #endif
70 EOF
71 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
72- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
73+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
74 ;;
75 ppc:Linux:*:*)
76- echo powerpc-unknown-linux-gnu
77+ echo powerpc-unknown-linux-${LIBC}
78 exit ;;
79 ppc64:Linux:*:*)
80- echo powerpc64-unknown-linux-gnu
81+ echo powerpc64-unknown-linux-${LIBC}
82 exit ;;
83 alpha:Linux:*:*)
84 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
85@@ -922,34 +935,34 @@
86 EV68*) UNAME_MACHINE=alphaev68 ;;
87 esac
88 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
89- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
90- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
91+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
92+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
93 exit ;;
94 parisc:Linux:*:* | hppa:Linux:*:*)
95 # Look for CPU level
96 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
97- PA7*) echo hppa1.1-unknown-linux-gnu ;;
98- PA8*) echo hppa2.0-unknown-linux-gnu ;;
99- *) echo hppa-unknown-linux-gnu ;;
100+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
101+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
102+ *) echo hppa-unknown-linux-${LIBC} ;;
103 esac
104 exit ;;
105 parisc64:Linux:*:* | hppa64:Linux:*:*)
106- echo hppa64-unknown-linux-gnu
107+ echo hppa64-unknown-linux-${LIBC}
108 exit ;;
109 s390:Linux:*:* | s390x:Linux:*:*)
110 echo ${UNAME_MACHINE}-ibm-linux
111 exit ;;
112 sh64*:Linux:*:*)
113- echo ${UNAME_MACHINE}-unknown-linux-gnu
114+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
115 exit ;;
116 sh*:Linux:*:*)
117- echo ${UNAME_MACHINE}-unknown-linux-gnu
118+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
119 exit ;;
120 sparc:Linux:*:* | sparc64:Linux:*:*)
121- echo ${UNAME_MACHINE}-unknown-linux-gnu
122+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
123 exit ;;
124 x86_64:Linux:*:*)
125- echo x86_64-unknown-linux-gnu
126+ echo x86_64-unknown-linux-${LIBC}
127 exit ;;
128 i*86:Linux:*:*)
129 # The BFD linker knows what the default object file format is, so
130@@ -964,20 +977,21 @@
131 p'`
132 case "$ld_supported_targets" in
133 elf32-i386)
134- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
135+ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
136 ;;
137 a.out-i386-linux)
138- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
139+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
140 exit ;;
141 coff-i386)
142- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
143+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
144 exit ;;
145 "")
146 # Either a pre-BFD a.out linker (linux-gnuoldld) or
147 # one that does not give us useful --help.
148- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
149+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
150 exit ;;
151 esac
152+ if [ $LIBC != "gnu" -o $LIBC != "gnulibc1" ];then echo "$TENTATIVE" && exit; fi
153 # Determine whether the default compiler is a.out or elf
154 eval $set_cc_for_build
155 sed 's/^ //' << EOF >$dummy.c
diff --git a/meta/packages/gnu-config/gnu-config/gnu-configize.in b/meta/packages/gnu-config/gnu-config/gnu-configize.in
new file mode 100755
index 0000000000..be8580c8e6
--- /dev/null
+++ b/meta/packages/gnu-config/gnu-config/gnu-configize.in
@@ -0,0 +1,267 @@
1#! /usr/bin/perl -w
2# -*- perl -*-
3
4eval 'case $# in 0) exec /usr/bin/perl -S "$0";; *) exec /usr/bin/perl -S "$0" "$@";; esac'
5 if 0;
6
7# gnu-configize - install the GNU config.guess / config.sub in a directory tree
8# Based on autoreconf:
9# Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003
10# Free Software Foundation, Inc.
11
12# This program is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation; either version 2, or (at your option)
15# any later version.
16
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, write to the Free Software
24# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25# 02111-1307, USA.
26
27BEGIN
28{
29 my $datadir = $ENV{'autom4te_perllibdir'} || '@autom4te_perllibdir@';
30# '/home/kergoth/code/build-arm/tmp/staging/share/autoconf';
31 unshift @INC, $datadir;
32
33 # Override SHELL. On DJGPP SHELL may not be set to a shell
34 # that can handle redirection and quote arguments correctly,
35 # e.g.: COMMAND.COM. For DJGPP always use the shell that configure
36 # has detected.
37 $ENV{'SHELL'} = '/bin/sh' if ($^O eq 'dos');
38}
39
40use Autom4te::ChannelDefs;
41use Autom4te::Channels;
42use Autom4te::Configure_ac;
43use Autom4te::FileUtils;
44use Autom4te::General;
45use Autom4te::XFile;
46# Do not use Cwd::chdir, since it might hang.
47use Cwd 'cwd';
48use strict;
49
50## ----------- ##
51## Variables. ##
52## ----------- ##
53
54# $HELP
55# -----
56$help = "Usage: $0 [OPTION] ... [CONFIGURE-AC or DIRECTORY] ...
57
58Install the GNU config.sub and config.guess scripts in the
59DIRECTORIES or the directory trees driven by CONFIGURE-AC
60(defaulting to `.').
61
62Operation modes:
63 -h, --help print this help, then exit
64 -V, --version print version number, then exit
65 -v, --verbose verbosely report processing
66 -f, --force consider all files obsolete
67 -s, --symlink install symbolic links instead of copies
68 -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
69
70" . Autom4te::ChannelDefs::usage . "
71
72The environment variable \`WARNINGS\' is honored. Some subtools might
73support other warning types, using \`all' is encouraged.
74";
75
76# $VERSION
77# --------
78$version = "gnu-configize 1.0
79
80Copyright (C) 2004 Chris Larson
81This is free software; see the source for copying conditions. There is NO
82warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
83";
84
85my $configdir = '@gnu-configdir@';
86#'/home/kergoth/code/build-arm/tmp/staging/i686-linux/share/gnu-config';
87my $autoconf = $ENV{'AUTOCONF'} || 'autoconf';
88
89# use symlinks instead.
90my $symlink = 0;
91
92my $configure_ac;
93
94my $rm = "rm -f";
95my $ln_s = "ln -sf";
96my $cp = "cp -f";
97my $mkdir = "mkdir";
98my $chmod = "chmod";
99
100## ---------- ##
101## Routines. ##
102## ---------- ##
103
104
105# parse_args ()
106# -------------
107# Process any command line arguments.
108sub parse_args ()
109{
110 my $srcdir;
111
112 getopt ('s|symlink' => \$symlink);
113
114 # Even if the user specified a configure.ac, trim to get the
115 # directory, and look for configure.ac again. Because (i) the code
116 # is simpler, and (ii) we are still able to diagnose simultaneous
117 # presence of configure.ac and configure.in.
118 @ARGV = map { /configure\.(ac|in)$/ ? dirname ($_) : $_ } @ARGV;
119 push @ARGV, '.' unless @ARGV;
120}
121
122
123# &gnu_configize_current_directory
124# -----------------------------
125sub gnu_configize_current_directory ()
126{
127 my $configure_ac = require_configure_ac;
128
129 # ---------------------- #
130 # Is it using Autoconf? #
131 # ---------------------- #
132
133 my $uses_autoconf;
134 my $uses_gettext;
135 my $configure_ac_file = new Autom4te::XFile $configure_ac;
136 while ($_ = $configure_ac_file->getline)
137 {
138 s/#.*//;
139 s/dnl.*//;
140 $uses_autoconf = 1 if /AC_INIT/;
141 }
142
143 if (!$uses_autoconf)
144 {
145 verb "$configure_ac: not using Autoconf";
146 return;
147 }
148
149 my $aux_dir;
150 my @subdir;
151 my $cmd;
152 my $dest;
153
154 verb "$configure_ac: tracing";
155 my $traces = new Autom4te::XFile
156 ("$autoconf"
157 . join (' --trace=', '',
158 # If you change this list, update the
159 # `Autoreconf-preselections' section of autom4te.in.
160 'AC_CONFIG_AUX_DIR:AC_CONFIG_AUX_DIR:\$1',
161 'AC_CONFIG_SUBDIRS:AC_CONFIG_SUBDIRS:\$1',
162 'AC_INIT',
163 )
164 . ' |');
165 while ($_ = $traces->getline)
166 {
167 $aux_dir = $1 if /AC_CONFIG_AUX_DIR:(.*)/;
168 $uses_autoconf = 1 if /AC_INIT/;
169 push @subdir, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/;
170 }
171
172 # The subdirs are *optional*, they may not exist.
173 foreach (@subdir)
174 {
175 if (-d)
176 {
177 verb "$configure_ac: subdirectory $_ to gnu-configize";
178 gnu_configize ($_);
179 }
180 else
181 {
182 verb "$configure_ac: subdirectory $_ not present";
183 }
184 }
185
186 $dest = ".";
187
188 if (defined $aux_dir)
189 {
190 $dest = $aux_dir;
191 if (! -d $aux_dir)
192 {
193 verb "$configure_ac: creating directory $aux_dir";
194 mkdir $aux_dir
195 or error "cannot create $aux_dir: $!";
196 }
197 }
198
199 if (!$symlink)
200 {
201 $cmd = $cp;
202 }
203 else
204 {
205 $cmd = $ln_s;
206 }
207
208 xsystem ("$cmd $configdir/config.guess $dest/");
209 xsystem ("$chmod u+x $dest/config.guess");
210 xsystem ("$cmd $configdir/config.sub $dest/");
211 xsystem ("$chmod u+x $dest/config.sub");
212}
213
214
215# &gnu_configize ($DIRECTORY)
216# ------------------------
217# Reconf the $DIRECTORY.
218sub gnu_configize ($)
219{
220 my ($directory) = @_;
221 my $cwd = cwd;
222
223 # The format for this message is not free: taken from Emacs, itself
224 # using GNU Make's format.
225 verb "Entering directory `$directory'";
226 chdir $directory
227 or error "cannot chdir to $directory: $!";
228
229 gnu_configize_current_directory;
230
231 # The format is not free: taken from Emacs, itself using GNU Make's
232 # format.
233 verb "Leaving directory `$directory'";
234 chdir $cwd
235 or error "cannot chdir to $cwd: $!";
236}
237
238
239## ------ ##
240## Main. ##
241## ------ ##
242
243parse_args;
244
245# Autoreconf all the given configure.ac. A while loop, not a for,
246# since the list can change at runtime because of AC_CONFIG_SUBDIRS.
247for my $directory (@ARGV)
248 {
249 gnu_configize ($directory);
250 }
251
252### Setup "GNU" style for perl-mode and cperl-mode.
253## Local Variables:
254## perl-indent-level: 2
255## perl-continued-statement-offset: 2
256## perl-continued-brace-offset: 0
257## perl-brace-offset: 0
258## perl-brace-imaginary-offset: 0
259## perl-label-offset: -2
260## cperl-indent-level: 2
261## cperl-brace-offset: 0
262## cperl-continued-brace-offset: 0
263## cperl-label-offset: -2
264## cperl-extra-newline-before-brace: t
265## cperl-merge-trailing-else: nil
266## cperl-continued-statement-offset: 2
267## End:
diff --git a/meta/packages/gnu-config/gnu-config/uclibc.patch b/meta/packages/gnu-config/gnu-config/uclibc.patch
new file mode 100644
index 0000000000..20a3b11f2f
--- /dev/null
+++ b/meta/packages/gnu-config/gnu-config/uclibc.patch
@@ -0,0 +1,21 @@
1--- config.sub.orig 2004-05-14 19:38:36.000000000 -0500
2+++ config.sub 2004-05-14 19:39:17.000000000 -0500
3@@ -118,7 +118,7 @@
4 # Here we must recognize all the valid KERNEL-OS combinations.
5 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
6 case $maybe_os in
7- nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
8+ nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
9 os=-$maybe_os
10 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
11 ;;
12@@ -1135,7 +1135,8 @@
13 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
14 | -chorusos* | -chorusrdb* \
15 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
16- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
17+ | -mingw32* | -linux-gnu* | -linux-uclibc* \
18+ | -uxpv* | -beos* | -mpeix* | -udk* \
19 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
20 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
21 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
diff --git a/meta/packages/gnu-config/gnu-config_20050701.bb b/meta/packages/gnu-config/gnu-config_20050701.bb
new file mode 100644
index 0000000000..2066014adf
--- /dev/null
+++ b/meta/packages/gnu-config/gnu-config_20050701.bb
@@ -0,0 +1,32 @@
1DESCRIPTION = "gnu-configize"
2SECTION = "base"
3LICENSE = "GPL"
4DEPENDS = ""
5INHIBIT_DEFAULT_DEPS = "1"
6
7FIXEDSRCDATE = "${@bb.data.getVar('FILE', d, 1).split('_')[-1].split('.')[0]}"
8PV = "0.1+cvs${FIXEDSRCDATE}"
9PR = "r4"
10
11SRC_URI = "cvs://anonymous@cvs.sv.gnu.org/cvsroot/config;module=config;method=pserver;date=${FIXEDSRCDATE} \
12 file://config-guess-uclibc.patch;patch=1 \
13 file://gnu-configize.in"
14S = "${WORKDIR}/config"
15
16do_compile() {
17 :
18}
19
20do_install () {
21 install -d ${D}${datadir}/gnu-config \
22 ${D}${bindir}
23 cat ${WORKDIR}/gnu-configize.in | \
24 sed -e 's,@gnu-configdir@,${datadir}/gnu-config,g' \
25 -e 's,@autom4te_perllibdir@,${datadir}/autoconf,g' \
26 -e 's,/usr/bin/perl,${bindir}/perl,g' > ${D}${bindir}/gnu-configize
27 chmod 755 ${D}${bindir}/gnu-configize
28 install -m 0644 config.guess config.sub ${D}${datadir}/gnu-config/
29}
30
31PACKAGES = "${PN}"
32FILES_${PN} = "${bindir} ${datadir}/gnu-config"