components/gzip/patches/zgrep.in.patch
branchs11u1-sru
changeset 2842 2168e180aa83
parent 2443 952b267446eb
equal deleted inserted replaced
2836:b85607555ab0 2842:2168e180aa83
     1 This simplified patch was generated based on following community fix
     1 From 60b3f4eb672a85de28ecaad47ed426f8c8fe6c32 Mon Sep 17 00:00:00 2001
     2 which we have adopted in 12.0 and 11.2 (where we have latest gzip
     2 From: Paul Eggert <[email protected]>
     3 version and patch applied there without problem):
     3 Date: Sun, 21 Oct 2012 06:15:26 +0000
       
     4 Subject: zgrep: do not assume standard 'grep' has -e
     4 
     5 
     5 http://git.savannah.gnu.org/cgit/gzip.git/commit/?id=60b3f4eb672a85de28ecaad47ed426f8c8fe6c32
     6 On Solaris 11, /usr/bin/grep -e does not work.
     6 
     7 Problem reported by Petr Sumbera in
     7 --- gzip-1.4/zgrep.in	Sun Jan  3 09:26:02 2010
     8 <http://lists.gnu.org/archive/html/bug-gzip/2012-10/msg00003.html>.
     8 +++ gzip-1.4/zgrep.in	Wed Nov 28 05:44:33 2012
     9 * Makefile.am (.in): Substitute @GREP@.
     9 @@ -26,7 +26,7 @@
    10 * configure.ac (AC_PROG_GREP): Invoke.
       
    11 * zgrep.in (grep): Use @GREP@.
       
    12 ---
       
    13 diff --git a/Makefile.am b/Makefile.am
       
    14 index 86a0297..90fff2d 100644
       
    15 --- a/Makefile.am
       
    16 +++ b/Makefile.am
       
    17 @@ -84,6 +84,7 @@ SUFFIXES = .in
       
    18  	$(AM_V_GEN)sed \
       
    19  		-e 's|/bin/sh|$(SHELL)|g' \
       
    20  		-e 's|[@]bindir@|'\''$(bindir)'\''|g' \
       
    21 +		-e 's|[@]GREP@|$(GREP)|g' \
       
    22  		-e 's|[@]VERSION@|$(VERSION)|g' \
       
    23  		$(srcdir)/[email protected] >$@-t \
       
    24  	  && chmod a+x $@-t \
       
    25 diff --git a/configure.ac b/configure.ac
       
    26 index 4705ce4..ecb362b 100644
       
    27 --- a/configure.ac
       
    28 +++ b/configure.ac
       
    29 @@ -33,6 +33,7 @@ AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
       
    30  AC_PROG_CC_STDC
       
    31  AM_PROG_CC_C_O
       
    32  AC_PROG_CPP
       
    33 +AC_PROG_GREP
       
    34  AC_CHECK_TOOL([NM], [nm], [nm])
       
    35  AC_PROG_LN_S
       
    36  AC_PROG_RANLIB
       
    37 diff --git a/zgrep.in b/zgrep.in
       
    38 index f878acf..aec4a67 100644
       
    39 --- a/zgrep.in
       
    40 +++ b/zgrep.in
       
    41 @@ -28,7 +28,7 @@ case $1 in
    10  esac
    42  esac
    11  PATH=$bindir:$PATH
    43  PATH=$bindir:$PATH
    12  
    44  
    13 -grep='${GREP-grep}'
    45 -grep='${GREP-grep}'
    14 +grep='${GREP-'\''/usr/bin/ggrep'\''}'
    46 +grep='${GREP-'\''@GREP@'\''}'
    15  
    47  
    16  version='zgrep (gzip) @VERSION@
    48  version='zgrep (gzip) @VERSION@
    17  Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
    49  Copyright (C) 2010-2012 Free Software Foundation, Inc.
       
    50 --
       
    51 cgit v0.9.0.2