3 (( $+functions[_portmaster_pkgs] )) ||
5 compadd "$@" - ${PKG_DBDIR:-/var/db/pkg}/*(/:t)
8 (( $+functions[_portmaster_ports] )) ||
10 local ret=1 available_ports
11 # if ( [[ $+_fbsd_ports -eq 0 ]] || _cache_invalid FBSD_PORTS ) && ! _retrieve_cache FBSD_PORTS ;then
12 # typeset -gaU _fbsd_ports
13 # _fbsd_ports=(${PORTSDIR:-/usr/ports}/[a-z]*/*(/:s#${PORTSDIR:-/usr/ports/}#))
14 ## _fbsd_ports=(${_fbsd_ports%%/})
15 # _store_cache FBSD_PORTS _fbsd_ports
18 # _wanted cat_packages expl 'category/ports' _multi_parts "$@" / _fbsd_ports
19 # _path_files "$@" -W ${PORTSDIR:-/usr/ports} -/ -g [a-z]* && ret=0
20 _fbsd_cat=(${PORTSDIR:-/usr/ports}/[a-z]*(/:t))
21 if [[ $PREFIX != */* ]] ; then
22 _wanted cat_packages expl 'category/ports' compadd -S '/' $_fbsd_cat
25 _fbsd_ports=(${PORTSDIR:-/usr/ports}/$IPREFIX/*(/:t))
26 _wanted cat_packages expl 'category/ports' compadd $_fbsd_ports
31 (( $+functions[_portmaster_pkgs_and_ports] )) ||
32 _portmaster_pkgs_and_ports() {
34 _portmaster_pkgs && ret=0
35 _portmaster_ports && ret=0
41 local specific_args common_args expunge_args standalone_args kid
43 '--clean-distfiles[delete distfiles not associated with an installed ports: interactive]'
44 '--clean-distfiles-all[delete distfiles not associated with an installed ports]'
45 '--check-depends[cross-check and update dependency information for all ports]'
46 '--check-port-dbdir[check for stale entries in /var/db/ports]'
47 '-l[list all installed ports by category]'
48 '-L[list all installed ports by category, and search for updates]'
49 {'(-help)-h','(-h)--help'}'[display help message]:'
50 '--version[display the version only]:'
53 '(-s -r -o)-e[expunge port using pkg_delete, and remove all distfiles]:name of port:_portmaster_pkgs'
54 '(-e -r -o)-s[clean out stale ports that used to be depended on]'
55 '(-e -s -o)-r[rebuild the specified port, and all ports that depend on it]:name/glob of port:_portmaster_pkgs'
56 '(-e -s -r)-o[replace the installed port with a port from a different origin]:new port dir:_portmaster_ports'
59 '(-b)-B[prevents creation of the backup package for the installed port]'
60 '(-d)-D[no cleaning of distfiles]'
61 '(-D)-d[always clean distfiles]'
64 "(-G)--force-config[run 'make config' for all ports]"
65 "-C[prevents 'make clean' from being run before building]"
66 '-H[hide details of the port build and install in a log file]'
67 "-K[prevents 'make clean' from being run after building]"
68 '(-B)-b[create and keep a backup package of an installed port]'
69 '-g[create a package of the new port]'
70 '-n[run through configure, but do not make or install any ports]'
71 '-t[recurse dependencies thoroughly, using all-depends-list]'
73 '-w[save old shared libraries before deinstall]'
75 '(-i)-f[always rebuild ports]'
76 '(-f)-i[interactive update mode]'
77 '-m[any arguments to supply to make]:arguments for make:'
78 '-x[avoid building or updating ports that match this pattern]:glob pattern to exclude from building:'
79 '-p[specify the full path to a port directory]:a port directory:'
80 '--show-work[show what dependent ports are, and are not installed]'
81 '-R[restart an update, skipping ports already up to date]'
82 '-a[check all ports, update as necessary]'
83 '-F[fetch distfiles only]'
87 if (( CURRENT == 2 ));then
91 '*:Packages and Ports:_portmaster_pkgs_and_ports'
94 --clean-distfiles|--clean-distfiles-all|--check-depends|--check-port-dbdir|--version|-help|-h)
98 if (( $words[(I)-(e|r)] ));then
100 '*:Packages:_portmaster_pkgs'
101 elif (( kid=$words[(I)-o] ));then
102 if (( CURRENT == $kid + 1 ));then
104 '*:Ports replacing:_portmaster_ports'
105 elif (( CURRENT == $kid + 2 )); then
107 '*:Package to replace:_portmaster_pkgs'
111 elif (( $words[(I)-s] ));then
116 '*:Packages and Ports:_portmaster_pkgs_and_ports'