diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-01-06 05:36:21 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-01-06 05:36:21 +0000 |
commit | c702d9f1422a7e6d6689cf8a272e8263aa83a855 (patch) | |
tree | 5fc4e30612453dba9195eb2d4f5021e1c0248c5c /sys-apps/grep | |
parent | More changes (as usual). Mainly security updates - added CAN-2004-1068, CAN-... (diff) | |
download | gentoo-2-c702d9f1422a7e6d6689cf8a272e8263aa83a855.tar.gz gentoo-2-c702d9f1422a7e6d6689cf8a272e8263aa83a855.tar.bz2 gentoo-2-c702d9f1422a7e6d6689cf8a272e8263aa83a855.zip |
Fix UTF8 case matching with a patch from Debian #76192 by Michael Mauch. Also update one of the tests to fix #63507 by Daniel Black.
Diffstat (limited to 'sys-apps/grep')
-rw-r--r-- | sys-apps/grep/ChangeLog | 10 | ||||
-rw-r--r-- | sys-apps/grep/files/2.5.1-manpage-line-buffering.patch (renamed from sys-apps/grep/files/2.5.1-manpage-line-buffering.diff) | 3 | ||||
-rw-r--r-- | sys-apps/grep/files/2.5.1-tests.patch | 13 | ||||
-rw-r--r-- | sys-apps/grep/files/2.5.1-utf8-case.patch | 29 | ||||
-rw-r--r-- | sys-apps/grep/files/digest-grep-2.5.1-r7 | 1 | ||||
-rw-r--r-- | sys-apps/grep/files/gentoo-sparc32-dfa.patch | 11 | ||||
-rw-r--r-- | sys-apps/grep/files/grep-2.5.1-restrict_arr.patch | 5 | ||||
-rw-r--r-- | sys-apps/grep/grep-2.5.1-r6.ebuild | 9 | ||||
-rw-r--r-- | sys-apps/grep/grep-2.5.1-r7.ebuild | 84 |
9 files changed, 146 insertions, 19 deletions
diff --git a/sys-apps/grep/ChangeLog b/sys-apps/grep/ChangeLog index 8a20dd49f294..31e953167807 100644 --- a/sys-apps/grep/ChangeLog +++ b/sys-apps/grep/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-apps/grep # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/ChangeLog,v 1.39 2005/01/02 23:18:23 ciaranm Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/ChangeLog,v 1.40 2005/01/06 05:36:21 vapier Exp $ + +*grep-2.5.1-r7 (06 Jan 2005) + + 06 Jan 2005; Mike Frysinger <vapier@gentoo.org> + +files/2.5.1-tests.patch, +files/2.5.1-utf8-case.patch, + +grep-2.5.1-r7.ebuild: + Fix UTF8 case matching with a patch from Debian #76192 by Michael Mauch. + Also update one of the tests to fix #63507 by Daniel Black. 02 Jan 2005; Ciaran McCreesh <ciaranm@gentoo.org> : Change encoding to UTF-8 for GLEP 31 compliance diff --git a/sys-apps/grep/files/2.5.1-manpage-line-buffering.diff b/sys-apps/grep/files/2.5.1-manpage-line-buffering.patch index 8b32dd2984d7..6a417a9b9b4d 100644 --- a/sys-apps/grep/files/2.5.1-manpage-line-buffering.diff +++ b/sys-apps/grep/files/2.5.1-manpage-line-buffering.patch @@ -1,3 +1,6 @@ +grep recognizes '--line-buffered' instead of '--line-buffering' +taviso (20 Aug 2004) + --- doc/grep.1.orig 2004-08-20 09:28:45.857442048 +0100 +++ doc/grep.1 2004-08-20 09:27:20.959348520 +0100 @@ -303,7 +303,7 @@ diff --git a/sys-apps/grep/files/2.5.1-tests.patch b/sys-apps/grep/files/2.5.1-tests.patch new file mode 100644 index 000000000000..c0f98945eaaa --- /dev/null +++ b/sys-apps/grep/files/2.5.1-tests.patch @@ -0,0 +1,13 @@ +glibc has changed the error code it returns from '1' to '2'. The +included grep regex library returns '1' still though, so spencer +test #55 incorrectly fails. For now, we update the test to match +the glibc regex since that is what we're using ;). + +http://bugs.gentoo.org/show_bug.cgi?id=76192 +http://linuxfromscratch.org/pipermail/lfs-dev/2003-February/032543.html + +--- tests/spencer1.tests.orig 2005-01-06 00:17:34.550645568 -0500 ++++ tests/spencer1.tests 2005-01-06 00:18:43.682135984 -0500 +@@ -55 +55 @@ +-1@(*)b@- ++2@(*)b@- diff --git a/sys-apps/grep/files/2.5.1-utf8-case.patch b/sys-apps/grep/files/2.5.1-utf8-case.patch new file mode 100644 index 000000000000..c8842709daf9 --- /dev/null +++ b/sys-apps/grep/files/2.5.1-utf8-case.patch @@ -0,0 +1,29 @@ +Grabbed from Debian: +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=249245 + +To fix Gentoo bug: +http://bugs.gentoo.org/show_bug.cgi?id=76192 + +--- grep-2.5.1.orig/src/dfa.c 2004-10-19 02:07:23.000000000 +0900 ++++ grep-2.5.1/src/dfa.c 2004-10-19 02:24:28.000000000 +0900 +@@ -652,6 +652,20 @@ + REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al, + work_mbc->nchars + 1); + work_mbc->chars[work_mbc->nchars++] = (wchar_t)wc; ++ if (case_fold && (iswlower((wint_t) wc) || iswupper((wint_t) wc))) ++ { ++ wint_t altcase; ++ ++ altcase = wc; /* keeps compiler happy */ ++ if (iswlower((wint_t) wc)) ++ altcase = towupper((wint_t) wc); ++ else if (iswupper((wint_t) wc)) ++ altcase = towlower((wint_t) wc); ++ ++ REALLOC_IF_NECESSARY(work_mbc->chars, wchar_t, chars_al, ++ work_mbc->nchars + 1); ++ work_mbc->chars[work_mbc->nchars++] = (wchar_t) altcase; ++ } + } + } + while ((wc = wc1) != L']'); diff --git a/sys-apps/grep/files/digest-grep-2.5.1-r7 b/sys-apps/grep/files/digest-grep-2.5.1-r7 new file mode 100644 index 000000000000..ef03a032aa20 --- /dev/null +++ b/sys-apps/grep/files/digest-grep-2.5.1-r7 @@ -0,0 +1 @@ +MD5 85df024edc9f9689035f6b3de28c7731 grep-2.5.1.tar.gz 683093 diff --git a/sys-apps/grep/files/gentoo-sparc32-dfa.patch b/sys-apps/grep/files/gentoo-sparc32-dfa.patch deleted file mode 100644 index 20295fc43fdd..000000000000 --- a/sys-apps/grep/files/gentoo-sparc32-dfa.patch +++ /dev/null @@ -1,11 +0,0 @@ -*** src/dfa.h Fri Apr 25 01:36:02 2003 ---- src/dfa.h.mod Fri Apr 25 01:36:56 2003 -*************** -*** 428,432 **** ---- 428,433 ---- - - /* dfaerror() is called by the regexp routines whenever an error occurs. It - takes a single argument, a NUL-terminated string describing the error. - The user must supply a dfaerror. */ - extern void dfaerror PARAMS ((const char *)); -+ diff --git a/sys-apps/grep/files/grep-2.5.1-restrict_arr.patch b/sys-apps/grep/files/grep-2.5.1-restrict_arr.patch index aa71bbcb9db0..54caa355c2fa 100644 --- a/sys-apps/grep/files/grep-2.5.1-restrict_arr.patch +++ b/sys-apps/grep/files/grep-2.5.1-restrict_arr.patch @@ -1,10 +1,11 @@ --- lib/posix/regex.h.mps 2004-06-09 22:00:00.000000000 +0200 +++ lib/posix/regex.h 2004-06-09 22:00:40.000000000 +0200 -@@ -533,7 +533,9 @@ extern int re_exec _RE_ARGS ((const char +@@ -533,7 +533,10 @@ extern int re_exec _RE_ARGS ((const char /* For now unconditionally define __restrict_arr to expand to nothing. Ideally we would have a test for the compiler which allows defining it to restrict. */ -+#ifndef __restrict_arr ++#include <features.h> ++#if !defined(__UCLIBC__) || !defined(__restrict_arr) #define __restrict_arr +#endif diff --git a/sys-apps/grep/grep-2.5.1-r6.ebuild b/sys-apps/grep/grep-2.5.1-r6.ebuild index da21e4e3c6de..443e4a084fb5 100644 --- a/sys-apps/grep/grep-2.5.1-r6.ebuild +++ b/sys-apps/grep/grep-2.5.1-r6.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/grep-2.5.1-r6.ebuild,v 1.10 2005/01/02 23:18:23 ciaranm Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/grep-2.5.1-r6.ebuild,v 1.11 2005/01/06 05:36:21 vapier Exp $ inherit gnuconfig flag-o-matic eutils @@ -24,15 +24,14 @@ DEPEND="${RDEPEND} src_unpack() { unpack ${A} && cd ${S} || die - if [ "${ARCH}" = "sparc" -a "${PROFILE_ARCH}" = "sparc" ] ; then - epatch "${FILESDIR}/gentoo-sparc32-dfa.patch" - fi + # Fix a weird sparc32 compiler bug + echo "" >> src/dfa.h epatch "${FILESDIR}/${PV}-manpage.patch" # man page describes a --line-buffering option, where as # grep recognises --line-buffered. # -taviso (20 Aug 2004) - epatch ${FILESDIR}/${PV}-manpage-line-buffering.diff + epatch ${FILESDIR}/${PV}-manpage-line-buffering.patch use uclibc && epatch ${FILESDIR}/grep-2.5.1-restrict_arr.patch diff --git a/sys-apps/grep/grep-2.5.1-r7.ebuild b/sys-apps/grep/grep-2.5.1-r7.ebuild new file mode 100644 index 000000000000..f5d13a35f63e --- /dev/null +++ b/sys-apps/grep/grep-2.5.1-r7.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/grep-2.5.1-r7.ebuild,v 1.1 2005/01/06 05:36:21 vapier Exp $ + +inherit flag-o-matic eutils + +DESCRIPTION="GNU regular expression matcher" +HOMEPAGE="http://www.gnu.org/software/grep/grep.html" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz + mirror://gentoo/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="build nls pcre static uclibc" + +RDEPEND="virtual/libc" +DEPEND="${RDEPEND} + pcre? ( + >=sys-apps/sed-4 + dev-libs/libpcre + ) + nls? ( sys-devel/gettext )" + +src_unpack() { + unpack ${A} + cd "${S}" + + # Fix a weird sparc32 compiler bug + echo "" >> src/dfa.h + + epatch "${FILESDIR}"/${PV}-manpage.patch + epatch "${FILESDIR}"/${PV}-manpage-line-buffering.patch + epatch "${FILESDIR}"/${P}-fgrep.patch.bz2 + epatch "${FILESDIR}"/${P}-i18n.patch.bz2 + epatch "${FILESDIR}"/${P}-gofast.patch.bz2 + epatch "${FILESDIR}"/${P}-oi.patch.bz2 + epatch "${FILESDIR}"/${P}-restrict_arr.patch + epatch "${FILESDIR}"/${PV}-utf8-case.patch + epatch "${FILESDIR}"/${PV}-tests.patch +} + +src_compile() { + if use static ; then + append-flags -static + append-ldflags -static + fi + + local myconf + if use uclibc ; then + myconf="${myconf} --without-included-regex" + else + myconf="${myconf} $(use_enable pcre perl-regexp)" + fi + econf \ + --bindir=/bin \ + $(use_enable nls) \ + ${myconf} \ + || die "econf failed" + + if use pcre && ! use uclibc ; then + sed -i \ + -e 's:-lpcre:/usr/lib/libpcre.a:g' \ + {lib,src}/Makefile \ + || die "sed Makefile failed" + fi + + emake || die "emake failed" +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + + # Override the default shell scripts... grep knows how to act + # based on how it's called + ln -sfn grep "${D}"/bin/egrep || die "ln egrep failed" + ln -sfn grep "${D}"/bin/fgrep || die "ln fgrep failed" + + if use build ; then + rm -r "${D}"/usr/share + else + dodoc AUTHORS ChangeLog NEWS README THANKS TODO + fi +} |