From owner-freebsd-ports@FreeBSD.ORG Fri Apr 20 15:56:21 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27CD81065670 for ; Fri, 20 Apr 2012 15:56:21 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9B32B8FC0C for ; Fri, 20 Apr 2012 15:56:20 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so9977804bkc.13 for ; Fri, 20 Apr 2012 08:56:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fOvRYOLtUw3ouHrIRDWnzgohk7qVsNDCmaiHXpPR+Yk=; b=cYbgY4VfklqwzE5hZ1nWLIJk2RhFG/F37DIkuBsb3oQXDV/bVC/8Ws6HYz852EJj04 HbLO39YeL8QWeVXEzdstaU13dMYitAdM93zNBZNJ5tpB3PmF9HG2YRa3p7+Yamg9dOEP fQsJJghXxJz+o6bZQIcfnwFIWYNaZRP/xZ6dk6xuccGYnqFB7j3Mid8+yIYNvN54Zzgq YJ79Mi+hax9KiV+x7rN7XfFc0NwUCUtA841/OZLOMQEL8hs9yxVD/trx4/e4yQEWgWkw XU8+12FWAIhLkORNSqiCNbkuJf/ioPVSg47ggBbQiaBt5s4swZKL2KL5MVAQPZwnGEs3 sYIQ== MIME-Version: 1.0 Received: by 10.204.150.86 with SMTP id x22mr2121050bkv.136.1334937379606; Fri, 20 Apr 2012 08:56:19 -0700 (PDT) Received: by 10.204.202.142 with HTTP; Fri, 20 Apr 2012 08:56:19 -0700 (PDT) Received: by 10.204.202.142 with HTTP; Fri, 20 Apr 2012 08:56:19 -0700 (PDT) In-Reply-To: References: <4F913A7C.7050601@gmail.com> Date: Fri, 20 Apr 2012 16:56:19 +0100 Message-ID: From: Chris Rees To: Jeremy Messenger Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Vitaly Magerya , freebsd-ports@freebsd.org, Chris Inacio Subject: Re: port dependencies with port options 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, 20 Apr 2012 15:56:21 -0000 On 20 Apr 2012 16:37, "Jeremy Messenger" wrote: > > On Fri, Apr 20, 2012 at 5:29 AM, Vitaly Magerya wrote: > > Chris Inacio wrote: > >> I wanted to add an option to multiple ports - that is easy. But, those > >> ports have a dependency relationship, and I only want the last node in the > >> port dependency graph to build with that option if the requisite ports have > >> too. > >> > >> In real terms: > >> > >> net/spread <- net/libfixbuf <- net-mgmt/yaf > >> > >> I added a SPREAD option to net/libfixbuf & to net-mgmt/yaf. net-mgmt/yaf > >> can only build a Spread version if libfixbuf was built with a Spread > >> version. > >> > >> Question 1) How do you construct such that if a user goes into > >> net-mgmt/yaf chooses Spread and fixbuf isn't already installed, it builds > >> fixbuf with the spread option? > >> > >> Question 2) How do you ensure that if fixbuf is already installed, it has > >> the Spread option enabled, or disallow/error the Yaf Spread option? > > > > One way to do this is to create a separate port net/libfixbuf-spread > > that either installs separate libfixbuf-spread.so or just conflicts with > > net/libfixbuf, and then make net-mgmt/yaf depend on that if SPREAD > > option is on. > > Please do not create a split port that will end up conflict with the > each others. It creates more problems rather than solve. > > Either split port without have conflict to the each others or enable > SPREAD by default. If enable by default then add a check error if > libfixbuf-spread.so does not exist then give user a head up to enable > SPREAD back on. > > Split port without conflict is always best opinion, but if it's > complicate to do it then do the enable SPREAD by default instead. > > Cheers, > Mezz > I agree with Jeremy here. The easiest way to do this is to create a slave port of fixbuf, perhaps libfixbuf-spread, and put WITH_SPREAD, and depend on that file. I'm happy to help if you'd like a hand designing the slave. Chris