Discussion:
Forcing options in required ports
Xavier Humbert
2021-06-03 17:34:28 UTC
Permalink
Hi,

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

Thanks

Xavier
--
Xavier HUMBERT - Unix/Win/MacOSX Sysadmin/Network Senior Engineer
https://www.amdh.fr
Freddie Cash
2021-06-03 17:54:51 UTC
Permalink
Post by Xavier Humbert
I need to add a BUILD_DEPENDS to a port (p5-FusionInventory-Agent,
actually) with specifics options required by the port which requires it
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.
Post by Xavier Humbert
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
***@gmail.com
Thierry Thomas
2021-06-03 18:02:25 UTC
Permalink
Post by Xavier Humbert
Hi,
Hello,
Post by Xavier Humbert
I need to add a BUILD_DEPENDS to a port (p5-FusionInventory-Agent,
actually) with specifics options required by the port which requires it
1- Is there a way to specify options port in the Makefile ?
2- As a consequence, the port cannot be fetched from packages, it *must*
be built from ports. How to force this ?
The usual solution is to make a slave port from this port, with the
required options, and make your new port depend on this slave port.
But warning: the original port and the new slave will conflict, and that
might result in further conflicts!

Another solution is to negociate with the maintainer, and see if he
accepts to set your options by default


(When sub-packages will be a thing, this could be a hird solution in
some cases)

Regards.
--
Th. Thomas.
Loading...