# EAPI 3

## Helpers

### unpack

#### Support for the xz file extension

The unpack helper now supports the xz file extension.

## Support for installation prefix

### Helpers

Beginning with EAPI 3, all helpers use ${ED} instead of ${D} when appropriate. For example, see econf and einstall below.

#### econf

    ${ECONF_SOURCE:-.}/configure \
    	${CBUILD:+--build=${CBUILD}} \
    	--datadir="${EPREFIX}"/usr/share \
    	--host=${CHOST} \
    	--infodir="${EPREFIX}"/usr/share/info \
    	--localstatedir="${EPREFIX}"/var/lib \
    	--prefix="${EPREFIX}"/usr \
    	--mandir="${EPREFIX}"/usr/share/man \
    	--sysconfdir="${EPREFIX}"/etc \
    	${CTARGET:+--target=${CTARGET}} \
    	${EXTRA_ECONF} \
    	configure options || die "econf failed"

#### einstall

Note that, for make-based packages, 'emake install DESTDIR=${D}' (with DESTDIR=${D} rather than ${ED}) is still preferred over einstall.

    make \
    	prefix=${ED}/usr \
    	datadir=${ED}/usr/share \
    	infodir=${ED}/usr/share/info \
    	localstatedir=${ED}/var/lib \
    	mandir=${ED}/usr/share/man \
    	sysconfdir=${ED}/etc \
    	${EXTRA_EINSTALL} \
    	make options \
    	install

### Variables

#### Installation Prefix Variables

Variable Name | Description
--- | ---
ED | Contains the path "${D%/}${EPREFIX}/" for convenience purposes. For EAPI values prior to EAPI 3 which do not support ${ED}, helpers use ${D} where they would otherwise use ${ED}. Do not modify this variable.
EPREFIX | Contains the offset that this Portage was configured for during installation. The offset is sometimes necessary in an ebuild or eclass, and is available in such cases as ${EPREFIX}. EPREFIX does not contain a trailing slash, therefore an absent offset is represented by the empty string. Do not modify this variable.
EROOT | Contains "${ROOT%/}${EPREFIX}/" for convenience purposes. Do not modify this variable.