Port version difficulties (maybe one for the Python crowd)

Kevin Golding kevin at caomhin.demon.co.uk
Mon Dec 7 19:18:52 UTC 2009

In article <4B1D516D.2060209 at FreeBSD.org>, Greg Larkin
<glarkin at FreeBSD.org> writes
>Kevin Golding wrote:
>> I'm trying to create a new port and I'm getting in a tangle with the
>> version number.  Basically, the author of this software has given it a
>> version number 0.1_0 which is incompatible with ports.  Never fear! I
>> simply set the port version to 0.1.0 which is.  Now this wasn't too bad
>> to deal with, I set "DISTNAME=      ${PORTNAME}-0.1-0" to make it fetch
>> just fine (yes, despite the version being 0.1_0 the tarball is 0.1-0).
>> Because of the version number I've also set:
>> PYEASYINSTALL_EGG=      ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-0.1_
>> This makes installing work.
>> Uninstalling fails with:
>> pkg_delete: unexec command for '/usr/local/bin/easy_install-2.6 -q -m -S
>> /usr/local/lib/python2.6/site-packages  -d usr/local/lib/python2.6/site-
>> packages  -s /usr/local/bin  django-signals-ahoy==0.1.0' failed
>> So because ports installed 0.1.0 and the author wrote 0.1_0 is fails.
>> I did look at setting PYEASYINSTALL_UNINSTALLARGS but I must confess my
>> attempts to turn PYDISTUTILS_PKGVERSION into 0.1_0 have so far failed
>> (as in, apparently my regex has changed nothing).

>I've run into problems similar to this from time to time while creating
>and maintaining ports.  Would you mind posting a link to or the contents
>of your Makefile so I can have a look at it?

With pleasure (the whole port is there in fact): 

>It's also useful to use "make -V <variable name>" to examine the values
>of any variable you're trying to debug, like PYDISTUTILS_PKGVERSION.  I
>believe you can even use the colon modifiers (:S, :C, etc.) right on the
>command line so you can try different regexps easily.

Ooh, now that sounds dangerously addictive.  I shall give it a whirl and
shout if I crack it.


More information about the freebsd-ports mailing list