From crees@bayofrum.net  Sat Oct 13 15:24:45 2012
Return-Path: <crees@bayofrum.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7B6D1EB1
	for <freebsd-gnats-submit@freebsd.org>; Sat, 13 Oct 2012 15:24:45 +0000 (UTC)
	(envelope-from crees@bayofrum.net)
Received: from mk-outboundfilter-2.mail.uk.tiscali.com (mk-outboundfilter-2.mail.uk.tiscali.com [212.74.114.38])
	by mx1.freebsd.org (Postfix) with ESMTP id 04DB28FC0C
	for <freebsd-gnats-submit@freebsd.org>; Sat, 13 Oct 2012 15:24:44 +0000 (UTC)
Received: from 212-139-242-85.dynamic.dsl.as9105.com (HELO pegasus.bayofrum.net) ([212.139.242.85])
  by smtp.pipex.tiscali.co.uk with ESMTP; 13 Oct 2012 16:24:37 +0100
Received: by pegasus.bayofrum.net (Postfix, from userid 1001)
	id 359794CFEC; Mon,  8 Oct 2012 19:36:59 +0100 (BST)
Message-Id: <20121008183659.359794CFEC@pegasus.bayofrum.net>
Date: Mon,  8 Oct 2012 19:36:59 +0100 (BST)
From: Chris Rees <crees@physics.org>
Reply-To: Chris Rees <crees@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] Porter's Handbook to add information on PORT_OPTIONS syntax
X-Send-Pr-Version: 3.113
X-GNATS-Notify: gjb@FreeBSD.org

>Number:         172662
>Category:       docs
>Synopsis:       [PATCH] Porter's Handbook to add information on PORT_OPTIONS syntax
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    eadler
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 13 15:30:00 UTC 2012
>Closed-Date:    Wed Nov 28 04:16:42 UTC 2012
>Last-Modified:  Wed Nov 28 04:16:42 UTC 2012
>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:
Responsible-Changed-From-To: freebsd-doc->eadler 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Thu Nov 1 22:03:47 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172662 
State-Changed-From-To: open->analyzed 
State-Changed-By: eadler 
State-Changed-When: Fri Nov 2 01:09:36 UTC 2012 
State-Changed-Why:  
awaiting approval or review prior to commit (no action needed from 
submitter) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172662 
State-Changed-From-To: analyzed->closed 
State-Changed-By: eadler 
State-Changed-When: Wed Nov 28 04:16:41 UTC 2012 
State-Changed-Why:  
committed some time ago 

http://www.freebsd.org/cgi/query-pr.cgi?pr=172662 
>Unformatted:
