Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Aug 2006 17:33:36 +0200
From:      Martin Kammerhofer <dada@pluto.tugraz.at>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/102020: [patch] port misc/portless: 0.2.2 => 0.2.4
Message-ID:  <200608141533.k7EFXa2O022408@pluto.tugraz.at>
Resent-Message-ID: <200608141540.k7EFeEro088886@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         102020
>Category:       ports
>Synopsis:       [maintainer-update] misc/portless from 0.2.2 to 0.2.4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 14 15:40:13 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Martin Kammerhofer
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
Graz Uni
>Environment:
System: FreeBSD Martin.liebt.Susi 6.1-STABLE FreeBSD 6.1-STABLE #0: Fri Jul 28 19:22:24 CEST 2006 toor@Martin.liebt.Susi:/usr/obj/usr/src/sys/P2B-S6 i386
>Description:
Upgrade to 0.2.4:
Use bash rather than /bin/sh to add -I option (case insensitive globbing).
>How-To-Repeat:
>Fix:
diff -ruN /usr/ports/misc/portless/Makefile ./Makefile
--- /usr/ports/misc/portless/Makefile	Mon Jul 10 09:53:48 2006
+++ ./Makefile	Sun Aug 13 12:23:14 2006
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	portless
-PORTVERSION=	0.2.2
+PORTVERSION=	0.2.4
 CATEGORIES=	misc
 MASTER_SITES=	# empty
 DISTFILES=	# none
@@ -15,14 +15,18 @@
 MAINTAINER=	mkamm@gmx.net
 COMMENT=	Quick display of files inside the FreeBSD ports tree
 
-NO_BUILD=	yes
+RUN_DEPENDS=	${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash
+
 MAN1=		portless.1
 MANCOMPRESSED=	no
 
 PLIST_FILES=	bin/portless
 
+do-build:
+	${SED} -e 's;@BASH@;${LOCALBASE}/bin/bash;g' \
+		${FILESDIR}/portless.sh >${WRKDIR}/portless
 do-install:
-	${INSTALL_SCRIPT} ${FILESDIR}/portless.sh ${PREFIX}/bin/portless
+	${INSTALL_SCRIPT} ${WRKDIR}/portless ${PREFIX}/bin
 	${INSTALL_MAN} ${FILESDIR}/portless.1 ${PREFIX}/man/man1
 
 .include <bsd.port.mk>
diff -ruN /usr/ports/misc/portless/files/portless.1 ./files/portless.1
--- /usr/ports/misc/portless/files/portless.1	Mon Jul 10 09:53:48 2006
+++ ./files/portless.1	Sun Aug 13 12:23:14 2006
@@ -22,11 +22,11 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" @(#)portless.1,v 1.6 2006/07/06 10:41:39 martin Exp
+.\" @(#)portless.1,v 1.7 2006/08/13 10:23:14 martin Exp
 .\"
 .\" Note: The date here should be updated whenever a non-trivial
 .\" change is made to the manual page.
-.Dd July 6, 2006
+.Dd August 13, 2006
 .Dt PORTLESS 1
 .Os
 .Sh NAME
@@ -34,7 +34,7 @@
 .Nd "quickly browse port descriptions"
 .Sh SYNOPSIS
 .Nm
-.Op Fl dfiMmp
+.Op Fl dfIiMmp
 .Op Fl P Ar pager
 .Ar portglob...
 .Nm
@@ -55,6 +55,17 @@
 Take the
 .Ar portglob
 argument literal (not as a shell glob).
+.It Fl I
+Ignore case when matching
+.Ar portglob
+against the ports tree. This option is only effective when
+.Ar portglob
+contains at least one unquoted globbing meta-character (
+.Sq Li * ,
+.Sq Li \&? ,
+or
+.Sq Li [
+).
 .It Fl i
 Display the
 .Pa distinfo
diff -ruN /usr/ports/misc/portless/files/portless.sh ./files/portless.sh
--- /usr/ports/misc/portless/files/portless.sh	Mon Jul 10 09:53:48 2006
+++ ./files/portless.sh	Sun Aug 13 12:23:14 2006
@@ -1,6 +1,6 @@
-#! /bin/sh --
+#! @BASH@ --
 # (X)Emacs: -*- mode: Shell-Script; coding: iso8859-1; -*-
-# @(#)portless.sh,v 1.8 2006/07/06 10:32:01 martin Exp
+# @(#)portless.sh,v 1.11 2006/08/13 10:23:14 martin Exp
 # Show "pkg-descr" file of matching port(s).
 #
 # Copyright (c) 2006 Martin Kammerhofer <mkamm@gmx.net>
@@ -29,7 +29,7 @@
 Script=`basename $0` # name of this script
 
 # set defaults
-for opt in d f i M m p w; do
+for opt in d f I i M m p w; do
     eval opt_$opt=""
 done
 PORTSDIR=${PORTSDIR:-/usr/ports}
@@ -45,7 +45,7 @@
 	echo >&2 "$Script: $1"
 	shift
     done
-    echo >&2 "usage: $Script [-dfiMmp] [-P pager] 'portglob'..."
+    echo >&2 "usage: $Script [-dfIiMmpw] [-P pager] 'portglob'..."
     exit 64	# EX_USAGE
 }
 
@@ -60,12 +60,15 @@
 }
 
 # process options
-while getopts "D:dfiMmpP:wx" option
+while getopts "D:dfIiMmpP:wx" option
   do
   case "$option" in
       (D) PORTSDIR="$OPTARG";;		# undocumented
       (d) addopt d "$PKGDESCR";;
       (f) opt_f="f";;
+      (I) shopt -s nocaseglob ||
+      usage "Option -I needs bash!"
+      opt_I="I";;
       (i) addopt i "distinfo";;
       (M) addopt M "Makefile";;
       (m) addopt m "pkg-message";;
@@ -82,6 +85,8 @@
     [ -n "$filelist" ] && usage "option -w not compatible with other options"
     PAGER="/bin/ls -1d"			# just echo directory name(s)
     filelist="."
+elif [ -n "$opt_f" -a -n "$opt_I" ]; then
+    usage "only one of options -f and -I is useful"
 else
     [ -n "$filelist" ] || filelist="$PKGDESCR"
 fi
@@ -100,6 +105,7 @@
     dirglob=$1
     portglob=$2
     shift 2
+    set +f
     for f in $filelist; do
 	if [ -n "$opt_f" ]; then
 	    set -- "$@" "$PORTSDIR"$dirglob"$portglob/$f"
@@ -112,6 +118,7 @@
 
 # main
 for p in "$@"; do
+    set -f
     set -- $p
     [ $# != 1 ] && usage "portglob '$p' contains whitespace!"
     case "$p" in
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608141533.k7EFXa2O022408>