My plan to fix the versioning for lang/gcc ports

Gerald Pfeifer gerald at
Mon Sep 14 00:21:39 UTC 2009

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

On Tue, 19 May 2009, Ade Lovett wrote:
> 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
> 	SNAPDATE=     20090517

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/ 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:

  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.


More information about the freebsd-ports mailing list