port dependencies with port options

2012-04-20 Thread Chris Inacio
Hello ports wizards,

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?

Thanks,
Chris Inacio
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: port dependencies with port options

2012-04-20 Thread Vitaly Magerya
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.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: port dependencies with port options

2012-04-20 Thread Jeremy Messenger
On Fri, Apr 20, 2012 at 5:29 AM, Vitaly Magerya vmage...@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


-- 
mezz.free...@gmail.com - m...@freebsd.org
FreeBSD GNOME Team
http://www.FreeBSD.org/gnome/ - gn...@freebsd.org
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: port dependencies with port options

2012-04-20 Thread Chris Inacio
On Fri, Apr 20, 2012 at 11:36 AM, Jeremy Messenger
mezz.free...@gmail.comwrote:

 On Fri, Apr 20, 2012 at 5:29 AM, Vitaly Magerya vmage...@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



So let me see if I understand the conversation so far correctly:

(*) If I want to detect it, then I would need something like a new library
name output from from fixbuf based on the build.  (This currently doesn't
exist.)

(*) I could do some split port, but (even being a noob) sounds pretty bad.

(*) There isn't a current method that directly queries build options from
one port to another.

Am I capturing current state?

Chris


--
 mezz.free...@gmail.com - m...@freebsd.org
 FreeBSD GNOME Team
 http://www.FreeBSD.org/gnome/ - gn...@freebsd.org

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: port dependencies with port options

2012-04-20 Thread Chris Rees
On 20 Apr 2012 16:37, Jeremy Messenger mezz.free...@gmail.com wrote:

 On Fri, Apr 20, 2012 at 5:29 AM, Vitaly Magerya vmage...@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
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: port dependencies with port options

2012-04-20 Thread Vitaly Magerya
Chris Inacio nacho...@gmail.com wrote:
 So let me see if I understand the conversation so far correctly:

 (*) If I want to detect it, then I would need something like a new library
 name output from from fixbuf based on the build.  (This currently doesn't
 exist.)

New library name is not for detection; net/libfixbuf installs
libfixbuf.so (and a bunch of related files), what you need is a
separate port, net/libfixbuf-spread, that would compile libfixbuf with
Spread support and install a separate library (so it would not
conflict with the one net/libfixbuf installs), e.g.
libfixbuf-spread.so. Then your port, net-mgmt/yaf, depending on the
USE_SPREAD option, will either depend on net/libfixbuf and link with
-lfixbuf, or will depend on net/libfixbuf-spread and will link with
-lfixbuf-spread.

 (*) I could do some split port, but (even being a noob) sounds pretty bad.

It's not hard, and we can help you.

 (*) There isn't a current method that directly queries build options from
 one port to another.

Right.

 Am I capturing current state?
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: port dependencies with port options

2012-04-20 Thread Jeremy Messenger
On Fri, Apr 20, 2012 at 10:52 AM, Chris Inacio nacho...@gmail.com wrote:


 On Fri, Apr 20, 2012 at 11:36 AM, Jeremy Messenger mezz.free...@gmail.com
 wrote:

 On Fri, Apr 20, 2012 at 5:29 AM, Vitaly Magerya vmage...@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



 So let me see if I understand the conversation so far correctly:

 (*) If I want to detect it, then I would need something like a new library
 name output from from fixbuf based on the build.  (This currently doesn't
 exist.)

I don't have access to FreeBSD and CVS too due to firewall at work,
but if it doesn't has seperate library. I do not recommend to rename
the library and go with enable option by default instead.

If the spread is very small and doesn't has tons of dependency, you
can even have libfixbuf depends on spread by default without provide
option to turn off/on. Simple.

Cheers,
Mezz

 (*) I could do some split port, but (even being a noob) sounds pretty bad.

 (*) There isn't a current method that directly queries build options from
 one port to another.

 Am I capturing current state?

 Chris
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: port dependencies with port options

2012-04-20 Thread Doug Barton
On 4/20/2012 10:03 AM, Jeremy Messenger wrote:
 I don't have access to FreeBSD and CVS too due to firewall at work,

http://www.freebsd.org/cgi/cvsweb.cgi/

-- 

This .signature sanitized for your protection
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org