From 6e509ddf9ae266d224f136ecf2b2f83a7401df9c Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Tue, 19 Oct 2010 19:50:14 -0700 Subject: autotools: update config.{sub,guess} directly Drops gnu-configize in favor of doing it in the classes, and automatically doing it in autotools_base as well as autotools, ensuring that even recipes which only want oe_runconf will get the config files updated. Signed-off-by: Chris Larson --- classes/autotools.bbclass | 45 ++++++++++++++++++-- classes/autotools_base.bbclass | 5 +++ .../autoconf-2.61/autoreconf-gnuconfigize.patch | 49 ---------------------- .../autoconf-2.63/autoreconf-gnuconfigize.patch | 30 ------------- .../autoconf-2.65/autoreconf-gnuconfigize.patch | 30 ------------- recipes/autoconf/autoconf_2.61.bb | 3 +- recipes/autoconf/autoconf_2.63.bb | 3 +- recipes/autoconf/autoconf_2.65.bb | 3 +- recipes/gnu-config/gnu-config_20050701.bb | 21 +++------- recipes/gnu-config/gnu-config_git.bb | 20 ++------- 10 files changed, 59 insertions(+), 150 deletions(-) delete mode 100644 recipes/autoconf/autoconf-2.61/autoreconf-gnuconfigize.patch delete mode 100644 recipes/autoconf/autoconf-2.63/autoreconf-gnuconfigize.patch delete mode 100644 recipes/autoconf/autoconf-2.65/autoreconf-gnuconfigize.patch diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index 16ba469d2a..46d6d3dad1 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -18,8 +18,7 @@ def autotools_deps(d): and not bb.data.inherits_class('sdk', d) \ and not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1): deps += 'libtool-cross ' - - return deps + 'gnu-config-native ' + return deps DEPENDS_prepend = "${@autotools_deps(d)}" DEPENDS_virtclass-native_prepend = "${@autotools_deps(d)}" @@ -28,6 +27,39 @@ DEPENDS_virtclass-nativesdk_prepend = "${@autotools_deps(d)}" acpaths = "default" EXTRA_AUTORECONF = "--exclude=autopoint" +gnu_configize_here() { + if [ -n "`autoconf -t AC_CANONICAL_BUILD`" ]; then + macrodir="`autoconf -t AC_CONFIG_MACRO_DIR|cut -d: -f4|tail -n 1`" + if [ -z "$macrodir" ]; then + macrodir="." + fi + if [ ! -e ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ]; then + oefatal "gnu-config data files missing" + fi + oenote Updating config.sub and config.guess in $macrodir + rm -f $macrodir/config.sub $macrodir/config.guess + cp ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub $macrodir/config.sub + cp ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess $macrodir/config.guess + fi +} + +gnu_configize() { + subdirs="`autoconf -t AC_CONFIG_SUBDIRS|cut -d: -f4`" + for dir in $subdirs .; do + if [ ! -e "$olddir/$dir" ]; then + continue + fi + + pushd $dir + gnu_configize_here + popd + done +} + +do_configure_prepend () { + alias gnu-configize=gnu_configize +} + oe_autoreconf () { # autoreconf is too shy to overwrite aclocal.m4 if it doesn't look # like it was auto-generated. Work around this by blowing it away @@ -56,9 +88,12 @@ oe_autoreconf () { mkdir -p m4 autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} "$@" \ || oefatal "autoreconf execution failed." + if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then intltoolize --copy --force --automake fi + + gnu_configize_here } autotools_do_configure() { @@ -91,7 +126,11 @@ autotools_do_configure() { fi ;; esac - autotools_base_do_configure + if [ -e ${S}/configure ]; then + oe_runconf $@ + else + oenote "nothing to configure" + fi } EXPORT_FUNCTIONS do_configure diff --git a/classes/autotools_base.bbclass b/classes/autotools_base.bbclass index 97fc024807..1b22178f02 100755 --- a/classes/autotools_base.bbclass +++ b/classes/autotools_base.bbclass @@ -1,6 +1,7 @@ # use autotools_stage_all for native packages AUTOTOOLS_NATIVE_STAGE_INSTALL = "1" +DEPENDS_prepend = "${@['gnu-config-native ', ''][bool(d.getVar('INHIBIT_AUTOTOOLS_DEPS', 1))]}" EXTRA_OEMAKE = "" inherit siteinfo @@ -63,6 +64,10 @@ oe_runconf () { autotools_base_do_configure () { if [ -e ${S}/configure ]; then + find ${S} -name config.guess -exec \ + ln -sf ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess "{}" \; + find ${S} -name config.sub -exec \ + ln -sf ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub "{}" \; oe_runconf $@ else oenote "nothing to configure" diff --git a/recipes/autoconf/autoconf-2.61/autoreconf-gnuconfigize.patch b/recipes/autoconf/autoconf-2.61/autoreconf-gnuconfigize.patch deleted file mode 100644 index c243ce0216..0000000000 --- a/recipes/autoconf/autoconf-2.61/autoreconf-gnuconfigize.patch +++ /dev/null @@ -1,49 +0,0 @@ - -# -# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher -# - -Index: autoconf-2.61/bin/autoreconf.in -=================================================================== ---- autoconf-2.61.orig/bin/autoreconf.in 2006-12-14 20:33:52.000000000 +0100 -+++ autoconf-2.61/bin/autoreconf.in 2006-12-14 20:34:28.000000000 +0100 -@@ -58,7 +58,7 @@ - $help = "Usage: $0 [OPTION] ... [DIRECTORY] ... - - Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint' --(formerly `gettextize'), and `libtoolize' where appropriate) -+(formerly `gettextize'), `libtoolize', and `gnu-configize' where appropriate) - repeatedly to remake the GNU Build System files in specified - DIRECTORIES and their subdirectories (defaulting to `.'). - -@@ -107,12 +107,13 @@ - "; - - # Lib files. --my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@'; --my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@'; --my $automake = $ENV{'AUTOMAKE'} || 'automake'; --my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; --my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; --my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; -+my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@'; -+my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@'; -+my $automake = $ENV{'AUTOMAKE'} || 'automake'; -+my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; -+my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; -+my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; -+my $gnuconfigize = $ENV{'GNUCONFIGIZE'} || 'gnu-configize'; - - # --install -- as --add-missing in other tools. - my $install = 0; -@@ -644,6 +645,10 @@ - } - } - -+ @ex = grep (/^gnu-configize$/, @exclude); -+ if ($#ex == -1) { -+ xsystem ("$gnuconfigize"); -+ } - - # -------------- # - # Running make. # diff --git a/recipes/autoconf/autoconf-2.63/autoreconf-gnuconfigize.patch b/recipes/autoconf/autoconf-2.63/autoreconf-gnuconfigize.patch deleted file mode 100644 index beeb4c70c0..0000000000 --- a/recipes/autoconf/autoconf-2.63/autoreconf-gnuconfigize.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- /tmp/autoreconf.in 2009-06-02 13:10:42.000000000 +0200 -+++ autoconf-2.63/bin/autoreconf.in 2009-06-02 13:12:28.000000000 +0200 -@@ -58,7 +58,7 @@ - $help = "Usage: $0 [OPTION]... [DIRECTORY]... - - Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint' --(formerly `gettextize'), and `libtoolize' where appropriate) -+(formerly `gettextize'), `libtoolize', and `gnu-configize' where appropriate) - repeatedly to remake the GNU Build System files in specified - DIRECTORIES and their subdirectories (defaulting to `.'). - -@@ -115,6 +115,7 @@ - my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; - my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; - my $make = $ENV{'MAKE'} || 'make'; -+my $gnuconfigize = $ENV{'GNUCONFIGIZE'} || 'gnu-configize'; - - # --install -- as --add-missing in other tools. - my $install = 0; -@@ -643,6 +644,10 @@ - } - } - -+ @ex = grep (/^gnu-configize$/, @exclude); -+ if ($#ex == -1) { -+ xsystem ("$gnuconfigize"); -+ } - - # -------------- # - # Running make. # diff --git a/recipes/autoconf/autoconf-2.65/autoreconf-gnuconfigize.patch b/recipes/autoconf/autoconf-2.65/autoreconf-gnuconfigize.patch deleted file mode 100644 index beeb4c70c0..0000000000 --- a/recipes/autoconf/autoconf-2.65/autoreconf-gnuconfigize.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- /tmp/autoreconf.in 2009-06-02 13:10:42.000000000 +0200 -+++ autoconf-2.63/bin/autoreconf.in 2009-06-02 13:12:28.000000000 +0200 -@@ -58,7 +58,7 @@ - $help = "Usage: $0 [OPTION]... [DIRECTORY]... - - Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint' --(formerly `gettextize'), and `libtoolize' where appropriate) -+(formerly `gettextize'), `libtoolize', and `gnu-configize' where appropriate) - repeatedly to remake the GNU Build System files in specified - DIRECTORIES and their subdirectories (defaulting to `.'). - -@@ -115,6 +115,7 @@ - my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; - my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; - my $make = $ENV{'MAKE'} || 'make'; -+my $gnuconfigize = $ENV{'GNUCONFIGIZE'} || 'gnu-configize'; - - # --install -- as --add-missing in other tools. - my $install = 0; -@@ -643,6 +644,10 @@ - } - } - -+ @ex = grep (/^gnu-configize$/, @exclude); -+ if ($#ex == -1) { -+ xsystem ("$gnuconfigize"); -+ } - - # -------------- # - # Running make. # diff --git a/recipes/autoconf/autoconf_2.61.bb b/recipes/autoconf/autoconf_2.61.bb index 45886085c6..c845f38c10 100644 --- a/recipes/autoconf/autoconf_2.61.bb +++ b/recipes/autoconf/autoconf_2.61.bb @@ -2,12 +2,11 @@ require autoconf.inc LICENSE = "GPLv2+" -PR = "${INC_PR}.1" +PR = "${INC_PR}.2" SRC_URI += "file://autoreconf-include.patch \ file://autoreconf-exclude.patch \ file://autoreconf-foreign.patch \ - file://autoreconf-gnuconfigize.patch \ file://autoheader-nonfatal-warnings.patch \ file://config-site.patch \ file://autoconf-dont-execute-perl.patch \ diff --git a/recipes/autoconf/autoconf_2.63.bb b/recipes/autoconf/autoconf_2.63.bb index 41b33766c8..02e58508dd 100644 --- a/recipes/autoconf/autoconf_2.63.bb +++ b/recipes/autoconf/autoconf_2.63.bb @@ -1,13 +1,12 @@ require autoconf.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" DEFAULT_PREFERENCE = "-1" SRC_URI += "file://autoreconf-exclude.patch \ file://autoreconf-foreign.patch \ file://autoheader-nonfatal-warnings.patch \ - file://autoreconf-gnuconfigize.patch \ file://config-site.patch" SRC_URI_append_virtclass-native = " file://fix_path_xtra.patch" diff --git a/recipes/autoconf/autoconf_2.65.bb b/recipes/autoconf/autoconf_2.65.bb index d0bc9d4375..216e2b02a4 100644 --- a/recipes/autoconf/autoconf_2.65.bb +++ b/recipes/autoconf/autoconf_2.65.bb @@ -1,11 +1,10 @@ require autoconf.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" SRC_URI += "file://autoreconf-exclude.patch \ file://autoreconf-foreign.patch \ file://autoheader-nonfatal-warnings.patch \ - file://autoreconf-gnuconfigize.patch \ file://config-site.patch" SRC_URI_append_virtclass-native = " file://fix_path_xtra.patch" diff --git a/recipes/gnu-config/gnu-config_20050701.bb b/recipes/gnu-config/gnu-config_20050701.bb index 178f0c9e8b..278968af83 100644 --- a/recipes/gnu-config/gnu-config_20050701.bb +++ b/recipes/gnu-config/gnu-config_20050701.bb @@ -1,4 +1,4 @@ -DESCRIPTION = "gnu-configize" +DESCRIPTION = "config.{guess,sub} files" SECTION = "base" LICENSE = "GPL" DEPENDS = "" @@ -6,12 +6,11 @@ INHIBIT_DEFAULT_DEPS = "1" FIXEDSRCDATE = "${@bb.data.getVar('FILE', d, 1).split('_')[-1].split('.')[0]}" PV = "0.1+cvs${FIXEDSRCDATE}" -PR = "r6" +PR = "r7" SRC_URI = "cvs://anonymous@cvs.sv.gnu.org/cvsroot/config;module=config;method=pserver;date=${FIXEDSRCDATE} \ file://config-guess-uclibc.patch \ - file://avr32.patch \ - file://gnu-configize.in" + file://avr32.patch" S = "${WORKDIR}/config" do_compile() { @@ -19,21 +18,11 @@ do_compile() { } do_install () { - install -d ${D}${datadir}/gnu-config \ - ${D}${bindir} - cat ${WORKDIR}/gnu-configize.in | \ - sed -e 's,@gnu-configdir@,${datadir}/gnu-config,g' \ - -e 's,@autom4te_perllibdir@,${datadir}/autoconf,g' > ${D}${bindir}/gnu-configize - # In the native case we want the system perl as perl-native can't have built yet - if [ "${BUILD_ARCH}" != "${TARGET_ARCH}" ]; then - cat ${WORKDIR}/gnu-configize.in | \ - sed -e 's,/usr/bin/perl,${bindir}/perl,g' > ${D}${bindir}/gnu-configize - fi - chmod 755 ${D}${bindir}/gnu-configize + install -d ${D}${datadir}/gnu-config install -m 0644 config.guess config.sub ${D}${datadir}/gnu-config/ } -FILES_${PN} = "${bindir} ${datadir}/gnu-config" +FILES_${PN} = "${datadir}/gnu-config" BBCLASSEXTEND = "native" NATIVE_INSTALL_WORKS = "1" diff --git a/recipes/gnu-config/gnu-config_git.bb b/recipes/gnu-config/gnu-config_git.bb index 6c8983d449..8582223449 100644 --- a/recipes/gnu-config/gnu-config_git.bb +++ b/recipes/gnu-config/gnu-config_git.bb @@ -4,13 +4,12 @@ LICENSE = "GPL" DEPENDS = "" INHIBIT_DEFAULT_DEPS = "1" -PR = "r0" +PR = "r1" FAKESRCREV="e35217687ee5f39b428119fe31c7e954f6de64f0" PR_append = "+gitr${FAKESRCREV}" SRC_URI = "http://www.angstrom-distribution.org/unstable/sources/git_git.savannah.gnu.org.config.git_${FAKESRCREV}.tar.gz \ - file://config-guess-uclibc.patch \ - file://gnu-configize.in" + file://config-guess-uclibc.patch" SRC_URI[md5sum] = "6a45979aa33d15b23c874b95e24c8732" SRC_URI[sha256sum] = "a83bf7c7c972eb4106b5d7c6126d3b5b058f7aace7a62cae4e4f330d62f40259" @@ -22,22 +21,11 @@ do_compile() { } do_install () { - install -d ${D}${datadir}/gnu-config \ - ${D}${bindir} - cat ${WORKDIR}/gnu-configize.in | \ - sed -e 's,@gnu-configdir@,${datadir}/gnu-config,g' \ - -e 's,@autom4te_perllibdir@,${datadir}/autoconf,g' > ${D}${bindir}/gnu-configize - # In the native case we want the system perl as perl-native can't have built yet - if [ "${BUILD_ARCH}" != "${TARGET_ARCH}" ]; then - cat ${WORKDIR}/gnu-configize.in | \ - sed -e 's,/usr/bin/perl,${bindir}/perl,g' > ${D}${bindir}/gnu-configize - fi - chmod 755 ${D}${bindir}/gnu-configize + install -d ${D}${datadir}/gnu-config install -m 0644 config.guess config.sub ${D}${datadir}/gnu-config/ } -FILES_${PN} = "${bindir} ${datadir}/gnu-config" +FILES_${PN} = "${datadir}/gnu-config" BBCLASSEXTEND = "native" NATIVE_INSTALL_WORKS = "1" - -- cgit 1.2.3-korg