From a780643c4b6aa11e1a36965a69df7116477c7b4c Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Tue, 7 Dec 2004 22:05:47 +0000 Subject: Merge oe-devel@oe-devel.bkbits.net:packages.bb into handhelds.org:/home/kergoth/code/packages.bb 2004/12/07 04:58:25-06:00 ti.com!kergoth More updates per the core rename. 2004/12/07 04:46:51-06:00 ti.com!kergoth Update soundtracker per the core rename. 2004/12/07 04:44:14-06:00 ti.com!kergoth Merge 2004/12/07 04:42:38-06:00 ti.com!kergoth Updates per the recent rename of the oe core from 'oe' to 'bitbake'. BKrev: 41b6293b91LRHSxMOt6WnrZVAdLbFw --- classes/autotools.bbclass | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 classes/autotools.bbclass (limited to 'classes/autotools.bbclass') diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3 From 0f235b0f42575bfb50dd891cf44aa08c2e404a67 Mon Sep 17 00:00:00 2001 From: "nslu2-linux.adm@bkbits.net" Date: Tue, 18 Jan 2005 01:52:40 +0000 Subject: Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/01/17 19:52:39-06:00 ti.com!kergoth Kill off the dyn-ldconfig patch for uclibc cvs, as the patch was accepted upstream. 2005/01/17 19:48:04-06:00 ti.com!kergoth Update the patcher-native build to set PATCHCMD, in case we want to actually apply patches to it at some point. 2005/01/17 19:45:23-06:00 ti.com!kergoth Add quilt-native and use quilt instead of patcher by default. BKrev: 41ec6be8oJA-Iu3VSh3tCDGFhr_Xkw --- classes/autotools.bbclass | 146 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 146 insertions(+) (limited to 'classes/autotools.bbclass') diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index e69de29bb2..820400680f 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -0,0 +1,146 @@ +inherit base + +def autotools_dep_prepend(d): + import bb; + + if bb.data.getVar('INHIBIT_AUTOTOOLS_DEPS', d, 1): + return '' + + pn = bb.data.getVar('PN', d, 1) + deps = '' + + if pn in ['autoconf-native', 'automake-native']: + return deps + deps += 'autoconf-native automake-native ' + + if not pn in ['libtool', 'libtool-native', 'libtool-cross']: + deps += 'libtool-native ' + + return deps + 'gnu-config-native ' + +EXTRA_OEMAKE = "" +DEPENDS_prepend = "${@autotools_dep_prepend(d)}" +acpaths = "default" +EXTRA_AUTORECONF = "--exclude=autopoint" + +def autotools_set_crosscompiling(d): + import bb + if not bb.data.inherits_class('native', d): + return " cross_compiling=yes" + return "" + +# EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}" + +oe_runconf () { + if [ -x ${S}/configure ] ; then + cfgcmd="${S}/configure \ + --build=${BUILD_SYS} \ + --host=${HOST_SYS} \ + --target=${TARGET_SYS} \ + --prefix=${prefix} \ + --exec_prefix=${exec_prefix} \ + --bindir=${bindir} \ + --sbindir=${sbindir} \ + --libexecdir=${libexecdir} \ + --datadir=${datadir} \ + --sysconfdir=${sysconfdir} \ + --sharedstatedir=${sharedstatedir} \ + --localstatedir=${localstatedir} \ + --libdir=${libdir} \ + --includedir=${includedir} \ + --oldincludedir=${oldincludedir} \ + --infodir=${infodir} \ + --mandir=${mandir} \ + ${EXTRA_OECONF} \ + $@" + oenote "Running $cfgcmd..." + $cfgcmd || oefatal "oe_runconf failed" + else + oefatal "no configure script found" + fi +} + +autotools_do_configure() { + case ${PN} in + autoconf*) + ;; + automake*) + ;; + *) + # WARNING: gross hack follows: + # An autotools built package generally needs these scripts, however only + # automake or libtoolize actually install the current versions of them. + # This is a problem in builds that do not use libtool or automake, in the case + # where we -need- the latest version of these scripts. e.g. running a build + # for a package whose autotools are old, on an x86_64 machine, which the old + # config.sub does not support. Work around this by installing them manually + # regardless. + ( for ac in `find ${S} -name configure.in -o -name configure.ac`; do + rm -f `dirname $ac`/configure + done ) + if [ -e ${S}/configure.in -o -e ${S}/configure.ac ]; then + olddir=`pwd` + cd ${S} + if [ x"${acpaths}" = xdefault ]; then + acpaths= + for i in `find ${S} -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \ + grep -v 'acinclude.m4' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do + acpaths="$acpaths -I $i" + done + else + acpaths="${acpaths}" + fi + install -d ${STAGING_DIR}/${HOST_SYS}/share/aclocal + acpaths="$acpaths -I ${STAGING_DIR}/${HOST_SYS}/share/aclocal" + # 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 + # by hand, unless the package specifically asked not to run aclocal. + if ! echo ${EXTRA_AUTORECONF} | grep -q "aclocal"; then + rm -f aclocal.m4 + fi + if [ -e configure.in ]; then + CONFIGURE_AC=configure.in + else + CONFIGURE_AC=configure.ac + fi + if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then + if grep "sed.*POTFILES" configure.ac >/dev/null; then + : do nothing -- we still have an old unmodified configure.ac + else + oenote Executing glib-gettextize --force --copy + echo "no" | glib-gettextize --force --copy + fi + fi + if grep "^AC_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then + oenote Executing intltoolize --copy --force --automake + intltoolize --copy --force --automake + fi + oenote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths + mkdir -p m4 + autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed." + cd $olddir + fi + ;; + esac + if [ -e ${S}/configure ]; then + oe_runconf + else + oenote "nothing to configure" + fi +} + +autotools_do_install() { + oe_runmake 'DESTDIR=${D}' install +} + +STAGE_TEMP="${WORKDIR}/temp-staging" + +autotools_stage_includes() { + rm -rf ${STAGE_TEMP} + mkdir -p ${STAGE_TEMP} + make DESTDIR="${STAGE_TEMP}" install + cp -a ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR} + rm -rf ${STAGE_TEMP} +} + +EXPORT_FUNCTIONS do_configure do_install -- cgit v1.2.3 From 3696ad0acb6fef1b18484fef08f83a30c9c28e62 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Tue, 15 Feb 2005 02:58:29 +0000 Subject: avoid ugly error when configure.in is present, not configure.ac BKrev: 42116555rsOpzOKI2ivuWUw6QxQJTQ --- classes/autotools.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/autotools.bbclass') diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index 820400680f..85d96e0028 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -104,7 +104,7 @@ autotools_do_configure() { CONFIGURE_AC=configure.ac fi if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then - if grep "sed.*POTFILES" configure.ac >/dev/null; then + if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then : do nothing -- we still have an old unmodified configure.ac else oenote Executing glib-gettextize --force --copy -- cgit v1.2.3 From 111379fb08ecbacc5120720652b3ce6ecbb528df Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Sat, 16 Apr 2005 07:14:45 +0000 Subject: add versioned aclocal directory to acpaths for autoreconf BKrev: 4260bb65qQlKjLMowOfitF_BjV8z_w --- classes/autotools.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'classes/autotools.bbclass') diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index 85d96e0028..7e81a68a9d 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -90,8 +90,11 @@ autotools_do_configure() { else acpaths="${acpaths}" fi + AUTOV=`automake --version |head -n 1 |sed "s/.* //;s/\.[0-9]\+$//"` + automake --version + echo "AUTOV is $AUTOV" install -d ${STAGING_DIR}/${HOST_SYS}/share/aclocal - acpaths="$acpaths -I ${STAGING_DIR}/${HOST_SYS}/share/aclocal" + acpaths="$acpaths -I ${STAGING_DIR}/${HOST_SYS}/share/aclocal-$AUTOV -I ${STAGING_DIR}/${HOST_SYS}/share/aclocal" # 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 # by hand, unless the package specifically asked not to run aclocal. -- cgit v1.2.3 From bb65fe7102989d270d9ee70eda44df700afb6f66 Mon Sep 17 00:00:00 2001 From: Phil Blundell Date: Sat, 16 Apr 2005 08:14:47 +0000 Subject: Merge bk://oe-devel@openembedded-devel.bkbits.net/openembedded into mebius.reciva.com:/home/pb/oe/oe 2005/04/16 09:13:52+01:00 reciva.com!pb create aclocal-N.N before trying to use it BKrev: 4260c977DOfRPC513Shpw-OP-tZLxA --- classes/autotools.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes/autotools.bbclass') diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index 7e81a68a9d..1d6a607559 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -94,6 +94,7 @@ autotools_do_configure() { automake --version echo "AUTOV is $AUTOV" install -d ${STAGING_DIR}/${HOST_SYS}/share/aclocal + install -d ${STAGING_DIR}/${HOST_SYS}/share/aclocal-$AUTOV acpaths="$acpaths -I ${STAGING_DIR}/${HOST_SYS}/share/aclocal-$AUTOV -I ${STAGING_DIR}/${HOST_SYS}/share/aclocal" # 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 -- cgit v1.2.3 From cc66d34e4a411ce7e105df2ecb3d95265157f267 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Tue, 9 Aug 2005 22:40:46 +0000 Subject: autotools.bbclass: add INHIBIT_AUTO_STAGE_INCLUDES native.bbclass: add INHIBIT_NATIVE_STAGE_INSTALL --- classes/autotools.bbclass | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'classes/autotools.bbclass') diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index 1d6a607559..8a387da5ca 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -140,11 +140,14 @@ autotools_do_install() { STAGE_TEMP="${WORKDIR}/temp-staging" autotools_stage_includes() { - rm -rf ${STAGE_TEMP} - mkdir -p ${STAGE_TEMP} - make DESTDIR="${STAGE_TEMP}" install - cp -a ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR} - rm -rf ${STAGE_TEMP} + if [ "${INHIBIT_AUTO_STAGE_INCLUDES}" != "1" ] + then + rm -rf ${STAGE_TEMP} + mkdir -p ${STAGE_TEMP} + make DESTDIR="${STAGE_TEMP}" install + cp -a ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR} + rm -rf ${STAGE_TEMP} + fi } EXPORT_FUNCTIONS do_configure do_install -- cgit v1.2.3 From 57c3acf775eeb9f8a2613c3752688d7816f2b0a4 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 19 Sep 2005 12:29:59 +0000 Subject: GNU cp has a nice -a switch, sadly the BSD tools lack it update our descriptions to work with any version of cp. Patches that include cp -a are not changed. They seem to work and I'm too scared busybox cp is more like GNU cp than BSD cp. (e.g do not know about P) --- classes/autotools.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/autotools.bbclass') diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index 8a387da5ca..ec1d4af1a4 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -145,7 +145,7 @@ autotools_stage_includes() { rm -rf ${STAGE_TEMP} mkdir -p ${STAGE_TEMP} make DESTDIR="${STAGE_TEMP}" install - cp -a ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR} + cp -pPR ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR} rm -rf ${STAGE_TEMP} fi } -- cgit v1.2.3 From 0809a79a7776069d1c58011b5eb294a5edfa9a56 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Thu, 29 Sep 2005 12:08:48 +0000 Subject: class autotools: add function 'autotools_stage_all' that automatically stages include files and libraries for packages that obey DESTDIR. This can be used to remove a lot of duplicated metadata in do_stage() of packages that inherit autotools. Note that you need to call autotools_stage_all manually in do_stage. It may be added to do_stage() eventually, but for now we want to do the transition step-by-step. Feel free to convert do_stage of autotools packages to using autotools_stage_all. --- classes/autotools.bbclass | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'classes/autotools.bbclass') diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index ec1d4af1a4..8d448ce0d3 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -150,4 +150,16 @@ autotools_stage_includes() { fi } +autotools_stage_all() { + if [ "${INHIBIT_AUTO_STAGE}" != "1" ] + then + rm -rf ${STAGE_TEMP} + mkdir -p ${STAGE_TEMP} + oe_runmake DESTDIR="${STAGE_TEMP}" install + cp -pPR ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR} + cp -pPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR} + rm -rf ${STAGE_TEMP} + fi +} + EXPORT_FUNCTIONS do_configure do_install -- cgit v1.2.3