From owner-freebsd-ports@FreeBSD.ORG Sat Dec 22 01:51:02 2007 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 44B6C16A419 for ; Sat, 22 Dec 2007 01:51:02 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail5out.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) by mx1.freebsd.org (Postfix) with ESMTP id E473C13C44B for ; Sat, 22 Dec 2007 01:51:01 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by mail5out.barnet.com.au (Postfix, from userid 1001) id 50B982218BCC; Sat, 22 Dec 2007 12:51:00 +1100 (EST) X-Viruscan-Id: <476C6D840000567FE39382@BarNet> Received: from mail5auth.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail5auth.barnet.com.au", Issuer "*.barnet.com.au" (verified OK)) by mail5.barnet.com.au (Postfix) with ESMTP id 1EAA721B189B; Sat, 22 Dec 2007 12:51:00 +1100 (EST) Received: from k7.mavetju (k7.mavetju.org [10.251.1.18]) by mail5auth.barnet.com.au (Postfix) with ESMTP id C2B302218BCA; Sat, 22 Dec 2007 12:50:59 +1100 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id 8D0BD34D; Sat, 22 Dec 2007 12:50:59 +1100 (EST) Date: Sat, 22 Dec 2007 12:50:59 +1100 From: Edwin Groothuis To: Josh Paetzel Message-ID: <20071222015059.GA82459@k7.mavetju> References: <200712211524.25454.josh@tcbug.org> <20071221214319.GI40969@k7.mavetju> <200712211613.50439.josh@tcbug.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200712211613.50439.josh@tcbug.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-ports@freebsd.org Subject: Re: Opinion on cross-port OPTIONS CONFLICTS 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: Sat, 22 Dec 2007 01:51:02 -0000 On Fri, Dec 21, 2007 at 04:13:46PM -0600, Josh Paetzel wrote: > On Friday 21 December 2007 03:43:19 pm Edwin Groothuis wrote: > > On Fri, Dec 21, 2007 at 03:24:20PM -0600, Josh Paetzel wrote: > > > I've recently run across some brokeness in ports that would be relatively > > > trivial to deal with if one port had a way to know about the OPTIONS > > > another port was compiled with. > > > > I have been working on it a not-so-long-time-ago and found that > > this could be the best way: > > > > [/var/db/ports/arts] edwin@k7>cat options > > # This file is auto-generated by 'make config'. > > # No user-servicable parts inside! > > # Options for arts-1.5.1_1,1 > > _OPTIONS_READ=arts-1.5.1_1,1 > > WITHOUT_ESD=true > > WITHOUT_NAS=true > > > > [/var/db/ports/arts] edwin@k7>eval `cat options | grep -v "^\#" | sed -e > > 's/^/arts_/'` > > > > [/var/db/ports/arts] edwin@k7>echo $arts_WITHOUT_NAS > > true > > > > > > I hadn't put it in a PR yet because it has some synchronity issues: > > > > - It only works for ports already installed. > > - It doesn't work for ports which are being installed by this port. > > - No idea how to do this for packages build on ye olde cluster. > > > > But the idea is there: > > > > OPTIONS_DEPENDS= arts > > .include > > .if !defined arts_WITH_NAS > > BROKEN= Please build audio/arts first before building this port. > > .fi > > .if ${arts_WITH_NAS} = "true" > > BROKEN= This port can't work with audio/arts enabled with NAS support > > .fi > > > > Edwin > > It also doesn't work if someone runs make rmconfig, or make config again and > changes things after the port is installed. > > It probably doesn't work if a package was used to install either. Create a slave port audio/arts-withoutnas and let it depends on that one. Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/