>Number:         178169
>Category:       docs
>Synopsis:       [patch][porters-handbook] update documentation for using 
>gettext
>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:   Fri Apr 26 04:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Jason Helfman
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD freefall.freebsd.org 10.0-CURRENT FreeBSD 10.0-CURRENT #0 
r249172: Sat Apr 6 00:40:01 UTC 2013 
pe...@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64


        
>Description:
USE_GETTEXT is now under the USES framework

>How-To-Repeat:
        
>Fix:

Index: porters-handbook/book.xml
===================================================================
--- porters-handbook/book.xml   (revision 41499)
+++ porters-handbook/book.xml   (working copy)
@@ -5781,17 +5781,12 @@
       <sect2>
        <title>Basic Usage</title>
 
-       <para>If your port requires <literal>gettext</literal>,
-         just set <makevar>USE_GETTEXT</makevar> to
-         <literal>yes</literal>, and your port will grow the
-         dependency on <filename
-           role="package">devel/gettext</filename>.  The value of
-         <makevar>USE_GETTEXT</makevar> can also specify the required
-         version of the <literal>libintl</literal> library, the basic
-         part of <literal>gettext</literal>, but using this feature
-         is <emphasis>strongly discouraged</emphasis>: Your port
-         should work with just the current version of <filename
-           role="package">devel/gettext</filename>.</para>
+       <para>If your port requires <literal>gettext</literal>, just
+         set <literal>USES= gettext</literal>, and your
+         port will inherit a dependency on <filename
+           role="package">devel/gettext</filename>. Other values for
+         <literal>gettext</literal> usage can be in <xref
+         linkend="uses-values"/>.</para>
 
        <para>A rather common case is a port using
          <literal>gettext</literal> and <command>configure</command>.
@@ -5802,7 +5797,7 @@
          <envar>CPPFLAGS</envar> and <envar>LDFLAGS</envar> as
          follows:</para>
 
-       <programlisting>USE_GETTEXT=    yes
+       <programlisting>USES=   gettext
 CPPFLAGS+=     -I${LOCALBASE}/include
 LDFLAGS+=      -L${LOCALBASE}/lib
 
@@ -5811,7 +5806,7 @@
        <para>Of course, the code can be more compact if there are no
          more flags to pass to <command>configure</command>:</para>
 
-       <programlisting>USE_GETTEXT=    yes
+       <programlisting>USES=   gettext
 GNU_CONFIGURE= yes</programlisting>
       </sect2>
 
@@ -5832,7 +5827,7 @@
 .include &lt;bsd.port.options.mk&gt;
 
 .if ${PORT_OPTIONS:MNLS}
-USE_GETTEXT=           yes
+USES+=                 gettext
 PLIST_SUB+=            NLS=""
 .else
 CONFIGURE_ARGS+=       --disable-nls
Index: porters-handbook/uses.xml
===================================================================
--- porters-handbook/uses.xml   (revision 41499)
+++ porters-handbook/uses.xml   (working copy)
@@ -63,6 +63,19 @@
 </row>
 
 <row>
+  <entry><literal>gettext</literal></entry>
+  <entry>none, <literal>lib</literal>, <literal>build</literal>,
+    <literal>run</literal></entry>
+  <entry>Implies that the port uses <filename
+      role="package">devel/gettext</filename> in one way or another.  By
+    default, with no arguments or with the <literal>lib</literal>
+    argument, implies <command>gettext</command> with build-time and 
+    run-time dependencies, <literal>build</literal> implies a build-time
+    dependency, and <literal>run</literal> implies a run-time
+    dependency.</entry>
+</row>
+
+<row>
   <entry><literal>pathfix</literal></entry>
   <entry>none</entry>
   <entry>Look for the <filename>Makefile.in</filename> and
>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-doc@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-doc
To unsubscribe, send any mail to "freebsd-doc-unsubscr...@freebsd.org"

Reply via email to