summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-06-29 23:12:06 +0000
committerMike Frysinger <vapier@gentoo.org>2008-06-29 23:12:06 +0000
commit764e76d0f3b2e8ea4c3414030e1972e96677b075 (patch)
tree877d977200e06e52748e7ab535e2679c0894f1c4 /sys-devel/autoconf
parentbroken (diff)
downloadgentoo-2-764e76d0f3b2e8ea4c3414030e1972e96677b075.tar.gz
gentoo-2-764e76d0f3b2e8ea4c3414030e1972e96677b075.tar.bz2
gentoo-2-764e76d0f3b2e8ea4c3414030e1972e96677b075.zip
Add workarounds for nasty bugs #217976 (multiline problems) and #228825 (big endian misdetection on ppc).
(Portage version: 2.2_rc1/cvs/Linux 2.6.25 x86_64)
Diffstat (limited to 'sys-devel/autoconf')
-rw-r--r--sys-devel/autoconf/ChangeLog12
-rw-r--r--sys-devel/autoconf/autoconf-2.62-r1.ebuild47
-rw-r--r--sys-devel/autoconf/files/autoconf-2.62-at-keywords.patch81
-rw-r--r--sys-devel/autoconf/files/autoconf-2.62-fix-multiline-string.patch30
-rw-r--r--sys-devel/autoconf/files/autoconf-2.62-revert-AC_C_BIGENDIAN.patch214
5 files changed, 383 insertions, 1 deletions
diff --git a/sys-devel/autoconf/ChangeLog b/sys-devel/autoconf/ChangeLog
index 4c88a6379ca6..137d2d0d09ea 100644
--- a/sys-devel/autoconf/ChangeLog
+++ b/sys-devel/autoconf/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-devel/autoconf
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf/ChangeLog,v 1.119 2008/06/23 16:04:19 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf/ChangeLog,v 1.120 2008/06/29 23:12:05 vapier Exp $
+
+*autoconf-2.62-r1 (29 Jun 2008)
+
+ 29 Jun 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/autoconf-2.62-at-keywords.patch,
+ +files/autoconf-2.62-fix-multiline-string.patch,
+ +files/autoconf-2.62-revert-AC_C_BIGENDIAN.patch,
+ +autoconf-2.62-r1.ebuild:
+ Add workarounds for nasty bugs #217976 (multiline problems) and #228825
+ (big endian misdetection on ppc).
23 Jun 2008; Jeroen Roovers <jer@gentoo.org> autoconf-2.61-r2.ebuild:
Stable for HPPA (bug #227603).
diff --git a/sys-devel/autoconf/autoconf-2.62-r1.ebuild b/sys-devel/autoconf/autoconf-2.62-r1.ebuild
new file mode 100644
index 000000000000..376e81c3fd4d
--- /dev/null
+++ b/sys-devel/autoconf/autoconf-2.62-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/autoconf/autoconf-2.62-r1.ebuild,v 1.1 2008/06/29 23:12:05 vapier Exp $
+
+inherit eutils
+
+DESCRIPTION="Used to create autoconfiguration files"
+HOMEPAGE="http://www.gnu.org/software/autoconf/autoconf.html"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="2.5"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
+IUSE="emacs"
+
+DEPEND=">=sys-apps/texinfo-4.3
+ >=sys-devel/m4-1.4.6
+ dev-lang/perl"
+RDEPEND="${DEPEND}
+ >=sys-devel/autoconf-wrapper-5"
+PDEPEND="emacs? ( app-emacs/autoconf-mode )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-revert-AC_C_BIGENDIAN.patch #228825
+ epatch "${FILESDIR}"/${P}-at-keywords.patch
+ epatch "${FILESDIR}"/${P}-fix-multiline-string.patch #217976
+}
+
+src_compile() {
+ # Disable Emacs in the build system since it is in a separate package.
+ export EMACS=no
+ econf --program-suffix="-${PV}" || die
+ # econf updates config.{sub,guess} which forces the manpages
+ # to be regenerated which we dont want to do #146621
+ touch man/*.1
+ # From configure output:
+ # Parallel builds via `make -jN' do not work.
+ emake -j1 || die
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ dodoc AUTHORS BUGS NEWS README TODO THANKS \
+ ChangeLog ChangeLog.0 ChangeLog.1 ChangeLog.2
+}
diff --git a/sys-devel/autoconf/files/autoconf-2.62-at-keywords.patch b/sys-devel/autoconf/files/autoconf-2.62-at-keywords.patch
new file mode 100644
index 000000000000..04cd1807b8a0
--- /dev/null
+++ b/sys-devel/autoconf/files/autoconf-2.62-at-keywords.patch
@@ -0,0 +1,81 @@
+commit 3ac7ceb0c2dfd023e0e9e944da6825b6bd676568
+Author: Eric Blake <ebb9@byu.net>
+Date: Thu Jun 5 15:18:11 2008 -0600
+
+ Fix regression in AT_KEYWORDS([Macro]), from 2007-10-18.
+
+ * lib/autotest/general.m4 (AT_KEYWORDS): Expand argument prior to
+ converting it to lower case.
+ * tests/autotest.at (Keywords and ranges): Test this.
+ * NEWS: Document the fix.
+ * THANKS: Update.
+ Reported by Karsten Hopp.
+
+ Signed-off-by: Eric Blake <ebb9@byu.net>
+
+diff --git a/NEWS b/NEWS
+index 183d4f1..8b866ad 100644
+--- a/NEWS
++++ b/NEWS
+@@ -9,6 +9,10 @@ GNU Autoconf NEWS - User visible changes.
+ ** Two new quadrigraphs have been introduced: @{:@ for (, and @:}@ for ),
+ allowing the output of unbalanced parantheses in more contexts.
+
++** AT_KEYWORDS once again performs expansion on its argument, such that
++ AT_KEYWORDS([m4_if([$1], [], [default])]) no longer complains about
++ the possibly unexpanded m4_if [regression introduced in 2.62].
++
+
+ * Major changes in Autoconf 2.62 (2008-04-05) [stable]
+ Released by Eric Blake, based on git versions 2.61a.*.
+diff --git a/THANKS b/THANKS
+index 5ec8921..224cdea 100644
+--- a/THANKS
++++ b/THANKS
+@@ -177,6 +177,7 @@ Justace Clutter ?
+ Jörn Rennecke amylaar@cygnus.co.uk
+ Karl Berry karl@cs.umb.edu
+ Karl Heuer kwzh@gnu.org
++Karsten Hopp karsten@redhat.com
+ Kate Hedstrom ?
+ Kathryn Hargreaves kathryn@deas.harvard.edu
+ Kaveh R. Ghazi ghazi@caip.rutgers.edu
+diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
+index 88d10a3..993dd9f 100644
+--- a/lib/autotest/general.m4
++++ b/lib/autotest/general.m4
+@@ -1476,9 +1476,10 @@ m4_case([$1],
+ # AT_KEYWORDS(KEYWORDS)
+ # ---------------------
+ # Declare a list of keywords associated to the current test group.
+-# The list is stored in lower case, since the -k option is case-insensitive.
++# Since the -k option is case-insensitive, the list is stored in lower case
++# to avoid duplicates that differ only by case.
+ _AT_DEFINE_SETUP([AT_KEYWORDS],
+-[m4_append_uniq_w([AT_keywords], m4_tolower([[$1]]))])
++[m4_append_uniq_w([AT_keywords], m4_tolower(m4_dquote(m4_expand([$1]))))])
+
+
+ # AT_CAPTURE_FILE(FILE)
+diff --git a/tests/autotest.at b/tests/autotest.at
+index dc3cfd5..c4c0eda 100644
+--- a/tests/autotest.at
++++ b/tests/autotest.at
+@@ -690,7 +690,7 @@ AT_CHECK(:)
+ AT_CLEANUP
+ AT_SETUP(both) # 04
+ AT_KEYWORDS([key1 key2])
+-AT_KEYWORDS([key1])
++AT_KEYWORDS([m4@&t@_echo([Key1])])
+ AT_CHECK(:)
+ AT_CLEANUP
+ AT_SETUP(test5) # 05
+@@ -713,7 +713,7 @@ AT_CHECK(:)
+ AT_CLEANUP
+ ]])
+ dnl check that AT_KEYWORDS does not duplicate words
+-AT_CHECK([grep 'key1.*key1' k], [1])
++AT_CHECK([grep -i 'key1.*key1' k], [1])
+ dnl check that -k requires an argument
+ AT_CHECK([$CONFIG_SHELL ./k -k], [1], [], [ignore])
+
diff --git a/sys-devel/autoconf/files/autoconf-2.62-fix-multiline-string.patch b/sys-devel/autoconf/files/autoconf-2.62-fix-multiline-string.patch
new file mode 100644
index 000000000000..cfd7b4228794
--- /dev/null
+++ b/sys-devel/autoconf/files/autoconf-2.62-fix-multiline-string.patch
@@ -0,0 +1,30 @@
+sniped from mandrivia:
+http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/autoconf/current/SOURCES/autoconf-2.62-fix-multiline-string.patch
+
+this may not be the correct fix, but it seems to get the job done until we can
+grab whatever upstream merges
+http://lists.gnu.org/archive/html/bug-autoconf/2008-04/msg00031.html
+
+--- autoconf-2.62/lib/autoconf/status.m4
++++ autoconf-2.62/lib/autoconf/status.m4
+@@ -1360,16 +1360,16 @@ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ # Files that config.status was made for.
+ m4_ifdef([_AC_SEEN_CONFIG(FILES)],
+-[config_files="$ac_config_files"
++[config_files="`echo $ac_config_files`"
+ ])dnl
+ m4_ifdef([_AC_SEEN_CONFIG(HEADERS)],
+-[config_headers="$ac_config_headers"
++[config_headers="`echo $ac_config_headers`"
+ ])dnl
+ m4_ifdef([_AC_SEEN_CONFIG(LINKS)],
+-[config_links="$ac_config_links"
++[config_links="`echo $ac_config_links`"
+ ])dnl
+ m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)],
+-[config_commands="$ac_config_commands"
++[config_commands="`echo $ac_config_commands`"
+ ])dnl
+
+ _ACEOF
diff --git a/sys-devel/autoconf/files/autoconf-2.62-revert-AC_C_BIGENDIAN.patch b/sys-devel/autoconf/files/autoconf-2.62-revert-AC_C_BIGENDIAN.patch
new file mode 100644
index 000000000000..76db013cac53
--- /dev/null
+++ b/sys-devel/autoconf/files/autoconf-2.62-revert-AC_C_BIGENDIAN.patch
@@ -0,0 +1,214 @@
+revert AC_C_BIGENDIAN to the version found in 2.61 since the version in 2.62 is
+known to be broken and the changes that it brings are not critical
+
+http://bugs.gentoo.org/228825
+
+--- autoconf-2.62/lib/autoconf/c.m4
++++ autoconf-2.61/lib/autoconf/c.m4
+@@ -1393,140 +1351,74 @@
+ ])# AC_C_CHAR_UNSIGNED
+
+
+-# AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN],
+-# [ACTION-IF-UNIVERSAL])
++# AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN])
+ # -------------------------------------------------------------------------
+ AC_DEFUN([AC_C_BIGENDIAN],
+-[AH_VERBATIM([WORDS_BIGENDIAN],
+-[/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+- significant byte first (like Motorola and SPARC, unlike Intel and VAX). */
+-#if defined __BIG_ENDIAN__
+-# define WORDS_BIGENDIAN 1
+-#elif ! defined __LITTLE_ENDIAN__
+-# undef WORDS_BIGENDIAN
+-#endif])dnl
+- AC_CACHE_CHECK([whether byte ordering is bigendian], [ac_cv_c_bigendian],
+- [ac_cv_c_bigendian=unknown
+- m4_ifval(m4_ifdef([AH_HEADER], 1)[$4],
+- [# See if __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined.
+- AC_COMPILE_IFELSE(
+- [AC_LANG_SOURCE(
+- [[#if ! (defined __BIG_ENDIAN__ || defined __LITTLE_ENDIAN__)
+- neither is defined;
+- #endif
+- typedef int dummy;
+- ]])],
+- [ac_cv_c_bigendian=universal])],
+- [AC_DIAGNOSE([obsolete], [AC_C_BIGENDIAN suggests AC_CONFIG_HEADERS])])
+- if test $ac_cv_c_bigendian = unknown; then
+- # See if sys/param.h defines the BYTE_ORDER macro.
+- AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[#include <sys/types.h>
+- #include <sys/param.h>
+- ]],
+- [[#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+- && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+- && LITTLE_ENDIAN)
+- bogus endian macros
+- #endif
+- ]])],
+- [# It does; now see whether it defined to BIG_ENDIAN or not.
+- AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[#include <sys/types.h>
+- #include <sys/param.h>
+- ]],
+- [[#if BYTE_ORDER != BIG_ENDIAN
+- not big endian
+- #endif
+- ]])],
+- [ac_cv_c_bigendian=yes],
+- [ac_cv_c_bigendian=no])])
+- fi
+- if test $ac_cv_c_bigendian = unknown; then
+- # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+- AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[#include <limits.h>
+- ]],
+- [[#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+- bogus endian macros
+- #endif
+- ]])],
+- [# It does; now see whether it defined to _BIG_ENDIAN or not.
+- AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[#include <limits.h>
+- ]],
+- [[#ifndef _BIG_ENDIAN
+- not big endian
+- #endif
+- ]])],
+- [ac_cv_c_bigendian=yes],
+- [ac_cv_c_bigendian=no])])
+- fi
+- if test $ac_cv_c_bigendian = unknown; then
+- # Compile a test program.
+- AC_RUN_IFELSE(
+- [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+- [[
+- /* Are we little or big endian? From Harbison&Steele. */
+- union
+- {
+- long int l;
+- char c[sizeof (long int)];
+- } u;
+- u.l = 1;
+- return u.c[sizeof (long int) - 1] == 1;
+- ]])],
+- [ac_cv_c_bigendian=no],
+- [ac_cv_c_bigendian=yes],
+- [# Try to guess by grepping values from an object file.
+- AC_COMPILE_IFELSE(
+- [AC_LANG_PROGRAM(
+- [[short int ascii_mm[] =
+- { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+- short int ascii_ii[] =
+- { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+- int use_ascii (int i) {
+- return ascii_mm[i] + ascii_ii[i];
+- }
+- short int ebcdic_ii[] =
+- { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+- short int ebcdic_mm[] =
+- { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+- int use_ebcdic (int i) {
+- return ebcdic_mm[i] + ebcdic_ii[i];
+- }
+- extern int foo;
+- ]],
+- [[return use_ascii (foo) == use_ebcdic (foo);]])],
+- [if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+- ac_cv_c_bigendian=yes
+- fi
+- if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+- if test "$ac_cv_c_bigendian" = unknown; then
+- ac_cv_c_bigendian=no
+- else
+- # finding both strings is unlikely to happen, but who knows?
+- ac_cv_c_bigendian=unknown
+- fi
+- fi])])
+- fi])
+- case $ac_cv_c_bigendian in #(
+- yes)
+- m4_default([$1],
+- [AC_DEFINE([WORDS_BIGENDIAN], 1)]);; #(
+- no)
+- $2 ;; #(
+- universal)
+- $4 ;; #(
+- *)
+- m4_default([$3],
+- [AC_MSG_ERROR([unknown endianness
+- presetting ac_cv_c_bigendian=no (or yes) will help])]) ;;
+- esac
++[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
++[# See if sys/param.h defines the BYTE_ORDER macro.
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
++#include <sys/param.h>
++],
++[#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
++ && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
++ bogus endian macros
++#endif
++])],
++[# It does; now see whether it defined to BIG_ENDIAN or not.
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
++#include <sys/param.h>
++], [#if BYTE_ORDER != BIG_ENDIAN
++ not big endian
++#endif
++])], [ac_cv_c_bigendian=yes], [ac_cv_c_bigendian=no])],
++[# It does not; compile a test program.
++AC_RUN_IFELSE(
++[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[
++ /* Are we little or big endian? From Harbison&Steele. */
++ union
++ {
++ long int l;
++ char c[sizeof (long int)];
++ } u;
++ u.l = 1;
++ return u.c[sizeof (long int) - 1] == 1;
++]])],
++ [ac_cv_c_bigendian=no],
++ [ac_cv_c_bigendian=yes],
++[# try to guess the endianness by grepping values into an object file
++ ac_cv_c_bigendian=unknown
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
++[[short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
++short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
++void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
++short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
++short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
++void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }]],
++[[ _ascii (); _ebcdic (); ]])],
++[if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
++ ac_cv_c_bigendian=yes
++fi
++if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
++ if test "$ac_cv_c_bigendian" = unknown; then
++ ac_cv_c_bigendian=no
++ else
++ # finding both strings is unlikely to happen, but who knows?
++ ac_cv_c_bigendian=unknown
++ fi
++fi])])])])
++case $ac_cv_c_bigendian in
++ yes)
++ m4_default([$1],
++ [AC_DEFINE([WORDS_BIGENDIAN], 1,
++ [Define to 1 if your processor stores words with the most significant
++ byte first (like Motorola and SPARC, unlike Intel and VAX).])]) ;;
++ no)
++ $2 ;;
++ *)
++ m4_default([$3],
++ [AC_MSG_ERROR([unknown endianness
++presetting ac_cv_c_bigendian=no (or yes) will help])]) ;;
++esac
+ ])# AC_C_BIGENDIAN
+
+