Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 296701 - installation prefix support (EAPI 3)
Summary: installation prefix support (EAPI 3)
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Conceptual/Abstract Ideas (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL: http://www.gentoo.org/proj/en/gentoo-...
Whiteboard:
Keywords:
Depends on:
Blocks: 296700
  Show dependency tree
 
Reported: 2009-12-13 06:54 UTC by Zac Medico
Modified: 2009-12-13 07:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2009-12-13 06:54:29 UTC
This includes support for installation prefix via new ED, EPREFIX, and EROOT variables which are set automatically by the package manager:

EPREFIX: the prefix that Portage was configured for during installation
ED:      "${D%/}${EPREFIX}/"
EROOT:   "${ROOT%/}${EPREFIX}/"

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:

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

Note that, for make-based packages, 'emake install DESTDIR=${D}' (with DESTDIR=${D} rather than ${ED}) is still preferred over einstall.
Comment 1 Zac Medico gentoo-dev 2009-12-13 06:55:54 UTC
This is supported by portage 2.1.7.14 and 2.2_rc59 with EAPI 3_pre2. See `man 5 ebuild` and/or the "EAPI 3_pre2" section of the html docs that are installed with USE=doc.