(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:
		
							parent
							
								
									694b3ed100
								
							
						
					
					
						commit
						9408170cfd
					
				
				
				Notes:
				
					svn2git
				
				2020-12-08 03:00:23 +00:00 
				
			
			svn path=/head/; revision=494
					 1 changed files with 53 additions and 23 deletions
				
			
		|  | @ -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 --> | ||||
| 
 | ||||
| <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 | ||||
|  # 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 | ||||
|  | @ -604,28 +604,45 @@ work/foozolix-1.0/ | |||
| 	    <tt>dir</tt> is the directory in which to find it in case | ||||
| 	    it is not available.  For example, | ||||
| <tscreen><verb> | ||||
| LIB_DEPENDS=    tcl\\.7\\.:${PORTSDIR}/lang/tcl | ||||
| LIB_DEPENDS=    jpeg\\.6\\.:${PORTSDIR}/graphics/jpeg | ||||
| </verb></tscreen> | ||||
| 	    will check for a shared tcl library with major version 7, | ||||
| 	    and descend into the <tt>lang/tcl</tt> subdirectory of | ||||
| 	    your ports tree to build and install it if it is not found. | ||||
| 	    will check for a shared jpeg library with major version 6, | ||||
| 	    and descend into the <tt>graphics/jpeg</tt> subdirectory | ||||
| 	    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 | ||||
| 	    to `<tt>ldconfig -r | grep</tt>', so periods should be | ||||
| 	    escaped by two backslashes like in the example above. | ||||
| 	<sect4> | ||||
| 	  <heading>RUN_DEPENDS</heading> | ||||
| 	  <p>This variable specifies executables this port depends on | ||||
| 	    during run-time.  It is a list of `<tt>exec:dir</tt>' | ||||
| 	    pairs where <tt>exec</tt> is the name of the executable, | ||||
| 	    and <tt>dir</tt> is the directory in which to find it in | ||||
| 	    case it is not available.  For example, | ||||
| 	  <p>This variable specifies executables or files this port | ||||
| 	    depends on during run-time.  It is a list of | ||||
| 	    `<tt>path:dir</tt>' pairs where <tt>path</tt> is the name | ||||
| 	    of the executable or file, and <tt>dir</tt> is the | ||||
| 	    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> | ||||
| RUN_DEPENDS=   wish:${PORTSDIR}/x11/tk | ||||
| RUN_DEPENDS=	${PREFIX}/etc/innd:${PORTSDIR}/news/inn \ | ||||
|                 wish:${PORTSDIR}/x11/tk | ||||
| </verb></tscreen> | ||||
| 	    will check for an executable called `<tt>wish</tt>', and | ||||
| 	    descend into the <tt>x11/tk</tt> subdirectory of your | ||||
| 	    ports tree to build and install it if it is not found. | ||||
| 	    will check if the file `<tt>/usr/local/etc/innd</tt>' | ||||
| 	    exists, and build and install it from the | ||||
| 	    <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> | ||||
| 	    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> | ||||
| 	  <p>This variable specifies executables this port requires to | ||||
| 	    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> | ||||
| BUILD_DEPENDS=   unzip:${PORTSDIR}/archivers/unzip | ||||
| </verb></tscreen> | ||||
|  | @ -650,7 +667,7 @@ BUILD_DEPENDS=   unzip:${PORTSDIR}/archivers/unzip | |||
| 	  <heading>FETCH_DEPENDS</heading> | ||||
| 	  <p>This variable specifies executables this port requires to | ||||
| 	    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> | ||||
| FETCH_DEPENDS=   ncftp2:${PORTSDIR}/net/ncftp2 | ||||
| </verb></tscreen> | ||||
|  | @ -667,7 +684,7 @@ FETCH_DEPENDS=   ncftp2:${PORTSDIR}/net/ncftp2 | |||
| 	    the source of the other port extracted (i.e., having them | ||||
| 	    installed is not enough), then use this variable.  This is | ||||
| 	    just a list of directories, as there is nothing to check, | ||||
| 	    unlike the previous two. | ||||
| 	    unlike the previous four. | ||||
| 
 | ||||
|       <sect3> | ||||
| 	<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 | ||||
| 	  appropriate reference to the Motif library.  Please patch | ||||
| 	  the source to use this wherever the Motif library is | ||||
| 	  referenced in the Makefile or Imakefile.  (Note that this | ||||
| 	  variable (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.) | ||||
| 	  referenced in the Makefile or Imakefile. | ||||
| 
 | ||||
| 	<p>There are two common cases: | ||||
| 	<enum> | ||||
| 	  <item>If the port refers to the Motif library as | ||||
| 	    `<tt>-lXm</tt>' in its Makefile or Imakefile, simply | ||||
| 	    substitite `<tt>${MOTIFLIB}</tt>' for it. | ||||
| 
 | ||||
| 	  <item>If the port uses `<tt>XmClientLibs</tt>' in its | ||||
| 	    Imakefile, change it to `<tt>${MOTIFLIB} | ||||
| 	    ${XTOOLLIB} ${XLIB}</tt>'. | ||||
| 	</enum> | ||||
| 
 | ||||
| 	<p>Note that <tt>${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> | ||||
|       <heading>Licensing Problems</heading> | ||||
|  | @ -1048,7 +1078,7 @@ lib/libtcl.so.7.3 | |||
|   person who wrote this Makefile] | ||||
|  # 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  | ||||
|   when it is committed to our repository] | ||||
|  # | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue