From owner-freebsd-ports@FreeBSD.ORG Mon Dec 7 20:11:39 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAD421065676 for ; Mon, 7 Dec 2009 20:11:39 +0000 (UTC) (envelope-from glarkin@FreeBSD.org) Received: from mail1.sourcehosting.net (113901-app1.sourcehosting.net [72.32.213.11]) by mx1.freebsd.org (Postfix) with ESMTP id B5A208FC0A for ; Mon, 7 Dec 2009 20:11:39 +0000 (UTC) Received: from 68-189-245-235.dhcp.oxfr.ma.charter.com ([68.189.245.235] helo=cube.entropy.prv) by mail1.sourcehosting.net with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1NHjvg-00021s-Ns; Mon, 07 Dec 2009 15:11:38 -0500 Received: from [127.0.0.1] (fireball.entropy.prv [192.168.1.12]) by cube.entropy.prv (Postfix) with ESMTP id 1890D3878458; Mon, 7 Dec 2009 15:11:33 -0500 (EST) Message-ID: <4B1D617A.6020303@FreeBSD.org> Date: Mon, 07 Dec 2009 15:11:38 -0500 From: Greg Larkin Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Kevin Golding References: <4B1D516D.2060209@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.96.0 OpenPGP: id=1C940290 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.4 (/) Cc: freebsd-ports@freebsd.org Subject: Re: Port version difficulties (maybe one for the Python crowd) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: glarkin@FreeBSD.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 20:11:40 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kevin Golding wrote: > In article <4B1D516D.2060209@FreeBSD.org>, Greg Larkin > 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_ >>> 0-${PYTHON_VERSION:S/thon//}${PYEASYINSTALL_OSARCH}.egg >>> >>> 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): > http://www.caomhin.org/ports/www/py-django-signals-ahoy/Makefile > >> It's also useful to use "make -V " 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. > > Kevin Hi Kevin, This might get you further: fbsd70# make -V \ PYDISTUTILS_PKGVERSION:C/\(\[\[:digit:\]\]\.\[\[:digit:\]\]\)\./\\1_/g 0.1_0 fbsd70# The :C modifier uses regexps as specified by re_format(7) (http://bit.ly/8CH8X1) instead of Perl regexps. Hope that helps, Greg - -- Greg Larkin http://www.FreeBSD.org/ - The Power To Serve http://www.sourcehosting.net/ - Ready. Set. Code. http://twitter.com/sourcehosting/ - Follow me, follow you -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFLHWF60sRouByUApARAuwHAJ9u/h3DzSZ1cOqGzRu3Y2K9jSFpawCfegsc p4QLS7fR3MNglymvWrsqh2M= =83xv -----END PGP SIGNATURE-----