From owner-freebsd-ports@FreeBSD.ORG Mon Mar 16 12:54:38 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FF0A1065670 for ; Mon, 16 Mar 2009 12:54:38 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from cauchy.math.missouri.edu (cauchy.math.missouri.edu [128.206.184.213]) by mx1.freebsd.org (Postfix) with ESMTP id 517DF8FC1A for ; Mon, 16 Mar 2009 12:54:38 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from laptop3.gateway.2wire.net (cauchy.math.missouri.edu [128.206.184.213]) by cauchy.math.missouri.edu (8.14.3/8.14.3) with ESMTP id n2GCsa8M046302; Mon, 16 Mar 2009 07:54:37 -0500 (CDT) (envelope-from stephen@math.missouri.edu) Message-ID: <49BE4C0C.5000703@math.missouri.edu> Date: Mon, 16 Mar 2009 07:54:36 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8.1.19) Gecko/20090305 SeaMonkey/1.1.14 MIME-Version: 1.0 To: Alex Povolotsky References: <49BE398A.8080708@webmail.sub.ru> In-Reply-To: <49BE398A.8080708@webmail.sub.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: Conditionals in pkg-plist 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: Mon, 16 Mar 2009 12:54:38 -0000 Alex Povolotsky wrote: > Hello! > > How do I implement conditional in pkg-plist? > > if WITH_STARTTLS is defined, %%PORTDOCS%%%%DOCSDIR%%/README.STARTTLS > should be added to package list. > > I haven't found approporate instructions in porter's handbook. > > Alex. You want to use PLIST_SUB where a variable optionally gets the value "@comment ". There are many examples in the ports. For example, math/oleo - see how it handles the NLS option. (A paragraph about this would make a good addition to http://www.freebsd.org/doc/en/books/porters-handbook/plist.html#PLIST-SUB).