Lines 17-25
calculating relationships between packages. Please note that if the atom has
Link Here
|
17 |
not already been emerged, then the latest version available is matched. |
17 |
not already been emerged, then the latest version available is matched. |
18 |
.TP |
18 |
.TP |
19 |
.B Atom Bases |
19 |
.B Atom Bases |
20 |
The base atom is just a full category/packagename. |
20 |
The base atom is just a full category/packagename. Another name for a full |
|
|
21 |
category/packagename is a \fI"catpkg"\fR. You will find this shorthand-name |
22 |
used frequently in Gentoo. Here are some base atoms, a.k.a \fI"catpkgs"\fR: |
21 |
|
23 |
|
22 |
Examples: |
|
|
23 |
.nf |
24 |
.nf |
24 |
.I sys\-apps/sed |
25 |
.I sys\-apps/sed |
25 |
.I sys\-libs/zlib |
26 |
.I sys\-libs/zlib |
Lines 31-37
It is nice to be more specific and say that only certain versions of atoms are
Link Here
|
31 |
acceptable. Note that versions must be combined with a prefix (see below). |
32 |
acceptable. Note that versions must be combined with a prefix (see below). |
32 |
Hence you may add a version number as a postfix to the base. |
33 |
Hence you may add a version number as a postfix to the base. |
33 |
|
34 |
|
34 |
Examples: |
35 |
\fBExamples\fR: |
35 |
.nf |
36 |
.nf |
36 |
sys\-apps/sed\fI\-4.0.5\fR |
37 |
sys\-apps/sed\fI\-4.0.5\fR |
37 |
sys\-libs/zlib\fI\-1.1.4\-r1\fR |
38 |
sys\-libs/zlib\fI\-1.1.4\-r1\fR |
Lines 51-57
Sometimes you want to be able to depend on general versions rather than
Link Here
|
51 |
specifying exact versions all the time. Hence we provide standard boolean |
52 |
specifying exact versions all the time. Hence we provide standard boolean |
52 |
operators: |
53 |
operators: |
53 |
|
54 |
|
54 |
Examples: |
55 |
\fBExamples\fR: |
55 |
.nf |
56 |
.nf |
56 |
\fI>\fRmedia\-libs/libgd\-1.6 |
57 |
\fI>\fRmedia\-libs/libgd\-1.6 |
57 |
\fI>=\fRmedia\-libs/libgd\-1.6 |
58 |
\fI>=\fRmedia\-libs/libgd\-1.6 |
Lines 71-85
means match any revision of the base version specified. So in the
Link Here
|
71 |
example below, we would match versions '1.0.2a', '1.0.2a\-r1', '1.0.2a\-r2', |
72 |
example below, we would match versions '1.0.2a', '1.0.2a\-r1', '1.0.2a\-r2', |
72 |
etc... |
73 |
etc... |
73 |
|
74 |
|
74 |
Example: |
75 |
\fBExample\fR: |
75 |
.nf |
76 |
.nf |
76 |
\fI~\fRnet\-libs/libnet\-1.0.2a |
77 |
\fI~\fRnet\-libs/libnet\-1.0.2a |
77 |
.fi |
78 |
.fi |
78 |
.TP |
79 |
.TP |
79 |
.I ! |
80 |
.I ! |
80 |
means block packages from being installed at the same time. |
81 |
means block packages from being installed at the same time. |
81 |
|
82 |
|
82 |
Example: |
83 |
\fBExample\fR: |
83 |
.nf |
84 |
.nf |
84 |
\fI!\fRapp\-text/dos2unix |
85 |
\fI!\fRapp\-text/dos2unix |
85 |
.fi |
86 |
.fi |
Lines 90-96
and explicitly disallow them from being temporarily installed
Link Here
|
90 |
simultaneously during a series of upgrades. This syntax is supported |
91 |
simultaneously during a series of upgrades. This syntax is supported |
91 |
beginning with \fBEAPI 2\fR. |
92 |
beginning with \fBEAPI 2\fR. |
92 |
|
93 |
|
93 |
Example: |
94 |
\fBExample\fR: |
94 |
.nf |
95 |
.nf |
95 |
\fI!!\fR<sys\-apps/portage\-2.1.4_rc1 |
96 |
\fI!!\fR<sys\-apps/portage\-2.1.4_rc1 |
96 |
.fi |
97 |
.fi |
Lines 103-109
that comes before the '*' must be a valid version in the absence of the '*'.
Link Here
|
103 |
For example, '2' is a valid version and '2.' is not. Therefore, '2*' is |
104 |
For example, '2' is a valid version and '2.' is not. Therefore, '2*' is |
104 |
allowed and '2.*' is not. |
105 |
allowed and '2.*' is not. |
105 |
|
106 |
|
106 |
Examples: |
107 |
\fBExamples\fR: |
107 |
.nf |
108 |
.nf |
108 |
=dev\-libs/glib\-2\fI*\fR |
109 |
=dev\-libs/glib\-2\fI*\fR |
109 |
\fI!\fR=net\-fs/samba\-2\fI*\fR |
110 |
\fI!\fR=net\-fs/samba\-2\fI*\fR |
Lines 115-121
Beginning with \fBEAPI 1\fR, any atom can be constrained to match a specific
Link Here
|
115 |
\fBSLOT\fR. This is accomplished by appending a colon followed by a |
116 |
\fBSLOT\fR. This is accomplished by appending a colon followed by a |
116 |
\fBSLOT\fR: |
117 |
\fBSLOT\fR: |
117 |
|
118 |
|
118 |
Examples: |
119 |
\fBExamples\fR: |
119 |
.nf |
120 |
.nf |
120 |
x11\-libs/qt:3 |
121 |
x11\-libs/qt:3 |
121 |
\fI~\fRx11\-libs/qt-3.3.8:3 |
122 |
\fI~\fRx11\-libs/qt-3.3.8:3 |
Lines 128-134
Beginning with \fBEAPI 5\fR, a slot dependency may contain an
Link Here
|
128 |
optional sub\-slot part that follows the regular slot and is |
129 |
optional sub\-slot part that follows the regular slot and is |
129 |
delimited by a \fI/\fR character. |
130 |
delimited by a \fI/\fR character. |
130 |
|
131 |
|
131 |
Examples: |
132 |
\fBExamples\fR: |
132 |
.nf |
133 |
.nf |
133 |
dev\-libs/icu:0/0 |
134 |
dev\-libs/icu:0/0 |
134 |
dev\-libs/icu:0/49 |
135 |
dev\-libs/icu:0/49 |
Lines 147-153
for runtime dependencies, indicates that the package will not
Link Here
|
147 |
break if the matched package is uninstalled and replaced by |
148 |
break if the matched package is uninstalled and replaced by |
148 |
a different matching package in a different slot. |
149 |
a different matching package in a different slot. |
149 |
|
150 |
|
150 |
Examples: |
151 |
\fBExamples\fR: |
151 |
.nf |
152 |
.nf |
152 |
dev\-libs/icu:* |
153 |
dev\-libs/icu:* |
153 |
dev\-lang/perl:* |
154 |
dev\-lang/perl:* |
Lines 161-167
break unless a matching package with slot and sub\-slot equal
Link Here
|
161 |
to the slot and sub\-slot of the best installed version at the |
162 |
to the slot and sub\-slot of the best installed version at the |
162 |
time the package was installed is available. |
163 |
time the package was installed is available. |
163 |
|
164 |
|
164 |
Examples: |
165 |
\fBExamples\fR: |
165 |
.nf |
166 |
.nf |
166 |
dev\-libs/icu:= |
167 |
dev\-libs/icu:= |
167 |
dev\-lang/perl:= |
168 |
dev\-lang/perl:= |
Lines 172-178
Examples:
Link Here
|
172 |
Indicates that only a specific slot value is acceptable, and |
173 |
Indicates that only a specific slot value is acceptable, and |
173 |
otherwise behaves identically to the plain equals slot operator. |
174 |
otherwise behaves identically to the plain equals slot operator. |
174 |
|
175 |
|
175 |
Examples: |
176 |
\fBExamples\fR: |
176 |
.nf |
177 |
.nf |
177 |
dev\-libs/icu:0= |
178 |
dev\-libs/icu:0= |
178 |
dev\-lang/perl:0= |
179 |
dev\-lang/perl:0= |
Lines 190-196
dependencies. The sub\-slot part must not be omitted here
Link Here
|
190 |
is considered to have an implicit sub\-slot which is equal to |
191 |
is considered to have an implicit sub\-slot which is equal to |
191 |
the regular slot). |
192 |
the regular slot). |
192 |
|
193 |
|
193 |
Examples: |
194 |
\fBExamples\fR: |
194 |
.nf |
195 |
.nf |
195 |
dev\-libs/icu:0/0= |
196 |
dev\-libs/icu:0/0= |
196 |
dev\-libs/icu:0/49= |
197 |
dev\-libs/icu:0/49= |
Lines 238-244
immediately following a flag with either \fI(+)\fR or \fI(\-)\fR. Use
Link Here
|
238 |
\fI(+)\fR to behave as if a missing flag is present and enabled, or |
239 |
\fI(+)\fR to behave as if a missing flag is present and enabled, or |
239 |
\fI(\-)\fR to behave as if it is present and disabled: |
240 |
\fI(\-)\fR to behave as if it is present and disabled: |
240 |
|
241 |
|
241 |
Examples: |
242 |
\fBExamples\fR: |
242 |
.nf |
243 |
.nf |
243 |
media\-video/ffmpeg[threads(+)] |
244 |
media\-video/ffmpeg[threads(+)] |
244 |
media\-video/ffmpeg[-threads(\-)] |
245 |
media\-video/ffmpeg[-threads(\-)] |
Lines 280-286
That way the default is the superior GTK2 library.
Link Here
|
280 |
When a package can work with a few different packages but a virtual is not |
281 |
When a package can work with a few different packages but a virtual is not |
281 |
appropriate, this syntax can easily be used. |
282 |
appropriate, this syntax can easily be used. |
282 |
|
283 |
|
283 |
Example: |
284 |
\fBExample\fR: |
284 |
.nf |
285 |
.nf |
285 |
|| ( |
286 |
|| ( |
286 |
app\-games/unreal\-tournament |
287 |
app\-games/unreal\-tournament |
Lines 295-301
use either. Adding a virtual is inappropriate due to the small scope of it.
Link Here
|
295 |
Another good example is when a package can be built with multiple video |
296 |
Another good example is when a package can be built with multiple video |
296 |
interfaces, but it can only ever have just one. |
297 |
interfaces, but it can only ever have just one. |
297 |
|
298 |
|
298 |
Example: |
299 |
\fBExample\fR: |
299 |
.nf |
300 |
.nf |
300 |
|| ( |
301 |
|| ( |
301 |
sdl? ( media\-libs/libsdl ) |
302 |
sdl? ( media\-libs/libsdl ) |
Lines 314-369
the user does not specify any of the previous choices.
Link Here
|
314 |
Note that if any of the packages listed are already merged, the package manager |
315 |
Note that if any of the packages listed are already merged, the package manager |
315 |
will use that to consider the dependency satisfied. |
316 |
will use that to consider the dependency satisfied. |
316 |
|
317 |
|
317 |
.SH "VARIABLES" |
318 |
.SS Variable Usage Notes |
318 |
.TP |
319 |
.IP \[bu] 2 |
319 |
.B Usage Notes |
320 |
Variables defined in \fBmake.conf\fR(5) are available for use in |
320 |
\- Variables defined in \fBmake.conf\fR(5) are available for use in |
|
|
321 |
ebuilds (except Portage\-specific variables, which might be not supported by |
321 |
ebuilds (except Portage\-specific variables, which might be not supported by |
322 |
other package managers). |
322 |
other package managers). |
323 |
.br |
323 |
.IP \[bu] |
324 |
\- When assigning values to variables in ebuilds, you \fIcannot have a |
324 |
When assigning values to variables in ebuilds, you \fIcannot have a |
325 |
space\fR between the variable name and the equal sign. |
325 |
space\fR between the variable name and the equal sign. |
326 |
.br |
326 |
.IP \[bu] 2 |
327 |
\- Variable values should only contain characters that are members of the |
327 |
Variable values should only contain characters that are members of the |
328 |
\fBascii\fR(7) character set. This requirement is mandated by \fBGLEP 31\fR. |
328 |
\fBascii\fR(7) character set. This requirement is mandated by \fBGLEP 31\fR. |
|
|
329 |
|
330 |
.SS "Variables Used In Ebuilds" |
331 |
.TP |
332 |
.B ARCH |
333 |
This variable contains the official Gentoo-specific acronym for the current |
334 |
architecture of the running system. For an authoritative list please |
335 |
review /var/db/repos/gentoo/profiles/arch.list. |
329 |
.TP |
336 |
.TP |
330 |
.B P |
337 |
.B P |
331 |
This variable contains the package name without the ebuild revision. |
338 |
This variable contains the package name without the ebuild revision. |
332 |
This variable must NEVER be modified. |
339 |
This variable must NEVER be modified. |
333 |
|
340 |
|
334 |
xfree\-4.2.1\-r2.ebuild \-\-> $P=='xfree\-4.2.1' |
341 |
\fBExample\fR: |
|
|
342 |
.nf |
343 |
x11\-base/xorg\-server\-1.20.5\-r2 \-\-> '\fIx11\-base/xorg\-server\-1.20.5\fR' |
344 |
.fi |
335 |
.TP |
345 |
.TP |
336 |
.B PN |
346 |
.B PN |
337 |
Contains the name of the script without the version number. |
347 |
Contains the name of the script without the version number. |
338 |
|
348 |
|
339 |
xfree\-4.2.1\-r2.ebuild \-\-> $PN=='xfree' |
349 |
\fBExample\fR: |
|
|
350 |
.nf |
351 |
x11\-base/xorg\-server\-1.20.5\-r2 \-\-> '\fIx11\-base/xorg\-server\fR' |
352 |
.fi |
340 |
.TP |
353 |
.TP |
341 |
.B PV |
354 |
.B PV |
342 |
Contains the version number without the revision. |
355 |
Contains the version number without the revision. |
343 |
|
356 |
|
344 |
xfree\-4.2.1\-r2.ebuild \-\-> $PV=='4.2.1' |
357 |
\fBExample\fR: |
|
|
358 |
.nf |
359 |
x11\-base/xorg\-server\-1.20.5\-r2 \-\-> '\fI1.20.5\fR' |
360 |
.fi |
345 |
.TP |
361 |
.TP |
346 |
.B PR |
362 |
.B PR |
347 |
Contains the revision number or 'r0' if no revision number exists. |
363 |
Contains the revision number or 'r0' if no revision number exists. |
348 |
|
364 |
|
349 |
xfree\-4.2.1\-r2.ebuild \-\-> $PR=='r2' |
365 |
\fBExample\fR: |
|
|
366 |
.nf |
367 |
x11\-base/xorg\-server\-1.20.5\-r2 \-\-> '\fIr2\fR' |
368 |
.fi |
350 |
.TP |
369 |
.TP |
351 |
.B PVR |
370 |
.B PVR |
352 |
Contains the version number with the revision (if non-zero). |
371 |
Contains the version number with the revision (if non-zero). |
353 |
|
372 |
|
354 |
xfree\-4.2.1.ebuild \-\-> $PVR=='4.2.1' |
373 |
\fBExample\fR: |
355 |
.nf |
374 |
.nf |
356 |
xfree\-4.2.1\-r2.ebuild \-\-> $PVR=='4.2.1\-r2' |
375 |
x11\-base/xorg\-server\-1.20.5 \-\-> '\fI1.20.5\fR' |
|
|
376 |
x11\-base/xorg\-server\-1.20.5\-r2 \-\-> '\fI1.20.5\-r2\fR' |
377 |
.fi |
357 |
.TP |
378 |
.TP |
358 |
.B PF |
379 |
.B PF |
359 |
Contains the full package name \fBPN\fR\-\fBPVR\fR |
380 |
Contains the full package name \fBPN\fR\-\fBPVR\fR |
360 |
|
381 |
|
361 |
xfree\-4.2.1.ebuild \-\-> $PF=='xfree\-4.2.1' |
382 |
\fBExamples\fR: |
362 |
.nf |
383 |
.nf |
363 |
xfree\-4.2.1\-r2.ebuild \-\-> $PF=='xfree\-4.2.1\-r2' |
384 |
x11\-base/xorg\-server\-1.20.5 \-\-> '\fIx11\-base/xorg\-server\-1.20.5\fR' |
|
|
385 |
x11\-base/xorg\-server\-1.20.5\-r2 \-\-> '\fIx11\-base/xorg\-server\-1.20.5\-r2\fR' |
386 |
.fi |
364 |
.TP |
387 |
.TP |
365 |
.B CATEGORY |
388 |
.B CATEGORY |
366 |
Contains the package category name. |
389 |
Contains the package category name. |
|
|
390 |
|
391 |
\fBExample\fR: |
392 |
.nf |
393 |
x11\-base/xorg\-server-1.20.5\-r2 \-\-> '\fIx11-base\fR' |
394 |
.fi |
367 |
.TP |
395 |
.TP |
368 |
.B A |
396 |
.B A |
369 |
Contains all source files required for the package. This variable must |
397 |
Contains all source files required for the package. This variable must |
Lines 521-537
file name, should be separated by whitespace.
Link Here
|
521 |
Should contain a list of URIs for the sources main sites and other further |
549 |
Should contain a list of URIs for the sources main sites and other further |
522 |
package dependent information. |
550 |
package dependent information. |
523 |
.TP |
551 |
.TP |
524 |
.B KEYWORDS\fR = \fI[\-~][x86,ppc,sparc,mips,alpha,arm,hppa] |
552 |
.B KEYWORDS\fR = \fI[\-~][x86,ppc,sparc,mips,alpha,arm,hppa,...] |
525 |
Should contain appropriate list of arches that the ebuild is know to |
553 |
.P |
526 |
work/not work. By default if you do not know if an ebuild runs under |
554 |
|
527 |
a particular arch simply omit that KEYWORD. If the ebuild will not |
555 |
KEYWORDS works in conjunction with ACCEPT_KEYWORDS (see \fBmake.conf\fR(5)) |
528 |
work on that arch include it as \-ppc for example. If the ebuild is |
556 |
to implement a system of creating sets of different types of packages |
529 |
being submitted for inclusion, it must have ~arch set for architectures |
557 |
which can then be masked or unmasked en masse. In the Gentoo Linux |
530 |
where it has been PROVEN TO WORK. (Packages KEYWORDed this way may be |
558 |
project, they are used by the Gentoo arch teams to define what ebuilds |
531 |
unmasked for testing by setting ACCEPT_KEYWORDS="~arch" on the command |
559 |
are included in a particular CPU architecture's set of stable and unstable |
532 |
line, or in \fBmake.conf\fR(5)) For an authoritative list please review |
560 |
unmasked packages. |
533 |
/var/db/repos/gentoo/profiles/arch.list. Please keep this list in |
561 |
|
534 |
alphabetical order. |
562 |
Here's how they work. For purposes of explanation, let's assume you have |
|
|
563 |
a stable x86-64bit system, typically referred to as "amd64". |
564 |
ARCH would be defined as "amd64". If you were using the stable build of |
565 |
Gentoo Linux, then ACCEPT_KEYWORDS would be set to "amd64" via profiles. |
566 |
Any ebuild that then has |
567 |
"amd64" in KEYWORDS will be unmasked by default. |
568 |
|
569 |
On an "unstable" |
570 |
amd64 system, ACCEPT_KEYWORDS will be set to "amd64 ~amd64", with the |
571 |
tilde denoting "unstable." Then, if an ebuild has \fIeither\fR |
572 |
"amd64" or "~amd64" in KEYWORDS, it will be keyword unmasked by default on |
573 |
that system. Similarly, if an ebuild is known to not be compatible |
574 |
with a particular architecture, the "\-" prefix ( i.e. "\-amd64") setting |
575 |
can be specified to mask it only on that arch. |
576 |
.P |
577 |
If you are developing ebuilds for Gentoo Linux, there are certain |
578 |
policies regarding KEYWORDS that you are expected to follow in order |
579 |
to align with Gentoo's arch team workflow. The most important |
580 |
policies are listed below: |
581 |
.IP \[bu] 2 |
582 |
If you do not know if an ebuild runs under a particular arch, then do not |
583 |
specify it in KEYWORDS. |
584 |
It will then be masked by default on that architecture. |
585 |
.IP \[bu] |
586 |
If the ebuild is known not to work on an arch, disable that arch in KEYWORDS. |
587 |
This would be done by specifying "\-ppc", for example. This will ensure that |
588 |
it is explicitly keyword-masked for that architecture. |
589 |
.IP \[bu] |
590 |
When submitting an ebuild to Gentoo Linux, it is the project policy to only |
591 |
have "~arch" set in KEYWORDS |
592 |
for the architecture for which it has been successfully tested, and no more. |
593 |
As the ebuild receives more testing, Gentoo arch teams will gradually expand |
594 |
the KEYWORDS settings to "bump" the package to unstable, and possibly stable. |
595 |
|
596 |
It is possible to customize the behavior of ACCEPT_KEYWORDS and KEYWORDS on |
597 |
a per-package basis using package.accept_keywords and package.keywords files |
598 |
in profiles. See \fBportage\fR(5) for more information on using these files. |
599 |
.P |
600 |
Note that while other Gentoo-based projects |
601 |
have KEYWORDS and ACCEPT_KEYWORDS, they likely will not have exactly |
602 |
the same policies regarding their use. Therefore, it is necessary that you research their |
603 |
specific policies and how they differ from Gentoo. |
604 |
.RE |
535 |
.TP |
605 |
.TP |
536 |
.B SLOT |
606 |
.B SLOT |
537 |
This sets the SLOT for packages that may need to have multiple versions |
607 |
This sets the SLOT for packages that may need to have multiple versions |
Lines 1425-1431
file and the file is installed as \fI[new filename]\fR.
Link Here
|
1425 |
Beginning with \fBEAPI 5\fR, standard input is read when the |
1495 |
Beginning with \fBEAPI 5\fR, standard input is read when the |
1426 |
first parameter is \- (a hyphen). |
1496 |
first parameter is \- (a hyphen). |
1427 |
|
1497 |
|
1428 |
.SH "EXAMPLES" |
1498 |
.SH "Examples" |
1429 |
.DS |
1499 |
.DS |
1430 |
.nf |
1500 |
.nf |
1431 |
# Copyright 1999\-2013 Gentoo Foundation |
1501 |
# Copyright 1999\-2013 Gentoo Foundation |