docs/172662: [PATCH] Porter's Handbook to add information on PORT_OPTIONS syntax

Chris Rees crees at physics.org
Sat Oct 13 15:30:01 UTC 2012


>Number:         172662
>Category:       docs
>Synopsis:       [PATCH] Porter's Handbook to add information on PORT_OPTIONS syntax
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 13 15:30:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Chris Rees
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD pegasus.bayofrum.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Sun Apr 29 12:29:02 BST 2012 root at pegasus.bayofrum.net:/usr/obj/usr/src/sys/PEGASUS amd64


	
>Description:
	http://lists.freebsd.org/pipermail/svn-ports-head/2012-October/005238.html
>How-To-Repeat:
	
>Fix:

	

--- porters-simplify-syntax.diff begins here ---
Index: en_US.ISO8859-1/books/porters-handbook/book.xml
===================================================================
--- en_US.ISO8859-1/books/porters-handbook/book.xml	(revision 39715)
+++ en_US.ISO8859-1/books/porters-handbook/book.xml	(working copy)
@@ -4476,7 +4476,7 @@
 
 	  <example id ="ports-options-check-unset">
 	    <title>Check for Unset Port <makevar>OPTIONS</makevar></title>
-	    <programlisting>.if empty(PORT_OPTIONS:MEXAMPLES)
+	    <programlisting>.if ! ${PORT_OPTIONS:MEXAMPLES}
 CONFIGURE_ARGS+=--without-examples
 .endif</programlisting>
 	  </example>
@@ -4515,7 +4515,7 @@
 LIB_DEPENDS+=	icuuc:${PORTSDIR}/devel/icu
 .endif
 
-.if empty(PORT_OPTIONS:MEXAMPLES)
+.if ! ${PORT_OPTIONS:MEXAMPLES}
 CONFIGURE_ARGS+=	--without-examples
 .endif
 
@@ -4592,6 +4592,16 @@
 	  disabled.  The configure script does not enable related
 	  features in the application, despite library's presence in
 	  the system.</para>
+
+	<note>
+	  <para>Under some circumstances, the shorthand conditional
+	    syntax can cause problems with complex constructs.
+	    If you receive errors such as <literal>Malformed
+	    conditional</literal>, an alternative syntax can be used.</para>
+	  <programlisting>.if !empty(VARIABLE:MVALUE)
+# as an alternative to
+.if ${VARIABLE:MVALUE}</programlisting>
+	</note>
       </sect2>
     </sect1>
 
--- porters-simplify-syntax.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-doc mailing list