15785482 SUNBT7161330 gzgrep -e option no longer works s11-update
authorPetr Sumbera <petr.sumbera@oracle.com>
Fri, 30 Nov 2012 12:03:34 -0800
branchs11-update
changeset 2435 33cb297fa37c
parent 2434 6c9bb5cf5610
child 2441 68c1602e08c7
15785482 SUNBT7161330 gzgrep -e option no longer works
components/gzip/Makefile
components/gzip/patches/zgrep-f.patch
components/gzip/patches/zgrep.in.patch
--- a/components/gzip/Makefile	Thu Nov 29 06:06:04 2012 -0800
+++ b/components/gzip/Makefile	Fri Nov 30 12:03:34 2012 -0800
@@ -50,6 +50,8 @@
 # diffs failing due to script tracing in output files.
 unexport SHELLOPTS
 
+COMPONENT_PREP_ACTION = (cd $(SOURCE_DIR); $(AUTORECONF) -if)
+
 # Get the binaries to test from the component build area.
 COMPONENT_TEST_ENV +=	PATH=$(BUILD_DIR_$(BITS)):/usr/xpg4/bin:/usr/bin
 COMPONENT_TEST_TARGETS = check
--- a/components/gzip/patches/zgrep-f.patch	Thu Nov 29 06:06:04 2012 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- gzip-1.4/tests/zgrep-f.orig	2012-03-29 11:21:18.457617592 -0700
-+++ gzip-1.4/tests/zgrep-f	2012-03-29 11:21:56.078983515 -0700
[email protected]@ -32,7 +32,7 @@
- 
- 
- fail=0
--zgrep -f - haystack.gz < n > out 2>&1 || fail=1
-+zgrep --__bindir /usr/gnu/bin -f - haystack.gz < n > out 2>&1 || fail=1
- 
- compare out n || fail=1
- 
--- a/components/gzip/patches/zgrep.in.patch	Thu Nov 29 06:06:04 2012 -0800
+++ b/components/gzip/patches/zgrep.in.patch	Fri Nov 30 12:03:34 2012 -0800
@@ -1,18 +1,51 @@
---- gzip-1.5/zgrep.in.orig	2012-09-05 15:31:20.730722910 -0700
-+++ gzip-1.5/zgrep.in	2012-09-05 15:33:51.300884579 -0700
[email protected]@ -26,9 +26,13 @@
- case $1 in
- --__bindir) bindir=${2?}; shift; shift;;
+From 60b3f4eb672a85de28ecaad47ed426f8c8fe6c32 Mon Sep 17 00:00:00 2001
+From: Paul Eggert <[email protected]>
+Date: Sun, 21 Oct 2012 06:15:26 +0000
+Subject: zgrep: do not assume standard 'grep' has -e
+
+On Solaris 11, /usr/bin/grep -e does not work.
+Problem reported by Petr Sumbera in
+<http://lists.gnu.org/archive/html/bug-gzip/2012-10/msg00003.html>.
+* Makefile.am (.in): Substitute @[email protected]
+* configure.ac (AC_PROG_GREP): Invoke.
+* zgrep.in (grep): Use @[email protected]
+---
+diff --git a/Makefile.am b/Makefile.am
+index 86a0297..90fff2d 100644
+--- a/Makefile.am
++++ b/Makefile.am
[email protected]@ -84,6 +84,7 @@ SUFFIXES = .in
+ 	$(AM_V_GEN)sed \
+ 		-e 's|/bin/sh|$(SHELL)|g' \
+ 		-e 's|[@][email protected]|'\''$(bindir)'\''|g' \
++		-e 's|[@][email protected]|$(GREP)|g' \
+ 		-e 's|[@][email protected]|$(VERSION)|g' \
+ 		$(srcdir)/[email protected] >[email protected] \
+ 	  && chmod a+x [email protected] \
+diff --git a/configure.ac b/configure.ac
+index 4705ce4..ecb362b 100644
+--- a/configure.ac
++++ b/configure.ac
[email protected]@ -33,6 +33,7 @@ AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
+ AC_PROG_CC_STDC
+ AM_PROG_CC_C_O
+ AC_PROG_CPP
++AC_PROG_GREP
+ AC_CHECK_TOOL([NM], [nm], [nm])
+ AC_PROG_LN_S
+ AC_PROG_RANLIB
+diff --git a/zgrep.in b/zgrep.in
+index f878acf..aec4a67 100644
+--- a/zgrep.in
++++ b/zgrep.in
[email protected]@ -28,7 +28,7 @@ case $1 in
  esac
--PATH=$bindir:$PATH
-+PATH=/usr/xpg4/bin:$bindir:$PATH
+ PATH=$bindir:$PATH
  
 -grep='${GREP-grep}'
-+case "$1" in
-+	-F) grep='${FGREP-fgrep}'; shift;;
-+	-E) grep='${EGREP-egrep}'; shift;;
-+	*)  grep='${GREP-grep}';;
-+esac
++grep='${GREP-'\''@[email protected]'\''}'
  
  version='zgrep (gzip) @[email protected]
  Copyright (C) 2010-2012 Free Software Foundation, Inc.
+--
+cgit v0.9.0.2