source: trunk/base/doc/port.1 @ 134980

Last change on this file since 134980 was 131423, checked in by ionic@…, 5 years ago

base: clarify that --enforce-variants does not reset any variants but uses normal variants merging.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 26.6 KB
Line 
1'\" t
2.TH "PORT" "1" "2014\-11\-11" "MacPorts 2\&.3\&.99" "MacPorts Manual"
3.\" -----------------------------------------------------------------
4.\" * Define some portability stuff
5.\" -----------------------------------------------------------------
6.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7.\" http://bugs.debian.org/507673
8.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10.ie \n(.g .ds Aq \(aq
11.el       .ds Aq '
12.\" -----------------------------------------------------------------
13.\" * set default formatting
14.\" -----------------------------------------------------------------
15.\" disable hyphenation
16.nh
17.\" disable justification (adjust text to left margin only)
18.ad l
19.\" -----------------------------------------------------------------
20.\" * MAIN CONTENT STARTS HERE *
21.\" -----------------------------------------------------------------
22.SH "NAME"
23port \- Command line interface for MacPorts
24.SH "SYNOPSIS"
25.sp
26.nf
27\fBport\fR [\fB\-bcdfknNopqRstuvy\fR] [\fB\-D\fR \fIportdir\fR] [\fB\-F\fR \fIcmdfile\fR] [\fIaction\fR] [\fIactionflags\fR]
28     [[\fIportname\fR | \fIpseudo\-portname\fR | \fIport\-expressions\fR | \fIport\-url\fR]]
29     [[\fI@version\fR] [+/\-variant \&...] \&... [option=value \&...]]
30.fi
31.SH "DESCRIPTION"
32.sp
33\fBport\fR is designed to operate on individual or multiple \fIports\fR, optionally within a single call, based on the requested \fIaction\fR\&. If no \fIaction\fR is specified the port command enters interactive mode, in which commands are read via stdin\&. If no \fIportdir\fR or \fIportname\fR is specified for an \fIaction\fR, the current working directory is assumed\&. Batch commands may be passed via a \fIcmdfile\fR\&. Port \fIoptions\fR are passed as key=value pairs and take precedence over individual \fIportname\fR options as specified in its Portfile and system\-wide settings\&.
34.sp
35Port \fIvariants\fR can be specified as \fI+name\fR, which indicates the variant is desired, or \fI\-name\fR, indicating the contrary\&. In case of ambiguities, a port can be fully specified with the \fI@version_revision+variants\fR format\&.
36.sp
37Installed ports can be activated or deactivated without being uninstalled\&. A port can be installed in multiple versions and variant combinations, but only one of them can be \fIactive\fR\&. See \fBportarchives\fR(7)\&.
38.sp
39When passing \fIportnames\fR to an \fIaction\fR, \fBport\fR recognizes various \fIpseudo\-portnames\fR that will expand to the specified set of ports from the available port tree(s)\&. These may be used in the same way as a \fIportname\fR\&.
40.PP
41\fBThe \fR\fB\fIpseudo\-portnames\fR\fR\fB are:\fR
42.sp
43.RS 4
44.ie n \{\
45\h'-04'\(bu\h'+03'\c
46.\}
47.el \{\
48.sp -1
49.IP \(bu 2.3
50.\}
51\fIall\fR: all the ports in each ports tree listed in
52\fIsources\&.conf\fR
53.RE
54.sp
55.RS 4
56.ie n \{\
57\h'-04'\(bu\h'+03'\c
58.\}
59.el \{\
60.sp -1
61.IP \(bu 2.3
62.\}
63\fIcurrent\fR: the port in the current working directory
64.RE
65.sp
66.RS 4
67.ie n \{\
68\h'-04'\(bu\h'+03'\c
69.\}
70.el \{\
71.sp -1
72.IP \(bu 2.3
73.\}
74\fIactive\fR: set of installed and active ports
75.RE
76.sp
77.RS 4
78.ie n \{\
79\h'-04'\(bu\h'+03'\c
80.\}
81.el \{\
82.sp -1
83.IP \(bu 2.3
84.\}
85\fIinactive\fR: set of installed but inactive ports
86.RE
87.sp
88.RS 4
89.ie n \{\
90\h'-04'\(bu\h'+03'\c
91.\}
92.el \{\
93.sp -1
94.IP \(bu 2.3
95.\}
96\fIinstalled\fR: set of all installed ports
97.RE
98.sp
99.RS 4
100.ie n \{\
101\h'-04'\(bu\h'+03'\c
102.\}
103.el \{\
104.sp -1
105.IP \(bu 2.3
106.\}
107\fIuninstalled\fR: ports in the ports tree(s) that are not installed
108.RE
109.sp
110.RS 4
111.ie n \{\
112\h'-04'\(bu\h'+03'\c
113.\}
114.el \{\
115.sp -1
116.IP \(bu 2.3
117.\}
118\fIoutdated\fR: installed ports that are out of date with respect to their current version/revision in the ports tree(s)
119.RE
120.sp
121.RS 4
122.ie n \{\
123\h'-04'\(bu\h'+03'\c
124.\}
125.el \{\
126.sp -1
127.IP \(bu 2.3
128.\}
129\fIobsolete\fR: set of ports that are installed but no longer exist in any port tree
130.RE
131.sp
132.RS 4
133.ie n \{\
134\h'-04'\(bu\h'+03'\c
135.\}
136.el \{\
137.sp -1
138.IP \(bu 2.3
139.\}
140\fIrequested\fR: installed ports that were explicitly asked for
141.RE
142.sp
143.RS 4
144.ie n \{\
145\h'-04'\(bu\h'+03'\c
146.\}
147.el \{\
148.sp -1
149.IP \(bu 2.3
150.\}
151\fIunrequested\fR: installed ports that were installed only to satisfy dependencies
152.RE
153.sp
154.RS 4
155.ie n \{\
156\h'-04'\(bu\h'+03'\c
157.\}
158.el \{\
159.sp -1
160.IP \(bu 2.3
161.\}
162\fIleaves\fR: installed ports that are unrequested and have no dependents
163.RE
164.sp
165Sets of ports can also be specified with \fIpseudo\-portname selectors\fR, which expand to the ports in which the value of the \fIPortfile\fR option corresponding to the selector\(cqs name (in either singular or plural form where applicable) matches the given regular expression\&. Usage is: selector:regex
166.PP
167\fBThe \fR\fB\fIpseudo\-portname selectors\fR\fR\fB are:\fR
168.sp
169.RS 4
170.ie n \{\
171\h'-04'\(bu\h'+03'\c
172.\}
173.el \{\
174.sp -1
175.IP \(bu 2.3
176.\}
177\fIname\fR
178.RE
179.sp
180.RS 4
181.ie n \{\
182\h'-04'\(bu\h'+03'\c
183.\}
184.el \{\
185.sp -1
186.IP \(bu 2.3
187.\}
188\fIversion\fR
189.RE
190.sp
191.RS 4
192.ie n \{\
193\h'-04'\(bu\h'+03'\c
194.\}
195.el \{\
196.sp -1
197.IP \(bu 2.3
198.\}
199\fIrevision\fR
200.RE
201.sp
202.RS 4
203.ie n \{\
204\h'-04'\(bu\h'+03'\c
205.\}
206.el \{\
207.sp -1
208.IP \(bu 2.3
209.\}
210\fIepoch\fR
211.RE
212.sp
213.RS 4
214.ie n \{\
215\h'-04'\(bu\h'+03'\c
216.\}
217.el \{\
218.sp -1
219.IP \(bu 2.3
220.\}
221\fIvariant\fR
222.RE
223.sp
224.RS 4
225.ie n \{\
226\h'-04'\(bu\h'+03'\c
227.\}
228.el \{\
229.sp -1
230.IP \(bu 2.3
231.\}
232\fIvariants\fR
233.RE
234.sp
235.RS 4
236.ie n \{\
237\h'-04'\(bu\h'+03'\c
238.\}
239.el \{\
240.sp -1
241.IP \(bu 2.3
242.\}
243\fIcategory\fR
244.RE
245.sp
246.RS 4
247.ie n \{\
248\h'-04'\(bu\h'+03'\c
249.\}
250.el \{\
251.sp -1
252.IP \(bu 2.3
253.\}
254\fIcategories\fR
255.RE
256.sp
257.RS 4
258.ie n \{\
259\h'-04'\(bu\h'+03'\c
260.\}
261.el \{\
262.sp -1
263.IP \(bu 2.3
264.\}
265\fImaintainer\fR
266.RE
267.sp
268.RS 4
269.ie n \{\
270\h'-04'\(bu\h'+03'\c
271.\}
272.el \{\
273.sp -1
274.IP \(bu 2.3
275.\}
276\fImaintainers\fR
277.RE
278.sp
279.RS 4
280.ie n \{\
281\h'-04'\(bu\h'+03'\c
282.\}
283.el \{\
284.sp -1
285.IP \(bu 2.3
286.\}
287\fIplatform\fR
288.RE
289.sp
290.RS 4
291.ie n \{\
292\h'-04'\(bu\h'+03'\c
293.\}
294.el \{\
295.sp -1
296.IP \(bu 2.3
297.\}
298\fIplatforms\fR
299.RE
300.sp
301.RS 4
302.ie n \{\
303\h'-04'\(bu\h'+03'\c
304.\}
305.el \{\
306.sp -1
307.IP \(bu 2.3
308.\}
309\fIdescription\fR
310.RE
311.sp
312.RS 4
313.ie n \{\
314\h'-04'\(bu\h'+03'\c
315.\}
316.el \{\
317.sp -1
318.IP \(bu 2.3
319.\}
320\fIlong_description\fR
321.RE
322.sp
323.RS 4
324.ie n \{\
325\h'-04'\(bu\h'+03'\c
326.\}
327.el \{\
328.sp -1
329.IP \(bu 2.3
330.\}
331\fIhomepage\fR
332.RE
333.sp
334.RS 4
335.ie n \{\
336\h'-04'\(bu\h'+03'\c
337.\}
338.el \{\
339.sp -1
340.IP \(bu 2.3
341.\}
342\fIlicense\fR
343.RE
344.sp
345.RS 4
346.ie n \{\
347\h'-04'\(bu\h'+03'\c
348.\}
349.el \{\
350.sp -1
351.IP \(bu 2.3
352.\}
353\fIportdir\fR
354.RE
355.sp
356Other pseudo\-portname selectors match ports which have a particular relationship to another port\&. These will match ports that are direct or recursive dependencies or dependents of the given portname:
357.sp
358.RS 4
359.ie n \{\
360\h'-04'\(bu\h'+03'\c
361.\}
362.el \{\
363.sp -1
364.IP \(bu 2.3
365.\}
366\fIdepof\fR
367.RE
368.sp
369.RS 4
370.ie n \{\
371\h'-04'\(bu\h'+03'\c
372.\}
373.el \{\
374.sp -1
375.IP \(bu 2.3
376.\}
377\fIrdepof\fR
378.RE
379.sp
380.RS 4
381.ie n \{\
382\h'-04'\(bu\h'+03'\c
383.\}
384.el \{\
385.sp -1
386.IP \(bu 2.3
387.\}
388\fIdependentof\fR
389.RE
390.sp
391.RS 4
392.ie n \{\
393\h'-04'\(bu\h'+03'\c
394.\}
395.el \{\
396.sp -1
397.IP \(bu 2.3
398.\}
399\fIrdependentof\fR
400.RE
401.sp
402Search strings that will expand to a set of matching ports can be constructed based on the "\fIpseudo\-portname selector\fR":regex combination used\&. \fIportnames\fR containing valid UNIX glob patterns will also expand to the set of matching ports\&. Any action passed to port will be invoked on each of them\&.
403.sp
404For example:
405.sp
406.if n \{\
407.RS 4
408.\}
409.nf
410port info variant:no_ssl
411port uninstall name:sql
412port echo depof:mysql5
413port echo \*(Aqapache*\*(Aq
414.fi
415.if n \{\
416.RE
417.\}
418.sp
419Logical operators "and", "or", "not", "!", "(" and ")" may be used to combine individual \fIportnames\fR, port glob patterns and/or \fIpseudo\-portnames\fR to construct complex \fIport\-expressions\fR that expand to the set of matching ports\&.
420.sp
421For example:
422.sp
423.if n \{\
424.RS 4
425.\}
426.nf
427port upgrade outdated and \*(Aqpy27\-*\*(Aq
428port echo maintainer:jberry and uninstalled and \e( category:java and not commons* \e)
429.fi
430.if n \{\
431.RE
432.\}
433.if n \{\
434.sp
435.\}
436.RS 4
437.it 1 an-trap
438.nr an-no-space-flag 1
439.nr an-break-flag 1
440.br
441.ps +1
442\fBNote\fR
443.ps -1
444.br
445.sp
446Special shell characters like *, \e( or \e) need to be escaped in order to be passed correctly to \fBport\fR\&.
447.sp .5v
448.RE
449.SH "GLOBAL OPTIONS"
450.sp
451The port command recognizes several global flags and options\&.
452.PP
453\fBOutput control\fR
454.PP
455\-v
456.RS 4
457Verbose mode, generates verbose messages
458.RE
459.PP
460\-d
461.RS 4
462Debug mode, generate debugging messages, implies \-v
463.RE
464.PP
465\-q
466.RS 4
467Quiet mode, suppress informational messages to a minimum, implies \-N
468.RE
469.PP
470\-N
471.RS 4
472Non\-interactive mode, interactive questions are not asked
473.RE
474.PP
475\fBInstallation and upgrade\fR
476.PP
477\-n
478.RS 4
479Don\(cqt follow dependencies in upgrade (affects
480\fIupgrade\fR
481and
482\fIinstall\fR)
483.RE
484.PP
485\-R
486.RS 4
487Also upgrade dependents (only for
488\fIupgrade\fR)
489.RE
490.PP
491\-u
492.RS 4
493Uninstall inactive ports when upgrading and uninstalling
494.RE
495.PP
496\-y
497.RS 4
498Perform a dry run\&. All of the steps to build the ports and their dependencies are computed, but not actually performed\&. With the verbose flag, every step is reported; otherwise there is just one message per port, which allows you to easily determine the recursive deps of a port (and the order in which they will be built)\&.
499.RE
500.PP
501\fBSources\fR
502.PP
503\-s
504.RS 4
505Source\-only mode, build and install from source; do not attempt to fetch binary archives\&.
506.RE
507.PP
508\-b
509.RS 4
510Binary\-only mode, build and install from binary archives, ignore source, abort if no archive available\&.
511.RE
512.PP
513\fBCleaning\fR
514.PP
515\-c
516.RS 4
517Autoclean mode, execute clean after
518\fIinstall\fR
519.RE
520.PP
521\-k
522.RS 4
523Keep mode, do not autoclean after
524\fIinstall\fR
525.RE
526.PP
527\fBExit status\fR
528.PP
529\-p
530.RS 4
531Despite any errors encountered, proceed to process multiple ports and commands\&.
532.RE
533.PP
534\fBDevelopment\fR
535.PP
536\-o
537.RS 4
538Honor state files even if the Portfile was modified\&. This flag is called \-o because it used to mean "older"\&.
539.RE
540.PP
541\-t
542.RS 4
543Enable trace mode debug facilities on platforms that support it, currently only Mac OS X\&.
544
545This feature is two\-folded\&. It consists in automatically detecting and reporting undeclared dependencies based on what files the port reads or what programs the port executes\&. In verbose mode, it will also report unused dependencies for each stage of the port installation\&. It also consists in forbidding and reporting file creation and file writes outside allowed directories (temporary directories and ${workpath})\&.
546.RE
547.PP
548\fBMisc\fR
549.PP
550\-f
551.RS 4
552Force mode, ignore state file
553.RE
554.PP
555\-D \fIportdir\fR
556.RS 4
557Specfiy
558\fIportdir\fR
559.RE
560.PP
561\-F \fIcmdfile\fR
562.RS 4
563Read and process the
564\fIfile\fR
565of commands specified by the argument\&. If the argument is
566\fI\-\fR, then read commands from stdin\&. If the option is given multiple times, then multiple files will be read\&.
567.RE
568.SH "USER TARGETS"
569.sp
570Targets most commonly used by regular MacPorts users are:
571.PP
572search
573.RS 4
574Search for an available port whose name or description matches a regular expression\&.
575.sp
576For example:
577.sp
578.if n \{\
579.RS 4
580.\}
581.nf
582port search vim
583.fi
584.if n \{\
585.RE
586.\}
587.RE
588.PP
589info
590.RS 4
591Displays meta\-information available for
592\fIportname\fR\&. Specific meta\-information may be requested through an option such as
593\fB\-\-maintainer\fR
594or
595\fB\-\-category\fR\&. Recognized field names are those from the PortIndex, see \(lqport help info\(rq for a complete list\&. If no specific fields are specified, a useful default collection of fields will be displayed\&. If the global option
596\fB\-q\fR
597is in effect, the meta\-info fields will not be labeled\&. If the option
598\fB\-\-line\fR
599is provided, all such data will be consolidated into a single line per port, suitable for processing in a pipe of commands\&. If the option
600\fB\-\-pretty\fR
601is provided, the information will be formatted in a somewhat more attractive fashion for human readers\&. This is the default when no options at all are specified to info\&. If the option
602\fB\-\-index\fR
603is provided, the information will be pulled from the PortIndex rather than from the Portfile\&. In this case variant information, such as dependencies, will not affect the output\&.
604.sp
605For example:
606.sp
607.if n \{\
608.RS 4
609.\}
610.nf
611port info vim +ruby
612port info \-\-category \-\-name apache*
613port \-q info \-\-category \-\-name \-\-version category:java
614port info \-\-line \-\-category \-\-name all
615port info \-\-pretty \-\-fullname \-\-depends gtk2
616port info \-\-index python27
617.fi
618.if n \{\
619.RE
620.\}
621.RE
622.PP
623notes
624.RS 4
625Displays notes for
626\fIportname\fR
627which usually contain useful information concerning setup and use of the port\&.
628.RE
629.PP
630variants
631.RS 4
632Lists the variants available for
633\fIportname\fR\&.
634.RE
635.PP
636deps
637.RS 4
638Lists the other ports that are required to build and run portname\&. This is simply an alias for \(lqinfo \-\-pretty \-\-fullname \-\-depends\(rq\&.
639.RE
640.PP
641rdeps
642.RS 4
643Recursively lists the other ports that are required to build and run portname\&. To display the full dependency tree instead of only showing each port once, use
644\fB\-\-full\fR\&. To take dependency information from the PortIndex instead of the Portfile (faster, but does not take variant selections into account), use
645\fB\-\-index\fR\&. To exclude dependencies that are only needed at build time (i\&.e\&. depends_fetch, depends_extract, depends_build), use
646\fB\-\-no\-build\fR\&.
647.RE
648.PP
649dependents
650.RS 4
651Lists the installed ports that depend on the port
652\fIportname\fR\&.
653.RE
654.PP
655rdependents
656.RS 4
657Recursively lists the installed ports that depend on the port portname\&. To display the full tree of dependents instead of only showing each port once, use
658\fB\-\-full\fR\&.
659.RE
660.PP
661install
662.RS 4
663Install and activate
664\fIportname\fR\&.
665.RE
666.PP
667uninstall
668.RS 4
669Deactivate and uninstall portname\&. To uninstall all installed but
670\fIinactive\fR
671ports, use
672\fB\-u\fR\&. To recursively uninstall all dependents of this port, use
673\fB\-\-follow\-dependents\fR\&. To uninstall portname and then recursively uninstall all ports it depended on, use
674\fB\-\-follow\-dependencies\fR\&. This will not uninstall dependencies that are marked as requested or that have other dependents\&.
675.sp
676For example:
677.sp
678.if n \{\
679.RS 4
680.\}
681.nf
682port uninstall vim
683port \-u uninstall
684port uninstall \-\-follow\-dependents python27
685.fi
686.if n \{\
687.RE
688.\}
689.RE
690.PP
691select
692.RS 4
693For a given group, selects a version to be the default by creating appropriate symbolic links\&. For instance, python might be linked to python2\&.6\&. Available select groups are installed as subdirectories of ${prefix}/etc/select/ and can be listed using
694\fB\-\-summary\fR\&. To list the available versions in a group, use
695\fB\-\-list\fR\&. To see which version is currently selected for a group, use
696\fB\-\-show\fR\&. To change the selected version for a group, use
697\fB\-\-set\fR\&.
698.sp
699For example:
700.sp
701.if n \{\
702.RS 4
703.\}
704.nf
705port select \-\-summary
706port select \-\-show python
707port select \-\-list python
708port select \-\-set python python34
709.fi
710.if n \{\
711.RE
712.\}
713.RE
714.PP
715activate
716.RS 4
717Activate the installed
718\fIportname\fR\&.
719.RE
720.PP
721deactivate
722.RS 4
723Deactivate the installed
724\fIportname\fR\&.
725.RE
726.PP
727setrequested
728.RS 4
729Mark portname as requested\&.
730.RE
731.PP
732unsetrequested
733.RS 4
734Mark portname as unrequested\&.
735.RE
736.PP
737setunrequested
738.RS 4
739Alias for unsetrequested command\&.
740.RE
741.PP
742installed
743.RS 4
744Show the installed version, variants and activation status for each
745\fIportname\fR\&. If no arguments are given, all installed ports are displayed\&.
746.RE
747.PP
748location
749.RS 4
750Print the install location of a given port\&.
751.RE
752.PP
753contents
754.RS 4
755Lists the files installed by
756\fIportname\fR\&.
757.RE
758.PP
759provides
760.RS 4
761Determines which port owns a given file and can take either a relative or absolute path\&.
762.sp
763For example:
764.sp
765.if n \{\
766.RS 4
767.\}
768.nf
769port provides /opt/local/etc/irssi\&.conf
770port provides include/tiff\&.h
771.fi
772.if n \{\
773.RE
774.\}
775.RE
776.PP
777sync
778.RS 4
779Performs a sync operation only on the ports tree of a MacPorts installation, pulling in the latest revision available of the Portfiles from the MacPorts rsync server\&.
780.sp
781To update you would normally do:
782.sp
783.if n \{\
784.RS 4
785.\}
786.nf
787sudo port \-d sync
788.fi
789.if n \{\
790.RE
791.\}
792.sp
793If any of the ports tree(s) uses a file: URL that points to a local subversion working copy, sync will perform an svn update on the working copy with the user set to the owner of the working copy\&.
794.RE
795.PP
796outdated
797.RS 4
798Lists the installed ports which need a
799\fIupgrade\fR\&.
800.RE
801.PP
802upgrade
803.RS 4
804The upgrade target works on a port and its dependencies\&. If you want to change this behavior, look at the switches for
805\fB\-n\fR
806(no dependencies) and
807\fB\-R\fR
808(dependents) above\&.
809.sp
810Upgrade the installed
811\fIportname\fR\&. For example:
812.sp
813.if n \{\
814.RS 4
815.\}
816.nf
817port upgrade vim
818.fi
819.if n \{\
820.RE
821.\}
822.sp
823To upgrade all outdated ports:
824.sp
825.if n \{\
826.RS 4
827.\}
828.nf
829port upgrade outdated
830.fi
831.if n \{\
832.RE
833.\}
834.sp
835To upgrade
836\fIportname\fR
837and the ports that depend on it:
838.sp
839.if n \{\
840.RS 4
841.\}
842.nf
843port \-R upgrade libiconv
844.fi
845.if n \{\
846.RE
847.\}
848.sp
849To force a rebuild of
850\fIportname\fR
851and all of its dependencies use:
852.sp
853.if n \{\
854.RS 4
855.\}
856.nf
857port upgrade \-\-force vim
858.fi
859.if n \{\
860.RE
861.\}
862.sp
863To upgrade
864\fIportname\fR
865without following its dependencies before, use
866\fB\-n\fR\&.
867.sp
868For example:
869.sp
870.if n \{\
871.RS 4
872.\}
873.nf
874port \-n upgrade wireshark
875.fi
876.if n \{\
877.RE
878.\}
879.sp
880.if n \{\
881.sp
882.\}
883.RS 4
884.it 1 an-trap
885.nr an-no-space-flag 1
886.nr an-break-flag 1
887.br
888.ps +1
889\fBNote\fR
890.ps -1
891.br
892By selecting the variants to use in the upgraded build of the port, any variants specified on the command line take highest precedence, then the variants active in the latest installed version of the port, and finally the global variants specified in variants\&.conf, if any\&. Note that upgrade will not normally rebuild a port only to change the selected variants; you can either specify
893\fB\-\-enforce\-variants\fR, or deactivate the port and reinstall it with different variants\&.
894\fB\-\-enforce\-variants\fR
895will retain the variant merging procedure described previously\&. Variants will not be reset to the default values\&.
896.sp .5v
897.RE
898\ \&
899.sp
900After the upgrade MacPorts will automatically run rev\-upgrade to check for broken ports that need to be rebuilt\&. If there are known problems with rev\-upgrade or other reasons why you would want to avoid running this step, you can disable it by running port upgrade with the
901\fB\-\-no\-rev\-upgrade\fR
902switch:
903.sp
904.if n \{\
905.RS 4
906.\}
907.nf
908port upgrade \-\-no\-rev\-upgrade outdated
909.fi
910.if n \{\
911.RE
912.\}
913.RE
914.PP
915rev\-upgrade
916.RS 4
917Manually check for broken binaries and rebuild ports containing broken binaries\&. rev\-upgrade is usually automatically run after each upgrade, unless you specify the
918\fB\-\-no\-rev\-upgrade\fR
919option\&.
920
921rev\-upgrade can run more checks against a special loadcommand in Mach\-O binaries that should always be referencing the file itself\&. This check is most helpful for maintainers to check whether their ports have been built correctly\&. It is disabled by default and can be enabled by passing
922\fB\-\-id\-loadcmd\-check\fR
923to rev\-upgrade\&.
924
925See also:
926\fBmacports.conf\fR(5)
927.RE
928.PP
929clean
930.RS 4
931Clean the files used for building
932\fIportname\fR\&. To just remove the work files, use the
933\fB\-\-work\fR\fIactionflag\fR\&. This is the default when no flag is given\&. To remove the distribution files (fetched tarballs, patches, etc), specify
934\fB\-\-dist\fR\&. To remove any archive(s) of a port than remain in the temporary download directory, pass
935\fB\-\-archive\fR\&. (This does not remove archives from the installed location\&.) To remove log files for a port, pass
936\fB\-\-logs\fR\&. To remove the work files, distribution files, temporary archives and logs pass
937\fB\-\-all\fR\&.
938.sp
939For example:
940.sp
941.if n \{\
942.RS 4
943.\}
944.nf
945port clean \-\-dist vim
946port clean \-\-archive vim
947port clean \-\-logs vim
948.fi
949.if n \{\
950.RE
951.\}
952.sp
953To remove only certain version(s) of a port\(cqs archives (version is any valid UNIX glob pattern), you can use:
954.sp
955.if n \{\
956.RS 4
957.\}
958.nf
959port clean \-\-archive vim 6\&.2\&.114
960.fi
961.if n \{\
962.RE
963.\}
964.sp
965or:
966.sp
967.if n \{\
968.RS 4
969.\}
970.nf
971port clean \-\-archive vim \*(Aq6\&.*\*(Aq
972.fi
973.if n \{\
974.RE
975.\}
976.RE
977.PP
978log
979.RS 4
980Parses and shows log files for
981\fIportname\fR\&. To filter log files by some criterions use
982\fB\-\-phase\fR
983to specify the phase you want to show and
984\fB\-\-verbosity\fR
985to specify message category (msg, info, debug)\&.
986.sp
987For example:
988.sp
989.if n \{\
990.RS 4
991.\}
992.nf
993port log \-\-phase configure vim
994port log \-\-phase fetch \-\-verbosity debug vim
995.fi
996.if n \{\
997.RE
998.\}
999.RE
1000.PP
1001logfile
1002.RS 4
1003Displays the path to the log file for
1004\fIportname\fR\&.
1005.RE
1006.PP
1007echo
1008.RS 4
1009Writes to stdout the arguments passed to
1010\fIport\fR\&. This follows the expansion of
1011\fIpseudo\-portnames\fR, portname glob patterns,
1012\fIpseudo\-portname selectors\fR
1013and the evaluation of
1014\fIport\-expressions\fR\&.
1015\fBecho\fR
1016may be used to determine the exact set of ports to which a given string of arguments will expand, without performing any further operations on them\&.
1017.sp
1018For example:
1019.sp
1020.if n \{\
1021.RS 4
1022.\}
1023.nf
1024port echo category:net
1025port echo maintainer:jmpp and name:netw
1026port echo maintainer:jmpp and \e( net* or category:text \e)
1027.fi
1028.if n \{\
1029.RE
1030.\}
1031.RE
1032.PP
1033list
1034.RS 4
1035If no argument is given, display a list of the latest version of all available ports\&. If portname(s) are given as arguments, display a list of the latest version of each port\&.
1036.RE
1037.PP
1038mirror
1039.RS 4
1040Create/update a local mirror of distfiles used for ports given on the command line\&. The filemap database can be reset by using the
1041\fB\-\-new\fR
1042option (though if no database is found, it will be created automatically)\&. If the fetched file does not match the checksum given in the Portfile, it is deleted\&. This can be used with
1043\fIpseudo\-portnames\fR, e\&.g\&.
1044\fIall\fR, to mirror everything\&. Note that if you use
1045\fIall\fR, you\(cqll most likely want to use
1046\fB\-p\fR
1047so
1048\fBport\fR
1049doesn\(cqt quit on the first download failure\&.
1050.RE
1051.PP
1052version
1053.RS 4
1054Display the release number of the installed MacPorts infrastructure\&.
1055.RE
1056.PP
1057selfupdate
1058.RS 4
1059Updates the MacPorts system, ports tree(s) and base tools if needed, from the MacPorts rsync server, installing the newest infrastructure available\&.
1060.sp
1061To update you would typically do:
1062.sp
1063.if n \{\
1064.RS 4
1065.\}
1066.nf
1067sudo port selfupdate
1068.fi
1069.if n \{\
1070.RE
1071.\}
1072.sp
1073See
1074\fIsync\fR
1075for more information about updating ports tree(s)\&.
1076.RE
1077.PP
1078load
1079.RS 4
1080Provides a shortcut to using launchctl to load a port\(cqs daemon (as installed in /Library/LaunchDaemons)\&. It runs:
1081.sp
1082.if n \{\
1083.RS 4
1084.\}
1085.nf
1086launchctl load \-w /Library/LaunchDaemons/org\&.macports\&.${port}\&.plist
1087.fi
1088.if n \{\
1089.RE
1090.\}
1091.RE
1092.PP
1093unload
1094.RS 4
1095A shortcut to launchctl, like load, but unloads the daemon\&.
1096.RE
1097.PP
1098reload
1099.RS 4
1100A shortcut to launchctl, like load and unload, but reloads the daemon\&.
1101.RE
1102.PP
1103gohome
1104.RS 4
1105Loads the home page for the given portname in the default web browser\&.
1106.RE
1107.PP
1108usage
1109.RS 4
1110Displays a condensed usage summary\&.
1111.RE
1112.PP
1113help
1114.RS 4
1115Displays a summary of all available actions and port command syntax on stdout\&.
1116.RE
1117.SH "DEVELOPER TARGETS"
1118.sp
1119The targets that are often used by Port developers are intended to provide access to the different phases of a Port\(cqs build process:
1120.PP
1121dir
1122.RS 4
1123Displays the path to the directory containing
1124\fIportname\fR\&.
1125.RE
1126.PP
1127work
1128.RS 4
1129Displays the path to the work directory for
1130\fIportname\fR\&.
1131.RE
1132.PP
1133cd
1134.RS 4
1135Changes the current working directory to the one containing portname\&. Only useful in interactive mode\&.
1136.RE
1137.PP
1138file
1139.RS 4
1140Displays the path to the Portfile for
1141\fIportname\fR\&.
1142.RE
1143.PP
1144url
1145.RS 4
1146Displays the URL for the path of the given portname, which can be passed as
1147\fIport\-url\fR\&.
1148.RE
1149.PP
1150cat
1151.RS 4
1152Concatenates and prints the contents of
1153\fIPortfile\fR
1154on stdout\&.
1155.RE
1156.PP
1157edit
1158.RS 4
1159Opens Portfile with your default editor specified in your shell\(cqs environment variable\&. You can also use the
1160\fB\-\-editor\fR
1161flag on the command line to specify an alternative editor\&.
1162.sp
1163For example:
1164.sp
1165.if n \{\
1166.RS 4
1167.\}
1168.nf
1169port edit \-\-editor nano apache2
1170.fi
1171.if n \{\
1172.RE
1173.\}
1174.RE
1175.PP
1176fetch
1177.RS 4
1178Fetches the distribution files required to build
1179\fIportname\fR\&.
1180.RE
1181.PP
1182checksum
1183.RS 4
1184Compute the checksums of the distribution files for
1185\fIportname\fR, and compare them to the checksums listed in
1186\fIPortfile\fR\&.
1187.RE
1188.PP
1189extract
1190.RS 4
1191Extracts the distribution files for
1192\fIportname\fR\&.
1193.RE
1194.PP
1195patch
1196.RS 4
1197Applies any required patches to
1198\fIportname\(cqs\fR
1199extracted distribution files\&.
1200.RE
1201.PP
1202configure
1203.RS 4
1204Runs any configure process for
1205\fIportname\fR\&.
1206.RE
1207.PP
1208build
1209.RS 4
1210Build
1211\fIportname\fR\&.
1212.RE
1213.PP
1214destroot
1215.RS 4
1216Installs
1217\fIportname\fR
1218to a temporary directory\&.
1219.RE
1220.PP
1221test
1222.RS 4
1223Tests
1224\fIportname\fR\&.
1225.RE
1226.PP
1227lint
1228.RS 4
1229Verifies Portfile for portname\&. To nitpick about whitespace and patchfile names, use
1230\fB\-\-nitpick\fR\&.
1231.RE
1232.PP
1233distcheck
1234.RS 4
1235Check if the distfiles haven\(cqt changed and can be fetched\&.
1236.RE
1237.PP
1238distfiles
1239.RS 4
1240Display each distfile, its checksums, and the URLs used to fetch it\&.
1241.RE
1242.PP
1243livecheck
1244.RS 4
1245Check if the software hasn\(cqt been updated since the Portfile was last modified\&.
1246.RE
1247.SH "PACKAGING TARGETS"
1248.sp
1249There are also targets for producing installable packages of ports:
1250.PP
1251pkg
1252.RS 4
1253Creates an OS X installer package of
1254\fIportname\fR\&.
1255.RE
1256.PP
1257mpkg
1258.RS 4
1259Creates an OS X installer metapackage of
1260\fIportname\fR
1261and its dependencies\&.
1262.RE
1263.PP
1264dmg
1265.RS 4
1266Creates an internet\-enabled disk image containing an OS X package of
1267\fIportname\fR\&.
1268.RE
1269.PP
1270mdmg
1271.RS 4
1272Creates an internet\-enabled disk image containing an OS X metapackage of
1273\fIportname\fR
1274and its dependencies\&.
1275.RE
1276.SH "EXAMPLES"
1277.sp
1278The following demonstrates invoking port with the extract target on portdir \(lqtextproc/figlet\(rq and extract\&.suffix set to \(lq\&.tgz\(rq:
1279.sp
1280.if n \{\
1281.RS 4
1282.\}
1283.nf
1284port extract \-D textproc/figlet extract\&.suffix=\&.tgz
1285.fi
1286.if n \{\
1287.RE
1288.\}
1289.SH "FILES"
1290.PP
1291${prefix}/etc/macports/macports\&.conf
1292.RS 4
1293Global configuration file for the MacPorts system\&.
1294.RE
1295.PP
1296${prefix}/etc/macports/sources\&.conf
1297.RS 4
1298Global listing of the ports trees used by MacPorts\&. This file also enables rsync synchronization\&.
1299.RE
1300.PP
1301${prefix}/etc/macports/variants\&.conf
1302.RS 4
1303Global variants used when a port is installed\&.
1304.RE
1305.PP
1306~/\&.macports/macports\&.conf
1307.RS 4
1308User configuration file for the MacPorts system\&. It overrides the global
1309\fImacports\&.conf(5)\fR
1310file\&.
1311.RE
1312.SH "DIAGNOSTICS"
1313.sp
1314The \fBport\fR utility exits 0 on success, and >0 if an error occurs\&.
1315.SH "SEE ALSO"
1316.sp
1317\fBmacports.conf\fR(5), \fBportfile\fR(7), \fBportgroup\fR(7), \fBportstyle\fR(7), \fBporthier\fR(7)
1318.SH "AUTHORS"
1319.sp
1320.if n \{\
1321.RS 4
1322.\}
1323.nf
1324(C) 2002\-2003 Apple Inc\&.
1325(C) 2004\-2012 The MacPorts Project
1326Landon Fuller <landonf@macports\&.org>
1327James Berry <jberry@macports\&.org>
1328Jordan K\&. Hubbard <jkh@macports\&.org>
1329Juan Manuel Palacios <jmpp@macports\&.org>
1330Kevin Van Vechten <kevin@opendarwin\&.org>
1331Ole Guldberg Jensen <olegb@opendarwin\&.org>
1332Robert Shaw <rshaw@opendarwin\&.org>
1333Chris Ridd <cjr@opendarwin\&.org>
1334Matt Anton <matt@opendarwin\&.org>
1335Joe Auty <joe@opendarwin\&.org>
1336Rainer Mueller <raimue@macports\&.org>
1337.fi
1338.if n \{\
1339.RE
1340.\}
Note: See TracBrowser for help on using the repository browser.