Dealing with options in dependent ports
I'm working on a port that has an option for a build_depends on another port. If that option is selected, the dependent port MUST be built with an option that is not selected by default. Is there a way to either force that option to be selected in the dependent port? Or, failing that, is it possible to pop up a message warning the installer that they must select that option before building the dependent port or, if they've already installed it without the option, they must deinstall and reinstall after selecting that option? -- Paul Schmehl, Senior Infosec Analyst As if it wasn't already obvious, my opinions are my own and not those of my employer. *** It is as useless to argue with those who have renounced the use of reason as to administer medication to the dead. Thomas Jefferson There are some ideas so wrong that only a very intelligent person could believe in them. George Orwell ___ 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: Dealing with options in dependent ports
Hello, Le ven 30 nov 12 à 16:36:32 +0100, Paul Schmehl pschmehl_li...@tx.rr.com écrivait : I'm working on a port that has an option for a build_depends on another port. If that option is selected, the dependent port MUST be built with an option that is not selected by default. Is there a way to either force that option to be selected in the dependent port? Or, failing that, is it possible to pop up a message warning the installer that they must select that option before building the dependent port or, if they've already installed it without the option, they must deinstall and reinstall after selecting that option? I'd suggest to make a slave port where you force the required option. However, to enforce the right dependency, this option have to produce a different plist. -- Th. Thomas. ___ 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: Dealing with options in dependent ports
Thierry Thomas thie...@freebsd.org wrote: Hello, Le ven 30 nov 12 à 16:36:32 +0100, Paul Schmehl pschmehl_li...@tx.rr.com écrivait : I'm working on a port that has an option for a build_depends on another port. If that option is selected, the dependent port MUST be built with an option that is not selected by default. Is there a way to either force that option to be selected in the dependent port? Or, failing that, is it possible to pop up a message warning the installer that they must select that option before building the dependent port or, if they've already installed it without the option, they must deinstall and reinstall after selecting that option? I'd suggest to make a slave port where you force the required option. However, to enforce the right dependency, this option have to produce a different plist. -- Th. Thomas. I was in the same situation with dns/ldns requiring python bindings which are not built by default. I solved the problem by creating a stub port dns/py-ldns. Emanuel ___ 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: Dealing with options in dependent ports
--On November 30, 2012 4:47:40 PM +0100 Thierry Thomas thie...@freebsd.org wrote: Hello, Le ven 30 nov 12 à 16:36:32 +0100, Paul Schmehl pschmehl_li...@tx.rr.com écrivait : I'm working on a port that has an option for a build_depends on another port. If that option is selected, the dependent port MUST be built with an option that is not selected by default. Is there a way to either force that option to be selected in the dependent port? Or, failing that, is it possible to pop up a message warning the installer that they must select that option before building the dependent port or, if they've already installed it without the option, they must deinstall and reinstall after selecting that option? I'd suggest to make a slave port where you force the required option. However, to enforce the right dependency, this option have to produce a different plist. Thanks. I think that's probably the right answer. -- Paul Schmehl, Senior Infosec Analyst As if it wasn't already obvious, my opinions are my own and not those of my employer. *** It is as useless to argue with those who have renounced the use of reason as to administer medication to the dead. Thomas Jefferson There are some ideas so wrong that only a very intelligent person could believe in them. George Orwell ___ 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: Dealing with options in dependent ports
On Fri, Nov 30, 2012 at 4:47 PM, Thierry Thomas thie...@freebsd.org wrote: However, to enforce the right dependency, this option have to produce a different plist. Really? Isn't enough to depend on the package name instead of a file? -- Alberto Villa, FreeBSD committer avi...@freebsd.org http://people.FreeBSD.org/~avilla ___ 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: Dealing with options in dependent ports
Le ven 30 nov 12 à 19:07:20 +0100, Alberto Villa avi...@freebsd.org écrivait : On Fri, Nov 30, 2012 at 4:47 PM, Thierry Thomas thie...@freebsd.org wrote: However, to enforce the right dependency, this option have to produce a different plist. Really? Isn't enough to depend on the package name instead of a file? xxx_DEPENDS= specific_file:slave_ports -- Th. Thomas. ___ 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: Dealing with options in dependent ports
--On November 30, 2012 7:07:20 PM +0100 Alberto Villa avi...@freebsd.org wrote: On Fri, Nov 30, 2012 at 4:47 PM, Thierry Thomas thie...@freebsd.org wrote: However, to enforce the right dependency, this option have to produce a different plist. Really? Isn't enough to depend on the package name instead of a file? No. The dependency installs files that are not otherwise installed, so the pkg-plist has to reflect that. Here's how I did it in the port I just created a slave for. Created this section in the main port's Makefile: .if defined(SLAVE) OPTIONS_DEFINE+=BROCCOLI OPTIONS_DEFAULT+= BROCCOLI BROCCOLI_DESC= Build support for libbroccoli communications .endif This adds the option and enforces it being selected if you install the slave port. Then created this section in the main port's Makefile: .if ${PORT_OPTIONS:MBROCCOLI} PLIST_SUB+= BROCCOLI= pre-configure: (cd ${WRKSRC}/aux/broccoli ./configure) pre-build: (cd ${WRKSRC}/aux/broccoli ${MAKE}) post-build: patch ${BUILD_WRKSRC}/cmake_install.cmake ${FILESDIR}/broccoli.patch .else PLIST_SUB+= BROCCOLI=@comment .endif The PLIST_SUB section allows you to add files to the pkg-plist that are provisional, based on the install of the slave port. Then the pkg_plist sub has the files included with the macro: %%BROCCOLI%%include/broccoli.h %%BROCCOLI%%lib/libbinpac.a %%BROCCOLI%%lib/libbroccoli.a %%BROCCOLI%%lib/libbroccoli.so %%BROCCOLI%%lib/libbroccoli.so.5 %%BROCCOLI%%lib/libbroccoli.so.5.1.0 Those only get removed if the option was selected, so deinstall won't throw errors if you install the main port without that option. -- Paul Schmehl, Senior Infosec Analyst As if it wasn't already obvious, my opinions are my own and not those of my employer. *** It is as useless to argue with those who have renounced the use of reason as to administer medication to the dead. Thomas Jefferson There are some ideas so wrong that only a very intelligent person could believe in them. George Orwell ___ 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