From owner-freebsd-ports@FreeBSD.ORG Fri Aug 5 07:10:16 2005 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 AE7EC16A42F for ; Fri, 5 Aug 2005 07:10:16 +0000 (GMT) (envelope-from adamw@magnesium.net) Received: from smtp100.rog.mail.re2.yahoo.com (smtp100.rog.mail.re2.yahoo.com [206.190.36.78]) by mx1.FreeBSD.org (Postfix) with SMTP id BC16143D46 for ; Fri, 5 Aug 2005 07:10:15 +0000 (GMT) (envelope-from adamw@magnesium.net) Received: (qmail 57529 invoked from network); 5 Aug 2005 07:10:11 -0000 Received: from unknown (HELO ?192.168.1.142?) (tacopants@70.28.168.125 with plain) by smtp100.rog.mail.re2.yahoo.com with SMTP; 5 Aug 2005 07:10:10 -0000 Message-ID: <42F310D2.7020200@magnesium.net> Date: Fri, 05 Aug 2005 03:10:10 -0400 From: Adam Weinberger User-Agent: Mozilla Thunderbird 1.0+ (Macintosh/20050712) MIME-Version: 1.0 To: vd@datamax.bg References: <20050805070513.GA60681@sinanica.bg.datamax> In-Reply-To: <20050805070513.GA60681@sinanica.bg.datamax> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: The right way to depend on a package's extra feature 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, 05 Aug 2005 07:10:16 -0000 Vasil Dimov wrote: > Hi list, > > What it the right way to make a port that depends on other port, but > that other port must be built with some extra feature? > > For example, imagine we have port "A" that installs > /foo/bar/great_feature only if it is build with > 'make WITH_GREAT_FEATURE=yes' > > Then we have port "B" that happens to depend on /foo/bar/great_feature. > > You see, there are two problems here: > > 1. We cannot pass WITH_GREAT_FEATURE=yes via the RUN_DEPENDS technology, > only the target may be specified: RUN_DEPENDS=/file:portdir:target > needed command: make -C portdir WITH_GREAT_FEATURE=yes target > > 2. Port A may have already been installed without WITH_GREAT_FEATURE=yes > This will cause make WITH_GREAT_FEATURE=yes install in A's dir to fail > with error "already installed" > needed command: portupgrade -f -m WITH_GREAT_FEATURE=yes /var/db/pkg/A > (huh! we used portupgrade, not very nice...) > > Any suggestions? Did I miss something? I have that same problem with deskutils/gourmet. It needs a metakit built with python support, but python support is disabled by default. You can see what I've done as a kludge in deskutils/gourmet/Makefile, but the best solution would be to separate metakit into a master/slave port thing so you can just depend on metakit-python and be done with it. Does this parallel your situation any? # Adam -- Adam Weinberger adamw@magnesium.net || adamw@FreeBSD.org adamw@vectors.cx || adamw@gnome.org http://www.vectors.cx