Skip site navigation (1)Skip section navigation (2)
Date:      Mon,  8 Oct 2012 19:36:59 +0100 (BST)
From:      Chris Rees <crees@physics.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   docs/172662: [PATCH] Porter's Handbook to add information on PORT_OPTIONS syntax
Message-ID:  <20121008183659.359794CFEC@pegasus.bayofrum.net>
Resent-Message-ID: <201210131530.q9DFU1j4056289@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121008183659.359794CFEC>