From: Daniel M. <dm...@us...> - 2004-04-30 08:23:56
|
Update of /cvsroot/fink/web/xml/packaging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14580 Modified Files: packaging.en.xml Log Message: Explained order-of-operations in Depends. Documented the single-string form of conditional syntax. Index: packaging.en.xml =================================================================== RCS file: /cvsroot/fink/web/xml/packaging/packaging.en.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- packaging.en.xml 27 Apr 2004 22:43:45 -0000 1.26 +++ packaging.en.xml 30 Apr 2004 08:23:47 -0000 1.27 @@ -1411,16 +1411,25 @@ If you want to offer the user both options, make two separate packages, e.g. wget and wget-ssl. </p><p> +Order of operations: logical "OR" (list of alternatives) has +a higher precedence (binds more tightly) than the logical +"AND" between each package (or set of alternatives) in the +comma-separated list. Unlike the use of parentheses in arithmetic, +there is no way to specify alternative groups of packages or otherwise +change the order of operations in <code>Depends</code> and related +fields. +</p><p> Starting with a post-0.18.2 CVS version of fink, you can have conditional dependencies. These are specified by placing <code>(string1 op string2)</code> before a package name. Percent -expansion is performed as usual and then the two strings are compared +expansion is performed as usual and then the two strings +(neither of which can be null) are compared according to the <code>op</code> operator: <<, <=, =, !=, >>, >=. The immediately-following package is only considered as a dependency if the comparison is true. </p><p> You can use this format to simplify maintaining several similar -packages. For example, both elinks and elinks-ssl could list: +packages. For example, the packages elinks and elinks-ssl could both list: </p> <codeblock>Depends: (%n = elinks-ssl) openssl097-shlibs, expat-shlibs</codeblock> <p> @@ -1431,6 +1440,19 @@ and elinks-ssl list: </p> <codeblock>Depends: openssl097-shlibs, expat-shlibs</codeblock> +<p> +As an alternative syntax, you can also specify <code>(string)</code>, +which is "true" if <code>string</code> is non-null. For example: +</p> +<codeblock> +Package: nethack%type_pkg[-x11] +Type: -x11 (boolean) +Depends: (%type_pkg[-x11]) x11 +</codeblock> +<p> +would set the package x11 as a dependency for the nethack-x11 variant +but not for the nethack variant. +</p> </itemd></item> <item><itemt>BuildDepends</itemt> |