1 .TH "EBUILD" "5" "May 2013" "Portage VERSION" "Portage"
4 ebuild \- the internal format, variables, and functions in an ebuild script
7 The \fBebuild\fR(1) program accepts a single ebuild script as an argument.
8 This script contains variables and commands that specify how to download,
9 unpack, patch, compile, install and merge a particular software package from
10 its original sources. In addition to all of this, the ebuild script can also
11 contain pre/post install/remove commands, as required. All ebuild scripts are
15 A \fIdepend atom\fR is simply a dependency that is used by portage when calculating
16 relationships between packages. Please note that if the atom has not already
17 been emerged, then the latest version available is matched.
20 The base atom is just a full category/packagename.
30 It is nice to be more specific and say that only certain versions of atoms are
31 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.
36 sys\-apps/sed\fI\-4.0.5\fR
37 sys\-libs/zlib\fI\-1.1.4\-r1\fR
38 net\-misc/dhcp\fI\-3.0_p2\fR
41 Versions are normally made up of two or three numbers separated by periods, such
42 as 1.2 or 4.5.2. This string may be followed by a character such as 1.2a or
43 4.5.2z. Note that this letter is \fInot\fR meant to indicate alpha, beta,
44 etc... status. For that, use the optional suffix; either _alpha, _beta, _pre
45 (pre\-release), _rc (release candidate), or _p (patch). This means for the
46 3rd pre\-release of a package, you would use something like 1.2_pre3. The
47 suffixes here can be arbitrarily chained without limitation.
49 .B Atom Prefix Operators [> >= = <= <]
50 Sometimes you want to be able to depend on general versions rather than specifying
51 exact versions all the time. Hence we provide standard boolean operators:
55 \fI>\fRmedia\-libs/libgd\-1.6
56 \fI>=\fRmedia\-libs/libgd\-1.6
57 \fI=\fRmedia\-libs/libgd\-1.6
58 \fI<=\fRmedia\-libs/libgd\-1.6
59 \fI<\fRmedia\-libs/libgd\-1.6
62 .B Extended Atom Prefixes [!~] and Postfixes [*]
63 Now to get even fancier, we provide the ability to define blocking packages and
64 version range matching. Also note that these extended prefixes/postfixes may
65 be combined in any way with the atom classes defined above.
69 means match any revision of the base version specified. So in the
70 example below, we would match versions '1.0.2a', '1.0.2a\-r1', '1.0.2a\-r2',
75 \fI~\fRnet\-libs/libnet\-1.0.2a
79 means block packages from being installed at the same time.
83 \fI!\fRapp\-text/dos2unix
87 means block packages from being installed at the same time
88 and explicitly disallow them from being temporarily installed
89 simultaneously during a series of upgrades. This syntax is supported
90 beginning with \fBEAPI 2\fR.
94 \fI!!\fR<sys\-apps/portage\-2.1.4_rc1
98 means match any version of the package so long
99 as the specified string prefix is matched. So with a
100 version of '2*', we can match '2.1', '2.2', '2.2.1',
101 etc... and not match version '1.0', '3.0', '4.1', etc...
102 Beware that, due to the string matching nature, '20'
103 will also be matched by '2*'. The version part
104 that comes before the '*' must be a valid version in the absence of the '*'.
105 For example, '2' is a valid version and '2.' is not. Therefore, '2*' is
106 allowed and '2.*' is not.
110 =dev\-libs/glib\-2\fI*\fR
111 \fI!\fR=net\-fs/samba\-2\fI*\fR
116 Beginning with \fBEAPI 1\fR, any atom can be constrained to match a specific
117 \fBSLOT\fR. This is accomplished by appending a colon followed by a
123 \fI~\fRx11\-libs/qt-3.3.8:3
124 \fI>=\fRx11\-libs/qt-3.3.8:3
125 \fI=\fRx11\-libs/qt-3.3*:3
129 Beginning with \fBEAPI 5\fR, a slot dependency may contain an
130 optional sub\-slot part that follows the regular slot and is
131 delimited by a \fI/\fR character.
137 dev\-lang/perl:0/5.12
138 dev\-libs/glib:2/2.30
141 .B Atom Slot Operators
142 Beginning with \fBEAPI 5\fR, slot operator dependency consists
143 of a colon followed by one of the following operators:
147 Indicates that any slot value is acceptable. In addition,
148 for runtime dependencies, indicates that the package will not
149 break if the matched package is uninstalled and replaced by
150 a different matching package in a different slot.
160 Indicates that any slot value is acceptable. In addition,
161 for runtime dependencies, indicates that the package will
162 break unless a matching package with slot and sub\-slot equal
163 to the slot and sub\-slot of the best installed version at the
164 time the package was installed is available.
174 Indicates that only a specific slot value is acceptable, and
175 otherwise behaves identically to the plain equals slot operator.
184 To implement the equals slot operator, the package manager
185 will need to store the slot/sub\-slot pair of the best installed
186 version of the matching package. This syntax is only for package
187 manager use and must not be used by ebuilds. The package manager
188 may do this by inserting the appropriate slot/sub\-slot pair
189 between the colon and equals sign when saving the package's
190 dependencies. The sub\-slot part must not be omitted here
191 (when the SLOT variable omits the sub\-slot part, the package
192 is considered to have an implicit sub\-slot which is equal to
199 dev\-lang/perl:0/5.12=
200 dev-libs/glib:2/2.30=
205 Beginning with \fBEAPI 2\fR, any atom can be constrained to match specific
206 \fBUSE\fR flag settings. When used together with \fBSLOT\fR dependencies,
207 \fBUSE\fR dependencies appear on the right hand side of \fBSLOT\fR
211 .B Unconditional USE Dependencies
217 foo[bar] foo must have bar enabled
218 foo[bar,baz] foo must have both bar and baz enabled
219 foo[\-bar,baz] foo must have bar disabled and baz enabled
222 .B Conditional USE Dependencies
227 Compact Form Equivalent Expanded Form
228 foo[bar?] bar? ( foo[bar] ) !bar? ( foo )
229 foo[!bar?] bar? ( foo ) !bar? ( foo[\-bar] )
230 foo[bar=] bar? ( foo[bar] ) !bar? ( foo[\-bar] )
231 foo[!bar=] bar? ( foo[\-bar] ) !bar? ( foo[bar] )
236 Beginning with \fBEAPI 4\fR, \fBUSE\fR dependencies may specify default
237 assumptions about values for flags that may or may not be missing from
238 the \fBIUSE\fR of the matched package. Such defaults are specified by
239 immediately following a flag with either \fI(+)\fR or \fI(\-)\fR. Use
240 \fI(+)\fR to behave as if a missing flag is present and enabled, or
241 \fI(\-)\fR to behave as if it is present and disabled:
245 media\-video/ffmpeg[threads(+)]
246 media\-video/ffmpeg[-threads(\-)]
249 .B Dynamic Dependencies
250 Sometimes programs may depend on different things depending on the USE
251 variable. Portage offers a few options to handle this. Note that when
252 using the following syntaxes, each case is considered as 1 Atom in the
253 scope it appears. That means that each Atom both conditionally include
254 multiple Atoms and be nested to an infinite depth.
258 To include the jpeg library when the user has jpeg in \fBUSE\fR, simply use the
261 jpeg? ( media\-libs/jpeg )
264 If you want to include a package only if the user does not have a certain option
265 in their \fBUSE\fR variable, then use the following syntax:
267 !nophysfs? ( dev\-games/physfs )
269 This is often useful for those times when you want to want to add optional support
270 for a feature and have it enabled by default.
272 .B usevar? ( Atom if true ) !usevar? ( Atom if false )
273 For functionality like the tertiary operator found in C you must use
274 two statements, one normal and one inverted. If a package uses
275 GTK2 or GTK1, but not both, then you can handle that like this:
277 gtk2? ( =x11\-libs/gtk+\-2* ) !gtk2? ( =x11\-libs/gtk+\-1* )
279 That way the default is the superior GTK2 library.
281 .B || ( Atom Atom ... )
282 When a package can work with a few different packages but a virtual is not
283 appropriate, this syntax can easily be used.
288 app\-games/unreal\-tournament
289 app\-games/unreal\-tournament\-goty
293 Here we see that unreal\-tournament has a normal version and it has a goty
294 version. Since they provide the same base set of files, another package can
295 use either. Adding a virtual is inappropriate due to the small scope of it.
297 Another good example is when a package can be built with multiple video
298 interfaces, but it can only ever have just one.
303 sdl? ( media\-libs/libsdl )
304 svga? ( media\-libs/svgalib )
305 opengl? ( virtual/opengl )
306 ggi? ( media\-libs/libggi )
311 Here only one of the packages will be chosen, and the order of preference is
312 determined by the order in which they appear. So sdl has the best chance of
313 being chosen, followed by svga, then opengl, then ggi, with a default of X if
314 the user does not specify any of the previous choices.
316 Note that if any of the packages listed are already merged, the package manager
317 will use that to consider the dependency satisfied.
319 .SS "Cross-compilation"
320 Portage supports cross-compilation into a subdirectory specified by \fBROOT\fR.
323 \fIHost\fR in this context means the platform hosting the build process, i.e.
324 what autotools calls CBUILD.
325 Its packages are contained in the root of the filesystem ("\fI/\fR").
327 If \fBROOT\fR is "\fI/\fR", all dependency types will be installed there.
328 Otherwise, for EAPIs that support \fBHDEPEND\fR (experimental
329 \fBEAPI 5-hdepend\fR), only \fBHDEPEND\fR is installed into "\fI/\fR".
330 For EAPIs that do not support \fBHDEPEND\fR, the behaviour is controlled by the
331 \fI\-\-root-deps\fR flag to \fBemerge\fR(1), defaulting to install only
332 \fBDEPEND\fR into the \fIhost\fR.
335 \fITarget\fR refers to the platform that the package will later run on, i.e.
336 what autotools calls CHOST.
337 The directory housing this system is specified by \fBROOT\fR.
338 If it is different from "\fI/\fR", i.e. \fIhost\fR and \fItarget\fR are not the
339 same, this variable contains the path to the directory housing the \fItarget\fR
342 For EAPIs that support \fBHDEPEND\fR (experimental \fBEAPI 5-hdepend\fR),
343 \fBDEPEND\fR, \fBRDEPEND\fR, and \fBPDEPEND\fR
344 list the \fItarget\fR dependencies, i.e. those to be installed into \fBROOT\fR.
345 For EAPIs that do not support \fBHDEPEND\fR, the \fBemerge\fR(1) flag
346 \fI\-\-root-deps\fR controls what the package manager installs there.
347 Without it, \fBemerge\fR defaults to install only runtime dependencies (i.e.
348 \fBRDEPEND\fR and \fBPDEPEND\fR) into \fBROOT\fR.
350 See section \fBVARIABLES\fR for more information about the \fBDEPEND\fR,
351 \fBRDEPEND\fR and \fBHDEPEND\fR variables.
353 .B The targetroot USE flag
354 For EAPIs that support the "\fItargetroot\fR" USE flag, that flag is
355 automatically enabled by the package manager if \fIhost\fR and \fItarget\fR
356 system are not the same, i.e. if the \fBROOT\fR is not "\fI/\fR".
357 This is necessary where the package to be built needs an executable copy of
358 itself during the build process.
359 A known example is dev-lang/python, which needs to run a Python interpreter
365 \- All variables defined in \fBmake.conf\fR(5) are available for use in
366 ebuilds (such as the PORTAGE* and PORTDIR* variables)
368 \- When assigning values to variables in ebuilds, you \fIcannot have a
369 space\fR between the variable name and the equal sign.
371 \- Variable values should only contain characters that are members of the
372 \fBascii\fR(7) character set. This requirement is mandated by \fBGLEP 31\fR.
375 This variable contains the package name without the ebuild revision.
376 This variable must NEVER be modified.
378 xfree\-4.2.1\-r2.ebuild \-\-> $P=='xfree\-4.2.1'
381 Contains the name of the script without the version number.
383 xfree\-4.2.1\-r2.ebuild \-\-> $PN=='xfree'
386 Contains the version number without the revision.
388 xfree\-4.2.1\-r2.ebuild \-\-> $PV=='4.2.1'
391 Contains the revision number or 'r0' if no revision number exists.
393 xfree\-4.2.1\-r2.ebuild \-\-> $PR=='r2'
396 Contains the version number with the revision.
398 xfree\-4.2.1\-r2.ebuild \-\-> $PVR=='4.2.1\-r2'
401 Contains the full package name \fBPN\fR\-\fBPVR\fR
403 xfree\-4.2.1\-r2.ebuild \-\-> $PF=='xfree\-4.2.1\-r2'
406 Contains the package category name.
409 Contains all source files required for the package. This variable must
410 not be defined. It is autogenerated from the \fBSRC_URI\fR variable.
412 .B WORKDIR\fR = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/work"
413 Contains the path to the package build root. Do not modify this variable.
415 .B FILESDIR\fR = \fI"${PORTDIR}/${CATEGORY}/${PN}/files"
416 Contains the path to the 'files' sub folder in the package specific
417 location in the portage tree. Do not modify this variable.
420 Contains the abreviated name of the phase function that is
421 currently executing, such as "setup", "unpack", "compile", or
425 Beginning with \fBEAPI 5\fR, contains the full name of the phase
426 function that is currently executing, such as "pkg_setup",
427 "src_unpack", "src_compile", or "pkg_preinst".
430 Beginning with \fBEAPI 3\fR, contains the offset
431 that this Portage was configured for during
432 installation. The offset is sometimes necessary in an ebuild or eclass,
433 and is available in such cases as ${EPREFIX}. EPREFIX does not contain
434 a trailing slash, therefore an absent offset is represented by the empty
435 string. Do not modify this variable.
437 .B S\fR = \fI"${WORKDIR}/${P}"
438 Contains the path to the temporary \fIbuild directory\fR. This variable
439 is used by the functions \fIsrc_compile\fR and \fIsrc_install\fR. Both
440 are executed with \fIS\fR as the current directory. This variable may
441 be modified to match the extraction directory of a tarball for the package.
443 .B T\fR = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/temp"
444 Contains the path to a \fItemporary directory\fR. You may use this for
447 .B D\fR = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/image/"
448 Contains the path to the temporary \fIinstall directory\fR. Every write
449 operation that does not involve the helper tools and functions (found below)
450 should be prefixed with ${D}.
451 Beginning with \fBEAPI 3\fR, the offset prefix often needs
452 to be taken into account here, for which the variable
453 ${ED} is provided (see below).
454 Do not modify this variable.
456 .B ED\fR = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/image/${EPREFIX}/"
457 Beginning with \fBEAPI 3\fR, contains the path
458 "${D%/}${EPREFIX}/" for convenience purposes.
459 For EAPI values prior to \fBEAPI 3\fR which do
460 not support ED, helpers use \fBD\fR where
461 they would otherwise use ED.
462 Do not modify this variable.
465 Beginning with \fBEAPI 4\fR, the MERGE_TYPE variable can be used to
466 query the current merge type. This variable will contain one of the
467 following possible values:
475 binary previously\-built which is scheduled for merge
476 buildonly source\-build which is not scheduled for merge
477 source source\-build which is scheduled for merge
482 Contains the path of the build log. If \fBPORT_LOGDIR\fR variable is unset then
483 PORTAGE_LOG_FILE=\fI"${T}/build.log"\fR.
485 .B REPLACED_BY_VERSION
486 Beginning with \fBEAPI 4\fR, the REPLACED_BY_VERSION variable can be
487 used in pkg_prerm and pkg_postrm to query the package version that
488 is replacing the current package. If there is no replacement package,
489 the variable will be empty, otherwise it will contain a single version
492 .B REPLACING_VERSIONS
493 Beginning with \fBEAPI 4\fR, the REPLACING_VERSIONS variable can be
494 used in pkg_pretend, pkg_setup, pkg_preinst and pkg_postinst to query
495 the package version(s) that the current package is replacing. If there
496 are no packages to replace, the variable will be empty, otherwise it
497 will contain a space\-separated list of version numbers corresponding
498 to the package version(s) being replaced. Typically, this variable will
499 not contain more than one version, but according to PMS it can contain
503 Contains the path that portage should use as the root of the live filesystem.
504 When packages wish to make changes to the live filesystem, they should do so in
505 the tree prefixed by ${ROOT}. Often the offset prefix needs to be taken
506 into account here, for which the variable ${EROOT} is provided (see
507 below). Do not modify this variable.
509 .B EROOT\fR = \fI"${ROOT%/}${EPREFIX}/"
510 Beginning with \fBEAPI 3\fR, contains
511 "${ROOT%/}${EPREFIX}/" for convenience
512 purposes. Do not modify this variable.
514 .B DESCRIPTION\fR = \fI"A happy little package"
515 Should contain a short description of the package.
518 Defines the ebuild API version to which this package conforms. If not
519 defined then it defaults to "0". If portage does not recognize the
520 EAPI value then it will mask the package and refuse to perform any
521 operations with it since this means that a newer version of portage
522 needs to be installed first. For maximum backward compatiblity, a
523 package should conform to the lowest possible EAPI. Note that anyone
524 who uses the \fBebuild\fR(1) and \fBrepoman\fR(1) commands with this
525 package will be required to have a version of portage that recognizes
526 the EAPI to which this package conforms.
528 .B SRC_URI\fR = \fI"http://example.com/path/${P}.tar.gz"
529 Contains a list of URIs for the required source files. It can contain
530 multiple URIs for a single source file. The list is processed in order
531 if the file was not found on any of the \fIGENTOO_MIRRORS\fR.
532 Beginning with \fBEAPI 2\fR, the output file name of a given URI may be
533 customized with a "->" operator on the right hand side, followed by the
534 desired output file name. All tokens, including the operator and output
535 file name, should be separated by whitespace.
537 .B HOMEPAGE\fR = \fI"http://example.com/"
538 Should contain a list of URIs for the sources main sites and other further
539 package dependent information.
541 .B KEYWORDS\fR = \fI[\-~][x86,ppc,sparc,mips,alpha,arm,hppa]
542 Should contain appropriate list of arches that the ebuild is know to
543 work/not work. By default if you do not know if an ebuild runs under
544 a particular arch simply omit that KEYWORD. If the ebuild will not
545 work on that arch include it as \-ppc for example. If the ebuild is
546 being submitted for inclusion, it must have ~arch set for architectures
547 where it has been PROVEN TO WORK. (Packages KEYWORDed this way may be
548 unmasked for testing by setting ACCEPT_KEYWORDS="~arch" on the command
549 line, or in \fBmake.conf\fR(5)) For an authoritative list please review
550 /usr/portage/profiles/arch.list. Please keep this list in alphabetical order.
553 This sets the SLOT for packages that may need to have multiple versions
554 co\-exist. By default you should set \fBSLOT\fR="0". If you are unsure, then
555 do not fiddle with this until you seek some guidance from some guru. This
556 value should \fINEVER\fR be left undefined.
558 Beginning with \fBEAPI 5\fR, the SLOT variable may contain
559 an optional sub\-slot part that follows the regular slot and
560 is delimited by a / character. The sub\-slot must be a valid
561 slot name. The sub\-slot is used to represent cases in which
562 an upgrade to a new version of a package with a different
563 sub\-slot may require dependent packages to be rebuilt. When
564 the sub\-slot part is omitted from the SLOT definition, the
565 package is considered to have an implicit sub\-slot which is
566 equal to the regular slot. Refer to the \fBAtom Slot
567 Operators\fR section for more information about sub\-slot
571 This should be a space delimited list of licenses that the package falls
572 under. This \fB_must_\fR be set to a matching license in
573 /usr/portage/licenses/. If the license does not exist in portage yet, you
577 This should be a list of any and all USE flags that are leveraged within
578 your build script. The only USE flags that should not be listed here are
579 arch related flags (see \fBKEYWORDS\fR). Beginning with \fBEAPI 1\fR, it
580 is possible to prefix flags with + or - in order to create default settings
581 that respectively enable or disable the corresponding \fBUSE\fR flags. For
582 details about \fBUSE\fR flag stacking order, refer to the \fBUSE_ORDER\fR
583 variable in \fBmake.conf\fR(5). Given the default \fBUSE_ORDER\fR setting,
584 negative IUSE default settings are effective only for negation of
585 repo\-level USE settings, since profile and user configuration settings
589 This should contain a list of all packages that are required for the program
590 to compile (aka \fIbuildtime\fR dependencies). These are usually libraries and
593 Starting from experimental \fBEAPI 5-hdepend\fR, tools should go into the
594 \fBHDEPEND\fR variable instead, as \fBDEPEND\fR will only be installed into the
595 \fItarget\fR system and hence cannot be executed in a cross\-compile setting.
596 (See section \fBCross\-compilation\fR for more information.)
598 You may use the syntax described above in the \fBDependencies\fR section.
601 This should contain a list of all packages that are required for this
602 program to run (aka \fIruntime\fR dependencies). These are usually libraries.
604 In \fBEAPI 3\fR or earlier, if this is not set, then it defaults to the value
605 of \fBDEPEND\fR. In \fBEAPI 4\fR or later, \fBRDEPEND\fR will never be
608 You may use the syntax described above in the \fBDependencies\fR section.
611 This should contain a list of all packages that are required to be executable
612 during compilation of this program (aka \fIhost\fR buildtime dependencies).
613 These are usually tools, like interpreters or (cross\-)compilers.
615 This variable is new in experimental \fBEAPI 5-hdepend\fR and will be installed
616 into the \fIhost\fR system.
617 (See section \fBCross-compilation\fR for more information.)
619 You may use the syntax described above in the \fBDependencies\fR section.
622 This should contain a list of all packages that should be merged after this
623 one (aka \fIpost\fR merge dependencies), but which may be installed by the
624 package manager at any time, if that is not possible.
628 Use this only as last resort to break cyclic dependencies!
630 You may use the syntax described above in the \fBDependencies\fR section.
633 Beginning with \fBEAPI 4\fR, the \fBREQUIRED_USE\fR variable can be
634 used to specify combinations of \fBUSE\fR flags that are allowed
635 or not allowed. Elements can be nested when necessary.
641 If flag1 enabled then flag2 disabled flag1? ( !flag2 )
642 If flag1 enabled then flag2 enabled flag1? ( flag2 )
643 If flag1 disabled then flag2 enabled !flag1? ( flag2 )
644 If flag1 disabled then flag2 disabled !flag1? ( !flag2 )
645 Must enable any one or more (inclusive or) || ( flag1 flag2 flag3 )
646 Must enable exactly one but not more (exclusive or) ^^ ( flag1 flag2 flag3 )
647 May enable at most one (EAPI 5 or later) ?? ( flag1 flag2 flag3 )
650 .B RESTRICT\fR = \fI[strip,mirror,fetch,userpriv]
651 This should be a space delimited list of portage features to restrict.
652 You may use conditional syntax to vary restrictions as seen above in DEPEND.
657 Disable all QA checks for binaries. This should ONLY be used in packages
658 for which binary checks make no sense (linux\-headers and kernel\-sources, for
659 example, can safely be skipped since they have no binaries). If the binary
660 checks need to be skipped for other reasons (such as proprietary binaries),
661 see the \fBQA CONTROL VARIABLES\fR section for more specific exemptions.
664 Distribution of built packages is restricted.
667 like \fImirror\fR but the files will not be fetched via \fBSRC_URI\fR either.
670 Disables installsources for specific packages. This is for packages with
671 binaries that are not compatible with debugedit.
674 files in \fBSRC_URI\fR will not be downloaded from the \fBGENTOO_MIRRORS\fR.
677 Disables preserve\-libs for specific packages. Note than when a package is
678 merged, RESTRICT=preserve\-libs applies if either the new instance or the
679 old instance sets RESTRICT=preserve\-libs.
682 fetch from URIs in \fBSRC_URI\fR before \fBGENTOO_MIRRORS\fR.
685 Disables splitdebug for specific packages. This is for packages with
686 binaries that trigger problems with splitdebug, such as file\-collisions
687 between symlinks in /usr/lib/debug/.build-id (triggered by bundled libraries).
690 final binaries/libraries will not be stripped of debug symbols.
693 do not run src_test even if user has \fBFEATURES\fR=test.
696 Disables userpriv for specific packages.
700 .B PROPERTIES\fR = \fI[interactive]
701 A space delimited list of properties, with conditional syntax support.
706 One or more ebuild phases will produce a prompt that requires user interaction.
710 .B PROVIDE\fR = \fI"virtual/TARGET"
711 This variable should only be used when a package provides a virtual target.
712 For example, blackdown\-jdk and sun\-jdk provide \fIvirtual/jdk\fR. This
713 allows for packages to depend on \fIvirtual/jdk\fR rather than on blackdown
716 The \fBPROVIDE\fR variable has been deprecated. See
717 \fIhttp://www.gentoo.org/proj/en/glep/glep-0037.html\fR for details.
721 Beginning with \fBEAPI 4\fR, an array or space\-delimited list of documentation
722 files for the default src_install function to install using dodoc. If
723 undefined, a reasonable default list is used. See the documentation for
726 .SS "QA Control Variables:"
729 Several QA variables are provided which allow an ebuild to manipulate some
730 of the QA checks performed by portage. Use of these variables in ebuilds
731 should be kept to an absolute minimum otherwise they defeat the purpose
732 of the QA checks, and their use is subject to agreement of the QA team.
733 They are primarily intended for use by ebuilds that install closed\-source
734 binary objects that cannot be altered.
736 Note that objects that violate these rules may fail on some architectures.
739 This should contain a list of file paths, relative to the image
740 directory, of files that are pre\-built binaries. Paths
741 listed here will be appended to each of the QA_* variables
742 listed below. The paths may contain fnmatch\-like patterns
743 which will be internally translated to regular expressions for
744 the QA_* variables that support regular expressions instead
745 of fnmatch patterns. The translation mechanism simply replaces
749 This variable can be set to a list of file paths, relative to the image
750 directory, of files that contain text relocations that cannot be eliminated.
751 The paths may contain fnmatch patterns.
753 This variable is intended to be used on closed\-source binary objects that
757 This should contain a list of file paths, relative to the image directory, of
758 objects that require executable stack in order to run.
759 The paths may contain fnmatch patterns.
761 This variable is intended to be used on objects that truly need executable
762 stack (i.e. not those marked to need it which in fact do not).
765 This should contain a list of file paths, relative to the image directory, of
766 files that contain writable and executable segments. These are rare.
767 The paths may contain fnmatch patterns.
770 This should contain a list of file paths, relative to the image directory, of
771 files that do not contain .GCC.command.line sections or contain .hash sections.
772 The paths may contain regular expressions with escape\-quoted special characters.
774 This variable is intended to be used on files of binary packages which ignore
775 CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, and LDFLAGS variables.
778 This should contain a list of file paths, relative to the image directory, of
779 files that should be ignored for the multilib\-strict checks.
780 The paths may contain regular expressions with escape\-quoted special characters.
783 This should contain a list of file paths, relative to the image directory, of
784 files that contain pre-stripped binaries. The paths may contain regular
785 expressions with escape\-quoted special characters.
788 This should contain a list of file paths, relative to the image directory, of
789 shared libraries that lack SONAMEs. The paths may contain regular expressions
790 with escape\-quoted special characters.
792 .B QA_SONAME_NO_SYMLINK
793 This should contain a list of file paths, relative to the image directory, of
794 shared libraries that have SONAMEs but should not have a corresponding SONAME
795 symlink in the same directory. The paths may contain regular expressions
796 with escape\-quoted special characters.
798 .B QA_AM_MAINTAINER_MODE
799 This should contain a list of lines containing automake missing \-\-run
800 commands. The lines may contain regular expressions with escape\-quoted
803 .B QA_CONFIGURE_OPTIONS
804 This should contain a list of configure options which trigger warnings about
805 unrecognized options. The options may contain regular expressions with
806 escape\-quoted special characters.
809 This should contain a list of file paths, relative to the image directory, of
810 shared libraries that lack NEEDED entries. The paths may contain regular
811 expressions with escape\-quoted special characters.
814 This should contain a list of file paths, relative to the image directory, of
815 desktop files which should not be validated. The paths may contain regular
816 expressions with escape\-quoted special characters.
818 .SH "PORTAGE DECLARATIONS"
821 Inherit is portage's maintenance of extra classes of functions that are
822 external to ebuilds and provided as inheritable capabilities and data. They
823 define functions and set data types as drop\-in replacements, expanded, and
824 simplified routines for extremely common tasks to streamline the build
825 process. Call to inherit cannot depend on conditions which can vary in given
826 ebuild. Specification of the eclasses contains only their name and not the
827 \fI.eclass\fR extension. Also note that the inherit statement must come
828 before other variable declarations unless these variables are used in global
831 .SH "PHASE FUNCTIONS"
834 Beginning with \fBEAPI 4\fR, this function can be defined in order to
835 check that miscellaneous requirements are met. It is called as early
836 as possible, before any attempt is made to satisfy dependencies. If the
837 function detects a problem then it should call eerror and die. The
838 environment (variables, functions, temporary directories, etc..) that
839 is used to execute pkg_pretend is not saved and therefore is not
840 available in phases that execute afterwards.
843 This function will be executed when the files in \fBSRC_URI\fR
844 cannot be fetched for any reason. If you turn on \fIfetch\fR in
845 \fBRESTRICT\fR, this is useful for displaying information to the
846 user on *how* to obtain said files. All
847 you have to do is output a message and let the function return. Do not
848 end the function with a call to \fBdie\fR.
851 This function can be used if the package needs specific setup actions or
852 checks to be preformed before anything else.
854 Initial working directory: $PORTAGE_TMPDIR
857 This function is used to unpack all the sources in \fIA\fR to \fIWORKDIR\fR.
858 If not defined in the \fIebuild script\fR it calls \fIunpack ${A}\fR. Any
859 patches and other pre configure/compile modifications should be done here.
861 Initial working directory: $WORKDIR
864 All preparation of source code, such as application of patches, should be done
865 here. This function is supported beginning with \fBEAPI 2\fR.
867 Initial working directory: $S
870 All necessary steps for configuration should be done here. This function is
871 supported beginning with \fBEAPI 2\fR.
873 Initial working directory: $S
876 With less than \fBEAPI 2\fR, all necessary steps for both configuration and
877 compilation should be done here. Beginning with \fBEAPI 2\fR, only compilation
878 steps should be done here.
880 Initial working directory: $S
883 Run all package specific test cases. The default is to run
884 \'emake check\' followed \'emake test\'. Prior to \fBEAPI 5\fR,
885 the default src_test implementation will automatically pass the
886 \-j1 option as the last argument to emake, and beginning with
887 \fBEAPI 5\fR it will allow the tests to run in parallel.
889 Initial working directory: $S
892 Should contain everything required to install the package in the temporary
893 \fIinstall directory\fR.
895 Initial working directory: $S
897 Beginning with \fBEAPI 4\fR, if src_install is undefined then the
898 following default implementation is used:
902 if [[ \-f Makefile || \-f GNUmakefile || \-f makefile ]] ; then
903 emake DESTDIR="${D}" install
906 if ! declare -p DOCS &>/dev/null ; then
908 for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \\
909 THANKS BUGS FAQ CREDITS CHANGELOG ; do
910 [[ \-s "${d}" ]] && dodoc "${d}"
912 elif [[ $(declare \-p DOCS) == "declare \-a "* ]] ; then
920 .B pkg_preinst pkg_postinst
921 All modifications required on the live\-filesystem before and after the
922 package is merged should be placed here. Also commentary for the user
923 should be listed here as it will be displayed last.
925 Initial working directory: $PWD
927 .B pkg_prerm pkg_postrm
928 Like the pkg_*inst functions but for unmerge.
930 Initial working directory: $PWD
933 This function should contain optional basic configuration steps.
935 Initial working directory: $PWD
937 .SH "HELPER FUNCTIONS"
941 Calls the default phase function implementation for the currently executing
942 phase. This function is supported beginning with \fBEAPI 2\fR.
945 Beginning with \fBEAPI 2\fR, the default pkg_nofetch and src_* phase
946 functions are accessible via a function having a name that begins with
947 default_ and ends with the respective phase function name. For example,
948 a call to a function with the name default_src_compile is equivalent to
949 a call to the default src_compile implementation.
956 Default Phase Functions
960 default_src_configure
968 .B die\fR \fI[reason]
969 Causes the current emerge process to be aborted. The final display will
970 include \fIreason\fR.
972 Beginning with \fBEAPI 4\fR, all helpers automatically call \fBdie\fR
973 whenever some sort of error occurs. Helper calls may be prefixed with
974 the \fBnonfatal\fR helper in order to prevent errors from being fatal.
976 .B nonfatal\fR \fI<helper>
977 Execute \fIhelper\fR and \fIdo not\fR call die if it fails.
978 The \fBnonfatal\fR helper is available beginning with \fBEAPI 4\fR.
980 .B use\fR \fI<USE item>
981 If \fIUSE item\fR is in the \fBUSE\fR variable, the function will silently
982 return 0 (aka shell true). If \fIUSE item\fR is not in the \fBUSE\fR
983 variable, the function will silently return 1 (aka shell false). \fBusev\fR
984 is a verbose version of \fBuse\fR.
990 guiconf="\-\-enable\-gui=gnome \-\-with\-x"
992 guiconf="\-\-enable\-gui=gtk \-\-with\-x"
994 guiconf="\-\-enable\-gui=athena \-\-with\-x"
996 # No gui version will be built
1002 .B usex\fR \fI<USE flag>\fR \fI[true output]\fR \fI[false output]\fR \fI[true suffix]\fR \fI[false suffix]
1003 If USE flag is set, echo [true output][true suffix] (defaults to
1004 "yes"), otherwise echo [false output][false suffix] (defaults to
1005 "no"). The usex helper is available beginning with \fBEAPI 5\fR.
1007 .B use_with\fR \fI<USE item>\fR \fI[configure name]\fR \fI[configure opt]
1008 Useful for creating custom options to pass to a configure script. If \fIUSE
1009 item\fR is in the \fBUSE\fR variable and a \fIconfigure opt\fR is specified,
1010 then the string \fI\-\-with\-[configure name]=[configure opt]\fR will be echoed.
1011 If \fIconfigure opt\fR is not specified, then just \fI\-\-with\-[configure
1012 name]\fR will be echoed. If \fIUSE item\fR is not in the \fBUSE\fR variable,
1013 then the string \fI\-\-without\-[configure name]\fR will be echoed. If
1014 \fIconfigure name\fR is not specified, then \fIUSE item\fR will be used in
1015 its place. Beginning with \fBEAPI 4\fR, an empty \fIconfigure opt\fR argument
1016 is recognized. In \fBEAPI 3\fR and earlier, an empty \fIconfigure opt\fR
1017 argument is treated as if it weren't provided.
1023 myconf=$(use_with opengl)
1024 (myconf now has the value "\-\-with\-opengl")
1027 myconf=$(use_with jpeg libjpeg)
1028 (myconf now has the value "\-\-with\-libjpeg")
1031 myconf=$(use_with jpeg libjpeg)
1032 (myconf now has the value "\-\-without\-libjpeg")
1035 myconf=$(use_with sdl SDL all\-plugins)
1036 (myconf now has the value "\-\-with\-SDL=all\-plugins")
1040 .B use_enable\fR \fI<USE item>\fR \fI[configure name]\fR \fI[configure opt]
1041 Same as \fBuse_with\fR above, except that the configure options are
1042 \fI\-\-enable\-\fR instead of \fI\-\-with\-\fR and \fI\-\-disable\-\fR instead of
1043 \fI\-\-without\-\fR. Beginning with \fBEAPI 4\fR, an empty \fIconfigure opt\fR
1044 argument is recognized. In \fBEAPI 3\fR and earlier, an empty
1045 \fIconfigure opt\fR argument is treated as if it weren't provided.
1047 .B hasv\fR \fI<item>\fR \fI<item list>
1048 If \fIitem\fR is in \fIitem list\fR, then \fIitem\fR is echoed and \fBhasv\fR
1049 returns 0. Otherwise, nothing is echoed and 1 is returned. As indicated with
1050 use, there is a non\-echoing version \fBhas\fR. Please use \fBhas\fR in all
1051 places where output is to be disregarded. Never use the output for calculation.
1053 The \fIitem list\fR is delimited by the \fIIFS\fR variable. This variable
1054 has a default value of ' ', or a space. It is a \fBbash\fR(1) setting.
1056 .B has_version\fR \fI[\-\-host\-root]\fR \fI<category/package\-version>
1057 Check to see if \fIcategory/package\-version\fR is installed on the system.
1058 The parameter accepts all values that are acceptable in the \fBDEPEND\fR
1059 variable. The function returns 0 if \fIcategory/package\-version\fR is
1060 installed, 1 otherwise. Beginning with \fBEAPI 5\fR, the
1061 \-\-host\-root option may be used in order to cause the query
1062 to apply to the host root instead of ${ROOT}.
1064 .B best_version\fR \fI[\-\-host\-root]\fR \fI<package name>
1065 This function will look up \fIpackage name\fR in the database of currently
1066 installed programs and echo the "best version" of the package that is
1067 currently installed. Beginning with \fBEAPI 5\fR, the
1068 \-\-host\-root option may be used in order to cause the query
1069 to apply to the host root instead of ${ROOT}.
1073 VERINS="$(best_version net\-ftp/glftpd)"
1074 (VERINS now has the value "net\-ftp/glftpd\-1.27" if glftpd\-1.27 is installed)
1079 .B register_die_hook\fR \fI[list of function names]
1080 Register one or more functions to call when the ebuild fails for any reason,
1081 including file collisions with other packages.
1083 .B register_success_hook\fR \fI[list of function names]
1084 Register one or more functions to call when the ebuild builds and/or installs
1089 .B einfo\fR \fI"disposable message"
1090 Same as \fBelog\fR, but should be used when the message isn't important to the
1091 user (like progress or status messages during the build process).
1093 .B elog\fR \fI"informative message"
1094 If you need to display a message that you wish the user to read and take
1095 notice of, then use \fBelog\fR. It works just like \fBecho\fR(1), but
1096 adds a little more to the output so as to catch the user's eye. The message
1097 will also be logged by portage for later review.
1099 .B ewarn\fR \fI"warning message"
1100 Same as \fBeinfo\fR, but should be used when showing a warning to the user.
1102 .B eqawarn\fR \fI"QA warning message"
1103 Same as \fBeinfo\fR, but should be used when showing a QA warning to the user.
1105 .B eerror\fR \fI"error message"
1106 Same as \fBeinfo\fR, but should be used when showing an error to the user.
1108 .B ebegin\fR \fI"helpful message"
1109 Like \fBeinfo\fR, we output a \fIhelpful message\fR and then hint that the
1110 following operation may take some time to complete. Once the task is
1111 finished, you need to call \fBeend\fR.
1113 .B eend\fR \fI<status>\fR \fI["error message"]
1114 Followup the \fBebegin\fR message with an appropriate "OK" or "!!" (for
1115 errors) marker. If \fIstatus\fR is non\-zero, then the additional \fIerror
1116 message\fR is displayed.
1120 .B unpack\fR \fI<source>\fR \fI[list of more sources]
1121 This function uncompresses and/or untars a list of sources into the current
1122 directory. The function will append \fIsource\fR to the \fBDISTDIR\fR variable.
1126 .B econf\fR \fI[configure options]
1127 This is used as a replacement for configure. Performs:
1129 ${\fIECONF_SOURCE\fR:-.}/configure \\
1130 ${CBUILD:+\-\-build=${CBUILD}} \\
1131 \-\-datadir="${EPREFIX}"/usr/share \\
1132 \-\-host=${CHOST} \\
1133 \-\-infodir="${EPREFIX}"/usr/share/info \\
1134 \-\-localstatedir="${EPREFIX}"/var/lib \\
1135 \-\-prefix="${EPREFIX}"/usr \\
1136 \-\-mandir="${EPREFIX}"/usr/share/man \\
1137 \-\-sysconfdir="${EPREFIX}"/etc \\
1138 ${CTARGET:+\-\-target=${CTARGET}} \\
1139 \-\-disable\-dependency\-tracking \\
1140 \fI${EXTRA_ECONF}\fR \\
1141 \fIconfigure options\fR || die "econf failed"
1143 Note that the \fIEXTRA_ECONF\fR is for users only, not for ebuild
1144 writers. If you wish to pass more options to configure, just pass the
1145 extra arguments to \fBeconf\fR. Also note that \fBeconf\fR automatically
1146 calls \fBdie\fR if the configure script fails.
1147 Beginning with \fBEAPI 3\fR, \fBeconf\fR uses the \fB${EPREFIX}\fR
1148 variable which is disregarded for prior \fBEAPI\fR values.
1149 Beginning with \fBEAPI 4\fR, \fBeconf\fR adds
1150 \fI\-\-disable\-dependency\-tracking\fR to the arguments if the
1151 string \fIdisable\-dependency\-tracking\fR occurs in the output
1152 of \fIconfigure \-\-help\fR.
1153 Beginning with \fBEAPI 5\fR, \fBeconf\fR adds
1154 \fIdisable\-silent\-rules\fR to the arguments if the
1155 string \fIdisable\-silent\-rules\fR occurs in the output
1156 of \fIconfigure \-\-help\fR.
1158 .B emake\fR \fI[make options]
1159 This is used as a replacement for make. Performs 'make ${MAKEOPTS}
1160 \fImake options\fR' (as set in make.globals), default is MAKEOPTS="\-j2".
1164 if you are going to use \fBemake\fR, make sure your build is happy with
1165 parallel makes (make \-j2). It should be tested thoroughly as parallel
1166 makes are notorious for failing _sometimes_ but not always. If you determine
1167 that your package fails to build in parallel, and you are unable to resolve
1168 the issue, then you should run '\fBemake\fR \-j1' instead of 'make'.
1172 .B einstall\fR \fI[make options]
1173 This is used as a replacement for make install. Performs:
1177 datadir=${ED}/usr/share \\
1178 infodir=${ED}/usr/share/info \\
1179 localstatedir=${ED}/var/lib \\
1180 mandir=${ED}/usr/share/man \\
1181 sysconfdir=${ED}/etc \\
1182 \fI${EXTRA_EINSTALL}\fR \\
1183 \fImake options\fR \\
1186 Please do \fBnot\fR use this in place of 'emake install DESTDIR=${D}'.
1187 That is the preferred way of installing make\-based packages. Also, do
1188 not utilize the \fIEXTRA_EINSTALL\fR variable since it is for users.
1202 Useful for when a package installs into \fB${D}\fR via scripts
1203 (i.e. makefiles). If you want to be sure that libraries are executable,
1204 aclocal files are installed into the right place, doc/info/man files are
1205 all compressed, and that executables are all stripped of debugging symbols,
1206 then use these suite of functions.
1211 Runs \fBprepallman\fR, \fBprepallinfo\fR, \fBprepallstrip\fR, sets
1212 libraries +x, and then checks aclocal directories. Please note this
1213 does \fI*not*\fR run \fBprepalldocs\fR.
1216 Compresses all doc files in ${ED}/usr/share/doc.
1219 Compresses all info files in ${ED}/usr/share/info.
1222 Compresses all man files in ${ED}/usr/share/man.
1225 Strips all executable files of debugging symboles. This includes libraries.
1229 .B prepinfo\fR \fI[dir]
1231 .B prepman\fR \fI[dir]
1233 .B prepstrip\fR \fI[dir]
1235 Similar to the \fBprepall\fR functions, these are subtle in their differences.
1240 If a \fIdir\fR is not specified, then \fBprepinfo\fR will assume the dir
1241 \fIusr\fR. \fBprepinfo\fR will then compress all the files in
1242 ${ED}/\fIdir\fR/info.
1245 If a \fIdir\fR is not specified, then \fBprepman\fR will assume the dir
1246 \fIusr\fR. \fBprepman\fR will then compress all the files in
1247 ${ED}/\fIdir\fR/man/*/.
1250 All the files found in ${ED}/\fIdir\fR will be stripped. You may specify
1251 multiple directories.
1255 .B docompress\fR \fI[\-x] <path> [list of more paths]
1257 Beginning with \fBEAPI 4\fR, the \fBdocompress\fR helper is used to
1258 manage lists of files to be included or excluded from optional compression.
1259 If the first argument is \fB\-x\fR, add each of its subsequent arguments to
1260 the exclusion list. Otherwise, add each argument to the inclusion list.
1261 The inclusion list initially contains \fI/usr/share/doc\fR,
1262 \fI/usr/share/info\fR, and \fI/usr/share/man\fR. The exclusion list
1263 initially contains \fI/usr/share/doc/${PF}/html\fR.
1265 The optional compression shall be carried out after \fBsrc_install\fR
1266 has completed, and before the execution of any subsequent phase
1267 function. For each item in the inclusion list, pretend it has the
1268 value of the \fBD\fR variable prepended, then:
1271 If it is a directory, act as if every file or directory immediately
1272 under this directory were in the inclusion list.
1274 If the item is a file, it may be compressed unless it has been
1275 excluded as described below.
1277 If the item does not exist, it is ignored.
1280 Whether an item is to be excluded is determined as follows: For each
1281 item in the exclusion list, pretend it has the value of the \fBD\fR
1282 variable prepended, then:
1285 If it is a directory, act as if every file or directory immediately
1286 under this directory were in the exclusion list.
1288 If the item is a file, it shall not be compressed.
1290 If the item does not exist, it is ignored.
1294 .B dosed\fR \fI"s:orig:change:g" <filename>
1295 Beginning with \fBEAPI 4\fR, the \fBdosed\fR helper no longer exists. Ebuilds
1296 should call \fBsed(1)\fR directly (and assume that it is GNU sed).
1298 Performs sed in place on \fIfilename\fR inside ${ED}. If no expression is
1299 given then \fI"s:${D}::g"\fR is used as the default expression. Note
1300 that this expression does \fBNOT\fR use the offset prefix.
1302 .BR 'dosed\ "s:/usr/local:/usr:g"\ /usr/bin/some\-script'
1303 runs sed on ${ED}/usr/bin/some\-script
1305 .B dodir\fR \fI<path> [more paths]
1306 Creates directories inside of ${ED}.
1308 .BR 'dodir\ /usr/lib/apache'
1309 creates ${ED}/usr/lib/apache. Note that the do* functions will run
1310 \fBdodir\fR for you.
1312 .B diropts\fR \fI[options for install(1)]
1313 Can be used to define options for the install function used in
1314 \fBdodir\fR. The default is \fI\-m0755\fR.
1316 .B into\fR \fI<path>
1317 Sets the root (\fIDESTTREE\fR) for other functions like \fBdobin\fR,
1318 \fBdosbin\fR, \fBdoman\fR, \fBdoinfo\fR, \fBdolib\fR.
1320 The default root is /usr.
1322 .B keepdir\fR \fI<path> [more paths]
1323 Tells portage to leave directories behind even if they're empty. Functions
1324 the same as \fBdodir\fR.
1326 .B dobin\fR \fI<binary> [list of more binaries]
1327 Installs a \fIbinary\fR or a list of binaries into \fIDESTTREE\fR/bin.
1328 Creates all necessary dirs.
1330 .B dosbin\fR \fI<binary> [list of more binaries]
1331 Installs a \fIbinary\fR or a list of binaries into \fIDESTTREE\fR/sbin.
1332 Creates all necessary dirs.
1334 .B doinitd\fR \fI<init.d script> [list of more init.d scripts]
1335 Install Gentoo \fIinit.d scripts\fR. They will be installed into the
1336 correct location for Gentoo init.d scripts (/etc/init.d/). Creates all
1339 .B doconfd\fR \fI<conf.d file> [list of more conf.d file]
1340 Install Gentoo \fIconf.d files\fR. They will be installed into the
1341 correct location for Gentoo conf.d files (/etc/conf.d/). Creates all
1344 .B doenvd\fR \fI<env.d entry> [list of more env.d entries]
1345 Install Gentoo \fIenv.d entries\fR. They will be installed into the
1346 correct location for Gentoo env.d entries (/etc/env.d/). Creates all
1351 .B dolib\fR \fI<library>\fR \fI[list of more libraries]
1353 .B dolib.a\fR \fI<library>\fR \fI[list of more libraries]
1355 .B dolib.so\fR \fI<library>\fR \fI[list of more libraries]
1357 Installs a library or a list of libraries into \fIDESTTREE\fR/lib.
1358 Creates all necessary dirs.
1360 .B libopts\fR \fI[options for install(1)]
1361 Can be used to define options for the install function used in
1362 the \fBdolib\fR functions. The default is \fI\-m0644\fR.
1364 .B doman\fR \fI[\-i18n=<locale>]\fR \fI<man\-page> [list of more man\-pages]
1365 Installs manual\-pages into /usr/share/man/man[0\-9n] depending on the
1366 manual file ending. The files are compressed if they are not already. You
1367 can specify locale\-specific manpages with the \fI\-i18n\fR option. Then the
1368 man\-page will be installed into /usr/share/man/\fI<locale>\fR/man[0\-9n].
1369 Beginning with \fBEAPI 2\fR, a locale\-specific manpage which contains a locale
1370 in the file name will be installed in /usr/share/man/\fI<locale>\fR/man[0\-9n],
1371 with the locale portion of the file name removed, and the \fI\-i18n\fR option
1372 has no effect. For example, with \fBEAPI 2\fR, a manpage named
1373 foo.\fI<locale>\fR.1 will be installed as
1374 /usr/share/man/\fI<locale>\fR/man1/foo.1. Beginning with \fBEAPI 4\fR,
1375 the \fI\-i18n\fR option takes precedence over the locale suffix of the
1380 .B dohard\fR \fI<filename> <linkname>
1381 Beginning with \fBEAPI 4\fR, the \fBdohard\fR helper no longer exists. Ebuilds
1382 should call \fBln(1)\fR directly.
1384 .B dosym\fR \fI<filename> <linkname>
1386 Performs the ln command to create a symlink.
1388 .B doheader\fR \fI[\-r] <file> [list of more files]
1389 Installs the given header files into /usr/include/, by default
1390 with file mode \fI0644\fR (this can be overridden with the
1391 \fBinsopts\fR function). Setting \-r sets recursive. The
1392 \fBdoheader\fR helper is available beginning with \fBEAPI 5\fR.
1394 .B dohtml\fR \fI [\-a filetypes] [\-r] [\-x list\-of\-dirs\-to\-ignore] [list\-of\-files\-and\-dirs]
1395 Installs the files in the list of files (space\-separated list) into
1396 /usr/share/doc/${PF}/html provided the file ends in .htm, .html, .css, .js, .gif, .jpeg, .jpg, or .png.
1397 Setting \fI\-a\fR limits what types of files will be included,
1398 \fI\-A\fR appends to the default list, setting \fI\-x\fR sets which dirs to
1399 exclude (CVS excluded by default), \fI\-p\fR sets a document prefix, \fI\-r\fR sets recursive.
1401 .B doinfo\fR \fI<info\-file> [list of more info\-files]
1402 Installs info\-pages into \fIDESTDIR\fR/info. Files are automatically
1403 gzipped. Creates all necessary dirs.
1405 .B domo\fR \fI<locale\-file> [list of more locale\-files]
1406 Installs locale\-files into \fIDESTDIR\fR/usr/share/locale/[LANG]
1407 depending on local\-file's ending. Creates all necessary dirs.
1411 .B fowners\fR \fI<permissions> <file> [files]
1413 .B fperms\fR \fI<permissions> <file> [files]
1415 Performs chown (\fBfowners\fR) or chmod (\fBfperms\fR), applying
1416 \fIpermissions\fR to \fIfiles\fR.
1418 .B insinto\fR \fI[path]
1419 Sets the destination path for the \fBdoins\fR function.
1421 The default path is /.
1423 .B insopts\fR \fI[options for install(1)]
1424 Can be used to define options for the install function used in
1425 \fBdoins\fR. The default is \fI\-m0644\fR.
1427 .B doins\fR \fI[\-r] <file> [list of more files]
1428 Installs files into the path controlled by \fBinsinto\fR. This function
1429 uses \fBinstall\fR(1). Creates all necessary dirs.
1430 Setting \-r sets recursive. Beginning with \fBEAPI 4\fR, both
1431 \fBdoins\fR and \fBnewins\fR preserve symlinks. In \fBEAPI 3\fR and
1432 earlier, symlinks are dereferenced rather than preserved.
1434 .B exeinto\fR \fI[path]
1435 Sets the destination path for the \fBdoexe\fR function.
1437 The default path is /.
1439 .B exeopts\fR \fI[options for install(1)]
1440 Can be used to define options for the install function used in \fBdoexe\fR.
1441 The default is \fI\-m0755\fR.
1443 .B doexe\fR \fI<executable> [list of more executables]
1444 Installs executables into the path controlled by \fBexeinto\fR. This function
1445 uses \fBinstall\fR(1). Creates all necessary dirs.
1447 .B docinto\fR \fI[path]
1448 Sets the subdir used by \fBdodoc\fR and \fBdohtml\fR
1449 when installing into the document tree
1450 (based in /usr/share/doc/${PF}/). Default is no subdir, or just "".
1452 .B dodoc\fR \fI[-r] <document> [list of more documents]
1453 Installs a document or a list of documents into /usr/share/doc/${PF}/\fI<docinto path>\fR.
1454 Documents are marked for compression. Creates all necessary dirs.
1455 Beginning with \fBEAPI 4\fR, there is support for recursion, enabled by the
1456 new \fI\-r\fR option.
1460 .B newbin\fR \fI<old file> <new filename>
1462 .B newsbin\fR \fI<old file> <new filename>
1464 .B newinitd\fR \fI<old file> <new filename>
1466 .B newconfd\fR \fI<old file> <new filename>
1468 .B newenvd\fR \fI<old file> <new filename>
1470 .B newlib.so\fR \fI<old file> <new filename>
1472 .B newlib.a\fR \fI<old file> <new filename>
1474 .B newman\fR \fI<old file> <new filename>
1476 .B newinfo\fR \fI<old file> <new filename>
1478 .B newins\fR \fI<old file> <new filename>
1480 .B newexe\fR \fI<old file> <new filename>
1482 .B newdoc\fR \fI<old file> <new filename>
1484 All these functions act like the do* functions, but they only work with one
1485 file and the file is installed as \fI[new filename]\fR.
1486 Beginning with \fBEAPI 5\fR, standard input is read when the
1487 first parameter is \- (a hyphen).
1492 # Copyright 1999\-2013 Gentoo Foundation
1493 # Distributed under the terms of the GNU General Public License v2
1498 inherit some_eclass another_eclass
1500 DESCRIPTION="Super\-useful stream editor (sed)"
1501 HOMEPAGE="http://www.gnu.org/software/sed/sed.html"
1502 SRC_URI="ftp://alpha.gnu.org/pub/gnu/${PN}/${P}.tar.gz"
1510 DEPEND="nls? ( sys-devel/gettext )"
1514 \-\-bindir="${EPREFIX}"/bin
1518 emake DESTDIR="${D}" install
1519 dodoc NEWS README* THANKS AUTHORS BUGS ChangeLog
1526 The \fI/usr/lib/portage/bin/ebuild.sh\fR script.
1528 The helper apps in \fI/usr/lib/portage/bin\fR.
1530 .B /etc/portage/make.conf
1531 Contains variables for the build\-process and overwrites those in make.defaults.
1533 .B /usr/share/portage/config/make.globals
1534 Contains the default variables for the build\-process, you should edit
1535 \fI/etc/portage/make.conf\fR instead.
1537 .B /etc/portage/color.map
1538 Contains variables customizing colors.
1545 .SH "REPORTING BUGS"
1546 Please report bugs via http://bugs.gentoo.org/
1550 Achim Gottinger <achim@gentoo.org>
1551 Mark Guertin <gerk@gentoo.org>
1552 Nicholas Jones <carpaski@gentoo.org>
1553 Mike Frysinger <vapier@gentoo.org>
1554 Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@gmail.com>
1555 Fabian Groffen <grobian@gentoo.org>