pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/40221: pkgsrc/mail/p5-Mail-Mbox-MessageParser requires GNU grep



>Number:         40221
>Category:       pkg
>Synopsis:       pkgsrc/mail/p5-Mail-Mbox-MessageParser requires GNU grep
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 18 22:25:00 +0000 2008
>Originator:     Tim
>Release:        pkgsrc current
>Organization:
Fermilab
>Environment:
SunOS hostname 5.10 Generic_137111-05 sun4u sparc SUNW,Sun-Fire-V440 Solaris

>Description:
lib/Mail/Mbox/MessageParser/Grep.pm calls grep with an arguments like 
--extended-regexp --line-number --byte-offset --binary-files=text and as a 
result the 'grep' used must be GNU Grep.
On Solaris the default grep is /usr/xpg4/bin/grep which will not accept those 
arguments.  So, for Solaris at least we need to depend on and use 
pkgrsrc/textproc/grep.

Patch included below.
>How-To-Repeat:
Easiest to demonstrate by building pkgsrc/mail/grepmail and trying to use it, 
since thise package is a perl library.
>Fix:
RCS file: /cvsroot/pkgsrc/mail/p5-Mail-Mbox-MessageParser/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- Makefile    19 Oct 2008 19:18:12 -0000      1.12
+++ Makefile    18 Dec 2008 22:23:09 -0000
@@ -20,13 +20,20 @@
 
 USE_TOOLS+=    grep gzip
 
+.include "../../mk/bsd.prefs.mk"
+
 SETTINGS+=     INSTALLDIRS=site
 # XXX: might need adaptation if the programs are not
 # in the base system
 SETTINGS+=     BZIP=/usr/bin/bzip2
 SETTINGS+=     BZIP2=/usr/bin/bzip2
 SETTINGS+=     DIFF=/usr/bin/diff
+.if ${OPSYS} == "SunOS"
+DEPENDS+=      grep>=0:../../textproc/grep
+SETTINGS+=     GREP=${LOCALBASE}/bin/${GNU_PROGRAM_PREFIX:Q}grep
+.else
 SETTINGS+=     GREP=${GREP}
+.endif
 SETTINGS+=     GZIP=${GZIP_CMD}
 SETTINGS+=     TZIP=



Home | Main Index | Thread Index | Old Index