ports/98565: [PATCH] Add PKGVERSION to bsd.port.mk

michael johnson ahze at FreeBSD.org
Tue Jun 6 01:01:43 UTC 2006


>Number:         98565
>Category:       ports
>Synopsis:       [PATCH] Add PKGVERSION to bsd.port.mk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 06 00:10:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     michael johnson
>Release:        
>Organization:
>Environment:
FreeBSD sparkey.ahze.net 7.0-CURRENT FreeBSD 7.0-CURRENT #6: Sun Jun  4 22:04:11 EDT 2006     ahze at sparkey.ahze.net:/usr/obj/usr/src/sys/Sparkey  sparc64

>Description:
This splists up PKGNAME in to PKGVERSION, I plan to use
PKGVERSION in bsd.gstreamer.mk and in all the gstreamer 
ports.
>How-To-Repeat:

>Fix:
Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.533
diff -u -r1.533 bsd.port.mk
--- bsd.port.mk	23 May 2006 21:53:18 -0000	1.533
+++ bsd.port.mk	5 Jun 2006 23:00:53 -0000
@@ -72,6 +72,9 @@
 # PKGNAMEPREFIX	- Prefix to specify that port is language-specific, etc.
 #				  Optional.
 # PKGNAMESUFFIX	- Suffix to specify compilation options.  Optional.
+# PKGVERSION		- Always defined as
+#				  ${PORTVERSION}.
+#				  Do not define this in your Makefile.
 # UNIQUENAME	- A name for your port that is globally unique.  By default,
 #				  this is set to ${LATEST_LINK} when LATEST_LINK is set,
 #				  and to ${PKGNAMEPREFIX}${PORTNAME} otherwise.
@@ -1212,8 +1215,11 @@
 
 # check for old, crufty, makefile types, part 2.  The "else" case
 # should have been handled in part 1, above.
+.if !defined(PKGVERSION)
+PKGVERSION=	${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
+.endif
 .if !defined(PKGNAME)
-PKGNAME=	${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
+PKGNAME=	${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION}
 .endif
 DISTNAME?=	${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list