This commit is contained in:
parent
67cc99e155
commit
f78702e37a
@ -1,14 +1,6 @@
|
||||
--- configure.ac
|
||||
+++ configure.ac
|
||||
@@ -72,6 +72,7 @@
|
||||
dnl I18N feature
|
||||
ALL_LINGUAS="cs de el eo es et fr gl hr id it ja ko nl no pl pt_BR ru sl sv"
|
||||
AM_GNU_GETTEXT
|
||||
+AM_GNU_GETTEXT_VERSION(0.12)
|
||||
|
||||
dnl DOS file name convention
|
||||
dnl sets HAVE_DOS_FILE_NAMES
|
||||
@@ -141,4 +142,4 @@
|
||||
@@ -167,4 +167,4 @@ if test x"$testpcre" = x"yes"; then
|
||||
AC_SEARCH_LIBS(pcre_exec, pcre, [AC_DEFINE(HAVE_LIBPCRE, 1, [Define to 1 if you have the `pcre' library (-lpcre).])])
|
||||
fi
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- Makefile.am
|
||||
+++ Makefile.am
|
||||
@@ -5,21 +5,7 @@
|
||||
@@ -5,21 +5,7 @@ SUBDIRS = intl po lib doc src tests m4 v
|
||||
|
||||
EXTRA_DIST = TODO README README-alpha
|
||||
|
||||
@ -23,3 +23,13 @@
|
||||
|
||||
# make cvs-clean blatantly stolen from KDE CVS ;)
|
||||
cvs-clean:
|
||||
--- lib/Makefile.am
|
||||
+++ lib/Makefile.am
|
||||
@@ -15,6 +15,6 @@ libgreputils_a_SOURCES = \
|
||||
libgreputils_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
noinst_HEADERS = \
|
||||
closeout.h error.h exclude.h fnmatch.h getopt.h \
|
||||
- hard-locale.h obstack.h quotearg.h regex.h savedir.h xalloc.h xstrtol.h
|
||||
+ hard-locale.h obstack.h quotearg.h savedir.h xalloc.h xstrtol.h
|
||||
|
||||
EXTRA_DIST = strtol.c malloc.c realloc.c
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 28 14:27:50 CET 2007 - schwab@suse.de
|
||||
|
||||
- General cleanup.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 12 14:32:07 CEST 2007 - schwab@suse.de
|
||||
|
||||
|
33
grep.spec
33
grep.spec
@ -19,7 +19,7 @@ Provides: base:/usr/bin/grep
|
||||
AutoReqProv: on
|
||||
PreReq: %{install_info_prereq}
|
||||
Version: 2.5.2
|
||||
Release: 29
|
||||
Release: 37
|
||||
Summary: Print lines matching a pattern
|
||||
Source: grep-%{version}.tar.bz2
|
||||
Patch: grep-%{version}.diff
|
||||
@ -59,15 +59,15 @@ Authors:
|
||||
%patch6
|
||||
%patch7
|
||||
%patch8
|
||||
rm -f lib/regex.[ch]
|
||||
|
||||
%build
|
||||
%{suse_update_config -f}
|
||||
rm -f m4/header.m4 m4/install.m4 m4/isc-posix.m4 m4/largefile.m4 m4/missing.m4 m4/sanity.m4
|
||||
autoreconf --force --install
|
||||
test -f po/Makevars || mv po/Makevars.template po/Makevars
|
||||
AUTOPOINT=true autoreconf --force --install
|
||||
./configure CFLAGS="$RPM_OPT_FLAGS" \
|
||||
--prefix=/usr --mandir=%{_mandir} --infodir=%{_infodir} \
|
||||
--bindir=/bin --build=%{_target_cpu}-suse-linux
|
||||
--bindir=/bin --build=%{_target_cpu}-suse-linux \
|
||||
--without-included-regex
|
||||
make
|
||||
make check VERBOSE=1
|
||||
|
||||
@ -77,6 +77,7 @@ install -d $RPM_BUILD_ROOT/usr/bin
|
||||
ln -sf ../../bin/egrep $RPM_BUILD_ROOT/usr/bin/egrep
|
||||
ln -sf ../../bin/fgrep $RPM_BUILD_ROOT/usr/bin/fgrep
|
||||
ln -sf ../../bin/grep $RPM_BUILD_ROOT/usr/bin/grep
|
||||
%find_lang %name
|
||||
|
||||
%post
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/grep.info.gz
|
||||
@ -84,21 +85,17 @@ ln -sf ../../bin/grep $RPM_BUILD_ROOT/usr/bin/grep
|
||||
%postun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/grep.info.gz
|
||||
|
||||
%files
|
||||
%files -f %name.lang
|
||||
%defattr(-,root,root)
|
||||
%doc README ABOUT-NLS AUTHORS COPYING NEWS THANKS TODO
|
||||
/bin/egrep
|
||||
/bin/fgrep
|
||||
/bin/grep
|
||||
/usr/bin/egrep
|
||||
/usr/bin/fgrep
|
||||
/usr/bin/grep
|
||||
%doc %{_mandir}/man1/egrep.1.gz
|
||||
%doc %{_mandir}/man1/fgrep.1.gz
|
||||
%doc %{_mandir}/man1/grep.1.gz
|
||||
%doc %{_infodir}/grep*.gz
|
||||
/usr/share/locale/*/LC_MESSAGES/grep.mo
|
||||
%doc README AUTHORS NEWS THANKS TODO
|
||||
/bin/*
|
||||
/usr/bin/*
|
||||
%doc %{_mandir}/man1/*.gz
|
||||
%doc %{_infodir}/*.gz
|
||||
|
||||
%changelog
|
||||
* Wed Nov 28 2007 - schwab@suse.de
|
||||
- General cleanup.
|
||||
* Wed Sep 12 2007 - schwab@suse.de
|
||||
- Allocate MB properties lazily.
|
||||
* Tue May 15 2007 - schwab@suse.de
|
||||
|
33
icase.diff
33
icase.diff
@ -43,39 +43,14 @@
|
||||
else if (mid)
|
||||
--- src/search.c
|
||||
+++ src/search.c
|
||||
@@ -192,11 +192,19 @@ GEAcompile (char const *pattern, size_t
|
||||
const char *sep;
|
||||
@@ -193,10 +193,8 @@ GEAcompile (char const *pattern, size_t
|
||||
size_t total = size;
|
||||
char const *motif = pattern;
|
||||
+ static char translate[NCHAR];
|
||||
|
||||
-#if 0
|
||||
- if (match_icase)
|
||||
- syntax_bits |= RE_ICASE;
|
||||
+ if (match_icase
|
||||
+#ifdef MBS_SUPPORT
|
||||
+ && MB_CUR_MAX == 1
|
||||
#endif
|
||||
+ )
|
||||
+ {
|
||||
+ int i;
|
||||
+ for (i = 0; i < NCHAR; i++)
|
||||
+ translate[i] = ISUPPER (i) ? TOLOWER (i) : i;
|
||||
+ }
|
||||
+
|
||||
if (match_icase)
|
||||
syntax_bits |= RE_ICASE;
|
||||
-#endif
|
||||
re_set_syntax (syntax_bits);
|
||||
dfasyntax (syntax_bits, match_icase, eolbyte);
|
||||
|
||||
@@ -224,6 +232,12 @@ GEAcompile (char const *pattern, size_t
|
||||
if (patterns == NULL)
|
||||
error (2, errno, _("memory exhausted"));
|
||||
patterns[pcount] = patterns0;
|
||||
+ if (match_icase
|
||||
+#ifdef MBS_SUPPORT
|
||||
+ && MB_CUR_MAX == 1
|
||||
+#endif
|
||||
+ )
|
||||
+ patterns[pcount].regexbuf.translate = translate;
|
||||
|
||||
if ((err = re_compile_pattern (motif, len,
|
||||
&(patterns[pcount].regexbuf))) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user