Subject: pkg/16772: port2pkg don't convert ${PORTNAME}
To: None <gnats-bugs@gnats.netbsd.org>
From: None <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 05/12/2002 18:08:52
>Number:         16772
>Category:       pkg
>Synopsis:       port2pkg don't convert ${PORTNAME}
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun May 12 02:09:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     YAMAMOTO Takashi
>Release:        NetBSD 1.5ZC
>Organization:
>Environment:
	
	
System: NetBSD bear.yamanet 1.5ZC NetBSD 1.5ZC (build) #13: Wed Apr 3 03:54:19 JST 2002 takashi@bear.yamanet:/usr/home/takashi/work/kernel/build i386
Architecture: i386
Machine: i386
>Description:
	port2pkg don't convert ${PORTNAME}
>How-To-Repeat:
	convert x11/xclip
>Fix:

Index: port2pkg.pl
===================================================================
RCS file: /cvs/NetBSD/pkgsrc/pkgtools/port2pkg/files/port2pkg.pl,v
retrieving revision 1.10
diff -u -r1.10 port2pkg.pl
--- port2pkg.pl	2002/01/01 17:01:01	1.10
+++ port2pkg.pl	2002/05/12 08:58:07
@@ -181,6 +181,7 @@
 		s|^FETCH_(DEPENDS)|BUILD_$1|;
 		s|^LIB_(DEPENDS)|$1|;
 		s|\$\{PORTSDIR\}|../..|g;
+		s|\$\{PORTNAME\}|\${PKGNAME:C/-.*\$//}|g;
 		s|PLIST_SUB|PLIST_SUBST|;
 
 		if (defined($master_site_subdir) &&
>Release-Note:
>Audit-Trail:
>Unformatted: