diff options
Diffstat (limited to 'patches/source/make')
-rw-r--r-- | patches/source/make/make-3.82-android-build-fix.diff | 16 | ||||
-rw-r--r-- | patches/source/make/make-3.82-bugfixes.patch | 250 | ||||
-rwxr-xr-x | patches/source/make/make.SlackBuild | 110 | ||||
-rw-r--r-- | patches/source/make/slack-desc | 19 |
4 files changed, 395 insertions, 0 deletions
diff --git a/patches/source/make/make-3.82-android-build-fix.diff b/patches/source/make/make-3.82-android-build-fix.diff new file mode 100644 index 000000000..8cd3db0d4 --- /dev/null +++ b/patches/source/make/make-3.82-android-build-fix.diff @@ -0,0 +1,16 @@ +--- make-3.82/function.c 2010-07-13 03:20:39.000000000 +0200 ++++ make-3.82/function.c 2010-10-27 01:43:27.000000000 +0200 +@@ -1138,12 +1138,12 @@ func_sort (char *o, char **argv, const c + { + char c = *(t++); + +- if (! isspace ((unsigned char)c)) ++ if (! isblank ((unsigned char)c)) + continue; + + ++wordi; + +- while (isspace ((unsigned char)*t)) ++ while (isblank ((unsigned char)*t)) + ++t; + } diff --git a/patches/source/make/make-3.82-bugfixes.patch b/patches/source/make/make-3.82-bugfixes.patch new file mode 100644 index 000000000..e89f14e0d --- /dev/null +++ b/patches/source/make/make-3.82-bugfixes.patch @@ -0,0 +1,250 @@ +diff -urpN make/ChangeLog make-new/ChangeLog +--- make/ChangeLog 2010-09-13 13:42:35.000000000 +0200 ++++ make-new/ChangeLog 2010-09-13 13:42:09.000000000 +0200 +@@ -1,3 +1,22 @@ ++2010-08-13 Paul Smith <psmith@gnu.org> ++ ++ * NEWS: Accidentally forgot to back out the sorted wildcard ++ enhancement in 3.82, so update NEWS. ++ Also add NEWS about the error check for explicit and pattern ++ targets in the same rule, added to 3.82. ++ ++ * main.c (main): Add "oneshell" to $(.FEATURES) (forgot to add ++ this in 3.82!) ++ ++ * read.c (parse_file_seq): Fix various errors parsing archives ++ with multiple objects in the parenthesis, as well as wildcards. ++ Fixes Savannah bug #30612. ++ ++2010-08-10 Paul Smith <psmith@gnu.org> ++ ++ * main.c (main): Expand MAKEFLAGS before adding it to the ++ environment when re-exec'ing. Fixes Savannah bug #30723. ++ + 2010-07-28 Paul Smith <psmith@gnu.org> + + Version 3.82 released. +diff -urpN make/main.c make-new/main.c +--- make/main.c 2010-09-13 13:42:35.000000000 +0200 ++++ make-new/main.c 2010-09-13 13:42:12.000000000 +0200 +@@ -1138,7 +1138,7 @@ main (int argc, char **argv, char **envp + a macro and some compilers (MSVC) don't like conditionals in macros. */ + { + const char *features = "target-specific order-only second-expansion" +- " else-if shortest-stem undefine" ++ " else-if shortest-stem undefine oneshell" + #ifndef NO_ARCHIVES + " archives" + #endif +@@ -2093,7 +2093,7 @@ main (int argc, char **argv, char **envp + const char *pv = define_makeflags (1, 1); + char *p = alloca (sizeof ("MAKEFLAGS=") + strlen (pv) + 1); + sprintf (p, "MAKEFLAGS=%s", pv); +- putenv (p); ++ putenv (allocated_variable_expand (p)); + } + + if (ISDB (DB_BASIC)) +diff -urpN make/NEWS make-new/NEWS +--- make/NEWS 2010-09-13 13:42:35.000000000 +0200 ++++ make-new/NEWS 2010-09-13 13:42:11.000000000 +0200 +@@ -18,14 +18,6 @@ http://sv.gnu.org/bugs/index.php?group=m + * Compiling GNU make now requires a conforming ISO C 1989 compiler and + standard runtime library. + +-* WARNING: Future backward-incompatibility! +- Wildcards are not documented as returning sorted values, but up to and +- including this release the results have been sorted and some makefiles are +- apparently depending on that. In the next release of GNU make, for +- performance reasons, we may remove that sorting. If your makefiles +- require sorted results from wildcard expansions, use the $(sort ...) +- function to request it explicitly. +- + * WARNING: Backward-incompatibility! + The POSIX standard for make was changed in the 2008 version in a + fundamentally incompatible way: make is required to invoke the shell as if +@@ -42,6 +34,21 @@ http://sv.gnu.org/bugs/index.php?group=m + existing targets were provided in $?). + + * WARNING: Backward-incompatibility! ++ Wildcards were not documented as returning sorted values, but the results ++ have been sorted up until this release.. If your makefiles require sorted ++ results from wildcard expansions, use the $(sort ...) function to request ++ it explicitly. ++ ++* WARNING: Backward-incompatibility! ++ In previous versions of make it was acceptable to list one or more explicit ++ targets followed by one or more pattern targets in the same rule and it ++ worked "as expected". However, this was not documented as acceptable and if ++ you listed any explicit targets AFTER the pattern targets, the entire rule ++ would be mis-parsed. This release removes this ability completely: make ++ will generate an error message if you mix explicit and pattern targets in ++ the same rule. ++ ++* WARNING: Backward-incompatibility! + As a result of parser enhancements, three backward-compatibility issues + exist: first, a prerequisite containing an "=" cannot be escaped with a + backslash any longer. You must create a variable containing an "=" and +diff -urpN make/read.c make-new/read.c +--- make/read.c 2010-09-13 13:42:35.000000000 +0200 ++++ make-new/read.c 2010-09-13 13:42:11.000000000 +0200 +@@ -3028,7 +3028,7 @@ parse_file_seq (char **stringp, unsigned + { + /* This looks like the first element in an open archive group. + A valid group MUST have ')' as the last character. */ +- const char *e = p + nlen; ++ const char *e = p; + do + { + e = next_token (e); +@@ -3084,19 +3084,19 @@ parse_file_seq (char **stringp, unsigned + Go to the next item in the string. */ + if (flags & PARSEFS_NOGLOB) + { +- NEWELT (concat (2, prefix, tp)); ++ NEWELT (concat (2, prefix, tmpbuf)); + continue; + } + + /* If we get here we know we're doing glob expansion. + TP is a string in tmpbuf. NLEN is no longer used. + We may need to do more work: after this NAME will be set. */ +- name = tp; ++ name = tmpbuf; + + /* Expand tilde if applicable. */ +- if (tp[0] == '~') ++ if (tmpbuf[0] == '~') + { +- tildep = tilde_expand (tp); ++ tildep = tilde_expand (tmpbuf); + if (tildep != 0) + name = tildep; + } +@@ -3152,7 +3152,10 @@ parse_file_seq (char **stringp, unsigned + else + { + /* We got a chain of items. Attach them. */ +- (*newp)->next = found; ++ if (*newp) ++ (*newp)->next = found; ++ else ++ *newp = found; + + /* Find and set the new end. Massage names if necessary. */ + while (1) +diff -urpN make/tests/ChangeLog make-new/tests/ChangeLog +--- make/tests/ChangeLog 2010-09-13 13:42:35.000000000 +0200 ++++ make-new/tests/ChangeLog 2010-09-13 13:42:10.000000000 +0200 +@@ -1,3 +1,16 @@ ++2010-08-13 Paul Smith <psmith@gnu.org> ++ ++ * scripts/features/archives: New regression tests for archive ++ support. Test for fix to Savannah bug #30612. ++ ++ * run_make_tests.pl (set_more_defaults): Set a %FEATURES hash to ++ the features available in $(.FEATURES). ++ ++2010-08-10 Paul Smith <psmith@gnu.org> ++ ++ * scripts/features/reinvoke: Ensure command line variable settings ++ are preserved across make re-exec. Tests Savannah bug #30723. ++ + 2010-07-28 Paul Smith <psmith@gnu.org> + + * scripts/targets/POSIX: Compatibility issues with Solaris (and +diff -urpN make/tests/run_make_tests.pl make-new/tests/run_make_tests.pl +--- make/tests/run_make_tests.pl 2010-09-13 13:42:35.000000000 +0200 ++++ make-new/tests/run_make_tests.pl 2010-09-13 13:42:10.000000000 +0200 +@@ -29,6 +29,7 @@ + # You should have received a copy of the GNU General Public License along with + # this program. If not, see <http://www.gnu.org/licenses/>. + ++%FEATURES = (); + + $valgrind = 0; # invoke make with valgrind + $valgrind_args = ''; +@@ -367,6 +368,8 @@ sub set_more_defaults + $parallel_jobs = 1; + } + ++ %FEATURES = map { $_ => 1 } split /\s+/, `sh -c "echo '\\\$(info \\\$(.FEATURES))' | $make_path -f- 2>/dev/null"`; ++ + # Set up for valgrind, if requested. + + if ($valgrind) { +diff -urpN make/tests/scripts/features/archives make-new/tests/scripts/features/archives +--- make/tests/scripts/features/archives 1970-01-01 01:00:00.000000000 +0100 ++++ make-new/tests/scripts/features/archives 2010-09-13 13:42:10.000000000 +0200 +@@ -0,0 +1,42 @@ ++# -*-mode: perl-*- ++ ++$description = "Test GNU make's archive management features."; ++ ++$details = "\ ++This only works on systems that support it."; ++ ++# If this instance of make doesn't support archives, skip it ++exists $FEATURES{archives} or return -1; ++ ++# Create some .o files to work with ++utouch(-60, qw(a1.o a2.o a3.o)); ++ ++# Very simple ++run_make_test('all: libxx.a(a1.o)', ++ '', "ar rv libxx.a a1.o\nar: creating libxx.a\na - a1.o\n"); ++ ++# Multiple .o's. Add a new one to the existing library ++run_make_test('all: libxx.a(a1.o a2.o)', ++ '', "ar rv libxx.a a2.o\na - a2.o\n"); ++ ++# Touch one of the .o's so it's rebuilt ++utouch(-40, 'a1.o'); ++run_make_test(undef, '', "ar rv libxx.a a1.o\nr - a1.o\n"); ++ ++# Use wildcards ++run_make_test('all: libxx.a(*.o)', ++ '', "#MAKE#: Nothing to be done for `all'.\n"); ++ ++# Touch one of the .o's so it's rebuilt ++utouch(-30, 'a1.o'); ++run_make_test(undef, '', "ar rv libxx.a a1.o\nr - a1.o\n"); ++ ++# Use both wildcards and simple names ++utouch(-50, 'a2.o'); ++run_make_test('all: libxx.a(a3.o *.o)', '', ++ "ar rv libxx.a a3.o\na - a3.o\nar rv libxx.a a2.o\nr - a2.o\n"); ++ ++rmfiles(qw(a1.o a2.o a3.o libxx.a)); ++ ++# This tells the test driver that the perl test script executed properly. ++1; +diff -urpN make/tests/scripts/features/reinvoke make-new/tests/scripts/features/reinvoke +--- make/tests/scripts/features/reinvoke 2010-09-13 13:42:35.000000000 +0200 ++++ make-new/tests/scripts/features/reinvoke 2010-09-13 13:42:10.000000000 +0200 +@@ -57,9 +57,24 @@ include $(F)', + # Now try with the file we're not updating being the actual file we're + # including: this and the previous one test different parts of the code. + +-run_make_test(undef, "F=b", "[ -f b ] || echo >> b\nhello\n") ++run_make_test(undef, 'F=b', "[ -f b ] || echo >> b\nhello\n") + + &rmfiles('a','b','c'); + ++# Ensure command line variables are preserved properly across re-exec ++# Tests for Savannah bug #30723 ++ ++run_make_test(' ++ifdef RECURSE ++-include foo30723 ++endif ++recurse: ; @$(MAKE) -f $(MAKEFILE_LIST) RECURSE=1 test ++test: ; @echo F.O=$(F.O) ++foo30723: ; @touch $@ ++', ++ '--no-print-directory F.O=bar', "F.O=bar\n"); ++ ++unlink('foo30723'); ++ + # This tells the test driver that the perl test script executed properly. + 1; diff --git a/patches/source/make/make.SlackBuild b/patches/source/make/make.SlackBuild new file mode 100755 index 000000000..e7ac62a38 --- /dev/null +++ b/patches/source/make/make.SlackBuild @@ -0,0 +1,110 @@ +#!/bin/sh + +# Copyright 2005-2013 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +PKGNAM=make +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-4_slack13.37} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-make + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG + +cd $TMP +rm -rf make-$VERSION +tar xvf $CWD/make-$VERSION.tar.bz2 || exit 1 +cd make-$VERSION || exit 1 +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# Fix a problem using make-3.82 to build Android: +zcat $CWD/make-3.82-android-build-fix.diff.gz | patch -p1 --verbose || exit 1 + +zcat $CWD/make-3.82-bugfixes.patch.gz | patch -p1 --verbose || exit 1 + +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --build=$ARCH-slackware-linux + +make -j6 || make || exit 1 +make install DESTDIR=$PKG || exit 1 +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) +gzip -9 $PKG/usr/man/man1/* +rm $PKG/usr/info/dir +gzip -9 $PKG/usr/info/* +# This has been here so long that it should probably stay. +# Trying to get rid of ginstall didn't go well, so... :-) +( cd $PKG/usr/bin + rm -f gmake + ln -sf make gmake ) +mkdir -p $PKG/usr/doc/make-$VERSION +cp -a \ + ABOUT-NLS AUTHORS COPYING* NEWS README* \ + $PKG/usr/doc/make-$VERSION/ +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# Build the package: +cd $PKG +makepkg -l y -c n $TMP/make-$VERSION-$ARCH-$BUILD.txz + diff --git a/patches/source/make/slack-desc b/patches/source/make/slack-desc new file mode 100644 index 000000000..ef19ca33a --- /dev/null +++ b/patches/source/make/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +make: make (GNU make utility to maintain groups of programs) +make: +make: This is the GNU implementation of make, which was written by Richard +make: Stallman and Roland McGrath. The purpose of the make utility is to +make: determine automatically which pieces of a large program need to be +make: recompiled, and issue the commands to recompile them. +make: +make: This is needed to compile just about any major C program, including +make: the Linux kernel. +make: +make: |