From feef9138fd2f8ead8c415492a1542bb698f36540 Mon Sep 17 00:00:00 2001 From: Satoshi Asami Date: Tue, 20 Aug 1996 09:51:02 +0000 Subject: [PATCH] (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. ;) --- share/doc/handbook/porting.sgml | 76 +++++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/share/doc/handbook/porting.sgml b/share/doc/handbook/porting.sgml index b525901b3387..0ef05d2270af 100644 --- a/share/doc/handbook/porting.sgml +++ b/share/doc/handbook/porting.sgml @@ -1,4 +1,4 @@ - + Porting an existing piece of free software @@ -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.24 1996/07/30 22:19:42 asami Exp $ + # $Id: porting.sgml,v 1.25 1996/08/01 00:12:11 asami Exp $ # DISTNAME= oneko-1.1b @@ -604,28 +604,45 @@ work/foozolix-1.0/ dir is the directory in which to find it in case it is not available. For example, -LIB_DEPENDS= tcl\\.7\\.:${PORTSDIR}/lang/tcl +LIB_DEPENDS= jpeg\\.6\\.:${PORTSDIR}/graphics/jpeg - will check for a shared tcl library with major version 7, - and descend into the lang/tcl 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 graphics/jpeg subdirectory + of your ports tree to build and install it if it is not + found. Note that the lib part is just an argument given to `ldconfig -r | grep', so periods should be escaped by two backslashes like in the example above. RUN_DEPENDS -

This variable specifies executables this port depends on - during run-time. It is a list of `exec:dir' - pairs where exec is the name of the executable, - and dir is the directory in which to find it in - case it is not available. For example, +

This variable specifies executables or files this port + depends on during run-time. It is a list of + `path:dir' pairs where path is the name + of the executable or file, and dir is the + directory in which to find it in case it is not + available. If path starts with a slash + (/), it is treated as a file and its existence is + tested with `test -e'; otherwise, it is assumed + to be an executable, and `which -s' is used to + determine if the program exists in the user's search path. + +

For example, -RUN_DEPENDS= wish:${PORTSDIR}/x11/tk +RUN_DEPENDS= ${PREFIX}/etc/innd:${PORTSDIR}/news/inn \ + wish:${PORTSDIR}/x11/tk - will check for an executable called `wish', and - descend into the x11/tk subdirectory of your - ports tree to build and install it if it is not found. + will check if the file `/usr/local/etc/innd' + exists, and build and install it from the + news/inn subdirectory of the ports tree if it is + not found. It will also see if an executable called + `wish' is in your search path, and descend into + the x11/tk subdirectory of your ports tree to + build and install it if it is not found. (Note that in + this case, `innd' 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 install target. Also, the name of the dependency is put in to the @@ -635,7 +652,7 @@ RUN_DEPENDS= wish:${PORTSDIR}/x11/tk BUILD_DEPENDS

This variable specifies executables this port requires to build. Like RUN_DEPENDS, it is a list of - `exec:dir' pairs. For example, + `path:dir' pairs. For example, BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip @@ -650,7 +667,7 @@ BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip FETCH_DEPENDS

This variable specifies executables this port requires to fetch. Like the previous two, it is a list of - `exec:dir' pairs. For example, + `path:dir' pairs. For example, FETCH_DEPENDS= ncftp2:${PORTSDIR}/net/ncftp2 @@ -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. Building mechanisms @@ -720,10 +737,23 @@ FETCH_DEPENDS= ncftp2:${PORTSDIR}/net/ncftp2

This variable will be set by bsd.port.mk 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 `-L/usr/X11R6/lib - -lXm' or `/usr/X11R6/lib/libXm.a', so there is - no need to add `-L' or `-l' in front.) + referenced in the Makefile or Imakefile. + +

There are two common cases: + + If the port refers to the Motif library as + `-lXm' in its Makefile or Imakefile, simply + substitite `${MOTIFLIB}' for it. + + If the port uses `XmClientLibs' in its + Imakefile, change it to `${MOTIFLIB} + ${XTOOLLIB} ${XLIB}'. + + +

Note that ${MOTIFLIB} (usually) expands to + `-L/usr/X11R6/lib -lXm' or + `/usr/X11R6/lib/libXm.a', so there is no need to + add `-L' or `-l' in front. Licensing Problems @@ -1048,7 +1078,7 @@ lib/libtcl.so.7.3 person who wrote this Makefile] # Whom: Satoshi Asami # - # $Id: porting.sgml,v 1.24 1996/07/30 22:19:42 asami Exp $ + # $Id: porting.sgml,v 1.25 1996/08/01 00:12:11 asami Exp $ [ ^^^^ do not worry about this...it will be automatically filled in by CVS when it is committed to our repository] #