- Move chapter 9 Ports that require Motif under 6.4 Using X11 and shorten

it a lot; don't pretend Motif is popular toolkir nor that people need
  to be able to build static packages linked against commercial Motif
  implementations
- Move chapter 10 X11 fonts under 6.4 Using X11 and remove information
  relevant for pre-XFree 3.3.3 era; this is now a one-line section

Approved by:	keramida (mentor)
This commit is contained in:
Pav Lucistnik 2005-09-01 07:26:21 +00:00
parent 452bd3f433
commit c3d6441853
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=25530

View file

@ -4227,6 +4227,9 @@ LDCONFIG_DIRS= %%PREFIX%%/lib/foo %%PREFIX%%/lib/bar</programlisting>
<sect1 id="using-x11">
<title>Using X11</title>
<sect2 id="x11-variables">
<title>Variable definitions</title>
<table frame="none">
<title>Variables for ports that use X</title>
@ -4384,6 +4387,61 @@ RUN_DEPENDS= ${X11BASE}/bin/xfs:${X_FONTSERVER_PORT} \
USE_XLIB= yes</programlisting>
</example>
</sect2>
<sect2 id="x11-motif">
<title>Ports that require Motif</title>
<para>If your port requires a Motif library, define
<makevar>USE_MOTIF</makevar> in the <filename>Makefile</filename>.
Default Motif implementation is
<filename role="package">x11-toolkits/open-motif</filename>.
Users can choose
<filename role="package">x11-toolkits/lesstif</filename> instead
by setting <makevar>WANT_LESSTIF</makevar> variable.</para>
<para>The <makevar>MOTIFLIB</makevar> variable will be set by
<filename>bsd.port.mk</filename> to be the appropriate reference
to the Motif library. Please patch the source of your port to
reference this wherever the Motif library is referenced in the
<filename>Makefile</filename> or
<filename>Imakefile</filename>.</para>
<para>There are two common cases:</para>
<itemizedlist>
<listitem>
<para>If the port refers to the Motif library as
<literal>-lXm</literal> in its <filename>Makefile</filename> or
<filename>Imakefile</filename>, simply substitute
<literal>&dollar;{MOTIFLIB}</literal> for it.</para>
</listitem>
<listitem>
<para>If the port uses <literal>XmClientLibs</literal> in its
<filename>Imakefile</filename>, change it to
<literal>&dollar;{MOTIFLIB} &dollar;{XTOOLLIB}
&dollar;{XLIB}</literal>.</para>
</listitem>
</itemizedlist>
<para>Note that <makevar>MOTIFLIB</makevar> (usually) expands to
<literal>-L/usr/X11R6/lib -lXm</literal> or
<literal>/usr/X11R6/lib/libXm.a</literal>, so there is no need to
add <literal>-L</literal> or <literal>-l</literal> in front.</para>
</sect2>
<sect2>
<title>X11 fonts</title>
<para>If your port installs fonts for the X Window System, put them in
<filename><makevar>X11BASE</makevar>/lib/X11/fonts/local</filename>.<para>
</sect2>
</sect1>
<sect1 id="using-automake">
@ -5807,73 +5865,6 @@ etc/orbit.conf.sample
-->
</chapter>
<chapter id="porting-motif">
<title>Ports that require Motif</title>
<para>There are many programs that require a Motif library (available
from several commercial vendors, while there is a free clone reported
to be able to run many applications in
<filename role="package">x11-toolkits/lesstif</filename>) to compile. Since it is a
popular toolkit and their licenses usually permit redistribution of
statically linked binaries, we have made special provisions for
handling ports that require Motif in a way that we can easily compile
binaries linked either dynamically (for people who are compiling from
the port) or statically (for people who distribute packages).</para>
<sect1 id="motif-use">
<title><makevar>USE_MOTIF</makevar></title>
<para>If your port requires Motif, define this variable in the
<filename>Makefile</filename>. This will prevent people who do not own a copy of Motif
from even attempting to build it.</para>
</sect1>
<sect1 id="motif-lib">
<title><makevar>MOTIFLIB</makevar></title>
<para>This variable will be set by <filename>bsd.port.mk</filename> to
be the appropriate reference to the Motif library. Please patch the
source of your port to reference this wherever the Motif library is referenced in the
<filename>Makefile</filename> or
<filename>Imakefile</filename>.</para>
<para>There are two common cases:</para>
<itemizedlist>
<listitem>
<para>If the port refers to the Motif library as
<literal>-lXm</literal> in its <filename>Makefile</filename> or
<filename>Imakefile</filename>, simply substitute
<literal>&dollar;{MOTIFLIB}</literal> for it.</para>
</listitem>
<listitem>
<para>If the port uses <literal>XmClientLibs</literal> in its
<filename>Imakefile</filename>, change it to
<literal>&dollar;{MOTIFLIB} &dollar;{XTOOLLIB}
&dollar;{XLIB}</literal>.</para>
</listitem>
</itemizedlist>
<para>Note that <makevar>MOTIFLIB</makevar> (usually) expands to
<literal>-L/usr/X11R6/lib -lXm</literal> or
<literal>/usr/X11R6/lib/libXm.a</literal>, so there is no need to
add <literal>-L</literal> or <literal>-l</literal> in front.</para>
</sect1>
</chapter>
<chapter id="x11-fonts">
<title>X11 fonts</title>
<para>If your port installs fonts for the X Window System, put them in
<filename><makevar>X11BASE</makevar>/lib/X11/fonts/local</filename>.
This directory was new to <application>XFree86 3.3.3</application>. If it does not exist,
please create it, and print out a message urging the user to update
their <application>XFree86</application> to 3.3.3 or newer, or at least add this directory to the
font path in <filename>/etc/XF86Config</filename>.</para>
</chapter>
<chapter id="pkg-files">
<title>The <filename>pkg-<replaceable>*</replaceable></filename> files</title>