MacPorts    S e l e c t o r s

  1. Introduction

    Like MacPorts pseudo-names selectors enable the user to link the port action to a set of ports. One selector is associated with a characteristic in the port data base, which can take one or several values. Like the SELECT command of in data base engine, the user defines a set of ports according to syntax key_name:key_value where
    • key_name is a valid (selector) name - see tables below.
    • key_value must be a valid Unix glob pattern.
  2. Port keys

    Key name Use case
    category
    categories
    description
    epoch
    homepage
    long_description
    license?
    maintainer
    maintainers
    name
    platform
    platforms
    portdir
    revision
    variant
    variants
    version
    Tab. Available port keys in MacPorts ports (alphabetical order).

  3. Port Dependencies

    Key name Use case
    dependentof
    depends
    depends_build
    depends_extract
    depends_fetch
    depends_lib
    depends_run
    depof
    rdependentof
    rdepof
    Tab. Selectors for analysis of port dependencies (alphabetical order).

    Remark: Selectors above are mentioned in the manpage and printed by port help, but are apparently not mentioned in the internet guide. Also no explanation about those features is available (except for trial-and-error).
  4. Pattern matching

    As already mentioned in introduction, key_value in key_name:key_value may be formulated as a glob pattern (not a full-fledge pattern matching as available in for example Perl). port help and also the manpage mention that Logical operators "and", "or", "not", "!", "(" and ")" may be used to combine individual portnames, port glob patterns and/or pseudo-portnames to construct complex port expressions.