Gentoo Development Guide
X-MODULAR.ECLASS
Section: portage (5)Updated: May 2013
Index Return to Main Contents
NAME
x-modular.eclass - Reduces code duplication in the modularized X11 ebuilds.DESCRIPTION
This eclass makes trivial X ebuilds possible for apps, fonts, drivers, and more. Many things that would normally be done in various functions can be accessed by setting variables instead, such as patching, running eautoreconf, passing options to configure and installing docs.All you need to do in a basic ebuild is inherit this eclass and set DESCRIPTION, KEYWORDS and RDEPEND/DEPEND. If your package is hosted with the other X packages, you don't need to set SRC_URI. Pretty much everything else should be automatic.
FUNCTIONS
- x-modular_specs_check
- Make any necessary changes related to gcc specs (generally hardened)
- x-modular_dri_check
- Ensures the server supports DRI if building a driver with DRI support
- x-modular_server_supports_drivers_check
- Ensures the server SDK is installed if a driver is being built
- x-modular_unpack_source
- Simply unpack source code. Nothing else.
- x-modular_patch_source
- Apply all patches
- PATCHES
- If you have any patches to apply, set PATCHES to their locations and epatch will apply them. It also handles epatch-style bulk patches, if you know how to use them and set the correct variables. If you don't, read eutils.eclass.
- x-modular_reconf_source
- Run eautoreconf if necessary, and run elibtoolize.
- x-modular_src_prepare
- Prepare a package after unpacking, performing all X-related tasks.
- x-modular_src_unpack
- Unpack a package, performing all X-related tasks.
- x-modular_font_configure
- If a font package, perform any necessary configuration steps
- x-modular_debug_setup
- Set up CFLAGS for a debug build
- x-modular_src_configure
- Perform any necessary pre-configuration steps, then run configure
- CONFIGURE_OPTIONS
- Any extra options to pass to configure
- x-modular_src_make
- Run make.
- x-modular_src_compile
- Compile a package, performing all X-related tasks.
- x-modular_src_install
- Install a built package to ${D}, performing any necessary steps. Creates a ChangeLog from git if using live ebuilds.
- DOCS
- Any documentation to install via dodoc
- x-modular_pkg_preinst
- This function doesn't do anything right now, but it may in the future.
- x-modular_pkg_postinst
- Run X-specific post-installation tasks on the live filesystem. The only task right now is some setup for font packages.
- x-modular_pkg_postrm
- Run X-specific post-removal tasks on the live filesystem. The only task right now is some cleanup for font packages.
- setup_fonts
- Generates needed files for fonts and fixes font permissions
- remove_font_metadata
- Don't let the package install generated font files that may overlap with other packages. Instead, they're generated in pkg_postinst().
- install_driver_hwdata
- Installs device-to-driver mappings for system-config-display and anything else that uses hwdata.
- discover_font_dirs
- Deprecated. Sets up the now-unused FONT_DIRS variable.
- create_fonts_scale
- Create fonts.scale file, used by the old server-side fonts subsystem.
- create_fonts_dir
- Create fonts.dir file, used by the old server-side fonts subsystem.
- create_font_cache
- Create fonts.cache-1 files, used by the new client-side fonts subsystem.
ECLASS VARIABLES
- XDIR = "/usr"
- Directory prefix to use for everything. If you want to install to a non-default prefix (e.g., /opt/xorg), change XDIR. This has not been recently tested. You may need to uncomment the setting of datadir and mandir in x-modular_src_install() or add it back in if it's no longer there. You may also want to change the SLOT.
- SNAPSHOT ?= no
- If set to 'yes' and configure.ac exists, eautoreconf will run. Set before inheriting this eclass.
- MODULE
- The subdirectory to download source from. Possible settings are app, doc, data, util, driver, font, lib, proto, xserver. Set above the inherit to override the default autoconfigured module.
- FONT_DIR ?= ${PN##*-}
- If you're creating a font package and the suffix of PN is not equal to the subdirectory of /usr/share/fonts/ it should install into, set FONT_DIR to that directory or directories. Set before inheriting this eclass.
MAINTAINERS
Donnie Berkholz <dberkholz@gentoo.org> x11@gentoo.org
REPORTING BUGS
Please report bugs via http://bugs.gentoo.org/FILES
/usr/portage/eclass/x-modular.eclassSEE ALSO
ebuild(5)http://sources.gentoo.org/eclass/x-modular.eclass?view=log
Index
This document was created by man2html, using the manual pages.
Time: 03:25:01 GMT, May 25, 2013