(1) Clarify the use of ${MOTIFLIB} by giving examples on what to

substitute.

(2) Bring the *_DEPENDS section up to the current state.  Explain that
    the pathname in the "path:dir" pair can be a full pathname if you
    want a port to depend on something that isn't executable or an
    executable that's not expected to be in the user's search path
    (like /usr/local/libexec).  Also, change the LIB_DEPENDS example
    to use jpeg, tcl-7.3's appropriateness as an example is quite
    outdated at this point. ;)
This commit is contained in:
Satoshi Asami 1996-08-20 09:51:02 +00:00
parent 694b3ed100
commit 9408170cfd
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=494

View file

@ -1,4 +1,4 @@
<!-- $Id: porting.sgml,v 1.25 1996-08-01 00:12:11 asami Exp $ --> <!-- $Id: porting.sgml,v 1.26 1996-08-20 09:51:02 asami Exp $ -->
<!-- The FreeBSD Documentation Project --> <!-- The FreeBSD Documentation Project -->
<sect1><heading>Porting an existing piece of free software<label id="porting"></heading> <sect1><heading>Porting an existing piece of free software<label id="porting"></heading>
@ -158,7 +158,7 @@ The pattern is the year followed by the month.
# Date created: 5 December 1994 # Date created: 5 December 1994
# Whom: asami # Whom: asami
# #
# $Id: porting.sgml,v 1.25 1996-08-01 00:12:11 asami Exp $ # $Id: porting.sgml,v 1.26 1996-08-20 09:51:02 asami Exp $
# #
DISTNAME= oneko-1.1b DISTNAME= oneko-1.1b
@ -604,28 +604,45 @@ work/foozolix-1.0/
<tt>dir</tt> is the directory in which to find it in case <tt>dir</tt> is the directory in which to find it in case
it is not available. For example, it is not available. For example,
<tscreen><verb> <tscreen><verb>
LIB_DEPENDS= tcl\\.7\\.:${PORTSDIR}/lang/tcl LIB_DEPENDS= jpeg\\.6\\.:${PORTSDIR}/graphics/jpeg
</verb></tscreen> </verb></tscreen>
will check for a shared tcl library with major version 7, will check for a shared jpeg library with major version 6,
and descend into the <tt>lang/tcl</tt> subdirectory of and descend into the <tt>graphics/jpeg</tt> subdirectory
your ports tree to build and install it if it is not found. of your ports tree to build and install it if it is not
found.
Note that the <tt>lib</tt> part is just an argument given Note that the <tt>lib</tt> part is just an argument given
to `<tt>ldconfig -r | grep</tt>', so periods should be to `<tt>ldconfig -r | grep</tt>', so periods should be
escaped by two backslashes like in the example above. escaped by two backslashes like in the example above.
<sect4> <sect4>
<heading>RUN_DEPENDS</heading> <heading>RUN_DEPENDS</heading>
<p>This variable specifies executables this port depends on <p>This variable specifies executables or files this port
during run-time. It is a list of `<tt>exec:dir</tt>' depends on during run-time. It is a list of
pairs where <tt>exec</tt> is the name of the executable, `<tt>path:dir</tt>' pairs where <tt>path</tt> is the name
and <tt>dir</tt> is the directory in which to find it in of the executable or file, and <tt>dir</tt> is the
case it is not available. For example, directory in which to find it in case it is not
available. If <tt>path</tt> starts with a slash
(<tt>/</tt>), it is treated as a file and its existence is
tested with `<tt>test -e</tt>'; otherwise, it is assumed
to be an executable, and `<tt>which -s</tt>' is used to
determine if the program exists in the user's search path.
<p>For example,
<tscreen><verb> <tscreen><verb>
RUN_DEPENDS= wish:${PORTSDIR}/x11/tk RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \
wish:${PORTSDIR}/x11/tk
</verb></tscreen> </verb></tscreen>
will check for an executable called `<tt>wish</tt>', and will check if the file `<tt>/usr/local/etc/innd</tt>'
descend into the <tt>x11/tk</tt> subdirectory of your exists, and build and install it from the
ports tree to build and install it if it is not found. <tt>news/inn</tt> subdirectory of the ports tree if it is
not found. It will also see if an executable called
`<tt>wish</tt>' is in your search path, and descend into
the <tt>x11/tk</tt> subdirectory of your ports tree to
build and install it if it is not found. (Note that in
this case, `<tt>innd</tt>' is actually an executable; if
an executable is in a place that is not expected to be in
a normal user's search path, you should use the full
pathname.)
The dependency is checked from within the <tt>install</tt> The dependency is checked from within the <tt>install</tt>
target. Also, the name of the dependency is put in to the target. Also, the name of the dependency is put in to the
@ -635,7 +652,7 @@ RUN_DEPENDS= wish:${PORTSDIR}/x11/tk
<heading>BUILD_DEPENDS</heading> <heading>BUILD_DEPENDS</heading>
<p>This variable specifies executables this port requires to <p>This variable specifies executables this port requires to
build. Like <tt>RUN_DEPENDS</tt>, it is a list of build. Like <tt>RUN_DEPENDS</tt>, it is a list of
`<tt>exec:dir</tt>' pairs. For example, `<tt>path:dir</tt>' pairs. For example,
<tscreen><verb> <tscreen><verb>
BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
</verb></tscreen> </verb></tscreen>
@ -650,7 +667,7 @@ BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
<heading>FETCH_DEPENDS</heading> <heading>FETCH_DEPENDS</heading>
<p>This variable specifies executables this port requires to <p>This variable specifies executables this port requires to
fetch. Like the previous two, it is a list of fetch. Like the previous two, it is a list of
`<tt>exec:dir</tt>' pairs. For example, `<tt>path:dir</tt>' pairs. For example,
<tscreen><verb> <tscreen><verb>
FETCH_DEPENDS= ncftp2:${PORTSDIR}/net/ncftp2 FETCH_DEPENDS= ncftp2:${PORTSDIR}/net/ncftp2
</verb></tscreen> </verb></tscreen>
@ -667,7 +684,7 @@ FETCH_DEPENDS= ncftp2:${PORTSDIR}/net/ncftp2
the source of the other port extracted (i.e., having them the source of the other port extracted (i.e., having them
installed is not enough), then use this variable. This is installed is not enough), then use this variable. This is
just a list of directories, as there is nothing to check, just a list of directories, as there is nothing to check,
unlike the previous two. unlike the previous four.
<sect3> <sect3>
<heading>Building mechanisms</heading> <heading>Building mechanisms</heading>
@ -720,10 +737,23 @@ FETCH_DEPENDS= ncftp2:${PORTSDIR}/net/ncftp2
<p>This variable will be set by <tt>bsd.port.mk</tt> to be the <p>This variable will be set by <tt>bsd.port.mk</tt> to be the
appropriate reference to the Motif library. Please patch appropriate reference to the Motif library. Please patch
the source to use this wherever the Motif library is the source to use this wherever the Motif library is
referenced in the Makefile or Imakefile. (Note that this referenced in the Makefile or Imakefile.
variable (usually) expands to `<tt>-L/usr/X11R6/lib
-lXm</tt>' or `<tt>/usr/X11R6/lib/libXm.a</tt>', so there is <p>There are two common cases:
no need to add `<tt>-L</tt>' or `<tt>-l</tt>' in front.) <enum>
<item>If the port refers to the Motif library as
`<tt>-lXm</tt>' in its Makefile or Imakefile, simply
substitite `<tt>&dollar;{MOTIFLIB}</tt>' for it.
<item>If the port uses `<tt>XmClientLibs</tt>' in its
Imakefile, change it to `<tt>&dollar;{MOTIFLIB}
&dollar;{XTOOLLIB} &dollar;{XLIB}</tt>'.
</enum>
<p>Note that <tt>&dollar;{MOTIFLIB}</tt> (usually) expands to
`<tt>-L/usr/X11R6/lib -lXm</tt>' or
`<tt>/usr/X11R6/lib/libXm.a</tt>', so there is no need to
add `<tt>-L</tt>' or `<tt>-l</tt>' in front.
<sect2> <sect2>
<heading>Licensing Problems</heading> <heading>Licensing Problems</heading>
@ -1048,7 +1078,7 @@ lib/libtcl.so.7.3
person who wrote this Makefile] person who wrote this Makefile]
# Whom: Satoshi Asami <asami@FreeBSD.ORG> # Whom: Satoshi Asami <asami@FreeBSD.ORG>
# #
# $Id: porting.sgml,v 1.25 1996-08-01 00:12:11 asami Exp $ # $Id: porting.sgml,v 1.26 1996-08-20 09:51:02 asami Exp $
[ ^^^^ do not worry about this...it will be automatically filled in by CVS [ ^^^^ do not worry about this...it will be automatically filled in by CVS
when it is committed to our repository] when it is committed to our repository]
# #