summaryrefslogtreecommitdiff
path: root/share/man/man7/pkgpath.7
blob: add21e9efe9624019a3b2c9ec6f221f28dc2bff1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
.\" $OpenBSD: pkgpath.7,v 1.3 2014/10/27 22:45:30 gsoares Exp $
.\"
.\" Copyright (c) 2011 Marc Espie <espie@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.Dd $Mdocdate: October 27 2014 $
.Dt PKGPATH 7
.Os
.Sh NAME
.Nm pkgpath
.Nd ports tree location for a package build
.Sh DESCRIPTION
Each location in the ports tree is uniquely identified through a
.Nm ,
which encodes the directory, flavor and subpackage information
that allows the build of a package.
This is not to be confused with
.Ev PKG_PATH ,
the list of URLs from which
.Xr pkg_add 1
retrieves binary packages.
.Pp
Every
.Nm
conforms to the pattern
.Ar some/directory[,-sub][,flavor...] .
.Pp
The
.Ar some/directory
part refers to the directory part, to find under the
portstree, usually in
.Pa /usr/ports
(or
.Pa /usr/port/mystuff
for port developers).
.Pp
The
.Ar ,-sub
optional part refers to a specific subpackage from a
multi-package port.
It can be left blank for non multi-package ports, or to get
the default subpackage
(usually
.Ar -main ) .
.Pp
The
.Ar ,flavor...
optional part refers to the flavors or pseudo-flavors to use
when building the package.
If left blank, it refers to the default flavor.
An explicit empty flavor can also be specified to make sure to
get an empty flavor, even if it does not correspond to the default
flavor.
.Pp
Note that
.Ar -sub
and
.Ar flavor
parts can be specified in any order, as all subpackages start with
a dash.
It is an error to ask for several subs at once, e.g.\&
.Ar some/path,-sub1,-sub2 ,
though it won't always be flagged as a problem.
.Pp
For instance:
.Bl -tag -width small
.It Ar misc/screen
A simple directory, default flavor, which happens to be empty.
.It Ar misc/screen,static
Same port,
.Ar static
flavor.
.It Ar x11/kde/libs3
A multi-package port with no subpackage nor flavor, refers to
.Ar x11/kde/libs3,-main .
.It Ar net/avahi
Multi-package port with default flavor.
Will actually build with FLAVOR="no_gui no_mono no_qt3 no_qt4 bootstrap"
(all of which are pseudo-flavors), so that only the main package will build.
.It Ar net/avahi,no_mono,-qt3
Build avahi with the "no_mono" pseudo-flavor, which will build the
-main, -qt3, -qt4, -gui, -gtk, -gtk3, and -ui subpackages, and refer to the
.Ar -qt3
subpackage.
.It Ar net/avahi,
.Ar net/avahi
with an explicit empty flavor, default subpackage
.Po
which happens to be
.Ar -main
.Pc .
.It Ar net/avahi,,-qt4
.Ar net/avahi
with an explicit empty flavor,
.Ar -main
subpackage.
.El
.Pp
The ports tree can iterate over lists of
.Nm
through
.Li SUBDIR="pkgpath1 pkgpath2..."
or through a full list through
.Li SUBDIRLIST=file .
.Pp
.Xr dpb 1
also handles
.Nm
lists for many options.
.Sh NORMALISATION AND THE FULLPATH CONVENTION
When the ports tree handles dependencies, it passes
.Nm
from
.Ev BUILD_DEPENDS ,
.Ev LIB_DEPENDS ,
.Ev RUN_DEPENDS ,
and
.Ev TEST_DEPENDS
to the dependent port for normalisation purposes.
That way, the
.Nm
that gets recorded in the package doesn't have any "default" flavor
or "default" subpackage left: those are always resolved to the correct
value.
.Pp
Likewise, pseudo-flavors vanish from the
.Nm pkgpath ,
since they only participate in the build process, but do not intervene
in the built package.
.Pp
As a result, such
.Nm
are slightly different from the description above, as a flavor left blank
is the empty flavor (and not the default flavor).
This is the
.Qq fullpath convention .
.Pp
Tools such as
.Xr dpb 1
display fullpath pkgpaths,
and binary packages store full pkgpaths.
.Pp
.Ev SUBDIR
and
.Ev SUBDIRLIST
can be forced to follow the fullpath convention by explicitly passing
.Li FULLPATH=Yes
to the corresponding
.Xr make 1
invocations.
.Pp
Most tools that process binary packages do so.
.Sh SEE ALSO
.Xr dpb 1 ,
.Xr bsd.port.mk 5 ,
.Xr library-specs 7 ,
.Xr packages 7 ,
.Xr packages-specs 7 ,
.Xr ports 7