Gentoo Development Guide

gnome2.eclass Reference

The gnome2.eclass provides functions for working with Gnome applications.

gnome2.eclass Variables

Variable Details
G2CONF You can set this variable to add configure options that are passed to econf. Always put this variable inside pkg_setup. Putting it outside pkg_setup is a QA violation.

For example:

pkg_setup() {
    G2CONF="--disable-scrollkeeper \
        $(use_enable eds)"
}

ELTCONF You can specify extra options to be passed to elibtoolize. elibtoolize is run for every package unless you override src_unpack / src_compile.
USE_EINSTALL You can specify to use einstall instead of the default, emake DESTDIR=${D} install. This usually means the package is broken and needs to be fixed. The fixes need to be sent upstream.
SCROLLKEEPER_UPDATE You can specify to not run scrollkeeper updates for a package.
DOCS You can specify a space seperated list of docs that will be install with the package. ( AUTHORS NEWS )

gnome2.eclass Functions

Function Details
gnome2_omf_fix This method prevents scrollkeeper-update from running. Almost all GNOME packages try to run scrollkeeper-update when trying to install/compile. When scrollkeeper-update runs, it creates the directory below, which writes outside the sandbox (see Sandbox). In addition, if it were to continue, it would overwrite your scrollkeeper_docs file with only the docs in the current build.

The method fixes all Makefile.in's, Makefile.am's, ${S}/omf-install/Makefile.in, and ${S}/omf.make. If any of the files are not one of the default, you can pass addition files as arguments.

gnome2_icon_cache_update This method updates the gtk icon cache. GTK does less work if the icons are cached.
src_unpack gnome2_omf_fix is called here so we don't have to put it in every ebuild. ( So many packages need it ) You must remember if you override src_unpack, you need to call gnome2_src_unpack, add gnome2_omf_fix in after the patches, or test to make sure gnome2_omf_fix not needed for that package.
src_configure Runs elibtoolize on the package, sets GST_REGISTRY variable to work around some access violations caused by gstreamer packages.
src_install Delays gconf schemas from being installed until postinst
gconf_install Installs GConf schema files using gconftool.
scrollkeeper_update Runs scrollkeeper update if SCROLLKEEPER_UPDATE is not 0.
pkg_postinst Calls gconf_install, scrollkeeper_update, fdo-mime_desktop_database_update, fdo-mime_mime_database_update, gnome2_icon_cache_update.
pkg_postrm Calls scrollkeeper_update, fdo-mime_desktop_database_update, fdo-mime_mime_database_update, gnome2_icon_cache_update.