|
Lines 5781-5797
Link Here
|
| 5781 |
<sect2> |
5781 |
<sect2> |
| 5782 |
<title>Basic Usage</title> |
5782 |
<title>Basic Usage</title> |
| 5783 |
|
5783 |
|
| 5784 |
<para>If your port requires <literal>gettext</literal>, |
5784 |
<para>If your port requires <literal>gettext</literal>, just |
| 5785 |
just set <makevar>USE_GETTEXT</makevar> to |
5785 |
set <literal>USES= gettext</literal>, and your |
| 5786 |
<literal>yes</literal>, and your port will grow the |
5786 |
port will inherit a dependency on <filename |
| 5787 |
dependency on <filename |
5787 |
role="package">devel/gettext</filename>. Other values for |
| 5788 |
role="package">devel/gettext</filename>. The value of |
5788 |
<literal>gettext</literal> usage can be in <xref |
| 5789 |
<makevar>USE_GETTEXT</makevar> can also specify the required |
5789 |
linkend="uses-values"/>.</para> |
| 5790 |
version of the <literal>libintl</literal> library, the basic |
|
|
| 5791 |
part of <literal>gettext</literal>, but using this feature |
| 5792 |
is <emphasis>strongly discouraged</emphasis>: Your port |
| 5793 |
should work with just the current version of <filename |
| 5794 |
role="package">devel/gettext</filename>.</para> |
| 5795 |
|
5790 |
|
| 5796 |
<para>A rather common case is a port using |
5791 |
<para>A rather common case is a port using |
| 5797 |
<literal>gettext</literal> and <command>configure</command>. |
5792 |
<literal>gettext</literal> and <command>configure</command>. |
|
Lines 5802-5808
Link Here
|
| 5802 |
<envar>CPPFLAGS</envar> and <envar>LDFLAGS</envar> as |
5797 |
<envar>CPPFLAGS</envar> and <envar>LDFLAGS</envar> as |
| 5803 |
follows:</para> |
5798 |
follows:</para> |
| 5804 |
|
5799 |
|
| 5805 |
<programlisting>USE_GETTEXT= yes |
5800 |
<programlisting>USES= gettext |
| 5806 |
CPPFLAGS+= -I${LOCALBASE}/include |
5801 |
CPPFLAGS+= -I${LOCALBASE}/include |
| 5807 |
LDFLAGS+= -L${LOCALBASE}/lib |
5802 |
LDFLAGS+= -L${LOCALBASE}/lib |
| 5808 |
|
5803 |
|
|
Lines 5811-5817
Link Here
|
| 5811 |
<para>Of course, the code can be more compact if there are no |
5806 |
<para>Of course, the code can be more compact if there are no |
| 5812 |
more flags to pass to <command>configure</command>:</para> |
5807 |
more flags to pass to <command>configure</command>:</para> |
| 5813 |
|
5808 |
|
| 5814 |
<programlisting>USE_GETTEXT= yes |
5809 |
<programlisting>USES= gettext |
| 5815 |
GNU_CONFIGURE= yes</programlisting> |
5810 |
GNU_CONFIGURE= yes</programlisting> |
| 5816 |
</sect2> |
5811 |
</sect2> |
| 5817 |
|
5812 |
|
|
Lines 5832-5838
Link Here
|
| 5832 |
.include <bsd.port.options.mk> |
5827 |
.include <bsd.port.options.mk> |
| 5833 |
|
5828 |
|
| 5834 |
.if ${PORT_OPTIONS:MNLS} |
5829 |
.if ${PORT_OPTIONS:MNLS} |
| 5835 |
USE_GETTEXT= yes |
5830 |
USES+= gettext |
| 5836 |
PLIST_SUB+= NLS="" |
5831 |
PLIST_SUB+= NLS="" |
| 5837 |
.else |
5832 |
.else |
| 5838 |
CONFIGURE_ARGS+= --disable-nls |
5833 |
CONFIGURE_ARGS+= --disable-nls |