From owner-freebsd-ports@FreeBSD.ORG Fri May 12 18:44:34 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 2039316B61A for ; Fri, 12 May 2006 18:44:34 +0000 (UTC) (envelope-from cokane@ramen.cokane.org) Received: from smtp3.fuse.net (mail-out3.fuse.net [216.68.8.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id 473C643D55 for ; Fri, 12 May 2006 18:44:32 +0000 (GMT) (envelope-from cokane@ramen.cokane.org) Received: from gx4.fuse.net ([72.49.162.239]) by smtp3.fuse.net (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20060512184431.NWTH12345.smtp3.fuse.net@gx4.fuse.net> for ; Fri, 12 May 2006 14:44:31 -0400 Received: from ramen.cokane.org ([72.49.162.239]) by gx4.fuse.net (InterMail vG.1.02.00.02 201-2136-104-102-20041210) with SMTP id <20060512184427.XLVX14894.gx4.fuse.net@ramen.cokane.org> for ; Fri, 12 May 2006 14:44:27 -0400 Received: (qmail 57930 invoked by uid 1001); 12 May 2006 18:44:24 -0000 Date: Fri, 12 May 2006 18:44:24 +0000 From: Coleman Kane To: FreeBSD Ports Message-ID: <20060512184424.GA57858@ramen.coleyandcheryl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Subject: RFC: Standardize and improve the PKGNAMESUFFIX handling in all ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2006 18:44:40 -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! -- Coleman Kane