From shaun@inerd.com  Tue Jun 13 18:18:38 2006
Return-Path: <shaun@inerd.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 80BC216A41B
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 13 Jun 2006 18:18:38 +0000 (UTC)
	(envelope-from shaun@inerd.com)
Received: from dione.picobyte.net (host-212-158-207-124.bulldogdsl.com [212.158.207.124])
	by mx1.FreeBSD.org (Postfix) with SMTP id E551743D46
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 13 Jun 2006 18:18:37 +0000 (GMT)
	(envelope-from shaun@inerd.com)
Received: from charon.picobyte.net (charon.picobyte.net [IPv6:2001:4bd0:201e::fe03])
	by dione.picobyte.net (Postfix) with ESMTP
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 13 Jun 2006 19:18:36 +0100 (BST)
Message-Id: <1150222716.44265@charon.picobyte.net>
Date: Tue, 13 Jun 2006 19:18:36 +0100
From: Shaun Amott <shaun@inerd.com>
Reply-To: Shaun Amott <shaun@inerd.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] bsd.port.mk: Extend DISTVERSION->PORTVERSION auto-conversion to cover month names
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         98909
>Category:       ports
>Synopsis:       [PATCH] bsd.port.mk: Extend DISTVERSION->PORTVERSION auto-conversion to cover month names
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    portmgr
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 13 18:20:18 GMT 2006
>Closed-Date:    Sat Mar 24 03:18:12 GMT 2007
>Last-Modified:  Sat Mar 24 03:18:12 GMT 2007
>Originator:     Shaun Amott
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
>Environment:

>Description:

bsd.port.mk does a nice job of creating PORTVERSION from DISTVERSION,
but the conversion code could be improved to deal with month names
within DISTVERSION.

For example:
    DISTVERSION= 2005-Jan-11  -> PORTVERSION= 2005.j.11

    This isn't much use, because Febuary's release will appear older.

With the proposed patch:
    DISTVERSION= 2005-Jan-11  -> PORTVERSION= 2005.01.11

A quick sweep of the ports tree didn't reveal any ports that would be
affected by this change.

>How-To-Repeat:

>Fix:

--- bsd.port.mk.diff.2 begins here ---
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	13 Jun 2006 18:16:07 -0000
@@ -1197,7 +1197,14 @@
 .endif
 DISTVERSION?=	${PORTVERSION:S/:/::/g}
 .elif defined(DISTVERSION)
-PORTVERSION=	${DISTVERSION:L:C/([a-z])[a-z]+/\1/g:C/([0-9])([a-z])/\1.\2/g:C/:(.)/\1/g:C/[^a-z0-9+]+/./g}
+_MONTHNUM=      0
+_DISTVERSION:=  ${DISTVERSION}
+.for MONTH in jan(uary)? feb(ruary)? mar(ch)? apr(il)? may june? july? \
+              aug(ust)? sep(tember)? oct(ober)? nov(ember)? dec(ember)?
+_MONTHNUM!=     ${PRINTF} %02d `${EXPR} ${_MONTHNUM} + 1`
+_DISTVERSION:=	${_DISTVERSION:L:C/${MONTH}/${_MONTHNUM}/g}
+.endfor
+PORTVERSION=	${_DISTVERSION:L:C/([a-z])[a-z]+/\1/g:C/([0-9])([a-z])/\1.\2/g:C/:(.)/\1/g:C/[^a-z0-9+]+/./g}
 .endif
 
 PORTREVISION?=	0
--- bsd.port.mk.diff.2 ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->portmgr 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Tue Jun 13 18:24:19 UTC 2006 
Responsible-Changed-Why:  
bsd.port.mk is port manager territory 

http://www.freebsd.org/cgi/query-pr.cgi?pr=98909 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Tue Jul 25 00:17:47 UTC 2006 
State-Changed-Why:  
How many ports are actually affected by this?  This seems to be a cumbersome 
piece of infrastructure if it is only going to be needed by a few ports. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=98909 
State-Changed-From-To: feedback->closed 
State-Changed-By: kris 
State-Changed-When: Sat Mar 24 03:17:59 UTC 2007 
State-Changed-Why:  
Feedback timeout 

http://www.freebsd.org/cgi/query-pr.cgi?pr=98909 
>Unformatted:
