docs/166855: [patch] Automatic Detection of Dependencies Addendum for Porter's Handbook

Max Brazhnikov makc at freebsd.org
Thu Apr 12 22:25:34 UTC 2012


On Wed, 11 Apr 2012 18:33:18 GMT, A.J. Kehoe IV (Nanoman) wrote:
> +       <example>
> +         <title>Correct Declaration of an Optional Dependency</title>
> +
> +         <programlisting>OPTIONS=              BAR     "Enable bar support" on
> +
> +.include <bsd.port.pre.mk>
> +
> +.if defined(WITH_BAR) && !defined(WITHOUT_BAR)
> +LIB_DEPENDS=   bar:${PORTSDIR}/foo/bar
> +.endif</programlisting>
> +       </example>

It's not enough. You also need to add something like --disable-bar to configure arguments and of course configure script should respect the switch.



More information about the freebsd-doc mailing list