From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Jun 13 18:20:19 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B58C516A47A for ; Tue, 13 Jun 2006 18:20:19 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8F5A43D4C for ; Tue, 13 Jun 2006 18:20:18 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k5DIKIIE039412 for ; Tue, 13 Jun 2006 18:20:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k5DIKI1U039411; Tue, 13 Jun 2006 18:20:18 GMT (envelope-from gnats) Resent-Date: Tue, 13 Jun 2006 18:20:18 GMT Resent-Message-Id: <200606131820.k5DIKI1U039411@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Shaun Amott Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80BC216A41B for ; 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 ; 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 ; 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 To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/98909: [PATCH] bsd.port.mk: Extend DISTVERSION->PORTVERSION auto-conversion to cover month names X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Shaun Amott List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2006 18:20:19 -0000 >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: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jun 13 18:20:18 GMT 2006 >Closed-Date: >Last-Modified: >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: >Unformatted: