diff options
Diffstat (limited to 'meta/recipes-extended')
60 files changed, 0 insertions, 3479 deletions
diff --git a/meta/recipes-extended/bash/bash-3.2.57/build-tests.patch b/meta/recipes-extended/bash/bash-3.2.57/build-tests.patch deleted file mode 100644 index e63457cf2b..0000000000 --- a/meta/recipes-extended/bash/bash-3.2.57/build-tests.patch +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | Add 'ptest' target to Makefile, to run tests without checking dependencies. | ||
| 2 | |||
| 3 | Signed-off-by: Anders Roxell <anders.roxell@enea.com> | ||
| 4 | Upstream-Status: Pending | ||
| 5 | --- | ||
| 6 | diff -dNaur bash-3.2.48/Makefile.in.orig bash-3.2.48/Makefile.in | ||
| 7 | --- bash-3.2.48/Makefile.in.orig 2006-08-17 23:03:35.000000000 +0500 | ||
| 8 | +++ bash-3.2.48/Makefile.in 2013-07-02 20:20:07.512709327 +0500 | ||
| 9 | @@ -803,17 +803,31 @@ | ||
| 10 | fi | ||
| 11 | |||
| 12 | recho$(EXEEXT): $(SUPPORT_SRC)recho.c | ||
| 13 | - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD} | ||
| 14 | + @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $< | ||
| 15 | |||
| 16 | zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c | ||
| 17 | - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD} | ||
| 18 | + @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $< | ||
| 19 | |||
| 20 | printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c | ||
| 21 | - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD} | ||
| 22 | + @$(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $< | ||
| 23 | |||
| 24 | -test tests check: force $(Program) $(TESTS_SUPPORT) | ||
| 25 | +test tests check: | ||
| 26 | + @$(MAKE) install-test | ||
| 27 | + @$(MAKE) runtest | ||
| 28 | + | ||
| 29 | +install-test: buildtest | ||
| 30 | +ifeq ($(origin INSTALL_TEST_DIR), undefined) | ||
| 31 | @-test -d tests || mkdir tests | ||
| 32 | @cp $(TESTS_SUPPORT) tests | ||
| 33 | +else | ||
| 34 | + @-test -d $(INSTALL_TEST_DIR) || mkdir -p $(INSTALL_TEST_DIR) | ||
| 35 | + @cp -r $(srcdir)/tests/* $(INSTALL_TEST_DIR)/ | ||
| 36 | + @cp $(TESTS_SUPPORT) $(INSTALL_TEST_DIR) | ||
| 37 | +endif | ||
| 38 | + | ||
| 39 | +buildtest: force $(Program) $(TESTS_SUPPORT) | ||
| 40 | + | ||
| 41 | +runtest: | ||
| 42 | @( cd $(srcdir)/tests && \ | ||
| 43 | PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) | ||
| 44 | |||
diff --git a/meta/recipes-extended/bash/bash-3.2.57/dont-include-target-CFLAGS-in-host-LDFLAGS.patch b/meta/recipes-extended/bash/bash-3.2.57/dont-include-target-CFLAGS-in-host-LDFLAGS.patch deleted file mode 100644 index ee756dc9e3..0000000000 --- a/meta/recipes-extended/bash/bash-3.2.57/dont-include-target-CFLAGS-in-host-LDFLAGS.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | From 933bd886af49667e88e2385409449ab598813dab Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Andre McCurdy <armccurdy@gmail.com> | ||
| 3 | Date: Wed, 15 Jul 2015 00:54:33 -0700 | ||
| 4 | Subject: [PATCH] dont include target CFLAGS in host LDFLAGS | ||
| 5 | |||
| 6 | Building the host tool 'mkbuiltins' will fail if the target CFLAGS | ||
| 7 | contains an option which isn't supported by the host's gcc. To prevent | ||
| 8 | the issue, define LDFLAGS_FOR_BUILD based on CFLAGS_FOR_BUILD instead | ||
| 9 | of CFLAGS. | ||
| 10 | |||
| 11 | Upstream-Status: Inappropriate [required for bash 3.2.57 (GPLv2) recipe only] | ||
| 12 | |||
| 13 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | ||
| 14 | --- | ||
| 15 | builtins/Makefile.in | 2 +- | ||
| 16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 17 | |||
| 18 | diff --git a/builtins/Makefile.in b/builtins/Makefile.in | ||
| 19 | index e027f7a..ebfddf3 100644 | ||
| 20 | --- a/builtins/Makefile.in | ||
| 21 | +++ b/builtins/Makefile.in | ||
| 22 | @@ -63,7 +63,7 @@ LOCAL_DEFS = @LOCAL_DEFS@ | ||
| 23 | |||
| 24 | LIBS = @LIBS@ | ||
| 25 | LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS) | ||
| 26 | -LDFLAGS_FOR_BUILD = $(LDFLAGS) | ||
| 27 | +LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD) | ||
| 28 | LOCAL_LDFLAGS = @LOCAL_LDFLAGS@ | ||
| 29 | #LIBS_FOR_BUILD = @LIBS_FOR_BUILD@ | ||
| 30 | LIBS_FOR_BUILD = $(LIBS) | ||
| 31 | -- | ||
| 32 | 1.9.1 | ||
| 33 | |||
diff --git a/meta/recipes-extended/bash/bash-3.2.57/mkbuiltins_have_stringize.patch b/meta/recipes-extended/bash/bash-3.2.57/mkbuiltins_have_stringize.patch deleted file mode 100644 index c4229a7ed9..0000000000 --- a/meta/recipes-extended/bash/bash-3.2.57/mkbuiltins_have_stringize.patch +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | On hosts with FORTIFY_SOURCES, stringize support is required, as it's used by | ||
| 2 | the macros to wrap functions (e.g. read and open in unistd.h). Those wrappers | ||
| 3 | use the STRING() macro from unistd.h. A header in the bash sources overrides | ||
| 4 | the unistd.h macro to 'x' when HAVE_STRINGIZE is not defined, causing the | ||
| 5 | wrappers to generate calls to 'xread' and 'xopen', which do not exist, | ||
| 6 | resulting in a failure to link. | ||
| 7 | |||
| 8 | Assume we have stringize support when cross-compiling, which works around the | ||
| 9 | issue. | ||
| 10 | |||
| 11 | It may be best for upstream to either give up on supporting compilers without | ||
| 12 | stringize support, or to not define STRING() at all when FORTIFY_SOURCES is | ||
| 13 | defined, letting the unistd.h one be used, instead. | ||
| 14 | |||
| 15 | Upstream-Status: Pending | ||
| 16 | |||
| 17 | Signed-off-by: Christopher Larson <chris_larson@mentor.com> | ||
| 18 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
| 19 | |||
| 20 | --- bash-4.2.orig/builtins/mkbuiltins.c | ||
| 21 | +++ bash-4.2/builtins/mkbuiltins.c | ||
| 22 | @@ -28,6 +28,7 @@ | ||
| 23 | # define HAVE_STDLIB_H | ||
| 24 | |||
| 25 | # define HAVE_RENAME | ||
| 26 | +# define HAVE_STRINGIZE | ||
| 27 | #endif /* CROSS_COMPILING */ | ||
| 28 | |||
| 29 | #if defined (HAVE_UNISTD_H) | ||
diff --git a/meta/recipes-extended/bash/bash-3.2.57/run-ptest b/meta/recipes-extended/bash/bash-3.2.57/run-ptest deleted file mode 100644 index 8dd3b9981d..0000000000 --- a/meta/recipes-extended/bash/bash-3.2.57/run-ptest +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | make -k THIS_SH=/bin/bash BUILD_DIR=. runtest | ||
diff --git a/meta/recipes-extended/bash/bash-3.2.57/string-format.patch b/meta/recipes-extended/bash/bash-3.2.57/string-format.patch deleted file mode 100644 index eda39649d9..0000000000 --- a/meta/recipes-extended/bash/bash-3.2.57/string-format.patch +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | Fix a string format warning when using security flags: | ||
| 2 | |||
| 3 | | ../bash-3.2.48/print_cmd.c:1152:3: error: format not a string literal and no format arguments [-Werror=format-security] | ||
| 4 | | cprintf (indentation_string); | ||
| 5 | |||
| 6 | Upstream-Status: Backport | ||
| 7 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
| 8 | |||
| 9 | diff --git a/print_cmd.c b/print_cmd.c | ||
| 10 | index d1dfd1a..956db53 100644 | ||
| 11 | --- a/print_cmd.c | ||
| 12 | +++ b/print_cmd.c | ||
| 13 | @@ -1149,7 +1149,7 @@ indent (amount) | ||
| 14 | for (i = 0; amount > 0; amount--) | ||
| 15 | indentation_string[i++] = ' '; | ||
| 16 | indentation_string[i] = '\0'; | ||
| 17 | - cprintf (indentation_string); | ||
| 18 | + cprintf ("%s", indentation_string); | ||
| 19 | } | ||
| 20 | |||
| 21 | static void | ||
diff --git a/meta/recipes-extended/bash/bash-3.2.57/test-output.patch b/meta/recipes-extended/bash/bash-3.2.57/test-output.patch deleted file mode 100644 index 2b09b7d977..0000000000 --- a/meta/recipes-extended/bash/bash-3.2.57/test-output.patch +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | Add FAIL/PASS output to test output. | ||
| 2 | |||
| 3 | Signed-off-by: Björn Stenberg <bjst@enea.com> | ||
| 4 | Upstream-Status: Pending | ||
| 5 | --- | ||
| 6 | diff -uNr a/tests/run-all b/tests/run-all | ||
| 7 | --- a/tests/run-all 1999-10-08 17:07:46.000000000 +0200 | ||
| 8 | +++ b/tests/run-all 2012-10-27 21:04:18.663331887 +0200 | ||
| 9 | @@ -22,7 +22,15 @@ | ||
| 10 | case $x in | ||
| 11 | $0|run-minimal|run-gprof) ;; | ||
| 12 | *.orig|*~) ;; | ||
| 13 | - *) echo $x ; sh $x ;; | ||
| 14 | + *) echo $x | ||
| 15 | + output=`sh $x` | ||
| 16 | + if [ -n "$output" ]; then | ||
| 17 | + echo "$output" | ||
| 18 | + echo "FAIL: $x" | ||
| 19 | + else | ||
| 20 | + echo "PASS: $x" | ||
| 21 | + fi | ||
| 22 | + ;; | ||
| 23 | esac | ||
| 24 | done | ||
| 25 | |||
diff --git a/meta/recipes-extended/bash/bash_3.2.57.bb b/meta/recipes-extended/bash/bash_3.2.57.bb deleted file mode 100644 index 5c288b35a2..0000000000 --- a/meta/recipes-extended/bash/bash_3.2.57.bb +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | require bash.inc | ||
| 2 | |||
| 3 | LICENSE = "GPLv2+" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=fd5d9bcabd8ed5a54a01ce8d183d592a" | ||
| 5 | |||
| 6 | SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ | ||
| 7 | file://mkbuiltins_have_stringize.patch \ | ||
| 8 | file://build-tests.patch \ | ||
| 9 | file://test-output.patch \ | ||
| 10 | file://run-ptest \ | ||
| 11 | file://dont-include-target-CFLAGS-in-host-LDFLAGS.patch \ | ||
| 12 | file://string-format.patch \ | ||
| 13 | " | ||
| 14 | |||
| 15 | SRC_URI[md5sum] = "237a8767c990b43ae2c89895c2dbc062" | ||
| 16 | SRC_URI[sha256sum] = "3fa9daf85ebf35068f090ce51283ddeeb3c75eb5bc70b1a4a7cb05868bfe06a4" | ||
| 17 | |||
| 18 | PARALLEL_MAKE = "" | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch b/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch deleted file mode 100644 index a31573510a..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624] | ||
| 2 | CVE: CVE-2010-0624 | ||
| 3 | |||
| 4 | This patch avoids heap overflow reported by : | ||
| 5 | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624 | ||
| 6 | |||
| 7 | This is a clean patch for the GPLv2 tar recipe. | ||
| 8 | |||
| 9 | the GPLv2 tar recipe patch is also applicable to this GPLv2 cpio | ||
| 10 | recipe, as they share code. | ||
| 11 | |||
| 12 | Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25 | ||
| 13 | |||
| 14 | Index: tar-1.17/lib/rtapelib.c | ||
| 15 | =================================================================== | ||
| 16 | --- tar-1.17.orig/lib/rtapelib.c | ||
| 17 | +++ tar-1.17/lib/rtapelib.c | ||
| 18 | @@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si | ||
| 19 | |||
| 20 | sprintf (command_buffer, "R%lu\n", (unsigned long) length); | ||
| 21 | if (do_command (handle, command_buffer) == -1 | ||
| 22 | - || (status = get_status (handle)) == SAFE_READ_ERROR) | ||
| 23 | + || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length)) | ||
| 24 | return SAFE_READ_ERROR; | ||
| 25 | |||
| 26 | for (counter = 0; counter < status; counter += rlen, buffer += rlen) | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch b/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch deleted file mode 100644 index 0148e70797..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.8/fix-memory-overrun.patch +++ /dev/null | |||
| @@ -1,217 +0,0 @@ | |||
| 1 | cpio: Fix memory overrun on reading improperly created link records | ||
| 2 | |||
| 3 | Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> | ||
| 4 | |||
| 5 | http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d | ||
| 6 | |||
| 7 | * src/copyin.c (get_link_name): New function. | ||
| 8 | (list_file, copyin_link): use get_link_name | ||
| 9 | |||
| 10 | * tests/symlink-bad-length.at: New file. | ||
| 11 | * tests/symlink-long.at: New file. | ||
| 12 | * tests/Makefile.am: Add new files. | ||
| 13 | * tests/testsuite.at: Likewise. | ||
| 14 | |||
| 15 | See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html | ||
| 16 | |||
| 17 | Upstream-Status: Backport | ||
| 18 | |||
| 19 | Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua> | ||
| 20 | |||
| 21 | diff -Nurp cpio-2.8.orig/src/copyin.c cpio-2.8/src/copyin.c | ||
| 22 | --- cpio-2.8.orig/src/copyin.c 2007-06-07 19:58:03.000000000 +0800 | ||
| 23 | +++ cpio-2.8/src/copyin.c 2014-12-08 11:30:01.159791484 +0800 | ||
| 24 | @@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, int | ||
| 25 | } | ||
| 26 | |||
| 27 | |||
| 28 | +static char * | ||
| 29 | +get_link_name (struct cpio_file_stat *file_hdr, int in_file_des) | ||
| 30 | +{ | ||
| 31 | + off_t n = file_hdr->c_filesize + 1; | ||
| 32 | + char *link_name; | ||
| 33 | + | ||
| 34 | + if (n == 0 || n > SIZE_MAX) | ||
| 35 | + { | ||
| 36 | + error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name); | ||
| 37 | + link_name = NULL; | ||
| 38 | + } | ||
| 39 | + else | ||
| 40 | + { | ||
| 41 | + link_name = xmalloc (n); | ||
| 42 | + tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); | ||
| 43 | + link_name[file_hdr->c_filesize] = '\0'; | ||
| 44 | + tape_skip_padding (in_file_des, file_hdr->c_filesize); | ||
| 45 | + } | ||
| 46 | + return link_name; | ||
| 47 | +} | ||
| 48 | + | ||
| 49 | + | ||
| 50 | static void | ||
| 51 | list_file(struct cpio_file_stat* file_hdr, int in_file_des) | ||
| 52 | { | ||
| 53 | @@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd | ||
| 54 | { | ||
| 55 | if (archive_format != arf_tar && archive_format != arf_ustar) | ||
| 56 | { | ||
| 57 | - char *link_name = NULL; /* Name of hard and symbolic links. */ | ||
| 58 | - | ||
| 59 | - link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); | ||
| 60 | - link_name[file_hdr->c_filesize] = '\0'; | ||
| 61 | - tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); | ||
| 62 | - long_format (file_hdr, link_name); | ||
| 63 | - free (link_name); | ||
| 64 | - tape_skip_padding (in_file_des, file_hdr->c_filesize); | ||
| 65 | - return; | ||
| 66 | + char *link_name = get_link_name (file_hdr, in_file_des); | ||
| 67 | + if (link_name) | ||
| 68 | + { | ||
| 69 | + long_format (file_hdr, link_name); | ||
| 70 | + free (link_name); | ||
| 71 | + } | ||
| 72 | } | ||
| 73 | else | ||
| 74 | - { | ||
| 75 | long_format (file_hdr, file_hdr->c_tar_linkname); | ||
| 76 | - return; | ||
| 77 | - } | ||
| 78 | + return; | ||
| 79 | } | ||
| 80 | else | ||
| 81 | #endif | ||
| 82 | @@ -732,10 +749,7 @@ copyin_link(struct cpio_file_stat *file_ | ||
| 83 | |||
| 84 | if (archive_format != arf_tar && archive_format != arf_ustar) | ||
| 85 | { | ||
| 86 | - link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1); | ||
| 87 | - link_name[file_hdr->c_filesize] = '\0'; | ||
| 88 | - tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize); | ||
| 89 | - tape_skip_padding (in_file_des, file_hdr->c_filesize); | ||
| 90 | + link_name = get_link_name (file_hdr, in_file_des); | ||
| 91 | } | ||
| 92 | else | ||
| 93 | { | ||
| 94 | diff -Nurp cpio-2.8.orig/tests/Makefile.am cpio-2.8/tests/Makefile.am | ||
| 95 | --- cpio-2.8.orig/tests/Makefile.am 2006-10-24 18:32:13.000000000 +0800 | ||
| 96 | +++ cpio-2.8/tests/Makefile.am 2014-12-08 11:30:52.387789482 +0800 | ||
| 97 | @@ -45,6 +45,8 @@ TESTSUITE_AT = \ | ||
| 98 | testsuite.at\ | ||
| 99 | inout.at\ | ||
| 100 | symlink.at\ | ||
| 101 | + symlink-bad-length.at\ | ||
| 102 | + symlink-long.at\ | ||
| 103 | version.at | ||
| 104 | |||
| 105 | TESTSUITE = $(srcdir)/testsuite | ||
| 106 | diff -Nurp cpio-2.8.orig/tests/symlink-bad-length.at cpio-2.8/tests/symlink-bad-length.at | ||
| 107 | --- cpio-2.8.orig/tests/symlink-bad-length.at 1970-01-01 08:00:00.000000000 +0800 | ||
| 108 | +++ cpio-2.8/tests/symlink-bad-length.at 2014-12-08 11:33:25.283783507 +0800 | ||
| 109 | @@ -0,0 +1,49 @@ | ||
| 110 | +# Process this file with autom4te to create testsuite. -*- Autotest -*- | ||
| 111 | +# Copyright (C) 2014 Free Software Foundation, Inc. | ||
| 112 | + | ||
| 113 | +# This program is free software; you can redistribute it and/or modify | ||
| 114 | +# it under the terms of the GNU General Public License as published by | ||
| 115 | +# the Free Software Foundation; either version 3, or (at your option) | ||
| 116 | +# any later version. | ||
| 117 | + | ||
| 118 | +# This program is distributed in the hope that it will be useful, | ||
| 119 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 120 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 121 | +# GNU General Public License for more details. | ||
| 122 | + | ||
| 123 | +# You should have received a copy of the GNU General Public License | ||
| 124 | +# along with this program; if not, write to the Free Software | ||
| 125 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
| 126 | +# 02110-1301 USA. | ||
| 127 | + | ||
| 128 | +# Cpio v2.11 did segfault with badly set symlink length. | ||
| 129 | +# References: | ||
| 130 | +# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html | ||
| 131 | + | ||
| 132 | +AT_SETUP([symlink-bad-length]) | ||
| 133 | +AT_KEYWORDS([symlink-long copyout]) | ||
| 134 | + | ||
| 135 | +AT_DATA([ARCHIVE.base64], | ||
| 136 | +[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv | ||
| 137 | +JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF | ||
| 138 | +UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
| 139 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
| 140 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
| 141 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
| 142 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
| 143 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
| 144 | +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= | ||
| 145 | +]) | ||
| 146 | + | ||
| 147 | +AT_CHECK([ | ||
| 148 | +base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST | ||
| 149 | +cpio -ntv < ARCHIVE | ||
| 150 | +test $? -eq 2 | ||
| 151 | +], | ||
| 152 | +[0], | ||
| 153 | +[-rw-rw-r-- 1 10029 10031 13 Nov 25 13:52 FILE | ||
| 154 | +],[cpio: LINK: stored filename length too big | ||
| 155 | +cpio: premature end of file | ||
| 156 | +]) | ||
| 157 | + | ||
| 158 | +AT_CLEANUP | ||
| 159 | diff -Nurp cpio-2.8.orig/tests/symlink-long.at cpio-2.8/tests/symlink-long.at | ||
| 160 | --- cpio-2.8.orig/tests/symlink-long.at 1970-01-01 08:00:00.000000000 +0800 | ||
| 161 | +++ cpio-2.8/tests/symlink-long.at 2014-12-08 11:34:28.807781024 +0800 | ||
| 162 | @@ -0,0 +1,46 @@ | ||
| 163 | +# Process this file with autom4te to create testsuite. -*- Autotest -*- | ||
| 164 | +# Copyright (C) 2014 Free Software Foundation, Inc. | ||
| 165 | + | ||
| 166 | +# This program is free software; you can redistribute it and/or modify | ||
| 167 | +# it under the terms of the GNU General Public License as published by | ||
| 168 | +# the Free Software Foundation; either version 3, or (at your option) | ||
| 169 | +# any later version. | ||
| 170 | + | ||
| 171 | +# This program is distributed in the hope that it will be useful, | ||
| 172 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 173 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 174 | +# GNU General Public License for more details. | ||
| 175 | + | ||
| 176 | +# You should have received a copy of the GNU General Public License | ||
| 177 | +# along with this program; if not, write to the Free Software | ||
| 178 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
| 179 | +# 02110-1301 USA. | ||
| 180 | + | ||
| 181 | +# Cpio v2.11.90 changed the way symlink name is read from archive. | ||
| 182 | +# References: | ||
| 183 | +# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html | ||
| 184 | + | ||
| 185 | +AT_SETUP([symlink-long]) | ||
| 186 | +AT_KEYWORDS([symlink-long copyout]) | ||
| 187 | + | ||
| 188 | +AT_CHECK([ | ||
| 189 | + | ||
| 190 | +# len(dirname) > READBUFSIZE | ||
| 191 | +dirname= | ||
| 192 | +for i in {1..52}; do | ||
| 193 | + dirname="xxxxxxxxx/$dirname" | ||
| 194 | + mkdir "$dirname" | ||
| 195 | +done | ||
| 196 | +ln -s "$dirname" x || AT_SKIP_TEST | ||
| 197 | + | ||
| 198 | +echo x | cpio -o > ar | ||
| 199 | +list=`cpio -tv < ar | sed 's|.*-> ||'` | ||
| 200 | +test "$list" = "$dirname" && echo success || echo fail | ||
| 201 | +], | ||
| 202 | +[0], | ||
| 203 | +[success | ||
| 204 | +],[2 blocks | ||
| 205 | +2 blocks | ||
| 206 | +]) | ||
| 207 | + | ||
| 208 | +AT_CLEANUP | ||
| 209 | diff -Nurp cpio-2.8.orig/tests/testsuite.at cpio-2.8/tests/testsuite.at | ||
| 210 | --- cpio-2.8.orig/tests/testsuite.at 2006-10-24 18:32:13.000000000 +0800 | ||
| 211 | +++ cpio-2.8/tests/testsuite.at 2014-12-08 11:34:56.515779942 +0800 | ||
| 212 | @@ -31,3 +31,5 @@ m4_include([version.at]) | ||
| 213 | |||
| 214 | m4_include([inout.at]) | ||
| 215 | m4_include([symlink.at]) | ||
| 216 | +m4_include([symlink-bad-length.at]) | ||
| 217 | +m4_include([symlink-long.at]) | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch b/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch deleted file mode 100644 index e16585dd3f..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.8/m4extensions.patch +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [licensing] | ||
| 2 | |||
| 3 | # Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined. | ||
| 4 | # This is needed to configure correctly with newer versions of autoconf. | ||
| 5 | |||
| 6 | diff -urN cpio-2.8.orig/m4/extensions.m4 cpio-2.8/m4/extensions.m4 | ||
| 7 | --- cpio-2.8.orig/m4/extensions.m4 2006-10-12 04:34:45.000000000 -0700 | ||
| 8 | +++ cpio-2.8/m4/extensions.m4 2010-07-23 14:37:36.000000000 -0700 | ||
| 9 | @@ -1,4 +1,4 @@ | ||
| 10 | -# serial 4 -*- Autoconf -*- | ||
| 11 | +# serial 5 -*- Autoconf -*- | ||
| 12 | # Enable extensions on systems that normally disable them. | ||
| 13 | |||
| 14 | # Copyright (C) 2003, 2006 Free Software Foundation, Inc. | ||
| 15 | @@ -16,6 +16,7 @@ | ||
| 16 | # ------------------------ | ||
| 17 | # Enable extensions on systems that normally disable them, | ||
| 18 | # typically due to standards-conformance issues. | ||
| 19 | +m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [ | ||
| 20 | AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], | ||
| 21 | [ | ||
| 22 | AC_BEFORE([$0], [AC_COMPILE_IFELSE]) | ||
| 23 | @@ -48,7 +49,7 @@ | ||
| 24 | AC_DEFINE([__EXTENSIONS__]) | ||
| 25 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | ||
| 26 | AC_DEFINE([_TANDEM_SOURCE]) | ||
| 27 | -]) | ||
| 28 | +])]) | ||
| 29 | |||
| 30 | # gl_USE_SYSTEM_EXTENSIONS | ||
| 31 | # ------------------------ | ||
diff --git a/meta/recipes-extended/cpio/cpio-2.8/statdef.patch b/meta/recipes-extended/cpio/cpio-2.8/statdef.patch deleted file mode 100644 index a00799fea9..0000000000 --- a/meta/recipes-extended/cpio/cpio-2.8/statdef.patch +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [licensing] | ||
| 2 | |||
| 3 | # Avoid multiple stat definitions | ||
| 4 | # Patch taken from cpio mailing list posting 2010-03-19 | ||
| 5 | |||
| 6 | diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h | ||
| 7 | --- cpio-2.11.orig/src/filetypes.h 2010-02-12 02:19:23.000000000 -0800 | ||
| 8 | +++ cpio-2.11/src/filetypes.h 2010-07-23 13:17:25.000000000 -0700 | ||
| 9 | @@ -82,4 +82,6 @@ | ||
| 10 | #define lstat stat | ||
| 11 | #endif | ||
| 12 | int lstat (); | ||
| 13 | +#ifndef stat | ||
| 14 | int stat (); | ||
| 15 | +#endif | ||
diff --git a/meta/recipes-extended/cpio/cpio_2.8.bb b/meta/recipes-extended/cpio/cpio_2.8.bb deleted file mode 100644 index 624906b134..0000000000 --- a/meta/recipes-extended/cpio/cpio_2.8.bb +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | require cpio_v2.inc | ||
| 2 | |||
| 3 | LICENSE = "GPLv2" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b" | ||
| 5 | |||
| 6 | PR = "r4" | ||
| 7 | |||
| 8 | SRC_URI += " \ | ||
| 9 | file://statdef.patch \ | ||
| 10 | file://m4extensions.patch \ | ||
| 11 | file://avoid_heap_overflow.patch \ | ||
| 12 | file://fix-memory-overrun.patch \ | ||
| 13 | " | ||
| 14 | |||
| 15 | SRC_URI[md5sum] = "0caa356e69e149fb49b76bacc64615a1" | ||
| 16 | SRC_URI[sha256sum] = "1b203248874c3b5a728b351f06513e5282f73e0170b7f207fbf8c39f28f6b4ad" | ||
| 17 | |||
| 18 | # Required to build with gcc 4.3 and later: | ||
| 19 | CFLAGS += "-fgnu89-inline" | ||
diff --git a/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch b/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch deleted file mode 100644 index f8638bbffe..0000000000 --- a/meta/recipes-extended/diffutils/diffutils-2.8.1/diffutils_fix_for_automake-1.12.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | automake 1.12 has depricated automatic de-ANSI-fication support | ||
| 4 | |||
| 5 | this patch avoids these kinds of errors: | ||
| 6 | |||
| 7 | | configure.ac:90: error: automatic de-ANSI-fication support has been removed | ||
| 8 | | /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from... | ||
| 9 | | /srv/home/nitin/builds/build-gcc47/tmp/work/i586-poky-linux/diffutils-2.8.1-r4/diffutils-2.8.1/m4/prereq.m4:110: jm_PREREQ_QUOTEARG is expanded from... | ||
| 10 | | configure.ac:90: the top level | ||
| 11 | | autom4te: m4 failed with exit status: 1 | ||
| 12 | |||
| 13 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
| 14 | 2012/05/04 | ||
| 15 | |||
| 16 | Index: diffutils-2.8.1/m4/prereq.m4 | ||
| 17 | =================================================================== | ||
| 18 | --- diffutils-2.8.1.orig/m4/prereq.m4 | ||
| 19 | +++ diffutils-2.8.1/m4/prereq.m4 | ||
| 20 | @@ -115,7 +115,6 @@ AC_DEFUN([jm_PREREQ_QUOTEARG], | ||
| 21 | AC_HEADER_STDC | ||
| 22 | AC_C_BACKSLASH_A | ||
| 23 | AC_MBSTATE_T | ||
| 24 | - AM_C_PROTOTYPES | ||
| 25 | ]) | ||
| 26 | |||
| 27 | AC_DEFUN([jm_PREREQ_REGEX], | ||
diff --git a/meta/recipes-extended/diffutils/diffutils-2.8.1/fix_gcc6.patch b/meta/recipes-extended/diffutils/diffutils-2.8.1/fix_gcc6.patch deleted file mode 100644 index f915287fe7..0000000000 --- a/meta/recipes-extended/diffutils/diffutils-2.8.1/fix_gcc6.patch +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | Fixes to allow diffutils to build with gcc v6. | ||
| 2 | |||
| 3 | RP | ||
| 4 | 2016/5/25 | ||
| 5 | |||
| 6 | Index: diffutils-2.8.1/lib/posix/regex.h | ||
| 7 | =================================================================== | ||
| 8 | --- diffutils-2.8.1.orig/lib/posix/regex.h | ||
| 9 | +++ diffutils-2.8.1/lib/posix/regex.h | ||
| 10 | @@ -529,7 +529,9 @@ extern int re_exec _RE_ARGS ((const char | ||
| 11 | /* For now unconditionally define __restrict_arr to expand to nothing. | ||
| 12 | Ideally we would have a test for the compiler which allows defining | ||
| 13 | it to restrict. */ | ||
| 14 | +#ifndef __restrict_arr | ||
| 15 | #define __restrict_arr | ||
| 16 | +#endif | ||
| 17 | |||
| 18 | /* POSIX compatibility. */ | ||
| 19 | extern int regcomp _RE_ARGS ((regex_t *__restrict __preg, | ||
| 20 | Index: diffutils-2.8.1/src/diff.c | ||
| 21 | =================================================================== | ||
| 22 | --- diffutils-2.8.1.orig/src/diff.c | ||
| 23 | +++ diffutils-2.8.1/src/diff.c | ||
| 24 | @@ -71,6 +71,7 @@ static void usage (void); | ||
| 25 | static bool recursive; | ||
| 26 | |||
| 27 | /* In context diffs, show previous lines that match these regexps. */ | ||
| 28 | +struct re_pattern_buffer function_regexp; | ||
| 29 | static struct regexp_list function_regexp_list; | ||
| 30 | |||
| 31 | /* Ignore changes affecting only lines that match these regexps. */ | ||
diff --git a/meta/recipes-extended/diffutils/diffutils_2.8.1.bb b/meta/recipes-extended/diffutils/diffutils_2.8.1.bb deleted file mode 100644 index fe56f9ce5f..0000000000 --- a/meta/recipes-extended/diffutils/diffutils_2.8.1.bb +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | LICENSE = "GPLv2+" | ||
| 2 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
| 3 | |||
| 4 | require diffutils.inc | ||
| 5 | |||
| 6 | PR = "r7.0" | ||
| 7 | |||
| 8 | SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.gz \ | ||
| 9 | file://diffutils_fix_for_automake-1.12.patch \ | ||
| 10 | file://fix_gcc6.patch" | ||
| 11 | |||
| 12 | SRC_URI[md5sum] = "71f9c5ae19b60608f6c7f162da86a428" | ||
| 13 | SRC_URI[sha256sum] = "c5001748b069224dd98bf1bb9ee877321c7de8b332c8aad5af3e2a7372d23f5a" | ||
| 14 | |||
| 15 | do_configure_prepend () { | ||
| 16 | chmod u+w ${S}/po/Makefile.in.in | ||
| 17 | } | ||
diff --git a/meta/recipes-extended/ed/ed_0.5.bb b/meta/recipes-extended/ed/ed_0.5.bb deleted file mode 100644 index e2df13f4bc..0000000000 --- a/meta/recipes-extended/ed/ed_0.5.bb +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | SUMMARY = "Line-oriented text editor" | ||
| 2 | HOMEPAGE = "http://www.gnu.org/software/ed/" | ||
| 3 | SECTION = "base" | ||
| 4 | LICENSE = "GPLv2+" | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=6ddd5335ef96fb858a138230af773710 \ | ||
| 6 | file://main.c;beginline=1;endline=17;md5=36d4b85e5ae9028e918d1cc775c2475e" | ||
| 7 | |||
| 8 | PR = "r2" | ||
| 9 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/ed/ed-${PV}.tar.bz2" | ||
| 10 | |||
| 11 | SRC_URI[md5sum] = "4ee21e9dcc9b5b6012c23038734e1632" | ||
| 12 | SRC_URI[sha256sum] = "edef2bbde0fbf0d88232782a0eded323f483a0519d6fde9a3b1809056fd35f3e" | ||
| 13 | |||
| 14 | inherit autotools texinfo | ||
| 15 | |||
| 16 | EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'" | ||
| 17 | |||
| 18 | CONFIGUREOPTS_remove = "--disable-dependency-tracking" | ||
| 19 | CONFIGUREOPTS_remove = "--disable-silent-rules" | ||
| 20 | EXTRA_OECONF_remove = "--disable-static" | ||
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch b/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch deleted file mode 100644 index 2076e44097..0000000000 --- a/meta/recipes-extended/findutils/findutils-4.2.31/findutils-fix-doc-build-error.patch +++ /dev/null | |||
| @@ -1,53 +0,0 @@ | |||
| 1 | From 33cba24cba7b0973a702e9627bd5b93962948ae4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
| 3 | Date: Tue, 17 Sep 2013 16:11:16 +0800 | ||
| 4 | Subject: [PATCH] findutils: fix doc build error | ||
| 5 | |||
| 6 | Upstream-Status: Backport | ||
| 7 | |||
| 8 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
| 9 | --- | ||
| 10 | doc/find.texi | 6 +++--- | ||
| 11 | 1 files changed, 3 insertions(+), 3 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/doc/find.texi b/doc/find.texi | ||
| 14 | index 5b5f0cf..b3d9c6b 100644 | ||
| 15 | --- a/doc/find.texi | ||
| 16 | +++ b/doc/find.texi | ||
| 17 | @@ -63,7 +63,7 @@ translation approved by the Foundation. | ||
| 18 | |||
| 19 | @page | ||
| 20 | @vskip 0pt plus 1filll | ||
| 21 | -@insertcopying{} | ||
| 22 | +@insertcopying | ||
| 23 | @end titlepage | ||
| 24 | |||
| 25 | @contents | ||
| 26 | @@ -1466,6 +1466,7 @@ no output is ever sent to it. | ||
| 27 | * Escapes:: | ||
| 28 | * Format Directives:: | ||
| 29 | * Time Formats:: | ||
| 30 | +* Formatting Flags:: | ||
| 31 | @end menu | ||
| 32 | |||
| 33 | @node Escapes | ||
| 34 | @@ -1534,7 +1535,6 @@ from the novel you are reading. | ||
| 35 | * Size Directives:: | ||
| 36 | * Location Directives:: | ||
| 37 | * Time Directives:: | ||
| 38 | -* Formatting Flags:: | ||
| 39 | @end menu | ||
| 40 | |||
| 41 | @node Name Directives | ||
| 42 | @@ -1780,7 +1780,7 @@ setting the TZ environment variable). This is a GNU extension. | ||
| 43 | @end table | ||
| 44 | |||
| 45 | @node Formatting Flags | ||
| 46 | -@subsubsection Formatting Flags | ||
| 47 | +@subsection Formatting Flags | ||
| 48 | |||
| 49 | The @samp{%m} and @samp{%d} directives support the @samp{#}, @samp{0} | ||
| 50 | and @samp{+} flags, but the other directives do not, even if they | ||
| 51 | -- | ||
| 52 | 1.7.4.1 | ||
| 53 | |||
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch b/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch deleted file mode 100644 index 1b7f8cfb99..0000000000 --- a/meta/recipes-extended/findutils/findutils-4.2.31/findutils_fix_for_automake-1.12.patch +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | automake 1.12 has depricated automatic de-ANSI-fication support | ||
| 4 | |||
| 5 | this patch avoids these kinds of errors: | ||
| 6 | |||
| 7 | | configure.in:75: error: automatic de-ANSI-fication support has been removed | ||
| 8 | |||
| 9 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
| 10 | 2012/05/04 | ||
| 11 | |||
| 12 | Index: findutils-4.2.31/configure.in | ||
| 13 | =================================================================== | ||
| 14 | --- findutils-4.2.31.orig/configure.in | ||
| 15 | +++ findutils-4.2.31/configure.in | ||
| 16 | @@ -72,7 +72,6 @@ dnl gl_EARLY calls AC_GNU_SOURCE anyway. | ||
| 17 | |||
| 18 | |||
| 19 | AC_ISC_POSIX | ||
| 20 | -AM_C_PROTOTYPES | ||
| 21 | |||
| 22 | AC_PROG_INSTALL | ||
| 23 | AC_PROG_RANLIB | ||
diff --git a/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch b/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch deleted file mode 100644 index 65bd64277c..0000000000 --- a/meta/recipes-extended/findutils/findutils-4.2.31/gnulib-extension.patch +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [legacy version] | ||
| 2 | |||
| 3 | the old AC_USE_SYSTEM_EXTENSIONS won't work with AC_GNU_SOURCE | ||
| 4 | |||
| 5 | against 4.2.31 | ||
| 6 | 07/08/2010 - qhe | ||
| 7 | |||
| 8 | diff --git a/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4 | ||
| 9 | index 143a9e5..0f27ceb 100644 | ||
| 10 | --- a/gnulib/m4/extensions.m4 | ||
| 11 | +++ b/gnulib/m4/extensions.m4 | ||
| 12 | @@ -12,44 +12,6 @@ | ||
| 13 | # enough in this area it's likely we'll need to redefine | ||
| 14 | # AC_USE_SYSTEM_EXTENSIONS for quite some time. | ||
| 15 | |||
| 16 | -# AC_USE_SYSTEM_EXTENSIONS | ||
| 17 | -# ------------------------ | ||
| 18 | -# Enable extensions on systems that normally disable them, | ||
| 19 | -# typically due to standards-conformance issues. | ||
| 20 | -AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], | ||
| 21 | -[ | ||
| 22 | - AC_BEFORE([$0], [AC_COMPILE_IFELSE]) | ||
| 23 | - AC_BEFORE([$0], [AC_RUN_IFELSE]) | ||
| 24 | - | ||
| 25 | - AC_REQUIRE([AC_GNU_SOURCE]) | ||
| 26 | - AC_REQUIRE([AC_AIX]) | ||
| 27 | - AC_REQUIRE([AC_MINIX]) | ||
| 28 | - | ||
| 29 | - AH_VERBATIM([__EXTENSIONS__], | ||
| 30 | -[/* Enable extensions on Solaris. */ | ||
| 31 | -#ifndef __EXTENSIONS__ | ||
| 32 | -# undef __EXTENSIONS__ | ||
| 33 | -#endif | ||
| 34 | -#ifndef _POSIX_PTHREAD_SEMANTICS | ||
| 35 | -# undef _POSIX_PTHREAD_SEMANTICS | ||
| 36 | -#endif | ||
| 37 | -#ifndef _TANDEM_SOURCE | ||
| 38 | -# undef _TANDEM_SOURCE | ||
| 39 | -#endif]) | ||
| 40 | - AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], | ||
| 41 | - [ac_cv_safe_to_define___extensions__], | ||
| 42 | - [AC_COMPILE_IFELSE( | ||
| 43 | - [AC_LANG_PROGRAM([ | ||
| 44 | -# define __EXTENSIONS__ 1 | ||
| 45 | - AC_INCLUDES_DEFAULT])], | ||
| 46 | - [ac_cv_safe_to_define___extensions__=yes], | ||
| 47 | - [ac_cv_safe_to_define___extensions__=no])]) | ||
| 48 | - test $ac_cv_safe_to_define___extensions__ = yes && | ||
| 49 | - AC_DEFINE([__EXTENSIONS__]) | ||
| 50 | - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | ||
| 51 | - AC_DEFINE([_TANDEM_SOURCE]) | ||
| 52 | -]) | ||
| 53 | - | ||
| 54 | # gl_USE_SYSTEM_EXTENSIONS | ||
| 55 | # ------------------------ | ||
| 56 | # Enable extensions on systems that normally disable them, | ||
diff --git a/meta/recipes-extended/findutils/findutils_4.2.31.bb b/meta/recipes-extended/findutils/findutils_4.2.31.bb deleted file mode 100644 index 7dee018834..0000000000 --- a/meta/recipes-extended/findutils/findutils_4.2.31.bb +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | LICENSE = "GPLv2+" | ||
| 2 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
| 3 | PR = "r4" | ||
| 4 | |||
| 5 | require findutils.inc | ||
| 6 | |||
| 7 | SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ | ||
| 8 | file://gnulib-extension.patch \ | ||
| 9 | file://findutils_fix_for_automake-1.12.patch \ | ||
| 10 | file://findutils-fix-doc-build-error.patch \ | ||
| 11 | " | ||
| 12 | |||
| 13 | SRC_URI[md5sum] = "a0e31a0f18a49709bf5a449867c8049a" | ||
| 14 | SRC_URI[sha256sum] = "e0d34b8faca0b3cca0703f6c6b498afbe72f0ba16c35980c10ec9ef7724d6204" | ||
diff --git a/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch b/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch deleted file mode 100644 index bc9201b631..0000000000 --- a/meta/recipes-extended/gawk/gawk-3.1.5/0001-gawk-fix-non-glibc-gcc-4-compilation.patch +++ /dev/null | |||
| @@ -1,67 +0,0 @@ | |||
| 1 | From 53496e2e306b16ac59801553f775bcca164e6a39 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <git@andred.net> | ||
| 3 | Date: Wed, 14 Sep 2016 16:20:37 +0100 | ||
| 4 | Subject: [PATCH] fix gcc >= 4 compilation | ||
| 5 | |||
| 6 | | ../gawk-3.1.5/hard-locale.h: In function 'hard_locale': | ||
| 7 | | ../gawk-3.1.5/hard-locale.h:43:20: error: invalid storage class for function 'xmalloc' | ||
| 8 | | static ptr_t xmalloc PARAMS ((size_t n)); | ||
| 9 | | ^~~~~~~ | ||
| 10 | |||
| 11 | | ../gawk-3.1.5/hard-locale.h:45:22: warning: implicit declaration of function 'xmalloc' [-Wimplicit-function-declaration] | ||
| 12 | | char *locale = xmalloc (strlen (p) + 1); | ||
| 13 | | ^~~~~~~ | ||
| 14 | | ../gawk-3.1.5/hard-locale.h:45:22: warning: initialization makes pointer from integer without a cast [-Wint-conversion] | ||
| 15 | | ../gawk-3.1.5/dfa.c: At top level: | ||
| 16 | | ../gawk-3.1.5/dfa.c:125:14: error: conflicting types for 'xmalloc' | ||
| 17 | | static ptr_t xmalloc PARAMS ((size_t n)); | ||
| 18 | | ^~~~~~~ | ||
| 19 | | In file included from ../gawk-3.1.5/dfa.c:112:0: | ||
| 20 | | ../gawk-3.1.5/hard-locale.h:45:22: note: previous implicit declaration of 'xmalloc' was here | ||
| 21 | | char *locale = xmalloc (strlen (p) + 1); | ||
| 22 | | ^~~~~~~ | ||
| 23 | |||
| 24 | Upstream-Status: Inappropriate [required for gawk 3.1.5 (GPLv2) recipe only] | ||
| 25 | |||
| 26 | Signed-off-by: André Draszik <git@andred.net> | ||
| 27 | --- | ||
| 28 | dfa.c | 2 +- | ||
| 29 | hard-locale.h | 2 -- | ||
| 30 | 2 files changed, 1 insertion(+), 3 deletions(-) | ||
| 31 | |||
| 32 | diff --git a/dfa.c b/dfa.c | ||
| 33 | index 71e3736..97f6045 100644 | ||
| 34 | --- a/dfa.c | ||
| 35 | +++ b/dfa.c | ||
| 36 | @@ -109,6 +109,7 @@ extern void free(); | ||
| 37 | |||
| 38 | #include "regex.h" | ||
| 39 | #include "dfa.h" | ||
| 40 | +static ptr_t xmalloc PARAMS ((size_t n)); | ||
| 41 | #include "hard-locale.h" | ||
| 42 | |||
| 43 | /* HPUX, define those as macros in sys/param.h */ | ||
| 44 | @@ -122,7 +123,6 @@ extern void free(); | ||
| 45 | static void dfamust PARAMS ((struct dfa *dfa)); | ||
| 46 | |||
| 47 | static ptr_t xcalloc PARAMS ((size_t n, size_t s)); | ||
| 48 | -static ptr_t xmalloc PARAMS ((size_t n)); | ||
| 49 | static ptr_t xrealloc PARAMS ((ptr_t p, size_t n)); | ||
| 50 | #ifdef DEBUG | ||
| 51 | static void prtok PARAMS ((token t)); | ||
| 52 | diff --git a/hard-locale.h b/hard-locale.h | ||
| 53 | index 0f4986b..9ee57e0 100644 | ||
| 54 | --- a/hard-locale.h | ||
| 55 | +++ b/hard-locale.h | ||
| 56 | @@ -40,8 +40,6 @@ hard_locale (int category) | ||
| 57 | if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0) | ||
| 58 | hard = 0; | ||
| 59 | # else | ||
| 60 | - static ptr_t xmalloc PARAMS ((size_t n)); | ||
| 61 | - | ||
| 62 | char *locale = xmalloc (strlen (p) + 1); | ||
| 63 | strcpy (locale, p); | ||
| 64 | |||
| 65 | -- | ||
| 66 | 2.9.3 | ||
| 67 | |||
diff --git a/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch b/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch deleted file mode 100644 index c42c33c420..0000000000 --- a/meta/recipes-extended/gawk/gawk-3.1.5/gawk-3.1.5_fix_for_automake-1.12.patch +++ /dev/null | |||
| @@ -1,41 +0,0 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | automake 1.12 has depricated automatic de-ANSI-fication support | ||
| 4 | |||
| 5 | this patch avoids these kinds of errors: | ||
| 6 | |||
| 7 | | configure.ac:127: error: automatic de-ANSI-fication support has been removed | ||
| 8 | | /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from... | ||
| 9 | | configure.ac:127: the top level | ||
| 10 | | autom4te: m4 failed with exit status: 1 | ||
| 11 | ... | ||
| 12 | | Makefile.am:27: error: automatic de-ANSI-fication support has been removed | ||
| 13 | |||
| 14 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
| 15 | 2012/05/04 | ||
| 16 | |||
| 17 | Index: gawk-3.1.5/configure.ac | ||
| 18 | =================================================================== | ||
| 19 | --- gawk-3.1.5.orig/configure.ac | ||
| 20 | +++ gawk-3.1.5/configure.ac | ||
| 21 | @@ -124,7 +124,6 @@ fi | ||
| 22 | |||
| 23 | dnl check for C compiler for automake | ||
| 24 | AM_PROG_CC_STDC | ||
| 25 | -AM_C_PROTOTYPES | ||
| 26 | |||
| 27 | dnl Cygwin doesn't like to get libs with full paths | ||
| 28 | dnl since that overrides linking against DLLs. | ||
| 29 | Index: gawk-3.1.5/Makefile.am | ||
| 30 | =================================================================== | ||
| 31 | --- gawk-3.1.5.orig/Makefile.am | ||
| 32 | +++ gawk-3.1.5/Makefile.am | ||
| 33 | @@ -24,7 +24,7 @@ | ||
| 34 | ## process this file with automake to produce Makefile.in | ||
| 35 | |||
| 36 | # Automatic de-ANSI-fication if needed, make .bz2 files also. | ||
| 37 | -AUTOMAKE_OPTIONS = ansi2knr dist-bzip2 | ||
| 38 | +AUTOMAKE_OPTIONS = dist-bzip2 | ||
| 39 | |||
| 40 | # This undocumented variable insures that aclocal runs | ||
| 41 | # correctly after changing configure.ac | ||
diff --git a/meta/recipes-extended/gawk/gawk_3.1.5.bb b/meta/recipes-extended/gawk/gawk_3.1.5.bb deleted file mode 100644 index 63fd32f4b9..0000000000 --- a/meta/recipes-extended/gawk/gawk_3.1.5.bb +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | SUMMARY = "GNU awk text processing utility" | ||
| 2 | DESCRIPTION = "The GNU version of awk, a text processing utility. \ | ||
| 3 | Awk interprets a special-purpose programming language to do \ | ||
| 4 | quick and easy text pattern matching and reformatting jobs." | ||
| 5 | HOMEPAGE = "www.gnu.org/software/gawk" | ||
| 6 | BUGTRACKER = "bug-gawk@gnu.org" | ||
| 7 | SECTION = "console/utils" | ||
| 8 | |||
| 9 | # gawk <= 3.1.5: GPLv2 | ||
| 10 | # gawk >= 3.1.6: GPLv3 | ||
| 11 | LICENSE = "GPLv2" | ||
| 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
| 13 | |||
| 14 | RDEPENDS_gawk += "gawk-common" | ||
| 15 | RDEPENDS_pgawk += "gawk-common" | ||
| 16 | PR = "r2" | ||
| 17 | |||
| 18 | SRC_URI = "\ | ||
| 19 | ${GNU_MIRROR}/gawk/gawk-${PV}.tar.gz \ | ||
| 20 | file://gawk-3.1.5_fix_for_automake-1.12.patch \ | ||
| 21 | file://0001-gawk-fix-non-glibc-gcc-4-compilation.patch \ | ||
| 22 | " | ||
| 23 | |||
| 24 | SRC_URI[md5sum] = "4760325489479cac17fe0114b8f62f30" | ||
| 25 | SRC_URI[sha256sum] = "463dcb9d0ca398b1d4f5a332f6cd9cec56441265fca616f2ea1b44d459e9f0f8" | ||
| 26 | |||
| 27 | inherit autotools gettext texinfo update-alternatives | ||
| 28 | |||
| 29 | PACKAGES += "gawk-common pgawk" | ||
| 30 | |||
| 31 | FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk" | ||
| 32 | FILES_gawk-common += "${datadir}/awk/* ${libexecdir}/awk/*" | ||
| 33 | FILES_pgawk = "${bindir}/pgawk*" | ||
| 34 | |||
| 35 | ALTERNATIVE_${PN} = "awk" | ||
| 36 | ALTERNATIVE_TARGET[awk] = "${bindir}/gawk" | ||
| 37 | ALTERNATIVE_PRIORITY = "100" | ||
| 38 | |||
| 39 | CFLAGS += "-D PROTOTYPES" | ||
| 40 | |||
| 41 | do_install_append() { | ||
| 42 | # remove the link since we don't package it | ||
| 43 | rm ${D}${bindir}/awk | ||
| 44 | } | ||
diff --git a/meta/recipes-extended/gperf/gperf_3.0.3.bb b/meta/recipes-extended/gperf/gperf_3.0.3.bb deleted file mode 100644 index 772886121b..0000000000 --- a/meta/recipes-extended/gperf/gperf_3.0.3.bb +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | require gperf.inc | ||
| 2 | |||
| 3 | LICENSE = "GPLv2+" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=a5f84abb0070adf8a0925d7d534b6e0a \ | ||
| 5 | file://src/main.cc;beginline=8;endline=19;md5=72a3034a19e72f08ee48ef8244a121fd" | ||
| 6 | |||
| 7 | PR = "r1" | ||
| 8 | |||
| 9 | SRC_URI[md5sum] = "cc20e58975a38075440423c8fb85fd00" | ||
| 10 | SRC_URI[sha256sum] = "63287527c8d9e27e801cf0804436f3494bd569db05d49dcdd2a942ae72fa9055" | ||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/Makevars b/meta/recipes-extended/grep/grep-2.5.1a/Makevars deleted file mode 100644 index 8b09f53b0f..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/Makevars +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | # Makefile variables for PO directory in any package using GNU gettext. | ||
| 2 | |||
| 3 | # Usually the message domain is the same as the package name. | ||
| 4 | DOMAIN = $(PACKAGE) | ||
| 5 | |||
| 6 | # These two variables depend on the location of this directory. | ||
| 7 | subdir = po | ||
| 8 | top_builddir = .. | ||
| 9 | |||
| 10 | # These options get passed to xgettext. | ||
| 11 | XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ | ||
| 12 | |||
| 13 | # This is the copyright holder that gets inserted into the header of the | ||
| 14 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding | ||
| 15 | # package. (Note that the msgstr strings, extracted from the package's | ||
| 16 | # sources, belong to the copyright holder of the package.) Translators are | ||
| 17 | # expected to transfer the copyright for their translations to this person | ||
| 18 | # or entity, or to disclaim their copyright. The empty string stands for | ||
| 19 | # the public domain; in this case the translators are expected to disclaim | ||
| 20 | # their copyright. | ||
| 21 | COPYRIGHT_HOLDER = Free Software Foundation, Inc. | ||
| 22 | |||
| 23 | # This is the list of locale categories, beyond LC_MESSAGES, for which the | ||
| 24 | # message catalogs shall be used. It is usually empty. | ||
| 25 | EXTRA_LOCALE_CATEGORIES = | ||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch deleted file mode 100644 index ce595099f4..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/fix-for-texinfo-5.1.patch +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [Poky Specific this is gplv2 version] | ||
| 2 | |||
| 3 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
| 4 | |||
| 5 | Index: grep-2.5.1a/doc/grep.texi | ||
| 6 | =================================================================== | ||
| 7 | --- grep-2.5.1a.orig/doc/grep.texi | ||
| 8 | +++ grep-2.5.1a/doc/grep.texi | ||
| 9 | @@ -288,7 +288,7 @@ This version number should be included i | ||
| 10 | Print a usage message briefly summarizing these command-line options | ||
| 11 | and the bug-reporting address, then exit. | ||
| 12 | |||
| 13 | -@itemx --binary-files=@var{type} | ||
| 14 | +@item --binary-files=@var{type} | ||
| 15 | @opindex --binary-files | ||
| 16 | @cindex binary files | ||
| 17 | If the first few bytes of a file indicate that the file contains binary | ||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch b/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch deleted file mode 100644 index 3b91520fb2..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/fix64-int-to-pointer.patch +++ /dev/null | |||
| @@ -1,17 +0,0 @@ | |||
| 1 | Always use locale.h as HAVE_LOCALE_H is no longer handled by ./configure | ||
| 2 | Upstream-Status: Inappropriate [ old version that will not be maintained ] | ||
| 3 | Signed-off-by: Alex DAMIAN <alexandru.damian@intel.com> | ||
| 4 | |||
| 5 | diff --recursive --unified grep-2.5.1a-orig/lib/hard-locale.c grep-2.5.1a/lib/hard-locale.c | ||
| 6 | --- grep-2.5.1a-orig/lib/hard-locale.c 2001-03-04 07:33:12.000000000 +0200 | ||
| 7 | +++ grep-2.5.1a/lib/hard-locale.c 2013-03-11 17:05:52.086444891 +0200 | ||
| 8 | @@ -38,9 +38,7 @@ | ||
| 9 | # endif | ||
| 10 | #endif | ||
| 11 | |||
| 12 | -#if HAVE_LOCALE_H | ||
| 13 | # include <locale.h> | ||
| 14 | -#endif | ||
| 15 | |||
| 16 | #if HAVE_STRING_H | ||
| 17 | # include <string.h> | ||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch b/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch deleted file mode 100644 index 57463355a7..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/gettext.patch +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | Enable operation with later versions of gettext. | ||
| 2 | |||
| 3 | Upstream-Status: Inappropriate | ||
| 4 | RP 2012/10/19 | ||
| 5 | |||
| 6 | Index: grep-2.5.1a/configure.in | ||
| 7 | =================================================================== | ||
| 8 | --- grep-2.5.1a.orig/configure.in 2012-10-19 12:57:51.646970204 +0000 | ||
| 9 | +++ grep-2.5.1a/configure.in 2012-10-19 12:59:49.946968803 +0000 | ||
| 10 | @@ -140,4 +140,4 @@ | ||
| 11 | AC_CHECK_LIB(pcre, pcre_exec) | ||
| 12 | fi | ||
| 13 | |||
| 14 | -AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile; echo timestamp > stamp-h]) | ||
| 15 | +AC_OUTPUT(Makefile lib/Makefile lib/posix/Makefile src/Makefile tests/Makefile po/Makefile.in intl/Makefile doc/Makefile m4/Makefile vms/Makefile bootstrap/Makefile, [echo timestamp > stamp-h]) | ||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch deleted file mode 100644 index a40a9f30bc..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | The patch to fix CVE-2012-5667 | ||
| 2 | Reference: https://bugzilla.redhat.com/attachment.cgi?id=686605&action=diff | ||
| 3 | |||
| 4 | Multiple integer overflows in GNU Grep before 2.11 might allow | ||
| 5 | context-dependent attackers to execute arbitrary code via vectors | ||
| 6 | involving a long input line that triggers a heap-based buffer overflow. | ||
| 7 | |||
| 8 | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-5667 | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [other] | ||
| 11 | This version of GNU Grep has been abandoned upstream and they are no longer | ||
| 12 | accepting patches. This is not a backport. | ||
| 13 | CVE: CVE-2012-5667 | ||
| 14 | |||
| 15 | Signed-off-by: Ming Liu <ming.liu@windriver.com> | ||
| 16 | --- | ||
| 17 | grep.c | 7 +++---- | ||
| 18 | 1 file changed, 3 insertions(+), 4 deletions(-) | ||
| 19 | |||
| 20 | --- a/src/grep.c 2013-05-15 13:39:33.359191769 +0800 | ||
| 21 | +++ a/src/grep.c 2013-05-15 13:50:22.609191882 +0800 | ||
| 22 | @@ -306,6 +306,11 @@ fillbuf (size_t save, struct stats const | ||
| 23 | int cc = 1; | ||
| 24 | char *readbuf; | ||
| 25 | size_t readsize; | ||
| 26 | + const size_t max_save = INT_MAX / 2; | ||
| 27 | + | ||
| 28 | + /* Limit the amount of saved data to INT_MAX to fix CVE-2012-5667 */ | ||
| 29 | + if (save > max_save) | ||
| 30 | + error (2, 0, _("line too long")); | ||
| 31 | |||
| 32 | /* Offset from start of buffer to start of old stuff | ||
| 33 | that we want to save. */ | ||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch deleted file mode 100644 index 327ee56402..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/grep-egrep-fgrep-Fix-LSB-NG-cases.patch +++ /dev/null | |||
| @@ -1,1342 +0,0 @@ | |||
| 1 | From c884dd12ec062569335702848fc5f29f436c28fa Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Li xin <lixin.fnst@cn.fujitsu.com> | ||
| 3 | Date: Mon, 25 May 2015 10:15:57 +0900 | ||
| 4 | Subject: [PATCH] grep egrep fgrep: Fix LSB NG cases. | ||
| 5 | |||
| 6 | The LSB core test requires grep egrep and fgrep can | ||
| 7 | perform pattern matching in searches without regard | ||
| 8 | to case if -i option is specified. | ||
| 9 | |||
| 10 | Upstream-Status: backport. | ||
| 11 | |||
| 12 | Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com> | ||
| 13 | --- | ||
| 14 | lib/posix/regex.h | 4 + | ||
| 15 | src/dfa.c | 22 +- | ||
| 16 | src/grep.c | 96 ++++--- | ||
| 17 | src/search.c | 833 +++++++++++++++++++++++++++++++++++++++++++++--------- | ||
| 18 | 4 files changed, 768 insertions(+), 187 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/lib/posix/regex.h b/lib/posix/regex.h | ||
| 21 | index 63c2fef..7bb2b0e 100644 | ||
| 22 | --- a/lib/posix/regex.h | ||
| 23 | +++ b/lib/posix/regex.h | ||
| 24 | @@ -109,6 +109,10 @@ typedef unsigned long int reg_syntax_t; | ||
| 25 | If not set, \{, \}, {, and } are literals. */ | ||
| 26 | #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) | ||
| 27 | |||
| 28 | +/* If this bit is set, then ignore case when matching. | ||
| 29 | + If not set, then case is significant. */ | ||
| 30 | +#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) | ||
| 31 | + | ||
| 32 | /* If this bit is set, +, ? and | aren't recognized as operators. | ||
| 33 | If not set, they are. */ | ||
| 34 | #define RE_LIMITED_OPS (RE_INTERVALS << 1) | ||
| 35 | diff --git a/src/dfa.c b/src/dfa.c | ||
| 36 | index 590bfa7..27c876a 100644 | ||
| 37 | --- a/src/dfa.c | ||
| 38 | +++ b/src/dfa.c | ||
| 39 | @@ -414,7 +414,7 @@ update_mb_len_index (unsigned char const *p, int len) | ||
| 40 | |||
| 41 | /* This function fetch a wide character, and update cur_mb_len, | ||
| 42 | used only if the current locale is a multibyte environment. */ | ||
| 43 | -static wchar_t | ||
| 44 | +static wint_t | ||
| 45 | fetch_wc (char const *eoferr) | ||
| 46 | { | ||
| 47 | wchar_t wc; | ||
| 48 | @@ -423,7 +423,7 @@ fetch_wc (char const *eoferr) | ||
| 49 | if (eoferr != 0) | ||
| 50 | dfaerror (eoferr); | ||
| 51 | else | ||
| 52 | - return -1; | ||
| 53 | + return WEOF; | ||
| 54 | } | ||
| 55 | |||
| 56 | cur_mb_len = mbrtowc(&wc, lexptr, lexleft, &mbs); | ||
| 57 | @@ -459,7 +459,7 @@ fetch_wc (char const *eoferr) | ||
| 58 | static void | ||
| 59 | parse_bracket_exp_mb () | ||
| 60 | { | ||
| 61 | - wchar_t wc, wc1, wc2; | ||
| 62 | + wint_t wc, wc1, wc2; | ||
| 63 | |||
| 64 | /* Work area to build a mb_char_classes. */ | ||
| 65 | struct mb_char_classes *work_mbc; | ||
| 66 | @@ -496,7 +496,7 @@ parse_bracket_exp_mb () | ||
| 67 | work_mbc->invert = 0; | ||
| 68 | do | ||
| 69 | { | ||
| 70 | - wc1 = -1; /* mark wc1 is not initialized". */ | ||
| 71 | + wc1 = WEOF; /* mark wc1 is not initialized". */ | ||
| 72 | |||
| 73 | /* Note that if we're looking at some other [:...:] construct, | ||
| 74 | we just treat it as a bunch of ordinary characters. We can do | ||
| 75 | @@ -586,7 +586,7 @@ parse_bracket_exp_mb () | ||
| 76 | work_mbc->coll_elems[work_mbc->ncoll_elems++] = elem; | ||
| 77 | } | ||
| 78 | } | ||
| 79 | - wc = -1; | ||
| 80 | + wc1 = wc = WEOF; | ||
| 81 | } | ||
| 82 | else | ||
| 83 | /* We treat '[' as a normal character here. */ | ||
| 84 | @@ -600,7 +600,7 @@ parse_bracket_exp_mb () | ||
| 85 | wc = fetch_wc(("Unbalanced [")); | ||
| 86 | } | ||
| 87 | |||
| 88 | - if (wc1 == -1) | ||
| 89 | + if (wc1 == WEOF) | ||
| 90 | wc1 = fetch_wc(_("Unbalanced [")); | ||
| 91 | |||
| 92 | if (wc1 == L'-') | ||
| 93 | @@ -630,17 +630,17 @@ parse_bracket_exp_mb () | ||
| 94 | } | ||
| 95 | REALLOC_IF_NECESSARY(work_mbc->range_sts, wchar_t, | ||
| 96 | range_sts_al, work_mbc->nranges + 1); | ||
| 97 | - work_mbc->range_sts[work_mbc->nranges] = wc; | ||
| 98 | + work_mbc->range_sts[work_mbc->nranges] = (wchar_t)wc; | ||
| 99 | REALLOC_IF_NECESSARY(work_mbc->range_ends, wchar_t, | ||
| 100 | range_ends_al, work_mbc->nranges + 1); | ||
| 101 | - work_mbc->range_ends[work_mbc->nranges++] = wc2; | ||
| 102 | + work_mbc->range_ends[work_mbc->nranges++] = (wchar_t)wc2; | ||
| 103 | } | ||
| 104 | - else if (wc != -1) | ||
| 105 | + else if (wc != WEOF) | ||
| 106 | /* build normal characters. */ | ||
| 107 | { | ||
| 108 | REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al, | ||
| 109 | work_mbc->nchars + 1); | ||
| 110 | - work_mbc->chars[work_mbc->nchars++] = wc; | ||
| 111 | + work_mbc->chars[work_mbc->nchars++] = (wchar_t)wc; | ||
| 112 | } | ||
| 113 | } | ||
| 114 | while ((wc = wc1) != L']'); | ||
| 115 | @@ -2552,6 +2552,8 @@ match_mb_charset (struct dfa *d, int s, position pos, int index) | ||
| 116 | } | ||
| 117 | |||
| 118 | /* match with a character? */ | ||
| 119 | + if (case_fold) | ||
| 120 | + wc = towlower (wc); | ||
| 121 | for (i = 0; i<work_mbc->nchars; i++) | ||
| 122 | { | ||
| 123 | if (wc == work_mbc->chars[i]) | ||
| 124 | diff --git a/src/grep.c b/src/grep.c | ||
| 125 | index 2fb2fac..3fd4b47 100644 | ||
| 126 | --- a/src/grep.c | ||
| 127 | +++ b/src/grep.c | ||
| 128 | @@ -30,6 +30,12 @@ | ||
| 129 | # include <sys/time.h> | ||
| 130 | # include <sys/resource.h> | ||
| 131 | #endif | ||
| 132 | +#if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_MBRTOWC | ||
| 133 | +/* We can handle multibyte string. */ | ||
| 134 | +# define MBS_SUPPORT | ||
| 135 | +# include <wchar.h> | ||
| 136 | +# include <wctype.h> | ||
| 137 | +#endif | ||
| 138 | #include <stdio.h> | ||
| 139 | #include "system.h" | ||
| 140 | #include "getopt.h" | ||
| 141 | @@ -255,19 +261,6 @@ reset (int fd, char const *file, struct stats *stats) | ||
| 142 | bufbeg[-1] = eolbyte; | ||
| 143 | bufdesc = fd; | ||
| 144 | |||
| 145 | - if (fstat (fd, &stats->stat) != 0) | ||
| 146 | - { | ||
| 147 | - error (0, errno, "fstat"); | ||
| 148 | - return 0; | ||
| 149 | - } | ||
| 150 | - if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode)) | ||
| 151 | - return 0; | ||
| 152 | -#ifndef DJGPP | ||
| 153 | - if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode))) | ||
| 154 | -#else | ||
| 155 | - if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode))) | ||
| 156 | -#endif | ||
| 157 | - return 0; | ||
| 158 | if (S_ISREG (stats->stat.st_mode)) | ||
| 159 | { | ||
| 160 | if (file) | ||
| 161 | @@ -558,33 +551,6 @@ prline (char const *beg, char const *lim, int sep) | ||
| 162 | { | ||
| 163 | size_t match_size; | ||
| 164 | size_t match_offset; | ||
| 165 | - if(match_icase) | ||
| 166 | - { | ||
| 167 | - /* Yuck, this is tricky */ | ||
| 168 | - char *buf = (char*) xmalloc (lim - beg); | ||
| 169 | - char *ibeg = buf; | ||
| 170 | - char *ilim = ibeg + (lim - beg); | ||
| 171 | - int i; | ||
| 172 | - for (i = 0; i < lim - beg; i++) | ||
| 173 | - ibeg[i] = tolower (beg[i]); | ||
| 174 | - while ((match_offset = (*execute) (ibeg, ilim-ibeg, &match_size, 1)) | ||
| 175 | - != (size_t) -1) | ||
| 176 | - { | ||
| 177 | - char const *b = beg + match_offset; | ||
| 178 | - if (b == lim) | ||
| 179 | - break; | ||
| 180 | - fwrite (beg, sizeof (char), match_offset, stdout); | ||
| 181 | - printf ("\33[%sm", grep_color); | ||
| 182 | - fwrite (b, sizeof (char), match_size, stdout); | ||
| 183 | - fputs ("\33[00m", stdout); | ||
| 184 | - beg = b + match_size; | ||
| 185 | - ibeg = ibeg + match_offset + match_size; | ||
| 186 | - } | ||
| 187 | - fwrite (beg, 1, lim - beg, stdout); | ||
| 188 | - free (buf); | ||
| 189 | - lastout = lim; | ||
| 190 | - return; | ||
| 191 | - } | ||
| 192 | while (lim-beg && (match_offset = (*execute) (beg, lim - beg, &match_size, 1)) | ||
| 193 | != (size_t) -1) | ||
| 194 | { | ||
| 195 | @@ -601,6 +567,7 @@ prline (char const *beg, char const *lim, int sep) | ||
| 196 | fputs ("\33[00m", stdout); | ||
| 197 | beg = b + match_size; | ||
| 198 | } | ||
| 199 | + fputs ("\33[K", stdout); | ||
| 200 | } | ||
| 201 | fwrite (beg, 1, lim - beg, stdout); | ||
| 202 | if (ferror (stdout)) | ||
| 203 | @@ -623,7 +590,7 @@ prpending (char const *lim) | ||
| 204 | size_t match_size; | ||
| 205 | --pending; | ||
| 206 | if (outleft | ||
| 207 | - || (((*execute) (lastout, nl - lastout, &match_size, 0) == (size_t) -1) | ||
| 208 | + || (((*execute) (lastout, nl + 1 - lastout, &match_size, 0) == (size_t) -1) | ||
| 209 | == !out_invert)) | ||
| 210 | prline (lastout, nl + 1, '-'); | ||
| 211 | else | ||
| 212 | @@ -895,6 +862,19 @@ grepfile (char const *file, struct stats *stats) | ||
| 213 | } | ||
| 214 | else | ||
| 215 | { | ||
| 216 | + if (stat (file, &stats->stat) != 0) | ||
| 217 | + { | ||
| 218 | + suppressible_error (file, errno); | ||
| 219 | + return 1; | ||
| 220 | + } | ||
| 221 | + if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode)) | ||
| 222 | + return 1; | ||
| 223 | +#ifndef DJGPP | ||
| 224 | + if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode) || S_ISFIFO(stats->stat.st_mode))) | ||
| 225 | +#else | ||
| 226 | + if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode))) | ||
| 227 | +#endif | ||
| 228 | + return 1; | ||
| 229 | while ((desc = open (file, O_RDONLY)) < 0 && errno == EINTR) | ||
| 230 | continue; | ||
| 231 | |||
| 232 | @@ -1681,9 +1661,6 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n")) | ||
| 233 | out_invert ^= 1; | ||
| 234 | match_lines = match_words = 0; | ||
| 235 | } | ||
| 236 | - else | ||
| 237 | - /* Strip trailing newline. */ | ||
| 238 | - --keycc; | ||
| 239 | } | ||
| 240 | else | ||
| 241 | if (optind < argc) | ||
| 242 | @@ -1697,6 +1674,37 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n")) | ||
| 243 | if (!install_matcher (matcher) && !install_matcher ("default")) | ||
| 244 | abort (); | ||
| 245 | |||
| 246 | +#ifdef MBS_SUPPORT | ||
| 247 | + if (MB_CUR_MAX != 1 && match_icase) | ||
| 248 | + { | ||
| 249 | + wchar_t wc; | ||
| 250 | + mbstate_t cur_state, prev_state; | ||
| 251 | + int i, len = strlen(keys); | ||
| 252 | + | ||
| 253 | + memset(&cur_state, 0, sizeof(mbstate_t)); | ||
| 254 | + for (i = 0; i <= len ;) | ||
| 255 | + { | ||
| 256 | + size_t mbclen; | ||
| 257 | + mbclen = mbrtowc(&wc, keys + i, len - i, &cur_state); | ||
| 258 | + if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0) | ||
| 259 | + { | ||
| 260 | + /* An invalid sequence, or a truncated multibyte character. | ||
| 261 | + We treat it as a singlebyte character. */ | ||
| 262 | + mbclen = 1; | ||
| 263 | + } | ||
| 264 | + else | ||
| 265 | + { | ||
| 266 | + if (iswupper((wint_t)wc)) | ||
| 267 | + { | ||
| 268 | + wc = towlower((wint_t)wc); | ||
| 269 | + wcrtomb(keys + i, wc, &cur_state); | ||
| 270 | + } | ||
| 271 | + } | ||
| 272 | + i += mbclen; | ||
| 273 | + } | ||
| 274 | + } | ||
| 275 | +#endif /* MBS_SUPPORT */ | ||
| 276 | + | ||
| 277 | (*compile)(keys, keycc); | ||
| 278 | |||
| 279 | if ((argc - optind > 1 && !no_filenames) || with_filenames) | ||
| 280 | diff --git a/src/search.c b/src/search.c | ||
| 281 | index 7bd233f..3c6a485 100644 | ||
| 282 | --- a/src/search.c | ||
| 283 | +++ b/src/search.c | ||
| 284 | @@ -18,9 +18,13 @@ | ||
| 285 | |||
| 286 | /* Written August 1992 by Mike Haertel. */ | ||
| 287 | |||
| 288 | +#ifndef _GNU_SOURCE | ||
| 289 | +# define _GNU_SOURCE 1 | ||
| 290 | +#endif | ||
| 291 | #ifdef HAVE_CONFIG_H | ||
| 292 | # include <config.h> | ||
| 293 | #endif | ||
| 294 | +#include <assert.h> | ||
| 295 | #include <sys/types.h> | ||
| 296 | #if defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_MBRTOWC | ||
| 297 | /* We can handle multibyte string. */ | ||
| 298 | @@ -31,7 +35,7 @@ | ||
| 299 | |||
| 300 | #include "system.h" | ||
| 301 | #include "grep.h" | ||
| 302 | -#include "regex.h" | ||
| 303 | +#include <regex.h> | ||
| 304 | #include "dfa.h" | ||
| 305 | #include "kwset.h" | ||
| 306 | #include "error.h" | ||
| 307 | @@ -39,6 +43,9 @@ | ||
| 308 | #ifdef HAVE_LIBPCRE | ||
| 309 | # include <pcre.h> | ||
| 310 | #endif | ||
| 311 | +#ifdef HAVE_LANGINFO_CODESET | ||
| 312 | +# include <langinfo.h> | ||
| 313 | +#endif | ||
| 314 | |||
| 315 | #define NCHAR (UCHAR_MAX + 1) | ||
| 316 | |||
| 317 | @@ -70,9 +77,10 @@ static kwset_t kwset; | ||
| 318 | call the regexp matcher at all. */ | ||
| 319 | static int kwset_exact_matches; | ||
| 320 | |||
| 321 | -#if defined(MBS_SUPPORT) | ||
| 322 | -static char* check_multibyte_string PARAMS ((char const *buf, size_t size)); | ||
| 323 | -#endif | ||
| 324 | +/* UTF-8 encoding allows some optimizations that we can't otherwise | ||
| 325 | + assume in a multibyte encoding. */ | ||
| 326 | +static int using_utf8; | ||
| 327 | + | ||
| 328 | static void kwsinit PARAMS ((void)); | ||
| 329 | static void kwsmusts PARAMS ((void)); | ||
| 330 | static void Gcompile PARAMS ((char const *, size_t)); | ||
| 331 | @@ -84,6 +92,15 @@ static void Pcompile PARAMS ((char const *, size_t )); | ||
| 332 | static size_t Pexecute PARAMS ((char const *, size_t, size_t *, int)); | ||
| 333 | |||
| 334 | void | ||
| 335 | +check_utf8 (void) | ||
| 336 | +{ | ||
| 337 | +#ifdef HAVE_LANGINFO_CODESET | ||
| 338 | + if (strcmp (nl_langinfo (CODESET), "UTF-8") == 0) | ||
| 339 | + using_utf8 = 1; | ||
| 340 | +#endif | ||
| 341 | +} | ||
| 342 | + | ||
| 343 | +void | ||
| 344 | dfaerror (char const *mesg) | ||
| 345 | { | ||
| 346 | error (2, 0, mesg); | ||
| 347 | @@ -141,38 +158,6 @@ kwsmusts (void) | ||
| 348 | } | ||
| 349 | } | ||
| 350 | |||
| 351 | -#ifdef MBS_SUPPORT | ||
| 352 | -/* This function allocate the array which correspond to "buf". | ||
| 353 | - Then this check multibyte string and mark on the positions which | ||
| 354 | - are not singlebyte character nor the first byte of a multibyte | ||
| 355 | - character. Caller must free the array. */ | ||
| 356 | -static char* | ||
| 357 | -check_multibyte_string(char const *buf, size_t size) | ||
| 358 | -{ | ||
| 359 | - char *mb_properties = malloc(size); | ||
| 360 | - mbstate_t cur_state; | ||
| 361 | - int i; | ||
| 362 | - memset(&cur_state, 0, sizeof(mbstate_t)); | ||
| 363 | - memset(mb_properties, 0, sizeof(char)*size); | ||
| 364 | - for (i = 0; i < size ;) | ||
| 365 | - { | ||
| 366 | - size_t mbclen; | ||
| 367 | - mbclen = mbrlen(buf + i, size - i, &cur_state); | ||
| 368 | - | ||
| 369 | - if (mbclen == (size_t) -1 || mbclen == (size_t) -2 || mbclen == 0) | ||
| 370 | - { | ||
| 371 | - /* An invalid sequence, or a truncated multibyte character. | ||
| 372 | - We treat it as a singlebyte character. */ | ||
| 373 | - mbclen = 1; | ||
| 374 | - } | ||
| 375 | - mb_properties[i] = mbclen; | ||
| 376 | - i += mbclen; | ||
| 377 | - } | ||
| 378 | - | ||
| 379 | - return mb_properties; | ||
| 380 | -} | ||
| 381 | -#endif | ||
| 382 | - | ||
| 383 | static void | ||
| 384 | Gcompile (char const *pattern, size_t size) | ||
| 385 | { | ||
| 386 | @@ -181,7 +166,8 @@ Gcompile (char const *pattern, size_t size) | ||
| 387 | size_t total = size; | ||
| 388 | char const *motif = pattern; | ||
| 389 | |||
| 390 | - re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE); | ||
| 391 | + check_utf8 (); | ||
| 392 | + re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | (match_icase ? RE_ICASE : 0)); | ||
| 393 | dfasyntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE, match_icase, eolbyte); | ||
| 394 | |||
| 395 | /* For GNU regex compiler we have to pass the patterns separately to detect | ||
| 396 | @@ -218,6 +204,10 @@ Gcompile (char const *pattern, size_t size) | ||
| 397 | motif = sep; | ||
| 398 | } while (sep && total != 0); | ||
| 399 | |||
| 400 | + /* Strip trailing newline. */ | ||
| 401 | + if (size && pattern[size - 1] == '\n') | ||
| 402 | + size--; | ||
| 403 | + | ||
| 404 | /* In the match_words and match_lines cases, we use a different pattern | ||
| 405 | for the DFA matcher that will quickly throw out cases that won't work. | ||
| 406 | Then if DFA succeeds we do some hairy stuff using the regex matcher | ||
| 407 | @@ -233,7 +223,7 @@ Gcompile (char const *pattern, size_t size) | ||
| 408 | static char const line_end[] = "\\)$"; | ||
| 409 | static char const word_beg[] = "\\(^\\|[^[:alnum:]_]\\)\\("; | ||
| 410 | static char const word_end[] = "\\)\\([^[:alnum:]_]\\|$\\)"; | ||
| 411 | - char *n = malloc (sizeof word_beg - 1 + size + sizeof word_end); | ||
| 412 | + char *n = xmalloc (sizeof word_beg - 1 + size + sizeof word_end); | ||
| 413 | size_t i; | ||
| 414 | strcpy (n, match_lines ? line_beg : word_beg); | ||
| 415 | i = strlen (n); | ||
| 416 | @@ -257,14 +247,15 @@ Ecompile (char const *pattern, size_t size) | ||
| 417 | size_t total = size; | ||
| 418 | char const *motif = pattern; | ||
| 419 | |||
| 420 | + check_utf8 (); | ||
| 421 | if (strcmp (matcher, "awk") == 0) | ||
| 422 | { | ||
| 423 | - re_set_syntax (RE_SYNTAX_AWK); | ||
| 424 | + re_set_syntax (RE_SYNTAX_AWK | (match_icase ? RE_ICASE : 0)); | ||
| 425 | dfasyntax (RE_SYNTAX_AWK, match_icase, eolbyte); | ||
| 426 | } | ||
| 427 | else | ||
| 428 | { | ||
| 429 | - re_set_syntax (RE_SYNTAX_POSIX_EGREP); | ||
| 430 | + re_set_syntax (RE_SYNTAX_POSIX_EGREP | (match_icase ? RE_ICASE : 0)); | ||
| 431 | dfasyntax (RE_SYNTAX_POSIX_EGREP, match_icase, eolbyte); | ||
| 432 | } | ||
| 433 | |||
| 434 | @@ -301,6 +292,10 @@ Ecompile (char const *pattern, size_t size) | ||
| 435 | motif = sep; | ||
| 436 | } while (sep && total != 0); | ||
| 437 | |||
| 438 | + /* Strip trailing newline. */ | ||
| 439 | + if (size && pattern[size - 1] == '\n') | ||
| 440 | + size--; | ||
| 441 | + | ||
| 442 | /* In the match_words and match_lines cases, we use a different pattern | ||
| 443 | for the DFA matcher that will quickly throw out cases that won't work. | ||
| 444 | Then if DFA succeeds we do some hairy stuff using the regex matcher | ||
| 445 | @@ -316,7 +311,7 @@ Ecompile (char const *pattern, size_t size) | ||
| 446 | static char const line_end[] = ")$"; | ||
| 447 | static char const word_beg[] = "(^|[^[:alnum:]_])("; | ||
| 448 | static char const word_end[] = ")([^[:alnum:]_]|$)"; | ||
| 449 | - char *n = malloc (sizeof word_beg - 1 + size + sizeof word_end); | ||
| 450 | + char *n = xmalloc (sizeof word_beg - 1 + size + sizeof word_end); | ||
| 451 | size_t i; | ||
| 452 | strcpy (n, match_lines ? line_beg : word_beg); | ||
| 453 | i = strlen(n); | ||
| 454 | @@ -339,15 +334,34 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact) | ||
| 455 | char eol = eolbyte; | ||
| 456 | int backref, start, len; | ||
| 457 | struct kwsmatch kwsm; | ||
| 458 | - size_t i; | ||
| 459 | + size_t i, ret_val; | ||
| 460 | + static int use_dfa; | ||
| 461 | + static int use_dfa_checked = 0; | ||
| 462 | #ifdef MBS_SUPPORT | ||
| 463 | - char *mb_properties = NULL; | ||
| 464 | + int mb_cur_max = MB_CUR_MAX; | ||
| 465 | + mbstate_t mbs; | ||
| 466 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 467 | #endif /* MBS_SUPPORT */ | ||
| 468 | |||
| 469 | + if (!use_dfa_checked) | ||
| 470 | + { | ||
| 471 | + char *grep_use_dfa = getenv ("GREP_USE_DFA"); | ||
| 472 | + if (!grep_use_dfa) | ||
| 473 | + { | ||
| 474 | #ifdef MBS_SUPPORT | ||
| 475 | - if (MB_CUR_MAX > 1 && kwset) | ||
| 476 | - mb_properties = check_multibyte_string(buf, size); | ||
| 477 | + /* Turn off DFA when processing multibyte input. */ | ||
| 478 | + use_dfa = (MB_CUR_MAX == 1); | ||
| 479 | +#else | ||
| 480 | + use_dfa = 1; | ||
| 481 | #endif /* MBS_SUPPORT */ | ||
| 482 | + } | ||
| 483 | + else | ||
| 484 | + { | ||
| 485 | + use_dfa = atoi (grep_use_dfa); | ||
| 486 | + } | ||
| 487 | + | ||
| 488 | + use_dfa_checked = 1; | ||
| 489 | + } | ||
| 490 | |||
| 491 | buflim = buf + size; | ||
| 492 | |||
| 493 | @@ -358,47 +372,120 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact) | ||
| 494 | if (kwset) | ||
| 495 | { | ||
| 496 | /* Find a possible match using the KWset matcher. */ | ||
| 497 | - size_t offset = kwsexec (kwset, beg, buflim - beg, &kwsm); | ||
| 498 | +#ifdef MBS_SUPPORT | ||
| 499 | + size_t bytes_left = 0; | ||
| 500 | +#endif /* MBS_SUPPORT */ | ||
| 501 | + size_t offset; | ||
| 502 | +#ifdef MBS_SUPPORT | ||
| 503 | + /* kwsexec doesn't work with match_icase and multibyte input. */ | ||
| 504 | + if (match_icase && mb_cur_max > 1) | ||
| 505 | + /* Avoid kwset */ | ||
| 506 | + offset = 0; | ||
| 507 | + else | ||
| 508 | +#endif /* MBS_SUPPORT */ | ||
| 509 | + offset = kwsexec (kwset, beg, buflim - beg, &kwsm); | ||
| 510 | if (offset == (size_t) -1) | ||
| 511 | - { | ||
| 512 | + goto failure; | ||
| 513 | #ifdef MBS_SUPPORT | ||
| 514 | - if (MB_CUR_MAX > 1) | ||
| 515 | - free(mb_properties); | ||
| 516 | -#endif | ||
| 517 | - return (size_t)-1; | ||
| 518 | + if (mb_cur_max > 1 && !using_utf8) | ||
| 519 | + { | ||
| 520 | + bytes_left = offset; | ||
| 521 | + while (bytes_left) | ||
| 522 | + { | ||
| 523 | + size_t mlen = mbrlen (beg, bytes_left, &mbs); | ||
| 524 | + if (mlen == (size_t) -1 || mlen == 0) | ||
| 525 | + { | ||
| 526 | + /* Incomplete character: treat as single-byte. */ | ||
| 527 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 528 | + beg++; | ||
| 529 | + bytes_left--; | ||
| 530 | + continue; | ||
| 531 | + } | ||
| 532 | + | ||
| 533 | + if (mlen == (size_t) -2) | ||
| 534 | + /* Offset points inside multibyte character: | ||
| 535 | + * no good. */ | ||
| 536 | + break; | ||
| 537 | + | ||
| 538 | + beg += mlen; | ||
| 539 | + bytes_left -= mlen; | ||
| 540 | + } | ||
| 541 | } | ||
| 542 | + else | ||
| 543 | +#endif /* MBS_SUPPORT */ | ||
| 544 | beg += offset; | ||
| 545 | /* Narrow down to the line containing the candidate, and | ||
| 546 | run it through DFA. */ | ||
| 547 | end = memchr(beg, eol, buflim - beg); | ||
| 548 | end++; | ||
| 549 | #ifdef MBS_SUPPORT | ||
| 550 | - if (MB_CUR_MAX > 1 && mb_properties[beg - buf] == 0) | ||
| 551 | + if (mb_cur_max > 1 && bytes_left) | ||
| 552 | continue; | ||
| 553 | -#endif | ||
| 554 | +#endif /* MBS_SUPPORT */ | ||
| 555 | while (beg > buf && beg[-1] != eol) | ||
| 556 | --beg; | ||
| 557 | - if (kwsm.index < kwset_exact_matches) | ||
| 558 | - goto success; | ||
| 559 | - if (dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1) | ||
| 560 | + if ( | ||
| 561 | +#ifdef MBS_SUPPORT | ||
| 562 | + !(match_icase && mb_cur_max > 1) && | ||
| 563 | +#endif /* MBS_SUPPORT */ | ||
| 564 | + (kwsm.index < kwset_exact_matches)) | ||
| 565 | + goto success_in_beg_and_end; | ||
| 566 | + if (use_dfa && | ||
| 567 | + dfaexec (&dfa, beg, end - beg, &backref) == (size_t) -1) | ||
| 568 | continue; | ||
| 569 | } | ||
| 570 | else | ||
| 571 | { | ||
| 572 | /* No good fixed strings; start with DFA. */ | ||
| 573 | - size_t offset = dfaexec (&dfa, beg, buflim - beg, &backref); | ||
| 574 | +#ifdef MBS_SUPPORT | ||
| 575 | + size_t bytes_left = 0; | ||
| 576 | +#endif /* MBS_SUPPORT */ | ||
| 577 | + size_t offset = 0; | ||
| 578 | + if (use_dfa) | ||
| 579 | + offset = dfaexec (&dfa, beg, buflim - beg, &backref); | ||
| 580 | if (offset == (size_t) -1) | ||
| 581 | break; | ||
| 582 | /* Narrow down to the line we've found. */ | ||
| 583 | +#ifdef MBS_SUPPORT | ||
| 584 | + if (mb_cur_max > 1 && !using_utf8) | ||
| 585 | + { | ||
| 586 | + bytes_left = offset; | ||
| 587 | + while (bytes_left) | ||
| 588 | + { | ||
| 589 | + size_t mlen = mbrlen (beg, bytes_left, &mbs); | ||
| 590 | + if (mlen == (size_t) -1 || mlen == 0) | ||
| 591 | + { | ||
| 592 | + /* Incomplete character: treat as single-byte. */ | ||
| 593 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 594 | + beg++; | ||
| 595 | + bytes_left--; | ||
| 596 | + continue; | ||
| 597 | + } | ||
| 598 | + | ||
| 599 | + if (mlen == (size_t) -2) | ||
| 600 | + /* Offset points inside multibyte character: | ||
| 601 | + * no good. */ | ||
| 602 | + break; | ||
| 603 | + | ||
| 604 | + beg += mlen; | ||
| 605 | + bytes_left -= mlen; | ||
| 606 | + } | ||
| 607 | + } | ||
| 608 | + else | ||
| 609 | +#endif /* MBS_SUPPORT */ | ||
| 610 | beg += offset; | ||
| 611 | end = memchr (beg, eol, buflim - beg); | ||
| 612 | end++; | ||
| 613 | +#ifdef MBS_SUPPORT | ||
| 614 | + if (mb_cur_max > 1 && bytes_left) | ||
| 615 | + continue; | ||
| 616 | +#endif /* MBS_SUPPORT */ | ||
| 617 | while (beg > buf && beg[-1] != eol) | ||
| 618 | --beg; | ||
| 619 | } | ||
| 620 | /* Successful, no backreferences encountered! */ | ||
| 621 | - if (!backref) | ||
| 622 | - goto success; | ||
| 623 | + if (use_dfa && !backref) | ||
| 624 | + goto success_in_beg_and_end; | ||
| 625 | } | ||
| 626 | else | ||
| 627 | end = beg + size; | ||
| 628 | @@ -413,14 +500,11 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact) | ||
| 629 | end - beg - 1, &(patterns[i].regs)))) | ||
| 630 | { | ||
| 631 | len = patterns[i].regs.end[0] - start; | ||
| 632 | - if (exact) | ||
| 633 | - { | ||
| 634 | - *match_size = len; | ||
| 635 | - return start; | ||
| 636 | - } | ||
| 637 | + if (exact && !match_words) | ||
| 638 | + goto success_in_start_and_len; | ||
| 639 | if ((!match_lines && !match_words) | ||
| 640 | || (match_lines && len == end - beg - 1)) | ||
| 641 | - goto success; | ||
| 642 | + goto success_in_beg_and_end; | ||
| 643 | /* If -w, check if the match aligns with word boundaries. | ||
| 644 | We do this iteratively because: | ||
| 645 | (a) the line may contain more than one occurence of the | ||
| 646 | @@ -431,10 +515,114 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact) | ||
| 647 | if (match_words) | ||
| 648 | while (start >= 0) | ||
| 649 | { | ||
| 650 | - if ((start == 0 || !WCHAR ((unsigned char) beg[start - 1])) | ||
| 651 | - && (len == end - beg - 1 | ||
| 652 | - || !WCHAR ((unsigned char) beg[start + len]))) | ||
| 653 | - goto success; | ||
| 654 | + int lword_match = 0; | ||
| 655 | + if (start == 0) | ||
| 656 | + lword_match = 1; | ||
| 657 | + else | ||
| 658 | + { | ||
| 659 | + assert (start > 0); | ||
| 660 | +#ifdef MBS_SUPPORT | ||
| 661 | + if (mb_cur_max > 1) | ||
| 662 | + { | ||
| 663 | + const char *s; | ||
| 664 | + size_t mr; | ||
| 665 | + wchar_t pwc; | ||
| 666 | + | ||
| 667 | + /* Locate the start of the multibyte character | ||
| 668 | + before the match position (== beg + start). */ | ||
| 669 | + if (using_utf8) | ||
| 670 | + { | ||
| 671 | + /* UTF-8 is a special case: scan backwards | ||
| 672 | + until we find a 7-bit character or a | ||
| 673 | + lead byte. */ | ||
| 674 | + s = beg + start - 1; | ||
| 675 | + while (s > buf | ||
| 676 | + && (unsigned char) *s >= 0x80 | ||
| 677 | + && (unsigned char) *s <= 0xbf) | ||
| 678 | + --s; | ||
| 679 | + } | ||
| 680 | + else | ||
| 681 | + { | ||
| 682 | + /* Scan forwards to find the start of the | ||
| 683 | + last complete character before the | ||
| 684 | + match position. */ | ||
| 685 | + size_t bytes_left = start - 1; | ||
| 686 | + s = beg; | ||
| 687 | + while (bytes_left > 0) | ||
| 688 | + { | ||
| 689 | + mr = mbrlen (s, bytes_left, &mbs); | ||
| 690 | + if (mr == (size_t) -1 || mr == 0) | ||
| 691 | + { | ||
| 692 | + memset (&mbs, '\0', sizeof (mbs)); | ||
| 693 | + s++; | ||
| 694 | + bytes_left--; | ||
| 695 | + continue; | ||
| 696 | + } | ||
| 697 | + if (mr == (size_t) -2) | ||
| 698 | + { | ||
| 699 | + memset (&mbs, '\0', sizeof (mbs)); | ||
| 700 | + break; | ||
| 701 | + } | ||
| 702 | + s += mr; | ||
| 703 | + bytes_left -= mr; | ||
| 704 | + } | ||
| 705 | + } | ||
| 706 | + mr = mbrtowc (&pwc, s, beg + start - s, &mbs); | ||
| 707 | + if (mr == (size_t) -2 || mr == (size_t) -1 || | ||
| 708 | + mr == 0) | ||
| 709 | + { | ||
| 710 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 711 | + lword_match = 1; | ||
| 712 | + } | ||
| 713 | + else if (!(iswalnum (pwc) || pwc == L'_') | ||
| 714 | + && mr == beg + start - s) | ||
| 715 | + lword_match = 1; | ||
| 716 | + } | ||
| 717 | + else | ||
| 718 | +#endif /* MBS_SUPPORT */ | ||
| 719 | + if (!WCHAR ((unsigned char) beg[start - 1])) | ||
| 720 | + lword_match = 1; | ||
| 721 | + } | ||
| 722 | + | ||
| 723 | + if (lword_match) | ||
| 724 | + { | ||
| 725 | + int rword_match = 0; | ||
| 726 | + if (start + len == end - beg - 1) | ||
| 727 | + rword_match = 1; | ||
| 728 | + else | ||
| 729 | + { | ||
| 730 | +#ifdef MBS_SUPPORT | ||
| 731 | + if (mb_cur_max > 1) | ||
| 732 | + { | ||
| 733 | + wchar_t nwc; | ||
| 734 | + int mr; | ||
| 735 | + | ||
| 736 | + mr = mbtowc (&nwc, beg + start + len, | ||
| 737 | + end - beg - start - len - 1); | ||
| 738 | + if (mr <= 0) | ||
| 739 | + { | ||
| 740 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 741 | + rword_match = 1; | ||
| 742 | + } | ||
| 743 | + else if (!iswalnum (nwc) && nwc != L'_') | ||
| 744 | + rword_match = 1; | ||
| 745 | + } | ||
| 746 | + else | ||
| 747 | +#endif /* MBS_SUPPORT */ | ||
| 748 | + if (!WCHAR ((unsigned char) beg[start + len])) | ||
| 749 | + rword_match = 1; | ||
| 750 | + } | ||
| 751 | + | ||
| 752 | + if (rword_match) | ||
| 753 | + { | ||
| 754 | + if (!exact) | ||
| 755 | + /* Returns the whole line. */ | ||
| 756 | + goto success_in_beg_and_end; | ||
| 757 | + else | ||
| 758 | + /* Returns just this word match. */ | ||
| 759 | + goto success_in_start_and_len; | ||
| 760 | + } | ||
| 761 | + } | ||
| 762 | if (len > 0) | ||
| 763 | { | ||
| 764 | /* Try a shorter length anchored at the same place. */ | ||
| 765 | @@ -461,26 +649,154 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact) | ||
| 766 | } | ||
| 767 | } /* for Regex patterns. */ | ||
| 768 | } /* for (beg = end ..) */ | ||
| 769 | -#ifdef MBS_SUPPORT | ||
| 770 | - if (MB_CUR_MAX > 1 && mb_properties) | ||
| 771 | - free (mb_properties); | ||
| 772 | -#endif /* MBS_SUPPORT */ | ||
| 773 | + | ||
| 774 | + failure: | ||
| 775 | return (size_t) -1; | ||
| 776 | |||
| 777 | - success: | ||
| 778 | -#ifdef MBS_SUPPORT | ||
| 779 | - if (MB_CUR_MAX > 1 && mb_properties) | ||
| 780 | - free (mb_properties); | ||
| 781 | -#endif /* MBS_SUPPORT */ | ||
| 782 | - *match_size = end - beg; | ||
| 783 | - return beg - buf; | ||
| 784 | + success_in_beg_and_end: | ||
| 785 | + len = end - beg; | ||
| 786 | + start = beg - buf; | ||
| 787 | + /* FALLTHROUGH */ | ||
| 788 | + | ||
| 789 | + success_in_start_and_len: | ||
| 790 | + *match_size = len; | ||
| 791 | + return start; | ||
| 792 | } | ||
| 793 | |||
| 794 | +#ifdef MBS_SUPPORT | ||
| 795 | +static int f_i_multibyte; /* whether we're using the new -Fi MB method */ | ||
| 796 | +static struct | ||
| 797 | +{ | ||
| 798 | + wchar_t **patterns; | ||
| 799 | + size_t count, maxlen; | ||
| 800 | + unsigned char *match; | ||
| 801 | +} Fimb; | ||
| 802 | +#endif | ||
| 803 | + | ||
| 804 | static void | ||
| 805 | Fcompile (char const *pattern, size_t size) | ||
| 806 | { | ||
| 807 | + int mb_cur_max = MB_CUR_MAX; | ||
| 808 | char const *beg, *lim, *err; | ||
| 809 | |||
| 810 | + check_utf8 (); | ||
| 811 | +#ifdef MBS_SUPPORT | ||
| 812 | + /* Support -F -i for UTF-8 input. */ | ||
| 813 | + if (match_icase && mb_cur_max > 1) | ||
| 814 | + { | ||
| 815 | + mbstate_t mbs; | ||
| 816 | + wchar_t *wcpattern = xmalloc ((size + 1) * sizeof (wchar_t)); | ||
| 817 | + const char *patternend = pattern; | ||
| 818 | + size_t wcsize; | ||
| 819 | + kwset_t fimb_kwset = NULL; | ||
| 820 | + char *starts = NULL; | ||
| 821 | + wchar_t *wcbeg, *wclim; | ||
| 822 | + size_t allocated = 0; | ||
| 823 | + | ||
| 824 | + memset (&mbs, '\0', sizeof (mbs)); | ||
| 825 | +# ifdef __GNU_LIBRARY__ | ||
| 826 | + wcsize = mbsnrtowcs (wcpattern, &patternend, size, size, &mbs); | ||
| 827 | + if (patternend != pattern + size) | ||
| 828 | + wcsize = (size_t) -1; | ||
| 829 | +# else | ||
| 830 | + { | ||
| 831 | + char *patterncopy = xmalloc (size + 1); | ||
| 832 | + | ||
| 833 | + memcpy (patterncopy, pattern, size); | ||
| 834 | + patterncopy[size] = '\0'; | ||
| 835 | + patternend = patterncopy; | ||
| 836 | + wcsize = mbsrtowcs (wcpattern, &patternend, size, &mbs); | ||
| 837 | + if (patternend != patterncopy + size) | ||
| 838 | + wcsize = (size_t) -1; | ||
| 839 | + free (patterncopy); | ||
| 840 | + } | ||
| 841 | +# endif | ||
| 842 | + if (wcsize + 2 <= 2) | ||
| 843 | + { | ||
| 844 | +fimb_fail: | ||
| 845 | + free (wcpattern); | ||
| 846 | + free (starts); | ||
| 847 | + if (fimb_kwset) | ||
| 848 | + kwsfree (fimb_kwset); | ||
| 849 | + free (Fimb.patterns); | ||
| 850 | + Fimb.patterns = NULL; | ||
| 851 | + } | ||
| 852 | + else | ||
| 853 | + { | ||
| 854 | + if (!(fimb_kwset = kwsalloc (NULL))) | ||
| 855 | + error (2, 0, _("memory exhausted")); | ||
| 856 | + | ||
| 857 | + starts = xmalloc (mb_cur_max * 3); | ||
| 858 | + wcbeg = wcpattern; | ||
| 859 | + do | ||
| 860 | + { | ||
| 861 | + int i; | ||
| 862 | + size_t wclen; | ||
| 863 | + | ||
| 864 | + if (Fimb.count >= allocated) | ||
| 865 | + { | ||
| 866 | + if (allocated == 0) | ||
| 867 | + allocated = 128; | ||
| 868 | + else | ||
| 869 | + allocated *= 2; | ||
| 870 | + Fimb.patterns = xrealloc (Fimb.patterns, | ||
| 871 | + sizeof (wchar_t *) * allocated); | ||
| 872 | + } | ||
| 873 | + Fimb.patterns[Fimb.count++] = wcbeg; | ||
| 874 | + for (wclim = wcbeg; | ||
| 875 | + wclim < wcpattern + wcsize && *wclim != L'\n'; ++wclim) | ||
| 876 | + *wclim = towlower (*wclim); | ||
| 877 | + *wclim = L'\0'; | ||
| 878 | + wclen = wclim - wcbeg; | ||
| 879 | + if (wclen > Fimb.maxlen) | ||
| 880 | + Fimb.maxlen = wclen; | ||
| 881 | + if (wclen > 3) | ||
| 882 | + wclen = 3; | ||
| 883 | + if (wclen == 0) | ||
| 884 | + { | ||
| 885 | + if ((err = kwsincr (fimb_kwset, "", 0)) != 0) | ||
| 886 | + error (2, 0, err); | ||
| 887 | + } | ||
| 888 | + else | ||
| 889 | + for (i = 0; i < (1 << wclen); i++) | ||
| 890 | + { | ||
| 891 | + char *p = starts; | ||
| 892 | + int j, k; | ||
| 893 | + | ||
| 894 | + for (j = 0; j < wclen; ++j) | ||
| 895 | + { | ||
| 896 | + wchar_t wc = wcbeg[j]; | ||
| 897 | + if (i & (1 << j)) | ||
| 898 | + { | ||
| 899 | + wc = towupper (wc); | ||
| 900 | + if (wc == wcbeg[j]) | ||
| 901 | + continue; | ||
| 902 | + } | ||
| 903 | + k = wctomb (p, wc); | ||
| 904 | + if (k <= 0) | ||
| 905 | + goto fimb_fail; | ||
| 906 | + p += k; | ||
| 907 | + } | ||
| 908 | + if ((err = kwsincr (fimb_kwset, starts, p - starts)) != 0) | ||
| 909 | + error (2, 0, err); | ||
| 910 | + } | ||
| 911 | + if (wclim < wcpattern + wcsize) | ||
| 912 | + ++wclim; | ||
| 913 | + wcbeg = wclim; | ||
| 914 | + } | ||
| 915 | + while (wcbeg < wcpattern + wcsize); | ||
| 916 | + f_i_multibyte = 1; | ||
| 917 | + kwset = fimb_kwset; | ||
| 918 | + free (starts); | ||
| 919 | + Fimb.match = xmalloc (Fimb.count); | ||
| 920 | + if ((err = kwsprep (kwset)) != 0) | ||
| 921 | + error (2, 0, err); | ||
| 922 | + return; | ||
| 923 | + } | ||
| 924 | + } | ||
| 925 | +#endif /* MBS_SUPPORT */ | ||
| 926 | + | ||
| 927 | + | ||
| 928 | kwsinit (); | ||
| 929 | beg = pattern; | ||
| 930 | do | ||
| 931 | @@ -499,6 +815,76 @@ Fcompile (char const *pattern, size_t size) | ||
| 932 | error (2, 0, err); | ||
| 933 | } | ||
| 934 | |||
| 935 | +#ifdef MBS_SUPPORT | ||
| 936 | +static int | ||
| 937 | +Fimbexec (const char *buf, size_t size, size_t *plen, int exact) | ||
| 938 | +{ | ||
| 939 | + size_t len, letter, i; | ||
| 940 | + int ret = -1; | ||
| 941 | + mbstate_t mbs; | ||
| 942 | + wchar_t wc; | ||
| 943 | + int patterns_left; | ||
| 944 | + | ||
| 945 | + assert (match_icase && f_i_multibyte == 1); | ||
| 946 | + assert (MB_CUR_MAX > 1); | ||
| 947 | + | ||
| 948 | + memset (&mbs, '\0', sizeof (mbs)); | ||
| 949 | + memset (Fimb.match, '\1', Fimb.count); | ||
| 950 | + letter = len = 0; | ||
| 951 | + patterns_left = 1; | ||
| 952 | + while (patterns_left && len <= size) | ||
| 953 | + { | ||
| 954 | + size_t c; | ||
| 955 | + | ||
| 956 | + patterns_left = 0; | ||
| 957 | + if (len < size) | ||
| 958 | + { | ||
| 959 | + c = mbrtowc (&wc, buf + len, size - len, &mbs); | ||
| 960 | + if (c + 2 <= 2) | ||
| 961 | + return ret; | ||
| 962 | + | ||
| 963 | + wc = towlower (wc); | ||
| 964 | + } | ||
| 965 | + else | ||
| 966 | + { | ||
| 967 | + c = 1; | ||
| 968 | + wc = L'\0'; | ||
| 969 | + } | ||
| 970 | + | ||
| 971 | + for (i = 0; i < Fimb.count; i++) | ||
| 972 | + { | ||
| 973 | + if (Fimb.match[i]) | ||
| 974 | + { | ||
| 975 | + if (Fimb.patterns[i][letter] == L'\0') | ||
| 976 | + { | ||
| 977 | + /* Found a match. */ | ||
| 978 | + *plen = len; | ||
| 979 | + if (!exact && !match_words) | ||
| 980 | + return 0; | ||
| 981 | + else | ||
| 982 | + { | ||
| 983 | + /* For -w or exact look for longest match. */ | ||
| 984 | + ret = 0; | ||
| 985 | + Fimb.match[i] = '\0'; | ||
| 986 | + continue; | ||
| 987 | + } | ||
| 988 | + } | ||
| 989 | + | ||
| 990 | + if (Fimb.patterns[i][letter] == wc) | ||
| 991 | + patterns_left = 1; | ||
| 992 | + else | ||
| 993 | + Fimb.match[i] = '\0'; | ||
| 994 | + } | ||
| 995 | + } | ||
| 996 | + | ||
| 997 | + len += c; | ||
| 998 | + letter++; | ||
| 999 | + } | ||
| 1000 | + | ||
| 1001 | + return ret; | ||
| 1002 | +} | ||
| 1003 | +#endif /* MBS_SUPPORT */ | ||
| 1004 | + | ||
| 1005 | static size_t | ||
| 1006 | Fexecute (char const *buf, size_t size, size_t *match_size, int exact) | ||
| 1007 | { | ||
| 1008 | @@ -506,88 +892,268 @@ Fexecute (char const *buf, size_t size, size_t *match_size, int exact) | ||
| 1009 | register size_t len; | ||
| 1010 | char eol = eolbyte; | ||
| 1011 | struct kwsmatch kwsmatch; | ||
| 1012 | + size_t ret_val; | ||
| 1013 | #ifdef MBS_SUPPORT | ||
| 1014 | - char *mb_properties; | ||
| 1015 | - if (MB_CUR_MAX > 1) | ||
| 1016 | - mb_properties = check_multibyte_string (buf, size); | ||
| 1017 | + int mb_cur_max = MB_CUR_MAX; | ||
| 1018 | + mbstate_t mbs; | ||
| 1019 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 1020 | + const char *last_char = NULL; | ||
| 1021 | #endif /* MBS_SUPPORT */ | ||
| 1022 | |||
| 1023 | - for (beg = buf; beg <= buf + size; ++beg) | ||
| 1024 | + for (beg = buf; beg < buf + size; ++beg) | ||
| 1025 | { | ||
| 1026 | - size_t offset = kwsexec (kwset, beg, buf + size - beg, &kwsmatch); | ||
| 1027 | + size_t offset; | ||
| 1028 | + offset = kwsexec (kwset, beg, buf + size - beg, &kwsmatch); | ||
| 1029 | + | ||
| 1030 | if (offset == (size_t) -1) | ||
| 1031 | - { | ||
| 1032 | + goto failure; | ||
| 1033 | #ifdef MBS_SUPPORT | ||
| 1034 | - if (MB_CUR_MAX > 1) | ||
| 1035 | - free(mb_properties); | ||
| 1036 | -#endif /* MBS_SUPPORT */ | ||
| 1037 | - return offset; | ||
| 1038 | + if (mb_cur_max > 1 && !using_utf8) | ||
| 1039 | + { | ||
| 1040 | + size_t bytes_left = offset; | ||
| 1041 | + while (bytes_left) | ||
| 1042 | + { | ||
| 1043 | + size_t mlen = mbrlen (beg, bytes_left, &mbs); | ||
| 1044 | + | ||
| 1045 | + last_char = beg; | ||
| 1046 | + if (mlen == (size_t) -1 || mlen == 0) | ||
| 1047 | + { | ||
| 1048 | + /* Incomplete character: treat as single-byte. */ | ||
| 1049 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 1050 | + beg++; | ||
| 1051 | + bytes_left--; | ||
| 1052 | + continue; | ||
| 1053 | + } | ||
| 1054 | + | ||
| 1055 | + if (mlen == (size_t) -2) | ||
| 1056 | + /* Offset points inside multibyte character: no good. */ | ||
| 1057 | + break; | ||
| 1058 | + | ||
| 1059 | + beg += mlen; | ||
| 1060 | + bytes_left -= mlen; | ||
| 1061 | + } | ||
| 1062 | + | ||
| 1063 | + if (bytes_left) | ||
| 1064 | + continue; | ||
| 1065 | } | ||
| 1066 | -#ifdef MBS_SUPPORT | ||
| 1067 | - if (MB_CUR_MAX > 1 && mb_properties[offset+beg-buf] == 0) | ||
| 1068 | - continue; /* It is a part of multibyte character. */ | ||
| 1069 | + else | ||
| 1070 | #endif /* MBS_SUPPORT */ | ||
| 1071 | beg += offset; | ||
| 1072 | - len = kwsmatch.size[0]; | ||
| 1073 | - if (exact) | ||
| 1074 | - { | ||
| 1075 | - *match_size = len; | ||
| 1076 | #ifdef MBS_SUPPORT | ||
| 1077 | - if (MB_CUR_MAX > 1) | ||
| 1078 | - free (mb_properties); | ||
| 1079 | + /* For f_i_multibyte, the string at beg now matches first 3 chars of | ||
| 1080 | + one of the search strings (less if there are shorter search strings). | ||
| 1081 | + See if this is a real match. */ | ||
| 1082 | + if (f_i_multibyte | ||
| 1083 | + && Fimbexec (beg, buf + size - beg, &kwsmatch.size[0], exact)) | ||
| 1084 | + goto next_char; | ||
| 1085 | #endif /* MBS_SUPPORT */ | ||
| 1086 | - return beg - buf; | ||
| 1087 | - } | ||
| 1088 | + len = kwsmatch.size[0]; | ||
| 1089 | + if (exact && !match_words) | ||
| 1090 | + goto success_in_beg_and_len; | ||
| 1091 | if (match_lines) | ||
| 1092 | { | ||
| 1093 | if (beg > buf && beg[-1] != eol) | ||
| 1094 | - continue; | ||
| 1095 | + goto next_char; | ||
| 1096 | if (beg + len < buf + size && beg[len] != eol) | ||
| 1097 | - continue; | ||
| 1098 | + goto next_char; | ||
| 1099 | goto success; | ||
| 1100 | } | ||
| 1101 | else if (match_words) | ||
| 1102 | - for (try = beg; len; ) | ||
| 1103 | - { | ||
| 1104 | - if (try > buf && WCHAR((unsigned char) try[-1])) | ||
| 1105 | - break; | ||
| 1106 | - if (try + len < buf + size && WCHAR((unsigned char) try[len])) | ||
| 1107 | - { | ||
| 1108 | - offset = kwsexec (kwset, beg, --len, &kwsmatch); | ||
| 1109 | - if (offset == (size_t) -1) | ||
| 1110 | - { | ||
| 1111 | + { | ||
| 1112 | + while (len) | ||
| 1113 | + { | ||
| 1114 | + int word_match = 0; | ||
| 1115 | + if (beg > buf) | ||
| 1116 | + { | ||
| 1117 | #ifdef MBS_SUPPORT | ||
| 1118 | - if (MB_CUR_MAX > 1) | ||
| 1119 | - free (mb_properties); | ||
| 1120 | + if (mb_cur_max > 1) | ||
| 1121 | + { | ||
| 1122 | + const char *s; | ||
| 1123 | + int mr; | ||
| 1124 | + wchar_t pwc; | ||
| 1125 | + | ||
| 1126 | + if (using_utf8) | ||
| 1127 | + { | ||
| 1128 | + s = beg - 1; | ||
| 1129 | + while (s > buf | ||
| 1130 | + && (unsigned char) *s >= 0x80 | ||
| 1131 | + && (unsigned char) *s <= 0xbf) | ||
| 1132 | + --s; | ||
| 1133 | + } | ||
| 1134 | + else | ||
| 1135 | + s = last_char; | ||
| 1136 | + mr = mbtowc (&pwc, s, beg - s); | ||
| 1137 | + if (mr <= 0) | ||
| 1138 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 1139 | + else if ((iswalnum (pwc) || pwc == L'_') | ||
| 1140 | + && mr == (int) (beg - s)) | ||
| 1141 | + goto next_char; | ||
| 1142 | + } | ||
| 1143 | + else | ||
| 1144 | #endif /* MBS_SUPPORT */ | ||
| 1145 | - return offset; | ||
| 1146 | - } | ||
| 1147 | - try = beg + offset; | ||
| 1148 | - len = kwsmatch.size[0]; | ||
| 1149 | - } | ||
| 1150 | - else | ||
| 1151 | - goto success; | ||
| 1152 | - } | ||
| 1153 | + if (WCHAR ((unsigned char) beg[-1])) | ||
| 1154 | + goto next_char; | ||
| 1155 | + } | ||
| 1156 | +#ifdef MBS_SUPPORT | ||
| 1157 | + if (mb_cur_max > 1) | ||
| 1158 | + { | ||
| 1159 | + wchar_t nwc; | ||
| 1160 | + int mr; | ||
| 1161 | + | ||
| 1162 | + mr = mbtowc (&nwc, beg + len, buf + size - beg - len); | ||
| 1163 | + if (mr <= 0) | ||
| 1164 | + { | ||
| 1165 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 1166 | + word_match = 1; | ||
| 1167 | + } | ||
| 1168 | + else if (!iswalnum (nwc) && nwc != L'_') | ||
| 1169 | + word_match = 1; | ||
| 1170 | + } | ||
| 1171 | + else | ||
| 1172 | +#endif /* MBS_SUPPORT */ | ||
| 1173 | + if (beg + len >= buf + size || !WCHAR ((unsigned char) beg[len])) | ||
| 1174 | + word_match = 1; | ||
| 1175 | + if (word_match) | ||
| 1176 | + { | ||
| 1177 | + if (!exact) | ||
| 1178 | + /* Returns the whole line now we know there's a word match. */ | ||
| 1179 | + goto success; | ||
| 1180 | + else | ||
| 1181 | + /* Returns just this word match. */ | ||
| 1182 | + goto success_in_beg_and_len; | ||
| 1183 | + } | ||
| 1184 | + if (len > 0) | ||
| 1185 | + { | ||
| 1186 | + /* Try a shorter length anchored at the same place. */ | ||
| 1187 | + --len; | ||
| 1188 | + offset = kwsexec (kwset, beg, len, &kwsmatch); | ||
| 1189 | + | ||
| 1190 | + if (offset == -1) | ||
| 1191 | + goto next_char; /* Try a different anchor. */ | ||
| 1192 | +#ifdef MBS_SUPPORT | ||
| 1193 | + if (mb_cur_max > 1 && !using_utf8) | ||
| 1194 | + { | ||
| 1195 | + size_t bytes_left = offset; | ||
| 1196 | + while (bytes_left) | ||
| 1197 | + { | ||
| 1198 | + size_t mlen = mbrlen (beg, bytes_left, &mbs); | ||
| 1199 | + | ||
| 1200 | + last_char = beg; | ||
| 1201 | + if (mlen == (size_t) -1 || mlen == 0) | ||
| 1202 | + { | ||
| 1203 | + /* Incomplete character: treat as single-byte. */ | ||
| 1204 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 1205 | + beg++; | ||
| 1206 | + bytes_left--; | ||
| 1207 | + continue; | ||
| 1208 | + } | ||
| 1209 | + | ||
| 1210 | + if (mlen == (size_t) -2) | ||
| 1211 | + { | ||
| 1212 | + /* Offset points inside multibyte character: | ||
| 1213 | + * no good. */ | ||
| 1214 | + break; | ||
| 1215 | + } | ||
| 1216 | + | ||
| 1217 | + beg += mlen; | ||
| 1218 | + bytes_left -= mlen; | ||
| 1219 | + } | ||
| 1220 | + | ||
| 1221 | + if (bytes_left) | ||
| 1222 | + { | ||
| 1223 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 1224 | + goto next_char; /* Try a different anchor. */ | ||
| 1225 | + } | ||
| 1226 | + } | ||
| 1227 | + else | ||
| 1228 | +#endif /* MBS_SUPPORT */ | ||
| 1229 | + beg += offset; | ||
| 1230 | +#ifdef MBS_SUPPORT | ||
| 1231 | + /* The string at beg now matches first 3 chars of one of | ||
| 1232 | + the search strings (less if there are shorter search | ||
| 1233 | + strings). See if this is a real match. */ | ||
| 1234 | + if (f_i_multibyte | ||
| 1235 | + && Fimbexec (beg, len - offset, &kwsmatch.size[0], | ||
| 1236 | + exact)) | ||
| 1237 | + goto next_char; | ||
| 1238 | +#endif /* MBS_SUPPORT */ | ||
| 1239 | + len = kwsmatch.size[0]; | ||
| 1240 | + } | ||
| 1241 | + } | ||
| 1242 | + } | ||
| 1243 | else | ||
| 1244 | goto success; | ||
| 1245 | - } | ||
| 1246 | - | ||
| 1247 | +next_char:; | ||
| 1248 | #ifdef MBS_SUPPORT | ||
| 1249 | - if (MB_CUR_MAX > 1) | ||
| 1250 | - free (mb_properties); | ||
| 1251 | + /* Advance to next character. For MB_CUR_MAX == 1 case this is handled | ||
| 1252 | + by ++beg above. */ | ||
| 1253 | + if (mb_cur_max > 1) | ||
| 1254 | + { | ||
| 1255 | + if (using_utf8) | ||
| 1256 | + { | ||
| 1257 | + unsigned char c = *beg; | ||
| 1258 | + if (c >= 0xc2) | ||
| 1259 | + { | ||
| 1260 | + if (c < 0xe0) | ||
| 1261 | + ++beg; | ||
| 1262 | + else if (c < 0xf0) | ||
| 1263 | + beg += 2; | ||
| 1264 | + else if (c < 0xf8) | ||
| 1265 | + beg += 3; | ||
| 1266 | + else if (c < 0xfc) | ||
| 1267 | + beg += 4; | ||
| 1268 | + else if (c < 0xfe) | ||
| 1269 | + beg += 5; | ||
| 1270 | + } | ||
| 1271 | + } | ||
| 1272 | + else | ||
| 1273 | + { | ||
| 1274 | + size_t l = mbrlen (beg, buf + size - beg, &mbs); | ||
| 1275 | + | ||
| 1276 | + last_char = beg; | ||
| 1277 | + if (l + 2 >= 2) | ||
| 1278 | + beg += l - 1; | ||
| 1279 | + else | ||
| 1280 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 1281 | + } | ||
| 1282 | + } | ||
| 1283 | #endif /* MBS_SUPPORT */ | ||
| 1284 | + } | ||
| 1285 | + | ||
| 1286 | + failure: | ||
| 1287 | return -1; | ||
| 1288 | |||
| 1289 | success: | ||
| 1290 | +#ifdef MBS_SUPPORT | ||
| 1291 | + if (mb_cur_max > 1 && !using_utf8) | ||
| 1292 | + { | ||
| 1293 | + end = beg + len; | ||
| 1294 | + while (end < buf + size) | ||
| 1295 | + { | ||
| 1296 | + size_t mlen = mbrlen (end, buf + size - end, &mbs); | ||
| 1297 | + if (mlen == (size_t) -1 || mlen == (size_t) -2 || mlen == 0) | ||
| 1298 | + { | ||
| 1299 | + memset (&mbs, '\0', sizeof (mbstate_t)); | ||
| 1300 | + mlen = 1; | ||
| 1301 | + } | ||
| 1302 | + if (mlen == 1 && *end == eol) | ||
| 1303 | + break; | ||
| 1304 | + | ||
| 1305 | + end += mlen; | ||
| 1306 | + } | ||
| 1307 | + } | ||
| 1308 | + else | ||
| 1309 | +#endif /* MBS_SUPPORT */ | ||
| 1310 | end = memchr (beg + len, eol, (buf + size) - (beg + len)); | ||
| 1311 | + | ||
| 1312 | end++; | ||
| 1313 | while (buf < beg && beg[-1] != eol) | ||
| 1314 | --beg; | ||
| 1315 | - *match_size = end - beg; | ||
| 1316 | -#ifdef MBS_SUPPORT | ||
| 1317 | - if (MB_CUR_MAX > 1) | ||
| 1318 | - free (mb_properties); | ||
| 1319 | -#endif /* MBS_SUPPORT */ | ||
| 1320 | + len = end - beg; | ||
| 1321 | + /* FALLTHROUGH */ | ||
| 1322 | + | ||
| 1323 | + success_in_beg_and_len: | ||
| 1324 | + *match_size = len; | ||
| 1325 | return beg - buf; | ||
| 1326 | } | ||
| 1327 | |||
| 1328 | @@ -701,8 +1267,9 @@ Pexecute (char const *buf, size_t size, size_t *match_size, int exact) | ||
| 1329 | char eol = eolbyte; | ||
| 1330 | if (!exact) | ||
| 1331 | { | ||
| 1332 | - end = memchr (end, eol, buflim - end); | ||
| 1333 | - end++; | ||
| 1334 | + while (end < buflim) | ||
| 1335 | + if (*end++ == eol) | ||
| 1336 | + break; | ||
| 1337 | while (buf < beg && beg[-1] != eol) | ||
| 1338 | --beg; | ||
| 1339 | } | ||
| 1340 | -- | ||
| 1341 | 1.8.4.2 | ||
| 1342 | |||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch b/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch deleted file mode 100644 index d9b1e35e72..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/grep_fix_for_automake-1.12.patch +++ /dev/null | |||
| @@ -1,52 +0,0 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | automake 1.12 has depricated automatic de-ANSI-fication support | ||
| 4 | |||
| 5 | this patch avoids these kinds of errors: | ||
| 6 | |||
| 7 | | configure.in:33: error: automatic de-ANSI-fication support has been removed | ||
| 8 | | /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/aclocal-1.12/protos.m4:12: AM_C_PROTOTYPES is expanded from... | ||
| 9 | | configure.in:33: the top level | ||
| 10 | | autom4te: m4 failed with exit status: 1 | ||
| 11 | ... | ||
| 12 | | lib/Makefile.am:2: error: automatic de-ANSI-fication support has been removed | ||
| 13 | | src/Makefile.am:2: error: automatic de-ANSI-fication support has been removed | ||
| 14 | | autoreconf: automake failed with exit status: 1 | ||
| 15 | |||
| 16 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
| 17 | 2012/05/04 | ||
| 18 | |||
| 19 | Index: grep-2.5.1a/configure.in | ||
| 20 | =================================================================== | ||
| 21 | --- grep-2.5.1a.orig/configure.in | ||
| 22 | +++ grep-2.5.1a/configure.in | ||
| 23 | @@ -30,7 +30,6 @@ AC_PROG_RANLIB | ||
| 24 | |||
| 25 | dnl Checks for typedefs, structures, and compiler characteristics. | ||
| 26 | AC_SYS_LARGEFILE | ||
| 27 | -AM_C_PROTOTYPES | ||
| 28 | AC_TYPE_SIZE_T | ||
| 29 | AC_CHECK_TYPE(ssize_t, int) | ||
| 30 | AC_C_CONST | ||
| 31 | Index: grep-2.5.1a/lib/Makefile.am | ||
| 32 | =================================================================== | ||
| 33 | --- grep-2.5.1a.orig/lib/Makefile.am | ||
| 34 | +++ grep-2.5.1a/lib/Makefile.am | ||
| 35 | @@ -1,5 +1,5 @@ | ||
| 36 | # | ||
| 37 | -AUTOMAKE_OPTIONS = ../src/ansi2knr | ||
| 38 | +AUTOMAKE_OPTIONS = | ||
| 39 | |||
| 40 | SUBDIRS = posix | ||
| 41 | |||
| 42 | Index: grep-2.5.1a/src/Makefile.am | ||
| 43 | =================================================================== | ||
| 44 | --- grep-2.5.1a.orig/src/Makefile.am | ||
| 45 | +++ grep-2.5.1a/src/Makefile.am | ||
| 46 | @@ -1,5 +1,5 @@ | ||
| 47 | ## Process this file with automake to create Makefile.in | ||
| 48 | -AUTOMAKE_OPTIONS = ansi2knr no-dependencies | ||
| 49 | +AUTOMAKE_OPTIONS = no-dependencies | ||
| 50 | |||
| 51 | LN = ln | ||
| 52 | |||
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch b/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch deleted file mode 100644 index de054fc755..0000000000 --- a/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch +++ /dev/null | |||
| @@ -1,55 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [licensing] | ||
| 2 | |||
| 3 | # Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which | ||
| 4 | # doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have | ||
| 5 | # mempcpy, we'll just use that instead. | ||
| 6 | # Patch source: OpenEmbedded | ||
| 7 | |||
| 8 | Index: grep-2.5.1/intl/localealias.c | ||
| 9 | =================================================================== | ||
| 10 | --- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100 | ||
| 11 | +++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000 | ||
| 12 | @@ -65,7 +65,7 @@ | ||
| 13 | # define strcasecmp __strcasecmp | ||
| 14 | |||
| 15 | # ifndef mempcpy | ||
| 16 | -# define mempcpy __mempcpy | ||
| 17 | +# error "mempcpy not detected" | ||
| 18 | # endif | ||
| 19 | # define HAVE_MEMPCPY 1 | ||
| 20 | # define HAVE___FSETLOCKING 1 | ||
| 21 | Index: grep-2.5.1/lib/getopt.c | ||
| 22 | =================================================================== | ||
| 23 | --- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100 | ||
| 24 | +++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000 | ||
| 25 | @@ -326,7 +326,7 @@ | ||
| 26 | nonoption_flags_len = nonoption_flags_max_len = 0; | ||
| 27 | else | ||
| 28 | { | ||
| 29 | - memset (__mempcpy (new_str, __getopt_nonoption_flags, | ||
| 30 | + memset (mempcpy (new_str, __getopt_nonoption_flags, | ||
| 31 | nonoption_flags_max_len), | ||
| 32 | '\0', top + 1 - nonoption_flags_max_len); | ||
| 33 | nonoption_flags_max_len = top + 1; | ||
| 34 | @@ -437,7 +437,7 @@ | ||
| 35 | if (__getopt_nonoption_flags == NULL) | ||
| 36 | nonoption_flags_max_len = -1; | ||
| 37 | else | ||
| 38 | - memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), | ||
| 39 | + memset (mempcpy (__getopt_nonoption_flags, orig_str, len), | ||
| 40 | '\0', nonoption_flags_max_len - len); | ||
| 41 | } | ||
| 42 | } | ||
| 43 | Index: grep-2.5.1/lib/regex.c | ||
| 44 | =================================================================== | ||
| 45 | --- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000 | ||
| 46 | +++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000 | ||
| 47 | @@ -7842,7 +7842,7 @@ | ||
| 48 | if (msg_size > errbuf_size) | ||
| 49 | { | ||
| 50 | #if defined HAVE_MEMPCPY || defined _LIBC | ||
| 51 | - *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; | ||
| 52 | + *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; | ||
| 53 | #else | ||
| 54 | memcpy (errbuf, msg, errbuf_size - 1); | ||
| 55 | errbuf[errbuf_size - 1] = 0; | ||
diff --git a/meta/recipes-extended/grep/grep_2.5.1a.bb b/meta/recipes-extended/grep/grep_2.5.1a.bb deleted file mode 100644 index 5a2da28327..0000000000 --- a/meta/recipes-extended/grep/grep_2.5.1a.bb +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | SUMMARY = "Pattern matching utilities" | ||
| 2 | DESCRIPTION = "The GNU versions of commonly used grep utilities. The grep command searches one or more input \ | ||
| 3 | files for lines containing a match to a specified pattern." | ||
| 4 | SECTION = "console/utils" | ||
| 5 | LICENSE = "GPLv2" | ||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" | ||
| 7 | |||
| 8 | PR = "r2" | ||
| 9 | |||
| 10 | SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.bz2 \ | ||
| 11 | file://uclibc-fix.patch \ | ||
| 12 | file://grep_fix_for_automake-1.12.patch \ | ||
| 13 | file://gettext.patch \ | ||
| 14 | file://fix64-int-to-pointer.patch \ | ||
| 15 | file://Makevars \ | ||
| 16 | file://grep-CVE-2012-5667.patch \ | ||
| 17 | file://fix-for-texinfo-5.1.patch \ | ||
| 18 | file://grep-egrep-fgrep-Fix-LSB-NG-cases.patch \ | ||
| 19 | " | ||
| 20 | |||
| 21 | SRC_URI[md5sum] = "52202fe462770fa6be1bb667bd6cf30c" | ||
| 22 | SRC_URI[sha256sum] = "38c8a2bb9223d1fb1b10bdd607cf44830afc92fd451ac4cd07619bf92bdd3132" | ||
| 23 | |||
| 24 | inherit autotools gettext texinfo | ||
| 25 | |||
| 26 | EXTRA_OECONF_INCLUDED_REGEX = "--without-included-regex" | ||
| 27 | EXTRA_OECONF_INCLUDED_REGEX_libc-musl = "--with-included-regex" | ||
| 28 | |||
| 29 | EXTRA_OECONF = "--disable-perl-regexp \ | ||
| 30 | ${EXTRA_OECONF_INCLUDED_REGEX}" | ||
| 31 | |||
| 32 | CFLAGS += "-D PROTOTYPES" | ||
| 33 | do_configure_prepend () { | ||
| 34 | rm -f ${S}/m4/init.m4 | ||
| 35 | cp -f ${WORKDIR}/Makevars ${S}/po/ | ||
| 36 | } | ||
| 37 | |||
| 38 | do_install () { | ||
| 39 | autotools_do_install | ||
| 40 | install -d ${D}${base_bindir} | ||
| 41 | mv ${D}${bindir}/grep ${D}${base_bindir}/grep | ||
| 42 | mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep | ||
| 43 | mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep | ||
| 44 | rmdir ${D}${bindir}/ | ||
| 45 | } | ||
| 46 | |||
| 47 | inherit update-alternatives | ||
| 48 | |||
| 49 | ALTERNATIVE_PRIORITY = "100" | ||
| 50 | |||
| 51 | ALTERNATIVE_${PN} = "grep egrep fgrep" | ||
| 52 | ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep" | ||
| 53 | ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep" | ||
| 54 | ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep" | ||
| 55 | |||
| 56 | export CONFIG_SHELL="/bin/sh" | ||
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch b/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch deleted file mode 100644 index 4b0176fcdd..0000000000 --- a/meta/recipes-extended/groff/groff-1.18.1.4/fix-narrowing-conversion-error.patch +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | From fc289ab69c6d7e4ad489172509a85f68afec43ea Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Fri, 29 Jul 2016 03:19:39 -0400 | ||
| 4 | Subject: [PATCH] fix narrowing conversion error | ||
| 5 | |||
| 6 | While gcc6 used, build old groff (for anti-GPLv3 reasons) failed: | ||
| 7 | ..... | ||
| 8 | |groff-1.18.1.4/src/devices/grolbp/charset.h:69:1: error: narrowing | ||
| 9 | conversion of '130' from 'int' to 'char' inside { } [-Wnarrowing] | ||
| 10 | ...... | ||
| 11 | |||
| 12 | In upstream git://git.savannah.gnu.org/groff.git, | ||
| 13 | the following commit fix the issue, but the license is GPLV3, | ||
| 14 | we could not backport it to the old groff which license is GPLV2. | ||
| 15 | ... | ||
| 16 | commit d180038ae0da19655bc2760ae2043efa0550a76c | ||
| 17 | Author: Werner LEMBERG <wl@gnu.org> | ||
| 18 | Date: Wed Apr 16 21:11:07 2003 +0000 | ||
| 19 | * src/devices/grolbp/charset.h (symset): Use `unsigned char'. | ||
| 20 | ... | ||
| 21 | |||
| 22 | We use another different way to fix the issue. | ||
| 23 | |||
| 24 | Upstream-Status: Pending | ||
| 25 | |||
| 26 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 27 | --- | ||
| 28 | src/devices/grolbp/charset.h | 2 +- | ||
| 29 | src/devices/grolbp/lbp.cc | 4 ++-- | ||
| 30 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
| 31 | |||
| 32 | diff --git a/src/devices/grolbp/charset.h b/src/devices/grolbp/charset.h | ||
| 33 | index adc76f4..e9c6c5b 100644 | ||
| 34 | --- a/src/devices/grolbp/charset.h | ||
| 35 | +++ b/src/devices/grolbp/charset.h | ||
| 36 | @@ -1,6 +1,6 @@ | ||
| 37 | // Definition of the WP54 character set | ||
| 38 | |||
| 39 | -char symset[] = { | ||
| 40 | +int symset[] = { | ||
| 41 | 0x57,0x50,0x35,0x34,0x00,0x41,0x76,0x61,0x6e,0x74,0x47,0x61, | ||
| 42 | 0x72,0x64,0x65,0x2d,0x42,0x6f,0x6f,0x6b,0x00,0x41,0x76, | ||
| 43 | 0x61,0x6e,0x74,0x47,0x61,0x72,0x64,0x65,0x2d,0x44,0x65, | ||
| 44 | diff --git a/src/devices/grolbp/lbp.cc b/src/devices/grolbp/lbp.cc | ||
| 45 | index 76db32a..00d4ca7 100644 | ||
| 46 | --- a/src/devices/grolbp/lbp.cc | ||
| 47 | +++ b/src/devices/grolbp/lbp.cc | ||
| 48 | @@ -152,8 +152,8 @@ static void wp54charset() | ||
| 49 | { | ||
| 50 | unsigned int i; | ||
| 51 | lbpputs("\033[714;100;29;0;32;120.}"); | ||
| 52 | - for (i = 0; i < sizeof(symset); i++) | ||
| 53 | - lbpputc(symset[i]); | ||
| 54 | + for (i = 0; i < sizeof(symset)/sizeof(symset[0]); i++) | ||
| 55 | + lbpputc((char)symset[i]&0xFF); | ||
| 56 | lbpputs("\033[100;0 D"); | ||
| 57 | return; | ||
| 58 | } | ||
| 59 | -- | ||
| 60 | 2.8.1 | ||
| 61 | |||
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch deleted file mode 100644 index 559ae72898..0000000000 --- a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [embedded] | ||
| 2 | |||
| 3 | Signed-off-by: Ming Liu <ming.liu@windriver.com> | ||
| 4 | --- | ||
| 5 | Makefile.sub | 10 +++++----- | ||
| 6 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
| 7 | |||
| 8 | --- a/contrib/groffer/Makefile.sub | ||
| 9 | +++ b/contrib/groffer/Makefile.sub | ||
| 10 | @@ -38,16 +38,16 @@ groffer: groffer.sh groffer2.sh version. | ||
| 11 | $(RM) $@; | ||
| 12 | sed \ | ||
| 13 | -e "s|@g@|$(g)|g" \ | ||
| 14 | - -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \ | ||
| 15 | + -e "s|@BINDIR@|$(bindir)|g" \ | ||
| 16 | -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \ | ||
| 17 | -e "s|@VERSION@|$(version)$(revision)|g" \ | ||
| 18 | $(srcdir)/groffer.sh >$@; | ||
| 19 | chmod +x $@ | ||
| 20 | |||
| 21 | install_data: groffer | ||
| 22 | - -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir) | ||
| 23 | - -$(RM) $(DESTDIR)$(bindir)/groffer | ||
| 24 | - $(INSTALL_SCRIPT) groffer $(DESTDIR)$(bindir)/groffer | ||
| 25 | + -test -d $(bindir) || $(mkinstalldirs) $(bindir) | ||
| 26 | + -$(RM) $(bindir)/groffer | ||
| 27 | + $(INSTALL_SCRIPT) groffer $(bindir)/groffer | ||
| 28 | -test -d $(DESTDIR)$(libdir)/groff/groffer || \ | ||
| 29 | $(mkinstalldirs) $(DESTDIR)$(libdir)/groff/groffer | ||
| 30 | -$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh | ||
| 31 | @@ -58,7 +58,7 @@ install_data: groffer | ||
| 32 | $(DESTDIR)$(libdir)/groff/groffer/version.sh | ||
| 33 | |||
| 34 | uninstall_sub: | ||
| 35 | - -$(RM) $(DESTDIR)$(bindir)/groffer | ||
| 36 | + -$(RM) $(bindir)/groffer | ||
| 37 | -$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh | ||
| 38 | -$(RM) $(DESTDIR)$(libdir)/groff/groffer/version.sh | ||
| 39 | -rmdir $(DESTDIR)$(libdir)/groff/groffer | ||
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch b/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch deleted file mode 100644 index c24eff9af5..0000000000 --- a/meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-remove-mom.patch +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | |||
| 2 | Upstream-Status: Inappropriate [embedded] | ||
| 3 | |||
| 4 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
| 5 | --- | ||
| 6 | groff-1.18.1.4/Makefile.in | 7 +------ | ||
| 7 | 1 file changed, 1 insertion(+), 6 deletions(-) | ||
| 8 | |||
| 9 | --- a/Makefile.in | ||
| 10 | +++ b/Makefile.in | ||
| 11 | @@ -460,27 +460,22 @@ OTHERDIRS=\ | ||
| 12 | src/roff/grog \ | ||
| 13 | src/roff/nroff \ | ||
| 14 | contrib/mm \ | ||
| 15 | contrib/pic2graph \ | ||
| 16 | contrib/eqn2graph \ | ||
| 17 | - contrib/groffer \ | ||
| 18 | - contrib/mom \ | ||
| 19 | - doc | ||
| 20 | + contrib/groffer | ||
| 21 | ALLDIRS=$(INCDIRS) $(LIBDIRS) $(PROGDIRS) \ | ||
| 22 | $(DEVDIRS) $(OTHERDEVDIRS) $(TTYDEVDIRS) $(OTHERDIRS) | ||
| 23 | EXTRADIRS=\ | ||
| 24 | font/devps/generate \ | ||
| 25 | font/devdvi/generate \ | ||
| 26 | font/devlj4/generate \ | ||
| 27 | - src/xditview \ | ||
| 28 | doc | ||
| 29 | NOMAKEDIRS=\ | ||
| 30 | arch/djgpp \ | ||
| 31 | contrib/mm/examples \ | ||
| 32 | contrib/mm/mm \ | ||
| 33 | - contrib/mom/examples \ | ||
| 34 | - contrib/mom/momdoc \ | ||
| 35 | src/libs/snprintf | ||
| 36 | DISTDIRS=\ | ||
| 37 | $(INCDIRS) $(LIBDIRS) $(PROGDIRS) $(DEVDIRS) $(OTHERDEVDIRS) \ | ||
| 38 | $(ALLTTYDEVDIRS) $(OTHERDIRS) $(EXTRADIRS) $(NOMAKEDIRS) | ||
| 39 | TARGETS=all install install_bin install_data clean distclean mostlyclean \ | ||
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch b/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch deleted file mode 100644 index e3f1aa6a48..0000000000 --- a/meta/recipes-extended/groff/groff-1.18.1.4/man-local.patch +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [embedded] | ||
| 2 | |||
| 3 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
| 4 | |||
| 5 | Index: groff-1.18.1.4/tmac/man.local | ||
| 6 | =================================================================== | ||
| 7 | --- groff-1.18.1.4.orig/tmac/man.local 2000-10-26 22:15:17.000000000 +0800 | ||
| 8 | +++ groff-1.18.1.4/tmac/man.local 2010-08-24 14:17:52.070006664 +0800 | ||
| 9 | @@ -1,2 +1,27 @@ | ||
| 10 | .\" This file is loaded after an-old.tmac. | ||
| 11 | .\" Put any local modifications to an-old.tmac here. | ||
| 12 | +. | ||
| 13 | +.if n \{\ | ||
| 14 | +. \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other | ||
| 15 | +. \" than utf8. | ||
| 16 | +. if !'\*[.T]'utf8' \ | ||
| 17 | +. tr \[oq]' | ||
| 18 | +. | ||
| 19 | +. \" Debian: Disable the use of SGR (ANSI colour) escape sequences by | ||
| 20 | +. \" grotty. | ||
| 21 | +. if '\V[GROFF_SGR]'' \ | ||
| 22 | +. output x X tty: sgr 0 | ||
| 23 | +. | ||
| 24 | +. \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make | ||
| 25 | +. \" searching in man pages easier. | ||
| 26 | +. if '\*[.T]'utf8' \ | ||
| 27 | +. char \- \N'45' | ||
| 28 | +. | ||
| 29 | +. \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such | ||
| 30 | +. \" as those in command-line options. This is a bug in those pages, but | ||
| 31 | +. \" too many fonts are missing the Unicode HYPHEN character, so we render | ||
| 32 | +. \" this as the ASCII-compatible HYPHEN-MINUS instead. | ||
| 33 | +. if '\*[.T]'utf8' \ | ||
| 34 | +. char - \N'45' | ||
| 35 | +.\} | ||
| 36 | + | ||
diff --git a/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch b/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch deleted file mode 100644 index 409c1a5a18..0000000000 --- a/meta/recipes-extended/groff/groff-1.18.1.4/mdoc-local.patch +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | |||
| 2 | Upstream-Status: Inappropriate [embedded] | ||
| 3 | |||
| 4 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
| 5 | |||
| 6 | Index: groff-1.18.1.4/tmac/mdoc.local | ||
| 7 | =================================================================== | ||
| 8 | --- groff-1.18.1.4.orig/tmac/mdoc.local 2001-03-23 08:17:51.000000000 +0800 | ||
| 9 | +++ groff-1.18.1.4/tmac/mdoc.local 2010-08-24 14:20:22.014006846 +0800 | ||
| 10 | @@ -1,2 +1,26 @@ | ||
| 11 | .\" This file is loaded after doc.tmac. | ||
| 12 | .\" Put any local modifications to doc.tmac here. | ||
| 13 | +. | ||
| 14 | +.if n \{\ | ||
| 15 | +. \" Debian: Map \(oq to ' rather than ` in nroff mode for devices other | ||
| 16 | +. \" than utf8. | ||
| 17 | +. if !'\*[.T]'utf8' \ | ||
| 18 | +. tr \[oq]' | ||
| 19 | +. | ||
| 20 | +. \" Debian: Disable the use of SGR (ANSI colour) escape sequences by | ||
| 21 | +. \" grotty. | ||
| 22 | +. if '\V[GROFF_SGR]'' \ | ||
| 23 | +. output x X tty: sgr 0 | ||
| 24 | +. | ||
| 25 | +. \" Debian: Map \- to the Unicode HYPHEN-MINUS character, to make | ||
| 26 | +. \" searching in man pages easier. | ||
| 27 | +. if '\*[.T]'utf8' \ | ||
| 28 | +. char \- \N'45' | ||
| 29 | +. | ||
| 30 | +. \" Debian: Many UTF-8 man pages use "-" instead of "\-" for dashes such | ||
| 31 | +. \" as those in command-line options. This is a bug in those pages, but | ||
| 32 | +. \" too many fonts are missing the Unicode HYPHEN character, so we render | ||
| 33 | +. \" this as the ASCII-compatible HYPHEN-MINUS instead. | ||
| 34 | +. if '\*[.T]'utf8' \ | ||
| 35 | +. char - \N'45' | ||
| 36 | +.\} | ||
diff --git a/meta/recipes-extended/groff/groff_1.18.1.4.bb b/meta/recipes-extended/groff/groff_1.18.1.4.bb deleted file mode 100644 index fc7eb44781..0000000000 --- a/meta/recipes-extended/groff/groff_1.18.1.4.bb +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | SUMMARY = "GNU Troff software" | ||
| 2 | DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \ | ||
| 3 | formatting commands and produces formatted output." | ||
| 4 | SECTION = "console/utils" | ||
| 5 | HOMEPAGE = "http://www.gnu.org/software/groff/" | ||
| 6 | LICENSE = "GPLv2" | ||
| 7 | PR = "r1" | ||
| 8 | |||
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=e43fc16fccd8519fba405f0a0ff6e8a3" | ||
| 10 | |||
| 11 | SRC_URI = "${GNU_MIRROR}/${BPN}/old/${BP}.tar.gz \ | ||
| 12 | file://groff-1.18.1.4-remove-mom.patch;striplevel=1 \ | ||
| 13 | file://man-local.patch \ | ||
| 14 | file://mdoc-local.patch \ | ||
| 15 | file://groff-1.18.1.4-fix-bindir.patch \ | ||
| 16 | file://fix-narrowing-conversion-error.patch \ | ||
| 17 | " | ||
| 18 | |||
| 19 | inherit autotools texinfo | ||
| 20 | |||
| 21 | EXTRA_OECONF="--without-x --prefix=${D} --exec-prefix=${D} --bindir=${D}${bindir} --datadir=${D}${datadir} --mandir=${D}${datadir}/man --infodir=${D}${datadir}info --with-appresdir=${D}${datadir}" | ||
| 22 | |||
| 23 | SRC_URI[md5sum] = "ceecb81533936d251ed015f40e5f7287" | ||
| 24 | SRC_URI[sha256sum] = "ff3c7c3b6cae5e8cc5062a144de5eff0022e8e970e1774529cc2d5dde46ce50d" | ||
| 25 | PARALLEL_MAKE = "" | ||
| 26 | |||
| 27 | do_configure (){ | ||
| 28 | oe_runconf | ||
| 29 | } | ||
| 30 | |||
| 31 | do_install_append() { | ||
| 32 | # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location | ||
| 33 | # for target as /usr/bin/perl, so fix it to /usr/bin/perl. | ||
| 34 | for i in afmtodit mmroff; do | ||
| 35 | if [ -f ${D}${bindir}/$i ]; then | ||
| 36 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i | ||
| 37 | fi | ||
| 38 | done | ||
| 39 | |||
| 40 | mkdir -p ${D}${sysconfdir}/groff | ||
| 41 | cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${sysconfdir}/groff/ | ||
| 42 | cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${datadir}/groff/${PV}/tmac/ | ||
| 43 | } | ||
| 44 | |||
| 45 | pkg_postinst_${PN}() { | ||
| 46 | ln -s tbl $D${bindir}/gtbl | ||
| 47 | echo "export GROFF_FONT_PATH=/usr/share/groff/${PV}/font" >> $D${sysconfdir}/profile | ||
| 48 | echo "export GROFF_TMAC_PATH=/usr/share/groff/${PV}/tmac" >> $D${sysconfdir}/profile | ||
| 49 | } | ||
| 50 | |||
diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch deleted file mode 100644 index d9e8d212bf..0000000000 --- a/meta/recipes-extended/gzip/gzip-1.3.12/dup-def-fix.patch +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | gzip uses gnulib, whose header conflict with glibc. This patch rename some function to avoid conflict. | ||
| 2 | |||
| 3 | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> | ||
| 4 | |||
| 5 | Upstream-Status: Inappropriate [licensing] | ||
| 6 | |||
| 7 | Index: gzip-1.3.12/gzip.c | ||
| 8 | =================================================================== | ||
| 9 | --- gzip-1.3.12.orig/gzip.c 2010-08-13 10:29:38.000000000 +0800 | ||
| 10 | +++ gzip-1.3.12/gzip.c 2010-08-13 10:29:44.000000000 +0800 | ||
| 11 | @@ -1637,7 +1637,7 @@ | ||
| 12 | } | ||
| 13 | } | ||
| 14 | |||
| 15 | - if (futimens (ofd, ofname, timespec) != 0) | ||
| 16 | + if (futimens_gnulib (ofd, ofname, timespec) != 0) | ||
| 17 | { | ||
| 18 | int e = errno; | ||
| 19 | WARN ((stderr, "%s: ", program_name)); | ||
| 20 | Index: gzip-1.3.12/lib/utimens.c | ||
| 21 | =================================================================== | ||
| 22 | --- gzip-1.3.12.orig/lib/utimens.c 2010-08-13 10:33:47.000000000 +0800 | ||
| 23 | +++ gzip-1.3.12/lib/utimens.c 2010-08-13 10:34:02.000000000 +0800 | ||
| 24 | @@ -75,7 +75,7 @@ | ||
| 25 | Return 0 on success, -1 (setting errno) on failure. */ | ||
| 26 | |||
| 27 | int | ||
| 28 | -futimens (int fd ATTRIBUTE_UNUSED, | ||
| 29 | +futimens_gnulib (int fd ATTRIBUTE_UNUSED, | ||
| 30 | char const *file, struct timespec const timespec[2]) | ||
| 31 | { | ||
| 32 | /* Some Linux-based NFS clients are buggy, and mishandle time stamps | ||
| 33 | @@ -185,5 +185,5 @@ | ||
| 34 | int | ||
| 35 | utimens (char const *file, struct timespec const timespec[2]) | ||
| 36 | { | ||
| 37 | - return futimens (-1, file, timespec); | ||
| 38 | + return futimens_gnulib (-1, file, timespec); | ||
| 39 | } | ||
| 40 | Index: gzip-1.3.12/lib/utimens.h | ||
| 41 | =================================================================== | ||
| 42 | --- gzip-1.3.12.orig/lib/utimens.h 2010-08-13 10:14:57.000000000 +0800 | ||
| 43 | +++ gzip-1.3.12/lib/utimens.h 2010-08-13 10:21:45.000000000 +0800 | ||
| 44 | @@ -1,3 +1,3 @@ | ||
| 45 | #include <time.h> | ||
| 46 | -int futimens (int, char const *, struct timespec const [2]); | ||
| 47 | +int futimens_gnulib (int, char const *, struct timespec const [2]); | ||
| 48 | int utimens (char const *, struct timespec const [2]); | ||
diff --git a/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch b/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch deleted file mode 100644 index 6b2f69870e..0000000000 --- a/meta/recipes-extended/gzip/gzip-1.3.12/m4-extensions-fix.patch +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | remove AC_USE_SYSTEM_EXTENSIONS to fix the autoconf error "AC_REQUIRE: circular | ||
| 2 | dependency of AC_GNU_SOURCE" | ||
| 3 | |||
| 4 | Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [licensing] | ||
| 7 | |||
| 8 | Index: gzip-1.3.12/m4/extensions.m4 | ||
| 9 | =================================================================== | ||
| 10 | --- gzip-1.3.12.orig/m4/extensions.m4 2010-08-16 14:18:16.000000000 +0800 | ||
| 11 | +++ gzip-1.3.12/m4/extensions.m4 2010-08-16 14:21:54.000000000 +0800 | ||
| 12 | @@ -12,44 +12,6 @@ | ||
| 13 | # enough in this area it's likely we'll need to redefine | ||
| 14 | # AC_USE_SYSTEM_EXTENSIONS for quite some time. | ||
| 15 | |||
| 16 | -# AC_USE_SYSTEM_EXTENSIONS | ||
| 17 | -# ------------------------ | ||
| 18 | -# Enable extensions on systems that normally disable them, | ||
| 19 | -# typically due to standards-conformance issues. | ||
| 20 | -AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], | ||
| 21 | -[ | ||
| 22 | - AC_BEFORE([$0], [AC_COMPILE_IFELSE]) | ||
| 23 | - AC_BEFORE([$0], [AC_RUN_IFELSE]) | ||
| 24 | - | ||
| 25 | - AC_REQUIRE([AC_GNU_SOURCE]) | ||
| 26 | - AC_REQUIRE([AC_AIX]) | ||
| 27 | - AC_REQUIRE([AC_MINIX]) | ||
| 28 | - | ||
| 29 | - AH_VERBATIM([__EXTENSIONS__], | ||
| 30 | -[/* Enable extensions on Solaris. */ | ||
| 31 | -#ifndef __EXTENSIONS__ | ||
| 32 | -# undef __EXTENSIONS__ | ||
| 33 | -#endif | ||
| 34 | -#ifndef _POSIX_PTHREAD_SEMANTICS | ||
| 35 | -# undef _POSIX_PTHREAD_SEMANTICS | ||
| 36 | -#endif | ||
| 37 | -#ifndef _TANDEM_SOURCE | ||
| 38 | -# undef _TANDEM_SOURCE | ||
| 39 | -#endif]) | ||
| 40 | - AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], | ||
| 41 | - [ac_cv_safe_to_define___extensions__], | ||
| 42 | - [AC_COMPILE_IFELSE( | ||
| 43 | - [AC_LANG_PROGRAM([ | ||
| 44 | -# define __EXTENSIONS__ 1 | ||
| 45 | - AC_INCLUDES_DEFAULT])], | ||
| 46 | - [ac_cv_safe_to_define___extensions__=yes], | ||
| 47 | - [ac_cv_safe_to_define___extensions__=no])]) | ||
| 48 | - test $ac_cv_safe_to_define___extensions__ = yes && | ||
| 49 | - AC_DEFINE([__EXTENSIONS__]) | ||
| 50 | - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | ||
| 51 | - AC_DEFINE([_TANDEM_SOURCE]) | ||
| 52 | -]) | ||
| 53 | - | ||
| 54 | # gl_USE_SYSTEM_EXTENSIONS | ||
| 55 | # ------------------------ | ||
| 56 | # Enable extensions on systems that normally disable them, | ||
diff --git a/meta/recipes-extended/gzip/gzip_1.3.12.bb b/meta/recipes-extended/gzip/gzip_1.3.12.bb deleted file mode 100644 index e4062827bd..0000000000 --- a/meta/recipes-extended/gzip/gzip_1.3.12.bb +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | require gzip.inc | ||
| 2 | |||
| 3 | LICENSE = "GPLv2+" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ | ||
| 5 | file://gzip.h;endline=22;md5=c0934ad1900d927f86556153d4c76d23 \ | ||
| 6 | file://lzw.h;endline=19;md5=c273e09a02edd9801cc74d39683049e9 " | ||
| 7 | |||
| 8 | SRC_URI = "${GNU_MIRROR}/gzip/gzip-${PV}.tar.gz \ | ||
| 9 | file://m4-extensions-fix.patch \ | ||
| 10 | file://dup-def-fix.patch" | ||
| 11 | |||
| 12 | SRC_URI[md5sum] = "b5bac2d21840ae077e0217bc5e4845b1" | ||
| 13 | SRC_URI[sha256sum] = "3f565be05f7f3d1aff117c030eb7c738300510b7d098cedea796ca8e4cd587af" | ||
| 14 | |||
| 15 | PR = "r2" | ||
diff --git a/meta/recipes-extended/libidn/libidn_0.6.14.bb b/meta/recipes-extended/libidn/libidn_0.6.14.bb deleted file mode 100644 index c681560d82..0000000000 --- a/meta/recipes-extended/libidn/libidn_0.6.14.bb +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | SUMMARY = "Internationalized Domain Name support library" | ||
| 2 | DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group." | ||
| 3 | HOMEPAGE = "http://www.gnu.org/software/libidn/" | ||
| 4 | SECTION = "libs" | ||
| 5 | LICENSE = "LGPLv2.1+ & GPLv2+" | ||
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ | ||
| 7 | file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \ | ||
| 8 | file://lib/idna.h;beginline=6;endline=18;md5=1336e848ca7b8e25767c3c7e8fa38a89 \ | ||
| 9 | file://src/idn.c;beginline=6;endline=18;md5=56c89e359652a71cda128d75f0ffdac4" | ||
| 10 | PR = "r1" | ||
| 11 | |||
| 12 | inherit pkgconfig autotools gettext texinfo | ||
| 13 | |||
| 14 | SRC_URI = "http://alpha.gnu.org/gnu/libidn/${BPN}-${PV}.tar.gz" | ||
| 15 | |||
| 16 | SRC_URI[md5sum] = "040f012a45feb56168853998bb87ad4d" | ||
| 17 | SRC_URI[sha256sum] = "98910c2ad664bdf4eed2c2fff88e24f8882636ec9d26669366ff03b469c05ae3" | ||
| 18 | |||
| 19 | do_configure_prepend() { | ||
| 20 | # this version of libidn copies AC_USE_SYSTEM_EXTENSIONS from | ||
| 21 | # autoconf CVS because atm the autoconf it uses is a bit old | ||
| 22 | # now with cross autotool, that macro is already there and this | ||
| 23 | # local definition causes circular dependency. Actually AC_GNU_SOURCE | ||
| 24 | # is identical to AC_USE_SYSTEM_EXTENSIONS. So remove all local | ||
| 25 | # references to the latter here. | ||
| 26 | sed -i -e "/AC_REQUIRE(\[gl_USE_SYSTEM_EXTENSIONS/d" ${S}/lib/gl/m4/gnulib-comp.m4 | ||
| 27 | rm -f ${S}/lib/gl/m4/extensions.m4 | ||
| 28 | } | ||
| 29 | |||
| 30 | do_install_append() { | ||
| 31 | rm -rf ${D}${libdir}/Libidn.dll | ||
| 32 | rm -rf ${D}${datadir}/emacs | ||
| 33 | } | ||
| 34 | |||
| 35 | BBCLASSEXTEND = "native nativesdk" | ||
| 36 | |||
diff --git a/meta/recipes-extended/mc/mc/mc-CTRL.patch b/meta/recipes-extended/mc/mc/mc-CTRL.patch deleted file mode 100644 index ee4ba9f26b..0000000000 --- a/meta/recipes-extended/mc/mc/mc-CTRL.patch +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | Fix build with musl by ensuring CTRL is defined. | ||
| 2 | |||
| 3 | musl does not define CTRL in <termios.h>, we could include <sys/ttydefaults.h> | ||
| 4 | explicitly but it's easier just to ensure CTRL is defined. | ||
| 5 | |||
| 6 | This patch is taken from Sabotage Linux, the license statement for patches and | ||
| 7 | build scripts in Sabotage Linux says: | ||
| 8 | |||
| 9 | To the extent possible under law, Christian Neukirchen has waived | ||
| 10 | all copyright and related or neighboring rights to this work. | ||
| 11 | |||
| 12 | http://creativecommons.org/publicdomain/zero/1.0/ | ||
| 13 | |||
| 14 | Therefore this should be good to include in OpenEmbedded. | ||
| 15 | |||
| 16 | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> | ||
| 17 | |||
| 18 | Upstream-Status: Accepted (should be included in v4.8.14) | ||
| 19 | |||
| 20 | diff -u mc-4.8.1.7.org/lib/tty/tty-ncurses.c mc-4.8.1.7/lib/tty/tty-ncurses.c | ||
| 21 | --- mc-4.8.1.7.org/lib/tty/tty-ncurses.c | ||
| 22 | +++ mc-4.8.1.7/lib/tty/tty-ncurses.c | ||
| 23 | @@ -65,7 +65,7 @@ | ||
| 24 | |||
| 25 | /*** file scope macro definitions ****************************************************************/ | ||
| 26 | |||
| 27 | -#if defined(_AIX) && !defined(CTRL) | ||
| 28 | +#if !defined(CTRL) | ||
| 29 | #define CTRL(x) ((x) & 0x1f) | ||
| 30 | #endif | ||
| 31 | |||
diff --git a/meta/recipes-extended/mc/mc_4.7.5.2.bb b/meta/recipes-extended/mc/mc_4.7.5.2.bb deleted file mode 100644 index b38964d827..0000000000 --- a/meta/recipes-extended/mc/mc_4.7.5.2.bb +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | SUMMARY = "Midnight Commander is an ncurses based file manager" | ||
| 2 | HOMEPAGE = "http://www.midnight-commander.org/" | ||
| 3 | LICENSE = "GPLv2" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
| 5 | SECTION = "console/utils" | ||
| 6 | DEPENDS = "ncurses glib-2.0" | ||
| 7 | RDEPENDS_${PN} = "ncurses-terminfo" | ||
| 8 | |||
| 9 | PR = "r3" | ||
| 10 | |||
| 11 | SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ | ||
| 12 | file://mc-CTRL.patch \ | ||
| 13 | " | ||
| 14 | |||
| 15 | SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6" | ||
| 16 | SRC_URI[sha256sum] = "a68338862bb30017eb65ed569a58e80ab66ae8cef11c886440c9e9f4d1efc6ab" | ||
| 17 | |||
| 18 | inherit autotools gettext pkgconfig | ||
| 19 | |||
| 20 | EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-samba" | ||
| 21 | |||
| 22 | do_install_append () { | ||
| 23 | sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/* | ||
| 24 | sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/* | ||
| 25 | } | ||
| 26 | |||
| 27 | PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish" | ||
| 28 | |||
| 29 | SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts" | ||
| 30 | FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \ | ||
| 31 | ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \ | ||
| 32 | ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \ | ||
| 33 | ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \ | ||
| 34 | ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \ | ||
| 35 | ${libexecdir}/mc/extfs.d/uzip" | ||
| 36 | RDEPENDS_${BPN}-helpers-perl = "perl" | ||
| 37 | |||
| 38 | SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts" | ||
| 39 | FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541" | ||
| 40 | RDEPENDS_${BPN}-helpers-python = "python" | ||
| 41 | |||
| 42 | SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts" | ||
| 43 | FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*" | ||
| 44 | |||
| 45 | SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts" | ||
| 46 | FILES_${BPN}-fish = "${libexecdir}/mc/fish" | ||
| 47 | |||
diff --git a/meta/recipes-extended/sed/sed-4.1.2/Makevars b/meta/recipes-extended/sed/sed-4.1.2/Makevars deleted file mode 100644 index 8b09f53b0f..0000000000 --- a/meta/recipes-extended/sed/sed-4.1.2/Makevars +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | # Makefile variables for PO directory in any package using GNU gettext. | ||
| 2 | |||
| 3 | # Usually the message domain is the same as the package name. | ||
| 4 | DOMAIN = $(PACKAGE) | ||
| 5 | |||
| 6 | # These two variables depend on the location of this directory. | ||
| 7 | subdir = po | ||
| 8 | top_builddir = .. | ||
| 9 | |||
| 10 | # These options get passed to xgettext. | ||
| 11 | XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ | ||
| 12 | |||
| 13 | # This is the copyright holder that gets inserted into the header of the | ||
| 14 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding | ||
| 15 | # package. (Note that the msgstr strings, extracted from the package's | ||
| 16 | # sources, belong to the copyright holder of the package.) Translators are | ||
| 17 | # expected to transfer the copyright for their translations to this person | ||
| 18 | # or entity, or to disclaim their copyright. The empty string stands for | ||
| 19 | # the public domain; in this case the translators are expected to disclaim | ||
| 20 | # their copyright. | ||
| 21 | COPYRIGHT_HOLDER = Free Software Foundation, Inc. | ||
| 22 | |||
| 23 | # This is the list of locale categories, beyond LC_MESSAGES, for which the | ||
| 24 | # message catalogs shall be used. It is usually empty. | ||
| 25 | EXTRA_LOCALE_CATEGORIES = | ||
diff --git a/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch b/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch deleted file mode 100644 index 836551ea18..0000000000 --- a/meta/recipes-extended/sed/sed-4.1.2/fix_return_type.patch +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | Change the getline return type to match its declaration. | ||
| 4 | |||
| 5 | Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> | ||
| 6 | |||
| 7 | diff -urN sed-4.1.2-orig/lib/getline.c sed-4.1.2/lib/getline.c | ||
| 8 | --- sed-4.1.2-orig/lib/getline.c 2010-08-31 08:47:50.070094024 +0800 | ||
| 9 | +++ sed-4.1.2/lib/getline.c 2010-08-31 08:48:50.982178172 +0800 | ||
| 10 | @@ -30,7 +30,7 @@ | ||
| 11 | necessary. Returns the number of characters read (not including the | ||
| 12 | null terminator), or -1 on error or EOF. */ | ||
| 13 | |||
| 14 | -size_t | ||
| 15 | +ssize_t | ||
| 16 | getline (lineptr, n, stream) | ||
| 17 | char **lineptr; | ||
| 18 | size_t *n; | ||
diff --git a/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch b/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch deleted file mode 100644 index c7c0aa015d..0000000000 --- a/meta/recipes-extended/sed/sed-4.1.2/sed-4.1.2_fix_for_automake-1.12.patch +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | automake-1.12.x has deprecated use of @mkdir_p@, fix the issue by using @MKDIR_P@ instead. | ||
| 4 | |||
| 5 | Avoid this build issue: | ||
| 6 | | make[1]: mkdir_p@: Command not found | ||
| 7 | | make[1]: *** [install-data-yes] Error 127 | ||
| 8 | |||
| 9 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
| 10 | 2012/07/13 | ||
| 11 | |||
| 12 | Index: sed-4.1.2/intl/Makefile.in | ||
| 13 | =================================================================== | ||
| 14 | --- sed-4.1.2.orig/intl/Makefile.in | ||
| 15 | +++ sed-4.1.2/intl/Makefile.in | ||
| 16 | @@ -40,7 +40,7 @@ subdir = intl | ||
| 17 | INSTALL = @INSTALL@ | ||
| 18 | INSTALL_DATA = @INSTALL_DATA@ | ||
| 19 | mkinstalldirs = $(mkdir_p) | ||
| 20 | -mkdir_p = @mkdir_p@ | ||
| 21 | +mkdir_p = @MKDIR_P@ | ||
| 22 | |||
| 23 | l = @INTL_LIBTOOL_SUFFIX_PREFIX@ | ||
| 24 | |||
| 25 | Index: sed-4.1.2/po/Makefile.in.in | ||
| 26 | =================================================================== | ||
| 27 | --- sed-4.1.2.orig/po/Makefile.in.in | ||
| 28 | +++ sed-4.1.2/po/Makefile.in.in | ||
| 29 | @@ -29,7 +29,7 @@ gettextsrcdir = $(datadir)/gettext/po | ||
| 30 | INSTALL = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/install -c | ||
| 31 | INSTALL_DATA = ${INSTALL} -m 644 | ||
| 32 | mkinstalldirs = $(mkdir_p) | ||
| 33 | -mkdir_p = @mkdir_p@ | ||
| 34 | +mkdir_p = @MKDIR_P@ | ||
| 35 | |||
| 36 | CC = i586-poky-linux-gcc -m32 -march=i586 --sysroot=/srv/home/nitin/builds2/build0/tmp/sysroots/qemux86 | ||
| 37 | GMSGFMT = /srv/home/nitin/builds2/build0/tmp/sysroots/x86_64-linux/usr/bin/msgfmt | ||
diff --git a/meta/recipes-extended/sed/sed_4.1.2.bb b/meta/recipes-extended/sed/sed_4.1.2.bb deleted file mode 100644 index 40e3a53ceb..0000000000 --- a/meta/recipes-extended/sed/sed_4.1.2.bb +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | SUMMARY = "Stream EDitor (text filtering utility)" | ||
| 2 | HOMEPAGE = "http://www.gnu.org/software/sed/" | ||
| 3 | LICENSE = "GPLv2+" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ | ||
| 5 | file://sed/sed.h;beginline=1;endline=17;md5=e00ffd1837f298439a214fd197f6a407" | ||
| 6 | SECTION = "console/utils" | ||
| 7 | PR = "r7" | ||
| 8 | |||
| 9 | SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \ | ||
| 10 | file://fix_return_type.patch \ | ||
| 11 | file://sed-4.1.2_fix_for_automake-1.12.patch \ | ||
| 12 | file://Makevars" | ||
| 13 | |||
| 14 | SRC_URI[md5sum] = "928f0e06422f414091917401f1a834d0" | ||
| 15 | SRC_URI[sha256sum] = "638e837ba765d5da0a30c98b57c2953cecea96827882f594612acace93ceeeab" | ||
| 16 | |||
| 17 | inherit autotools texinfo update-alternatives gettext | ||
| 18 | |||
| 19 | do_configure_prepend () { | ||
| 20 | cp ${WORKDIR}/Makevars ${S}/po/ | ||
| 21 | } | ||
| 22 | |||
| 23 | do_install () { | ||
| 24 | autotools_do_install | ||
| 25 | install -d ${D}${base_bindir} | ||
| 26 | if [ ! ${D}${bindir} -ef ${D}${base_bindir} ]; then | ||
| 27 | mv ${D}${bindir}/sed ${D}${base_bindir}/sed | ||
| 28 | rmdir ${D}${bindir}/ | ||
| 29 | fi | ||
| 30 | } | ||
| 31 | |||
| 32 | ALTERNATIVE_${PN} = "sed" | ||
| 33 | ALTERNATIVE_LINK_NAME[sed] = "${base_bindir}/sed" | ||
| 34 | ALTERNATIVE_PRIORITY = "100" | ||
| 35 | |||
diff --git a/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch b/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch deleted file mode 100644 index af5026f529..0000000000 --- a/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624] | ||
| 2 | CVE: CVE-2010-0624 | ||
| 3 | |||
| 4 | This patch avoids heap overflow reported by : | ||
| 5 | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624 | ||
| 6 | |||
| 7 | This is a clean patch for the GPLv2 tar recipe. | ||
| 8 | |||
| 9 | Nitin A Kamble <nitin.a.kamble@intel.com> 2011/04/25 | ||
| 10 | |||
| 11 | Index: tar-1.17/lib/rtapelib.c | ||
| 12 | =================================================================== | ||
| 13 | --- tar-1.17.orig/lib/rtapelib.c | ||
| 14 | +++ tar-1.17/lib/rtapelib.c | ||
| 15 | @@ -570,7 +570,7 @@ rmt_read__ (int handle, char *buffer, si | ||
| 16 | |||
| 17 | sprintf (command_buffer, "R%lu\n", (unsigned long) length); | ||
| 18 | if (do_command (handle, command_buffer) == -1 | ||
| 19 | - || (status = get_status (handle)) == SAFE_READ_ERROR) | ||
| 20 | + || ((status = get_status (handle)) == SAFE_READ_ERROR) || (status > length)) | ||
| 21 | return SAFE_READ_ERROR; | ||
| 22 | |||
| 23 | for (counter = 0; counter < status; counter += rlen, buffer += rlen) | ||
diff --git a/meta/recipes-extended/tar/tar-1.17/gcc43build.patch b/meta/recipes-extended/tar/tar-1.17/gcc43build.patch deleted file mode 100644 index f8059a0a89..0000000000 --- a/meta/recipes-extended/tar/tar-1.17/gcc43build.patch +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [licensing] | ||
| 2 | |||
| 3 | # Fix errors when built with gcc 4.3 | ||
| 4 | # Patch taken from Debian bug #452096 | ||
| 5 | |||
| 6 | diff -urN tar-1.17.orig/lib/argp-fmtstream.h tar-1.17/lib/argp-fmtstream.h | ||
| 7 | --- tar-1.17.orig/lib/argp-fmtstream.h 2006-01-11 12:24:05.000000000 -0800 | ||
| 8 | +++ tar-1.17/lib/argp-fmtstream.h 2010-07-22 22:36:12.000000000 -0700 | ||
| 9 | @@ -198,7 +198,11 @@ | ||
| 10 | #endif | ||
| 11 | |||
| 12 | #ifndef ARGP_FS_EI | ||
| 13 | -#define ARGP_FS_EI extern inline | ||
| 14 | + #if defined __GNUC_STDC_INLINE__ | ||
| 15 | + #define ARGP_FS_EI extern inline __attribute__((__gnu_inline__)) | ||
| 16 | + #else | ||
| 17 | + #define ARGP_FS_EI extern inline | ||
| 18 | + #endif | ||
| 19 | #endif | ||
| 20 | |||
| 21 | ARGP_FS_EI size_t | ||
| 22 | diff -urN tar-1.17.orig/lib/argp.h tar-1.17/lib/argp.h | ||
| 23 | --- tar-1.17.orig/lib/argp.h 2007-03-30 00:09:11.000000000 -0700 | ||
| 24 | +++ tar-1.17/lib/argp.h 2010-07-22 22:38:44.000000000 -0700 | ||
| 25 | @@ -580,7 +580,11 @@ | ||
| 26 | # endif | ||
| 27 | |||
| 28 | # ifndef ARGP_EI | ||
| 29 | -# define ARGP_EI extern __inline__ | ||
| 30 | +# if defined __GNUC_STDC_INLINE__ | ||
| 31 | +# define ARGP_EI extern __inline__ __attribute__((__gnu_inline__)) | ||
| 32 | +# else | ||
| 33 | +# define ARGP_EI extern __inline__ | ||
| 34 | +# endif | ||
| 35 | # endif | ||
| 36 | |||
| 37 | ARGP_EI void | ||
diff --git a/meta/recipes-extended/tar/tar-1.17/m4extensions.patch b/meta/recipes-extended/tar/tar-1.17/m4extensions.patch deleted file mode 100644 index 30534c29ce..0000000000 --- a/meta/recipes-extended/tar/tar-1.17/m4extensions.patch +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [licensing] | ||
| 2 | |||
| 3 | # Define AC_USE_SYSTEM_EXTENSIONS only if it was previously undefined. | ||
| 4 | # This is needed to configure correctly with newer versions of autoconf. | ||
| 5 | |||
| 6 | --- tar-1.17/m4/extensions.m4.orig 2010-07-22 22:21:35.000000000 -0700 | ||
| 7 | +++ tar-1.17/m4/extensions.m4 2010-07-22 22:23:41.000000000 -0700 | ||
| 8 | @@ -1,4 +1,4 @@ | ||
| 9 | -# serial 4 -*- Autoconf -*- | ||
| 10 | +# serial 5 -*- Autoconf -*- | ||
| 11 | # Enable extensions on systems that normally disable them. | ||
| 12 | |||
| 13 | # Copyright (C) 2003, 2006 Free Software Foundation, Inc. | ||
| 14 | @@ -16,6 +16,7 @@ | ||
| 15 | # ------------------------ | ||
| 16 | # Enable extensions on systems that normally disable them, | ||
| 17 | # typically due to standards-conformance issues. | ||
| 18 | +m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [ | ||
| 19 | AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], | ||
| 20 | [ | ||
| 21 | AC_BEFORE([$0], [AC_COMPILE_IFELSE]) | ||
| 22 | @@ -48,7 +49,7 @@ | ||
| 23 | AC_DEFINE([__EXTENSIONS__]) | ||
| 24 | AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) | ||
| 25 | AC_DEFINE([_TANDEM_SOURCE]) | ||
| 26 | -]) | ||
| 27 | +])]) | ||
| 28 | |||
| 29 | # gl_USE_SYSTEM_EXTENSIONS | ||
| 30 | # ------------------------ | ||
diff --git a/meta/recipes-extended/tar/tar_1.17.bb b/meta/recipes-extended/tar/tar_1.17.bb deleted file mode 100644 index b9ca2063df..0000000000 --- a/meta/recipes-extended/tar/tar_1.17.bb +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | require tar.inc | ||
| 2 | |||
| 3 | LICENSE = "GPLv2" | ||
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
| 5 | |||
| 6 | PR = "r3" | ||
| 7 | |||
| 8 | SRC_URI += "file://m4extensions.patch \ | ||
| 9 | file://gcc43build.patch \ | ||
| 10 | file://avoid_heap_overflow.patch \ | ||
| 11 | " | ||
| 12 | |||
| 13 | SRC_URI[md5sum] = "c6c4f1c075dbf0f75c29737faa58f290" | ||
| 14 | SRC_URI[sha256sum] = "19f9021dda51a16295e4706e80870e71f87107675e51c176a491eba0fc4ca492" | ||
diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch b/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch deleted file mode 100644 index f4d66600a1..0000000000 --- a/meta/recipes-extended/texinfo/texinfo-4.8/check-locale-h.patch +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | fix the macro check | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | |||
| 5 | configure does not check if locale.h exists, but check setlocale, | ||
| 6 | if setlocale exist, the locale.h should exist. | ||
| 7 | |||
| 8 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
| 9 | --- | ||
| 10 | lib/system.h | 2 +- | ||
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 12 | |||
| 13 | diff --git a/lib/system.h b/lib/system.h | ||
| 14 | index 946eb3c..c70037b 100644 | ||
| 15 | --- a/lib/system.h | ||
| 16 | +++ b/lib/system.h | ||
| 17 | @@ -42,7 +42,7 @@ extern char *substring (const char *, const char *); | ||
| 18 | #include <ctype.h> | ||
| 19 | |||
| 20 | /* All systems nowadays probably have these functions, but ... */ | ||
| 21 | -#ifdef HAVE_LOCALE_H | ||
| 22 | +#ifdef HAVE_SETLOCALE | ||
| 23 | #include <locale.h> | ||
| 24 | #endif | ||
| 25 | #ifndef HAVE_SETLOCALE | ||
| 26 | -- | ||
| 27 | 1.7.10.4 | ||
| 28 | |||
diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch b/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch deleted file mode 100644 index 81ebe26cf6..0000000000 --- a/meta/recipes-extended/texinfo/texinfo-4.8/do-compile-native-tools.patch +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | From 458e9450cecf703f55536e609365162719585900 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Roy.Li" <rongqing.li@windriver.com> | ||
| 3 | Date: Wed, 10 Sep 2014 17:03:29 +0800 | ||
| 4 | Subject: [PATCH] do not compile host tools, since we have native | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
| 9 | --- | ||
| 10 | configure.ac | 23 +---------------------- | ||
| 11 | 1 file changed, 1 insertion(+), 22 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/configure.ac b/configure.ac | ||
| 14 | index b46130d..cf58654 100644 | ||
| 15 | --- a/configure.ac | ||
| 16 | +++ b/configure.ac | ||
| 17 | @@ -90,28 +90,7 @@ AC_CANONICAL_BUILD | ||
| 18 | # $native_tools is also added to SUBDIRS in the main Makefile.am, | ||
| 19 | # so that make compiles the native tools first. | ||
| 20 | # | ||
| 21 | -if test "$cross_compiling" = no; then | ||
| 22 | - native_tools= | ||
| 23 | -else | ||
| 24 | - native_tools=tools | ||
| 25 | - test -d "$native_tools" || mkdir "$native_tools" | ||
| 26 | - confdir=`(cd "$srcdir";pwd)` | ||
| 27 | - # Make sure the secondary configure won't fail with | ||
| 28 | - # "error: source directory already configured". | ||
| 29 | - rm -f config.status | ||
| 30 | - AC_MSG_NOTICE([[Doing configure of native tools (${build}).]]) | ||
| 31 | - cd "$native_tools" || exit 1 | ||
| 32 | - # Run secondary configure in alternate environment or | ||
| 33 | - # it gets the wrong CC etc. env -i gives this build host configure | ||
| 34 | - # a clean environment. | ||
| 35 | - env -i CC="${BUILD_CC}" AR="${BUILD_AR}" RANLIB="${BUILD_RANLIB}" \ | ||
| 36 | - PATH="${PATH}" \ | ||
| 37 | - tools_only=1 \ | ||
| 38 | - ${confdir}/configure --build=${build} --host=${build} \ | ||
| 39 | - --disable-rpath --disable-nls | ||
| 40 | - cd .. || exit 1 | ||
| 41 | - AC_MSG_NOTICE([[Continuing with main configure (${host}).]]) | ||
| 42 | -fi | ||
| 43 | +native_tools= | ||
| 44 | AC_SUBST(native_tools) | ||
| 45 | AM_CONDITIONAL(TOOLS_ONLY, [[test "x$tools_only" = x1]]) | ||
| 46 | |||
| 47 | -- | ||
| 48 | 1.9.1 | ||
| 49 | |||
diff --git a/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch b/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch deleted file mode 100644 index 2297051ddb..0000000000 --- a/meta/recipes-extended/texinfo/texinfo-4.8/using-native-makeinfo.patch +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | From 9b0df7d6d3c18cfac82c291d60a5357d1bc8d9d0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Roy.Li" <rongqing.li@windriver.com> | ||
| 3 | Date: Wed, 10 Sep 2014 17:10:03 +0800 | ||
| 4 | Subject: [PATCH] using native makeinfo | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Signed-off-by: Roy.Li <rongqing.li@windriver.com> | ||
| 9 | --- | ||
| 10 | doc/Makefile.am | 2 +- | ||
| 11 | |||
| 12 | diff --git a/doc/Makefile.am b/doc/Makefile.am | ||
| 13 | index 63df818..b6ceb34 100644 | ||
| 14 | --- a/doc/Makefile.am | ||
| 15 | +++ b/doc/Makefile.am | ||
| 16 | @@ -19,7 +19,7 @@ man_MANS = info.1 infokey.1 install-info.1 makeinfo.1 texindex.1 texi2dvi.1 \ | ||
| 17 | |||
| 18 | # Use the programs built in our distribution, taking account of possible | ||
| 19 | # cross-compiling. | ||
| 20 | -MAKEINFO = $(top_builddir)/$(native_tools)/makeinfo/makeinfo | ||
| 21 | +MAKEINFO = makeinfo | ||
| 22 | INSTALL_INFO = $(top_builddir)/$(native_tools)/util/install-info | ||
| 23 | |||
| 24 | TXI_XLATE = txi-cs.tex txi-de.tex txi-en.tex txi-es.tex txi-fr.tex \ | ||
diff --git a/meta/recipes-extended/texinfo/texinfo_4.8.bb b/meta/recipes-extended/texinfo/texinfo_4.8.bb deleted file mode 100644 index 13678e093b..0000000000 --- a/meta/recipes-extended/texinfo/texinfo_4.8.bb +++ /dev/null | |||
| @@ -1,55 +0,0 @@ | |||
| 1 | SUMMARY = "Documentation system for on-line information and printed output" | ||
| 2 | DESCRIPTION = "Texinfo is a documentation system that can produce both \ | ||
| 3 | online information and printed output from a single source file. The \ | ||
| 4 | GNU Project uses the Texinfo file format for most of its documentation." | ||
| 5 | HOMEPAGE = "http://www.gnu.org/software/texinfo/" | ||
| 6 | SECTION = "console/utils" | ||
| 7 | LICENSE = "GPLv2" | ||
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | ||
| 9 | |||
| 10 | PROVIDES_append_class-native = " texinfo-4.8-replacement-native" | ||
| 11 | |||
| 12 | DEPENDS = "zlib ncurses texinfo-4.8-replacement-native" | ||
| 13 | DEPENDS_class-native = "zlib-native ncurses-native" | ||
| 14 | |||
| 15 | TARGET_PATCH = "file://use_host_makedoc.patch \ | ||
| 16 | file://using-native-makeinfo.patch \ | ||
| 17 | " | ||
| 18 | TARGET_PATCH_class-native = "" | ||
| 19 | |||
| 20 | SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \ | ||
| 21 | file://check-locale-h.patch \ | ||
| 22 | file://do-compile-native-tools.patch \ | ||
| 23 | ${TARGET_PATCH} \ | ||
| 24 | " | ||
| 25 | |||
| 26 | SRC_URI[md5sum] = "4e9a1a591ed236003d0d4b008bf07eef" | ||
| 27 | SRC_URI[sha256sum] = "1f3cdeebe65fdf510f55d765ab1031b54416aa5bc2635b6a54ef9bcb2367c917" | ||
| 28 | |||
| 29 | tex_texinfo = "texmf/tex/texinfo" | ||
| 30 | |||
| 31 | inherit gettext autotools | ||
| 32 | |||
| 33 | do_install_append() { | ||
| 34 | mkdir -p ${D}${datadir}/${tex_texinfo} | ||
| 35 | install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo} | ||
| 36 | } | ||
| 37 | |||
| 38 | do_install_append_class-native() { | ||
| 39 | install -m 755 info/makedoc ${D}${bindir} | ||
| 40 | install -m 755 makeinfo/makeinfo ${D}${bindir} | ||
| 41 | } | ||
| 42 | |||
| 43 | PACKAGES += "info info-doc" | ||
| 44 | |||
| 45 | FILES_info = "${bindir}/info ${bindir}/infokey ${bindir}/install-info" | ||
| 46 | FILES_info-doc = "${infodir}/info.info ${infodir}/dir ${infodir}/info-*.info \ | ||
| 47 | ${mandir}/man1/info.1* ${mandir}/man5/info.5* \ | ||
| 48 | ${mandir}/man1/infokey.1* ${mandir}/man1/install-info.1*" | ||
| 49 | |||
| 50 | FILES_${PN} = "${bindir}/makeinfo ${bindir}/texi* ${bindir}/pdftexi2dvi ${bindir}/pod2texi ${datadir}/texinfo" | ||
| 51 | FILES_${PN}-doc = "${infodir}/texinfo* \ | ||
| 52 | ${datadir}/${tex_texinfo} \ | ||
| 53 | ${mandir}/man1 ${mandir}/man5" | ||
| 54 | |||
| 55 | BBCLASSEXTEND = "native" | ||
diff --git a/meta/recipes-extended/which/which-2.18/automake-foreign.patch b/meta/recipes-extended/which/which-2.18/automake-foreign.patch deleted file mode 100644 index 495cdc6cf4..0000000000 --- a/meta/recipes-extended/which/which-2.18/automake-foreign.patch +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | Subject: [PATCH] automake foreign strictness | ||
| 2 | |||
| 3 | Use foreign strictness to avoid automake errors. | ||
| 4 | |||
| 5 | Upstream-Status: Inappropriate [upstream no longer active] | ||
| 6 | |||
| 7 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
| 8 | --- | ||
| 9 | configure.ac | 5 +++-- | ||
| 10 | 1 files changed, 3 insertions(+), 2 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/configure.ac b/configure.ac | ||
| 13 | index b30b6f5..bd3222c 100644 | ||
| 14 | --- a/configure.ac | ||
| 15 | +++ b/configure.ac | ||
| 16 | @@ -1,6 +1,7 @@ | ||
| 17 | dnl Process this file with autoconf to produce a configure script. | ||
| 18 | -AC_INIT(which.c) | ||
| 19 | -AM_INIT_AUTOMAKE(which, 2.18) | ||
| 20 | +AC_INIT([which],[2.18]) | ||
| 21 | +AC_CONFIG_SRCDIR(which.c) | ||
| 22 | +AM_INIT_AUTOMAKE([foreign]) | ||
| 23 | AM_CONFIG_HEADER(config.h) | ||
| 24 | AM_MAINTAINER_MODE | ||
| 25 | |||
| 26 | -- | ||
| 27 | 1.7.1 | ||
| 28 | |||
diff --git a/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch b/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch deleted file mode 100644 index 0e0988b262..0000000000 --- a/meta/recipes-extended/which/which-2.18/fix_name_conflict_group_member.patch +++ /dev/null | |||
| @@ -1,53 +0,0 @@ | |||
| 1 | Upstream-Status: Inappropriate [this is 2.18(GPLv2) specific] | ||
| 2 | |||
| 3 | # glibc also implements the function group_member. To avoid name conflict, | ||
| 4 | # here let us append a "_" to which's version. | ||
| 5 | # | ||
| 6 | # Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>, 2010-08-20 | ||
| 7 | # (this patch is licensed under GPLv2) | ||
| 8 | |||
| 9 | --- which-2.18/bash.c | ||
| 10 | +++ which-2.18/bash.c | ||
| 11 | @@ -45,7 +45,12 @@ | ||
| 12 | * - changed all occurences of 'gid_t' into 'GID_T'. | ||
| 13 | * - exported functions needed in which.c | ||
| 14 | */ | ||
| 15 | -static int group_member (GID_T gid); | ||
| 16 | + | ||
| 17 | +/* | ||
| 18 | + * glibc also implements the function group_member. To avoid name conflict, | ||
| 19 | + * here let us append a "_" to which's version. | ||
| 20 | + */ | ||
| 21 | +static int _group_member (GID_T gid); | ||
| 22 | static char* extract_colon_unit (char const* string, int *p_index); | ||
| 23 | |||
| 24 | /*=========================================================================== | ||
| 25 | @@ -200,8 +205,8 @@ | ||
| 26 | |||
| 27 | /* From bash-2.05b / general.c / line 805 */ | ||
| 28 | /* Return non-zero if GID is one that we have in our groups list. */ | ||
| 29 | -int | ||
| 30 | -group_member (GID_T gid) | ||
| 31 | +static int | ||
| 32 | +_group_member (GID_T gid) | ||
| 33 | { | ||
| 34 | #if defined (HAVE_GETGROUPS) | ||
| 35 | register int i; | ||
| 36 | @@ -290,7 +295,7 @@ | ||
| 37 | return (X_BIT (u_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS; | ||
| 38 | |||
| 39 | /* Otherwise, if we are in the owning group, the group permissions apply. */ | ||
| 40 | - if (group_member (finfo.st_gid)) | ||
| 41 | + if (_group_member (finfo.st_gid)) | ||
| 42 | return (X_BIT (g_mode_bits (finfo.st_mode))) ? (FS_EXISTS | FS_EXECABLE) : FS_EXISTS; | ||
| 43 | |||
| 44 | /* Otherwise, if we are in the other group, the other permissions apply. */ | ||
| 45 | @@ -331,7 +336,7 @@ | ||
| 46 | /* Given a string containing units of information separated by colons, | ||
| 47 | return the next one pointed to by (P_INDEX), or NULL if there are no more. | ||
| 48 | Advance (P_INDEX) to the character after the colon. */ | ||
| 49 | -char* | ||
| 50 | +static char* | ||
| 51 | extract_colon_unit (char const* string, int* p_index) | ||
| 52 | { | ||
| 53 | int i, start, len; | ||
diff --git a/meta/recipes-extended/which/which_2.18.bb b/meta/recipes-extended/which/which_2.18.bb deleted file mode 100644 index eb6cc9967e..0000000000 --- a/meta/recipes-extended/which/which_2.18.bb +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | SUMMARY = "Displays the full path of shell commands" | ||
| 2 | DESCRIPTION = "Which is a utility that prints out the full path of the \ | ||
| 3 | executables that bash(1) would execute when the passed \ | ||
| 4 | program names would have been entered on the shell prompt. \ | ||
| 5 | It does this by using the exact same algorithm as bash." | ||
| 6 | SECTION = "libs" | ||
| 7 | HOMEPAGE = "http://carlo17.home.xs4all.nl/which/" | ||
| 8 | |||
| 9 | LICENSE = "GPLv2+" | ||
| 10 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
| 11 | |||
| 12 | PR = "r2" | ||
| 13 | |||
| 14 | SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/which/which-2.18.tar.gz/42d51938e48b91f6e19fabf216f5c3e9/which-${PV}.tar.gz \ | ||
| 15 | file://fix_name_conflict_group_member.patch \ | ||
| 16 | file://automake-foreign.patch \ | ||
| 17 | " | ||
| 18 | |||
| 19 | SRC_URI[md5sum] = "42d51938e48b91f6e19fabf216f5c3e9" | ||
| 20 | SRC_URI[sha256sum] = "9445cd7e02ec0c26a44fd56098464ded064ba5d93dd2e15ec12410ba56b2e544" | ||
| 21 | |||
| 22 | DEPENDS = "cwautomacros-native" | ||
| 23 | |||
| 24 | inherit autotools texinfo update-alternatives | ||
| 25 | |||
| 26 | do_configure_prepend() { | ||
| 27 | OLD="@ACLOCAL_CWFLAGS@" | ||
| 28 | NEW="-I ${STAGING_DIR_NATIVE}/${datadir}/cwautomacros/m4" | ||
| 29 | sed -i "s#${OLD}#${NEW}#g" `grep -rl ${OLD} ${S}` | ||
| 30 | } | ||
| 31 | |||
| 32 | ALTERNATIVE_${PN} = "which" | ||
| 33 | ALTERNATIVE_PRIORITY = "100" | ||
| 34 | |||
