Date: Tue, 16 May 2006 15:46:08 +0300 From: Vasil Dimov <vd@FreeBSD.org> To: Pav Lucistnik <pav@FreeBSD.org> Cc: FreeBSD Ports <freebsd-ports@FreeBSD.org>, Coleman Kane <cokane@FreeBSD.org> Subject: Re: RFC: Standardize and improve the PKGNAMESUFFIX handling in all ports Message-ID: <20060516124608.GA6715@qlovarnika.bg.datamax> In-Reply-To: <1147617878.73451.17.camel@ikaros.oook.cz> References: <20060512184424.GA57858@ramen.coleyandcheryl> <1147617878.73451.17.camel@ikaros.oook.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
--cWoXeonUoKmBZSoM Content-Type: text/plain; charset=cp-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 14, 2006 at 04:44:38PM +0200, Pav Lucistnik wrote: > Coleman Kane p=ED=B9e v p=E1 12. 05. 2006 v 18:44 +0000: > > Hello all, > >=20 > > During some discussion, the existence of two problems in ports > > arose today surrounding handling of PKGNAMESUFFIX in the ports collecti= on. > >=20 > > First of all, the ability for it to handle multiple suffixes is broken > > in many ports, and not intuitive to accomplish, and the declaration of > > such option is not standard. > > Currently, if you have a port that has a toggle to reflect in the packa= ge > > name, you use "packagename+toggle-versioninfo". In many ports, this is= =20 > > accomplished via: > > PKGNAMESUFFIX=3D +toggle > >=20 > > If you want to add more than one toggle, you'd do: > > PKGNAMESUFFIX:=3D"${PACKAGENAMESUFFIX}+toggle1" > > ... > > PKGNAMESUFFIX:=3D"${PACKAGENAMESUFFIX}+toggle2" > >=20 > > To get 'packagename+toggle1+toggle2-versioninfo'. > >=20 > > Unfortunately, this is not done in many ports (such as ruby18), and the > > nomenclature swaps plus and hyphen for the 'toggle separator'. > >=20 > > I propose that we do this: > > Add to line 1199 of ports/Mk/bsd.port.mk > > _JOINEDPKGNAMESUFFIX?=3D > > .for _PKGNAMESUFFIXCOMPONENT in ${PKGNAMESUFFIX:O:u} > > _JOINEDPKGNAMESUFFIX:=3D"${_JOINEDPKGNAMESUFFIX}+${_PKGNAMESUFFIXCOMP= ONENT}" > > .endfor > >=20 > > Change line 1207: > > PKGNAME=3D ${PKGNAMEPREFIX}${PORTNAME}${_JOINEDPKGNAMESUFFIX}-${PORT= VERSION:C/[-_,]/./g}${_SUF1}${_SUF2} > >=20 > > Change line 2620: > > PKGBASE?=3D ${PKGNAMEPREFIX}${PORTNAME}${_JOINEDPKGNAMESUFFIX} > >=20 > > And then, rather than literally specifying the PKGNAMESUFFIX, you would= do this: > > PKGNAMESUFFIX+=3D toggle1 > > ... > > PKGNAMESUFFIX+=3D toggle2 > >=20 > > Which is far more intuitive and more readable. > >=20 > > And the addition at line 1199, specified above, would automagically add= the > > + delimiters, order the toggles alphabetically, and weed out the duplic= ates. > >=20 > > This could be one more step toward a more manageable package infrastruc= ture. > >=20 > > As I said, this is an RFC so give me comments! >=20 > Looks good. >=20 Agreed. I would suggest that you create diff -u, send-pr(1) it and assign to portmgr :) --=20 Vasil Dimov gro.DSBeerF@dv Testing can show the presence of bugs, but not their absence. -- Edsger W. Dijkstra --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFEacmQFw6SP/bBpCARAtx0AKDd2fSnC9kDiX+jOGyNAUW20PqSwQCdHQYU 3ZalJzmfzQxAm+mWqe1Sfaw= =HbSv -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060516124608.GA6715>