wok-4.x rev 7982

Fix: patch two bugs in make 3.82
author Antoine Bodin <gokhlayeh@slitaz.org>
date Mon Jan 17 18:24:29 2011 +0100 (2011-01-17)
parents c94104d87783
children 84bd66868a3f
files make/receipt make/stuff/bug30612.patch make/stuff/bug30723.patch
line diff
     1.1 --- a/make/receipt	Mon Jan 17 17:59:07 2011 +0100
     1.2 +++ b/make/receipt	Mon Jan 17 18:24:29 2011 +0100
     1.3 @@ -14,6 +14,11 @@
     1.4  {
     1.5  	cd $src
     1.6  
     1.7 +	# http://savannah.gnu.org/bugs/?30612
     1.8 +	patch -Np1 -i ../stuff/bug30612.patch
     1.9 +	# http://savannah.gnu.org/bugs/?30723
    1.10 +	patch -Np1 -i ../stuff/bug30723.patch
    1.11 +
    1.12  	./configure --prefix=/usr --infodir=/usr/share/info \
    1.13  	--mandir=/usr/share/man $CONFIGURE_ARGS
    1.14  	make
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/make/stuff/bug30612.patch	Mon Jan 17 18:24:29 2011 +0100
     2.3 @@ -0,0 +1,66 @@
     2.4 +diff -Naur make-3.82-orig/main.c make-3.82-fix30612//main.c
     2.5 +--- make-3.82-orig/main.c	2010-07-19 17:10:53.000000000 +1000
     2.6 ++++ make-3.82-fix30612//main.c	2010-09-23 23:33:37.908855839 +1000
     2.7 +@@ -1,3 +1,4 @@
     2.8 ++
     2.9 + /* Argument parsing and main program of GNU Make.
    2.10 + Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    2.11 + 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
    2.12 +@@ -1138,7 +1139,7 @@
    2.13 +      a macro and some compilers (MSVC) don't like conditionals in macros.  */
    2.14 +   {
    2.15 +     const char *features = "target-specific order-only second-expansion"
    2.16 +-                           " else-if shortest-stem undefine"
    2.17 ++                           " else-if shortest-stem undefine oneshell"
    2.18 + #ifndef NO_ARCHIVES
    2.19 +                            " archives"
    2.20 + #endif
    2.21 +diff -Naur make-3.82-orig/read.c make-3.82-fix30612//read.c
    2.22 +--- make-3.82-orig/read.c	2010-07-13 11:20:42.000000000 +1000
    2.23 ++++ make-3.82-fix30612//read.c	2010-09-23 23:30:58.018855839 +1000
    2.24 +@@ -3028,7 +3028,7 @@
    2.25 +             {
    2.26 +               /* This looks like the first element in an open archive group.
    2.27 +                  A valid group MUST have ')' as the last character.  */
    2.28 +-              const char *e = p + nlen;
    2.29 ++              const char *e = p;
    2.30 +               do
    2.31 +                 {
    2.32 +                   e = next_token (e);
    2.33 +@@ -3084,19 +3084,19 @@
    2.34 +          Go to the next item in the string.  */
    2.35 +       if (flags & PARSEFS_NOGLOB)
    2.36 +         {
    2.37 +-          NEWELT (concat (2, prefix, tp));
    2.38 ++          NEWELT (concat (2, prefix, tmpbuf));
    2.39 +           continue;
    2.40 +         }
    2.41 + 
    2.42 +       /* If we get here we know we're doing glob expansion.
    2.43 +          TP is a string in tmpbuf.  NLEN is no longer used.
    2.44 +          We may need to do more work: after this NAME will be set.  */
    2.45 +-      name = tp;
    2.46 ++      name = tmpbuf;
    2.47 + 
    2.48 +       /* Expand tilde if applicable.  */
    2.49 +-      if (tp[0] == '~')
    2.50 ++      if (tmpbuf[0] == '~')
    2.51 + 	{
    2.52 +-	  tildep = tilde_expand (tp);
    2.53 ++	  tildep = tilde_expand (tmpbuf);
    2.54 + 	  if (tildep != 0)
    2.55 +             name = tildep;
    2.56 + 	}
    2.57 +@@ -3152,7 +3152,11 @@
    2.58 +             else
    2.59 +               {
    2.60 +                 /* We got a chain of items.  Attach them.  */
    2.61 +-                (*newp)->next = found;
    2.62 ++                if (*newp)
    2.63 ++                  (*newp)->next = found;
    2.64 ++                else
    2.65 ++                  *newp = found;
    2.66 ++
    2.67 + 
    2.68 +                 /* Find and set the new end.  Massage names if necessary.  */
    2.69 +                 while (1)
    2.70 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/make/stuff/bug30723.patch	Mon Jan 17 18:24:29 2011 +0100
     3.3 @@ -0,0 +1,12 @@
     3.4 +diff -Naur make-3.82-orig/main.c make-3.82-fix30723//main.c
     3.5 +--- make-3.82-orig/main.c	2010-07-19 17:10:53.000000000 +1000
     3.6 ++++ make-3.82-fix30723//main.c	2010-09-23 23:34:10.932188592 +1000
     3.7 +@@ -2093,7 +2093,7 @@
     3.8 +             const char *pv = define_makeflags (1, 1);
     3.9 +             char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1);
    3.10 +             sprintf (p, "MAKEFLAGS=%s", pv);
    3.11 +-            putenv (p);
    3.12 ++            putenv (allocated_variable_expand (p));
    3.13 +           }
    3.14 + 
    3.15 + 	  if (ISDB (DB_BASIC))
    3.16 \ No newline at end of file