From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Jan 22 01:00:23 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6DE2116A41F for ; Sun, 22 Jan 2006 01:00:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F92043D66 for ; Sun, 22 Jan 2006 01:00:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k0M10H5a070891 for ; Sun, 22 Jan 2006 01:00:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0M10Haq070890; Sun, 22 Jan 2006 01:00:17 GMT (envelope-from gnats) Resent-Date: Sun, 22 Jan 2006 01:00:17 GMT Resent-Message-Id: <200601220100.k0M10Haq070890@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, infofarmer@gmail.com Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0934D16A41F for ; Sun, 22 Jan 2006 00:58:05 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 328E843D5F for ; Sun, 22 Jan 2006 00:58:03 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: by uproxy.gmail.com with SMTP id j3so297753ugf for ; Sat, 21 Jan 2006 16:58:02 -0800 (PST) Received: by 10.66.248.7 with SMTP id v7mr1573159ugh; Sat, 21 Jan 2006 16:58:02 -0800 (PST) Received: from localhost ( [85.141.135.86]) by mx.gmail.com with ESMTP id q40sm2734994ugc.2006.01.21.16.58.01; Sat, 21 Jan 2006 16:58:02 -0800 (PST) Message-Id: <43d2d89a.2413a822.1857.fffff737@mx.gmail.com> Date: Sat, 21 Jan 2006 16:58:02 -0800 (PST) From: infofarmer@gmail.com To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/92123: [patch] bsd.port.mk: PLIST_SUBX and SUBX_LIST autoexpansion X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2006 01:00:23 -0000 >Number: 92123 >Category: ports >Synopsis: [patch] bsd.port.mk: PLIST_SUBX and SUBX_LIST autoexpansion >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Jan 22 01:00:16 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Andrew Pantyukhin >Release: FreeBSD 6.0-STABLE i386 >Organization: >Environment: System: FreeBSD sat64.net17 6.0-STABLE FreeBSD 6.0-STABLE #4: Fri Jan 20 02:24:10 MSK 2006 sat@sat64.net17:/usr/obj/usr/src/sys/SATCUR32 i386 >Description: Implement two autoexpanding variables: PLIST_SUBX and SUBX_LIST Tired of PLIST_SUB=LONG_NAME=${LONG_NAME} VERY_LONG_NAME=${VERY_LONG_NAME} ... copy-paste jobs? Meet the SUBX variables. Just write: PLIST_SUBX=LONG_NAME VERY_LONG_NAME and the expanded pairs will be added to PLIST_SUB. This idea in one form or another has probably come to every port maintainer. >How-To-Repeat: >Fix: We just need these lines somewhere after PLIST_SUB/SUB_LIST definitions, probably right next to this line: # Put this as far down as possible so it will catch all PLIST_SUB definitions. .for _X in ${PLIST_SUBX} PLIST_SUB+=${_X}=${${_X}} .endfor .for _X in ${SUBX_LIST} SUB_LIST+=${_X}=${${_X}} .endfor Checks, optimizations, talk about the dangers of relying on recursive expansion, string quotations are all welcome, but committing these 6 lines will start saving us lots of typing right away. >Release-Note: >Audit-Trail: >Unformatted: