Date: Fri, 20 Apr 2012 16:56:19 +0100 From: Chris Rees <utisoft@gmail.com> To: Jeremy Messenger <mezz.freebsd@gmail.com> Cc: Vitaly Magerya <vmagerya@gmail.com>, freebsd-ports@freebsd.org, Chris Inacio <nacho319@gmail.com> Subject: Re: port dependencies with port options Message-ID: <CADLo8386=KHkpYskhafjpnTikR3aab8GQEAwTyn-_RikX5PqQA@mail.gmail.com> In-Reply-To: <CADLFttdcjGboDWsvKaaRsi0OAcYRLOR5N2WVuFdAyWMXZNkWRg@mail.gmail.com> References: <CAG_PEeyM78_8vdpLy5g%2BWRAsEW51T2OZertcB_NGwogh0TSceA@mail.gmail.com> <4F913A7C.7050601@gmail.com> <CADLFttdcjGboDWsvKaaRsi0OAcYRLOR5N2WVuFdAyWMXZNkWRg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 20 Apr 2012 16:37, "Jeremy Messenger" <mezz.freebsd@gmail.com> wrote: > > On Fri, Apr 20, 2012 at 5:29 AM, Vitaly Magerya <vmagerya@gmail.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo8386=KHkpYskhafjpnTikR3aab8GQEAwTyn-_RikX5PqQA>