auto-import grep-2.5.1-24 from grep-2.5.1-24.src.rpm
This commit is contained in:
parent
f8033fc591
commit
2393906004
11
grep-2.5.1-bracket.patch
Normal file
11
grep-2.5.1-bracket.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- grep-2.5.1/src/dfa.c.bracket 2003-10-30 16:21:14.000000000 +0000
|
||||
+++ grep-2.5.1/src/dfa.c 2003-10-30 16:22:38.000000000 +0000
|
||||
@@ -586,7 +586,7 @@
|
||||
work_mbc->coll_elems[work_mbc->ncoll_elems++] = elem;
|
||||
}
|
||||
}
|
||||
- wc = WEOF;
|
||||
+ wc1 = wc = WEOF;
|
||||
}
|
||||
else
|
||||
/* We treat '[' as a normal character here. */
|
@ -1,46 +1,48 @@
|
||||
--- grep-2.5.1/src/search.c.oi 2003-12-08 10:56:43.000000000 +0000
|
||||
+++ grep-2.5.1/src/search.c 2003-12-08 11:01:11.000000000 +0000
|
||||
@@ -219,6 +219,21 @@
|
||||
--- grep-2.5.1/lib/posix/regex.h.oi 2004-01-05 12:09:12.984391131 +0000
|
||||
+++ grep-2.5.1/lib/posix/regex.h 2004-01-05 12:09:24.717990622 +0000
|
||||
@@ -109,6 +109,10 @@
|
||||
If not set, \{, \}, {, and } are literals. */
|
||||
#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
|
||||
|
||||
patterns[pcount] = patterns0;
|
||||
+/* If this bit is set, then ignore case when matching.
|
||||
+ If not set, then case is significant. */
|
||||
+#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
|
||||
+
|
||||
/* If this bit is set, +, ? and | aren't recognized as operators.
|
||||
If not set, they are. */
|
||||
#define RE_LIMITED_OPS (RE_INTERVALS << 1)
|
||||
--- grep-2.5.1/src/search.c.oi 2004-01-05 12:07:00.550199415 +0000
|
||||
+++ grep-2.5.1/src/search.c 2004-01-05 12:07:00.566197505 +0000
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
+ // patch ed@javabase.fsnet.co.uk
|
||||
+ if (match_icase
|
||||
+#ifdef MBS_SUPPORT
|
||||
+ && MB_CUR_MAX == 1
|
||||
+#endif /* MBS_SUPPORT */
|
||||
+ )
|
||||
+ {
|
||||
+ static char trans[NCHAR];
|
||||
+ int i;
|
||||
+ for (i = 0; i < NCHAR; ++i)
|
||||
+ trans[i] = TOLOWER (i);
|
||||
+ patterns[pcount].regexbuf.translate = trans;
|
||||
+ }
|
||||
+ // end patch
|
||||
+
|
||||
if ((err = re_compile_pattern (motif, len,
|
||||
&(patterns[pcount].regexbuf))) != 0)
|
||||
error (2, 0, err);
|
||||
@@ -302,6 +317,21 @@
|
||||
error (2, errno, _("memory exhausted"));
|
||||
patterns[pcount] = patterns0;
|
||||
#include "system.h"
|
||||
#include "grep.h"
|
||||
-#include "regex.h"
|
||||
+#include <regex.h>
|
||||
#include "dfa.h"
|
||||
#include "kwset.h"
|
||||
#include "error.h"
|
||||
@@ -190,7 +190,7 @@
|
||||
size_t total = size;
|
||||
char const *motif = pattern;
|
||||
|
||||
- re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE);
|
||||
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | (match_icase ? RE_ICASE : 0));
|
||||
dfasyntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE, match_icase, eolbyte);
|
||||
|
||||
/* For GNU regex compiler we have to pass the patterns separately to detect
|
||||
@@ -268,12 +268,12 @@
|
||||
|
||||
if (strcmp (matcher, "awk") == 0)
|
||||
{
|
||||
- re_set_syntax (RE_SYNTAX_AWK);
|
||||
+ re_set_syntax (RE_SYNTAX_AWK | (match_icase ? RE_ICASE : 0));
|
||||
dfasyntax (RE_SYNTAX_AWK, match_icase, eolbyte);
|
||||
}
|
||||
else
|
||||
{
|
||||
- re_set_syntax (RE_SYNTAX_POSIX_EGREP);
|
||||
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP | (match_icase ? RE_ICASE : 0));
|
||||
dfasyntax (RE_SYNTAX_POSIX_EGREP, match_icase, eolbyte);
|
||||
}
|
||||
|
||||
+ // patch ed@javabase.fsnet.co.uk
|
||||
+ if (match_icase
|
||||
+#ifdef MBS_SUPPORT
|
||||
+ && MB_CUR_MAX == 1
|
||||
+#endif /* MBS_SUPPORT */
|
||||
+ )
|
||||
+ {
|
||||
+ static char trans[NCHAR];
|
||||
+ int i;
|
||||
+ for (i = 0; i < NCHAR; ++i)
|
||||
+ trans[i] = TOLOWER (i);
|
||||
+ patterns[pcount].regexbuf.translate = trans;
|
||||
+ }
|
||||
+ // end patch
|
||||
+
|
||||
if ((err = re_compile_pattern (motif, len,
|
||||
&(patterns[pcount].regexbuf))) != 0)
|
||||
error (2, 0, err);
|
||||
|
35
grep.spec
35
grep.spec
@ -1,5 +1,5 @@
|
||||
%define beta %nil
|
||||
%define rel 17.4
|
||||
%define rel 24
|
||||
Summary: The GNU versions of grep pattern matching utilities.
|
||||
Name: grep
|
||||
Version: 2.5.1
|
||||
@ -15,7 +15,7 @@ Patch0: grep-2.5-i18n.patch
|
||||
Patch1: grep-2.5.1-oi.patch
|
||||
Patch2: grep-2.5.1-manpage.patch
|
||||
Patch3: grep-2.5.1-gofast.patch
|
||||
Patch4: grep-2.5.1-efgrep.patch
|
||||
Patch4: grep-2.5.1-bracket.patch
|
||||
Prefix: %{_prefix}
|
||||
Prereq: /sbin/install-info
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
||||
@ -37,7 +37,7 @@ utility for searching through text.
|
||||
%patch1 -p1 -b .oi
|
||||
%patch2 -p1 -b .manpage
|
||||
%patch3 -p1 -b .gofast
|
||||
%patch4 -p1 -b .efgrep
|
||||
%patch4 -p1 -b .bracket
|
||||
|
||||
%build
|
||||
[ ! -e configure ] && ./autogen.sh
|
||||
@ -55,6 +55,10 @@ rm -rf $RPM_BUILD_ROOT%{_prefix}/bin
|
||||
gzip -9f $RPM_BUILD_ROOT%{_infodir}/grep*
|
||||
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||
|
||||
# Use symlinks for egrep and fgrep
|
||||
ln -sf grep $RPM_BUILD_ROOT/bin/egrep
|
||||
ln -sf grep $RPM_BUILD_ROOT/bin/fgrep
|
||||
|
||||
%find_lang %name
|
||||
|
||||
%clean
|
||||
@ -81,23 +85,32 @@ fi
|
||||
%{_mandir}/*/*
|
||||
|
||||
%changelog
|
||||
* Wed Dec 10 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-17.4
|
||||
* Mon Jan 5 2004 Tim Waugh <twaugh@redhat.com> 2.5.1-24
|
||||
- Work around glibc bug #112869 (segfault in re_compile_pattern).
|
||||
- Avoid patching Makefile.am, to avoid automake/autoconf weirdness.
|
||||
|
||||
* Wed Dec 10 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-23
|
||||
- Another multibyte efficiency bug-fix (bug #111800).
|
||||
|
||||
* Mon Dec 8 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-17.3
|
||||
* Mon Dec 8 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-22
|
||||
- Fixed [:alpha:]-type character classes (bug #108484).
|
||||
- Fixed -o -i properly (bug #111489).
|
||||
|
||||
* Sat Dec 6 2003 Tim Waugh <twaugh@redhat.com>
|
||||
- Another bug-fix for UTF-8 speed-up patch (bug #111614).
|
||||
* Sat Dec 6 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-21
|
||||
- Fixed 'fgrep -i' (bug #111614).
|
||||
|
||||
* Fri Nov 21 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-17.2
|
||||
* Fri Nov 21 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-20
|
||||
- Another two multibyte efficiency bug-fixes (bug #110524).
|
||||
|
||||
* Tue Nov 11 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-17.1
|
||||
- Fixed man page bug (bug #106267).
|
||||
- Turn on multibyte efficiency patch again.
|
||||
* Thu Nov 6 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-19
|
||||
- Fixed a multibyte efficiency bug.
|
||||
|
||||
* Thu Nov 6 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-18
|
||||
- Turn on multibyte efficiency patch again to shake out bugs.
|
||||
|
||||
* Wed Oct 8 2003 Tim Waugh <twaugh@redhat.com>
|
||||
- Fixed man page bug (bug #106267).
|
||||
|
||||
* Thu Sep 18 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-17
|
||||
- Use symlinks for egrep/fgrep, rather than shell script wrappers.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user