RFC: Standardize and improve the PKGNAMESUFFIX handling in all
ports
Vasil Dimov
vd at FreeBSD.org
Tue May 16 12:47:02 UTC 2006
On Sun, May 14, 2006 at 04:44:38PM +0200, Pav Lucistnik wrote:
> Coleman Kane pí¹e v pá 12. 05. 2006 v 18:44 +0000:
> > Hello all,
> >
> > During some discussion, the existence of two problems in ports
> > arose today surrounding handling of PKGNAMESUFFIX in the ports collection.
> >
> > 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 package
> > name, you use "packagename+toggle-versioninfo". In many ports, this is
> > accomplished via:
> > PKGNAMESUFFIX= +toggle
> >
> > If you want to add more than one toggle, you'd do:
> > PKGNAMESUFFIX:="${PACKAGENAMESUFFIX}+toggle1"
> > ...
> > PKGNAMESUFFIX:="${PACKAGENAMESUFFIX}+toggle2"
> >
> > To get 'packagename+toggle1+toggle2-versioninfo'.
> >
> > Unfortunately, this is not done in many ports (such as ruby18), and the
> > nomenclature swaps plus and hyphen for the 'toggle separator'.
> >
> > I propose that we do this:
> > Add to line 1199 of ports/Mk/bsd.port.mk
> > _JOINEDPKGNAMESUFFIX?=
> > .for _PKGNAMESUFFIXCOMPONENT in ${PKGNAMESUFFIX:O:u}
> > _JOINEDPKGNAMESUFFIX:="${_JOINEDPKGNAMESUFFIX}+${_PKGNAMESUFFIXCOMPONENT}"
> > .endfor
> >
> > Change line 1207:
> > PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${_JOINEDPKGNAMESUFFIX}-${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
> >
> > Change line 2620:
> > PKGBASE?= ${PKGNAMEPREFIX}${PORTNAME}${_JOINEDPKGNAMESUFFIX}
> >
> > And then, rather than literally specifying the PKGNAMESUFFIX, you would do this:
> > PKGNAMESUFFIX+= toggle1
> > ...
> > PKGNAMESUFFIX+= toggle2
> >
> > Which is far more intuitive and more readable.
> >
> > And the addition at line 1199, specified above, would automagically add the
> > + delimiters, order the toggles alphabetically, and weed out the duplicates.
> >
> > This could be one more step toward a more manageable package infrastructure.
> >
> > As I said, this is an RFC so give me comments!
>
> Looks good.
>
Agreed. I would suggest that you create diff -u, send-pr(1) it and
assign to portmgr :)
--
Vasil Dimov
gro.DSBeerF at dv
Testing can show the presence of bugs, but not their absence.
-- Edsger W. Dijkstra
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 155 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20060516/4ab475b9/attachment.pgp
More information about the freebsd-ports
mailing list