OPTFEATURE.ECLASS
Section: eclass-manpages (5)Updated: Nov 2024
Index Return to Main Contents
NAME
optfeature.eclass - Advertise optional functionality that might be useful to usersSUPPORTED EAPIS
7 8FUNCTIONS
- optfeature_header [custom header for follow-up optfeature calls]
-
Set a custom header for follow-up optfeature calls, or reset to default
header by calling it without argument. This can not only be used to customize
the header but also to distinguish optfeature "groups", e.g. to list a number
of different possible database backends, and then a number of optional
regular runtime features.
The following snippet will leave the default header untouched for the first two optfeature calls. Then a custom header is set that is going to be displayed in case dev-db/a or dev-db/b are not installed.
pkg_postinst() { optfeature "foo support" app-misc/foo optfeature "bar support" app-misc/bar optfeature_header "Install optional database backends:" optfeature "a DB backend" dev-db/a optfeature "b DB backend" dev-db/b }
- 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.
pkg_postinst() { 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 }
MAINTAINERS
[email protected]REPORTING BUGS
Please report bugs via https://bugs.gentoo.org/FILES
optfeature.eclassSEE ALSO
ebuild(5)https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/optfeature.eclass
Index
This document was created by man2html, using the manual pages.
Time: 03:27:00 GMT, November 25, 2024