From 64219b1d6c6170f1a400dc543a9a3d2522ac52da Mon Sep 17 00:00:00 2001 From: Niclas Zeising <zeising@FreeBSD.org> Date: Thu, 4 Oct 2012 18:39:41 +0000 Subject: [PATCH] Add a small example on how to check if a ports option is unset. Reviewed by: bapt Approved by: joel (mentor) --- en_US.ISO8859-1/books/porters-handbook/book.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/en_US.ISO8859-1/books/porters-handbook/book.xml b/en_US.ISO8859-1/books/porters-handbook/book.xml index 9e93b69397..983a912c66 100644 --- a/en_US.ISO8859-1/books/porters-handbook/book.xml +++ b/en_US.ISO8859-1/books/porters-handbook/book.xml @@ -4474,6 +4474,13 @@ RUN_DEPENDS+= bar:${PORTSDIR}/bar/bar .include <bsd.port.mk></programlisting> </example> + <example id ="ports-options-check-unset"> + <title>Check for Unset Port <makevar>OPTIONS</makevar></title> + <programlisting>.if empty(PORT_OPTIONS:MEXAMPLES) +CONFIGURE_ARGS+=--without-examples +.endif</programlisting> + </example> + <example id="ports-options-practical-use"> <title>Practical Use of <makevar>OPTIONS</makevar></title> @@ -4508,6 +4515,10 @@ CONFIGURE_ARGS+= --without-postgres LIB_DEPENDS+= icuuc:${PORTSDIR}/devel/icu .endif +.if empty(PORT_OPTIONS:MEXAMPLES) +CONFIGURE_ARGS+= --without-examples +.endif + # Check other OPTIONS .include <bsd.port.mk></programlisting>