Re: Forcing options in required ports

From: Freddie Cash <fjwcash_at_gmail.com>
Date: Thu, 3 Jun 2021 10:54:51 -0700
On Thu, Jun 3, 2021 at 10:35 AM Xavier Humbert <xavier_at_groumpf.org> wrote:

> I need to add a BUILD_DEPENDS to a port (p5-FusionInventory-Agent,
> actually) with specifics options required by the port which requires it
>
> This lead to 12 questions :
>
> 1- Is there a way to specify options port in the Makefile?
>

Unless something has changed in recent years, there's no way to force a
specific set of OPTIONS to be enabled on other ports.


> 2- As a consequence, the port cannot be fetched from packages, it *must*
> be built from ports. How to force this?
>

I believe the way around this is to create a slave port (or possibly a
FLAVOUR?) where you set the specific OPTIONS needed, then DEPEND on that
slave port.

For example, you'd create a p5-FusionInventory-Agent-somename port that's a
slave to the normal p5-FusionInventory-Agent port.  Set your specific
OPTIONS in the slave port and add CONFLICTS with the original as they will
install files into the same place (so you can't install both versions of
the p5-FI-A port simultaneously).  Then in your main port, you DEPEND on
the p5-FusionInventory-Agent-somename.

I believe that would also enable a package to be built for it, but am not
positive on that.
-- 
Freddie Cash
fjwcash_at_gmail.com
Received on Thu Jun 03 2021 - 17:54:51 UTC

Original text of this message