From owner-freebsd-ports@FreeBSD.ORG Tue May 16 12:46:56 2006 Return-Path: X-Original-To: freebsd-ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B5E216A482; Tue, 16 May 2006 12:46:56 +0000 (UTC) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 111B543D4C; Tue, 16 May 2006 12:46:11 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from qlovarnika.bg.datamax (qlovarnika.bg.datamax [192.168.10.2]) by jengal.datamax.bg (Postfix) with SMTP id B0CCBB859; Tue, 16 May 2006 15:46:08 +0300 (EEST) Received: (nullmailer pid 6757 invoked by uid 1002); Tue, 16 May 2006 12:46:08 -0000 Date: Tue, 16 May 2006 15:46:08 +0300 From: Vasil Dimov To: Pav Lucistnik Message-ID: <20060516124608.GA6715@qlovarnika.bg.datamax> References: <20060512184424.GA57858@ramen.coleyandcheryl> <1147617878.73451.17.camel@ikaros.oook.cz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline In-Reply-To: <1147617878.73451.17.camel@ikaros.oook.cz> X-OS: FreeBSD 6.1-STABLE User-Agent: Mutt/1.5.11 Cc: FreeBSD Ports , Coleman Kane Subject: Re: RFC: Standardize and improve the PKGNAMESUFFIX handling in all ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@FreeBSD.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 May 2006 12:47:02 -0000 --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--