m4: import current stable from upstream Gentoo

BUG=None
TEST=updated m4, checked `m4 --version`, rebuilt x86-alex from source, booted it; also ran `cbuildbot chromiumos-sdk`

Change-Id: I98595893e0dc931afd5a0b9158a0305a13da92d1
Reviewed-on: http://gerrit.chromium.org/gerrit/6741
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: David James <davidjames@chromium.org>
This commit is contained in:
Mike Frysinger 2011-08-25 18:31:29 -04:00
parent 07320ae884
commit 3f1c5cfab5
3 changed files with 107 additions and 0 deletions

View File

@ -0,0 +1,39 @@
http://bugs.gentoo.org/355045
[PATCH] git-version-gen: skip "-dirty" check when appropriate
* build-aux/git-version-gen: Don't run any git commands
when the version comes from .tarball-version. Prior to this,
we would run git update-index --refresh even from a just-unpacked
tarball directory, and that could affect a .git/ directory in a
parent of the build directory. Reported by Mike Frysinger.
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index 68c7d64..686f703 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -124,13 +124,16 @@
# Change the first '-' to a '.', so version-comparing tools work properly.
# Remove the "g" in git describe's output string, to save a byte.
v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
+ v_from_git=1
else
v=UNKNOWN
+ v_from_git=
fi
v=`echo "$v" |sed 's/^v//'`
# Don't declare a version "dirty" merely because a time stamp has changed.
+if test -n "$v_from_git"; then
git update-index --refresh > /dev/null 2>&1
dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
@@ -142,6 +145,7 @@
*) v="$v-dirty" ;;
esac ;;
esac
+fi
# Omit the trailing newline, so that m4_esyscmd can use the result directly.
echo "$v" | tr -d "$nl"

View File

@ -0,0 +1,19 @@
uclibc defines __GLIBC__ but it does not expose struct shed_param as much as glibc
and is not needed too per standard. gnulib attempts to use it but we have to account
for it because in this case uclibc does not behave like glibc.
-Khem
http://bugs.gentoo.org/336484
--- m4-1.4.14/lib/spawn.in.h
+++ m4-1.4.14/lib/spawn.in.h
@@ -31,7 +31,7 @@
/* Get definitions of 'struct sched_param' and 'sigset_t'.
But avoid namespace pollution on glibc systems. */
-#ifndef __GLIBC__
+#if !defined __GLIBC__ || defined __UCLIBC__
# include <sched.h>
# include <signal.h>
#endif

View File

@ -0,0 +1,49 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-devel/m4/m4-1.4.15.ebuild,v 1.11 2011/02/22 02:48:32 vapier Exp $
EAPI="3"
inherit eutils
DESCRIPTION="GNU macro processor"
HOMEPAGE="http://www.gnu.org/software/m4/m4.html"
SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
IUSE="examples"
# remember: cannot dep on autoconf since it needs us
DEPEND="app-arch/xz-utils"
RDEPEND=""
src_prepare() {
epatch "${FILESDIR}"/${P}-uclibc-sched_param-def.patch #336484
epatch "${FILESDIR}"/${P}-git-version-gen.patch
}
src_configure() {
# Disable automagic dependency over libsigsegv; see bug #278026
export ac_cv_libsigsegv=no
local myconf=""
[[ ${USERLAND} != "GNU" ]] && myconf="--program-prefix=g"
econf --enable-changeword ${myconf}
}
src_test() {
[[ -d /none ]] && die "m4 tests will fail with /none/" #244396
emake check || die
}
src_install() {
emake install DESTDIR="${D}" || die
dodoc BACKLOG ChangeLog NEWS README* THANKS TODO
if use examples ; then
docinto examples
dodoc examples/*
rm -f "${D}"/usr/share/doc/${PF}/examples/Makefile*
fi
}