From owner-freebsd-ports@FreeBSD.ORG Fri Jun 8 12:51:08 2012 Return-Path: Delivered-To: ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 500BA1065673 for ; Fri, 8 Jun 2012 12:51:08 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id E97738FC17 for ; Fri, 8 Jun 2012 12:51:07 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sweb; b=AxWTQJ UeT1bp5NZx4a2oZIaMrp/I3qj7mXTghwpjSnLVsRfrUZz+YbzF2acELzILZuIXwr jVcHtOZc7iAYLorRgZIWi3XyUoj6c+eXwC4feMHJMsjLQWCITIDkvirlWrWHFhhh tHW8jpZzaoARDb1w/rwCiT2uS3JKzSC5qj/1Q= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sweb; bh=M4iUtnWlPz9h jiMyj/4kTUtEXe78GNSwOr54rWUeexI=; b=gK3r+QBiAb8B5MJNxxItbvEdLSRQ hvMUYqH43+Es0bYZ6lG6scewbkk/ddszQe2UomxULzznhsf2LLcIEK8zJI0yUIia r7exXzpIW0XeD4f0FCHzvK30L8rKBmaBJlVsfkWc+R/CxfiHPSQOtoLtbzK5ffu2 ffquNTHTEwHiESI= Received: (qmail 11937 invoked from network); 8 Jun 2012 07:51:06 -0500 Received: from unknown (HELO ?10.10.1.87?) (bryan@shatow.net@10.10.1.87) by sweb.xzibition.com with ESMTPA; 8 Jun 2012 07:51:06 -0500 Message-ID: <4FD1F531.2030609@shatow.net> Date: Fri, 08 Jun 2012 07:50:57 -0500 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120604 Thunderbird/13.0 MIME-Version: 1.0 To: ports@FreeBSD.org References: <20120603184448.GI92976@ithaqua.etoilebsd.net> <4FCCB88B.6030007@shatow.net> In-Reply-To: <4FCCB88B.6030007@shatow.net> X-Enigmail-Version: 1.4.2 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Baptiste Daroussin Subject: Re: [HEADSUP] Please convert your ports to new options framework 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, 08 Jun 2012 12:51:08 -0000 On 6/4/2012 8:30 AM, Bryan Drewery wrote: > > > On 6/3/2012 1:44 PM, Baptiste Daroussin wrote: >> Hi, >> >> The new options framework is now in the port for a week, most of the problems >> directly concerning the framework seems to have been addressed. >> >> regards, >> Bapt > > A common question I have seen is how to support 0 or 1 in the SINGLE list. > > You can achieve this by adding the SINGLE group to the OPTIONS_DEFINE. > > For example: > > OPTIONS_DEFINE= DB_OVERRIDE > OPTIONS_SINGLE= DB_OVERRIDE > OPTIONS_SINGLE_DB_OVERRIDE= BDB4 BDB1 > OPTIONS_DEFAULT= DB_OVERRIDE BDB4 > DB_OVERRIDE_DESC= Override DB backend instead of default DBM > BDB1_DESC= Use Berkeley DB 1 > BDB4_DESC= Use Berkeley DB >=2 > > Here DB_OVERRIDE must be selected to select either of BDB4 or BDB1. > > This gives you 0 or 1 on the BDB4/BDB1. > You can do the same with MULTI as well to achieve 0 or many. This has been documented in the handbook now. Another common question is how to check if an option is not set. We all try !${PORT_OPTIONS:MFOO} to find it does not work. Use empty(): .if empty(PORT_OPTIONS:MFOO) CONFIGURE_ARGS+= --disable-foo .else CONFIGURE_ARGS+= --enable-foo .endif Wiki is updated on this, handbook being updated. Regards, Bryan Drewery