Hi Ade, I think I haven't thanked you for your input and recommendation
on this.

On Tue, 19 May 2009, Ade Lovett wrote:
>> PORTVERSION=  4.3.4.20090517
> Rather than going that way, why not take a leaf out of "standard" 
> practice for DNS SOA serial numbers, and go with:
> 
>       PORTVERSION=  4.3.4
>       PORTREVISION= ${SNAPDATE}${SNAPREVISION}
> 
>       SNAPDATE=     20090517
>       SNAPREVISION= 00

This immediately resonated, and I liked the idea a lot.  There is one 
killer argument which made me go for the somewhat more tricky approach
to pack all that into PORTVERSION and not touch PORTREVISION, and that
was the occasional need -- by third parties -- to do a PORTREVISION bump
using Tools/bump_revision.pl or the like.

> Probably a lot less work in the long run.

The current approach is not a lot more work, but inded three non-
immediate Makefile variable tricks.  From lang/gcc45:

  PORTVERSION=    4.5.0.20090910
  VERSIONSTRING=  ${PORTVERSION:C/([0-9]+\.[0-9]+).*\.([0-9]+)/\1-\2/}
  SUFFIX=         ${PORTVERSION:C/([0-9]+).([0-9]+).*/\1\2/}
  PLIST_SUB=      GCC_VER=${PORTVERSION:C/(.+)\.[0-9]+/\1/} \

I have using this for a couple of months across all lang/gcc4x ports,
and it's been working well.

Gerald
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to