EUTILS.ECLASSSection: eclass-manpages (5)
Updated: Feb 2020
Index Return to Main Contents
NAMEeutils.eclass - many extra (but common) functions that are used in ebuilds
DESCRIPTIONThe eutils eclass contains a suite of functions that complement the ones that ebuild.sh already contain. The idea is that the functions are not required in all ebuilds but enough utilize them to have a common home rather than having multiple ebuilds implementing the same thing.
Due to the nature of this eclass, some functions may have maintainers different from the overall eclass!
- emktemp [temp dir]
- Cheap replacement for when debianutils (and thus mktemp) does not exist on the users system.
- edos2unix <file> [more files ...]
- A handy replacement for dos2unix, recode, fixdos, etc... This allows you to remove all of these text utilities from DEPEND variables because this is a script based solution. Just give it a list of files to convert and they will all be changed from the DOS CRLF format to the UNIX LF format.
- strip-linguas [<allow LINGUAS>|<-i|-u> <directories of .po files>]
- Make sure that LINGUAS only contains languages that a package can support. The first form allows you to specify a list of LINGUAS. The -i builds a list of po files found in all the directories and uses the intersection of the lists. The -u builds a list of po files found in all the directories and uses the union of the lists.
- make_wrapper <wrapper> <target> [chdir] [libpaths] [installpath]
- Create a shell wrapper script named wrapper in installpath (defaults to the bindir) to execute target (default of wrapper) by first optionally setting LD_LIBRARY_PATH to the colon-delimited libpaths followed by optionally changing directory to chdir.
- use_if_iuse <flag>
Return true if the given flag is in USE and IUSE.
Note that this function should not be used in the global scope.
- optfeature <short description> <package atom to match> [other atoms]
Print out a message suggesting an optional package (or packages)
not currently installed which provides the described functionality.
The following snippet would suggest app-misc/foo for optional foo support, app-misc/bar or app-misc/baz[bar] for optional bar support and either both app-misc/a and app-misc/b or app-misc/c for alphabet support.
optfeature "foo support" app-misc/foo optfeature "bar support" app-misc/bar app-misc/baz[bar] optfeature "alphabet support" "app-misc/a app-misc/b" app-misc/c
- usex <USE flag> [true output] [false output] [true suffix] [false suffix]
- Proxy to declare usex for package managers or EAPIs that do not provide it and use the package manager implementation when available (i.e. EAPI >= 5). If USE flag is set, echo [true output][true suffix] (defaults to "yes"), otherwise echo [false output][false suffix] (defaults to "no").
Install documentation using DOCS and HTML_DOCS, in EAPIs that do not
provide this function. When available (i.e., in EAPI 6 or later),
the package manager implementation should be used instead.
If DOCS is declared and non-empty, all files listed in it are installed. The files must exist, otherwise the function will fail. In EAPI 4 and 5, DOCS may specify directories as well; in earlier EAPIs using directories is unsupported.
If DOCS is not declared, the files matching patterns given in the default EAPI implementation of src_install will be installed. If this is undesired, DOCS can be set to empty value to prevent any documentation from being installed.
If HTML_DOCS is declared and non-empty, all files and/or directories listed in it are installed as HTML docs (using dohtml).
Both DOCS and HTML_DOCS can either be an array or a whitespace- separated list. Whenever directories are allowed, '<directory>/.' may be specified in order to install all files within the directory without creating a sub-directory in docdir.
Passing additional options to dodoc and dohtml is not supported. If you needed such a thing, you need to call those helpers explicitly.
- in_iuse <flag>
Determines whether the given flag is in IUSE. Strips IUSE default
prefixes as necessary. In EAPIs where it is available (i.e., EAPI 6
or later), the package manager implementation should be used instead.
Note that this function must not be used in the global scope.
- eqawarn [message]
- Proxy to ewarn for package managers that don't provide eqawarn and use the PM implementation if available. Reuses PORTAGE_ELOG_CLASSES as set by the dev profile.
REPORTING BUGSPlease report bugs via https://bugs.gentoo.org/
This document was created by man2html, using the manual pages.
Time: 03:27:01 GMT, February 26, 2020