.DS
.nf
-# Copyright 1999\-2007 Gentoo Foundation
+# Copyright 1999\-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
+EAPI="3"
+
inherit some_eclass another_eclass
DESCRIPTION="Super\-useful stream editor (sed)"
RDEPEND=""
DEPEND="nls? ( sys-devel/gettext )"
-src_compile() {
+src_configure() {
econf \\
- \-\-bindir=/bin
- emake || die "emake failed"
+ \-\-bindir="${EPREFIX}"/bin
}
src_install() {
Contains the path to the 'files' sub folder in the package specific
location in the portage tree. Do not modify this variable.
.TP
+.B 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}. Do not modify this
+variable.
+.TP
\fBS\fR = \fI"${WORKDIR}/${P}"\fR
Contains the path to the temporary \fIbuild directory\fR. This variable
is used by the functions \fIsrc_compile\fR and \fIsrc_install\fR. Both
operation that does not involve the helper tools and functions (found below)
should be prefixed with ${D}. Do not modify this variable.
.TP
+\fBED\fT = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/image/${EPREFIX}"\fR
+Contains the path "${D}${EPREFIX}" for convenience purposes. Do not
+modify this variable.
+.TP
.B PORTAGE_LOG_FILE
Contains the path of the build log. If \fBPORT_LOGDIR\fR variable is unset then
\fBPORTAGE_LOG_FILE\fR=\fB"${T}/build.log"\fR.
When packages wish to make changes to the live filesystem, they should do so in
the tree prefixed by ${ROOT}. Do not modify this variable.
.TP
+\fBEROOT\fR = \fI"${ROOT}${EPREFIX%/}"\fR
+Contains "${ROOT}${EPREFIX%/}" for convenience purposes. Do not modify
+this variable.
+.TP
\fBDESCRIPTION\fR = \fI"A happy little package"\fR
Should contain a short description of the package.
.TP
This is used as a replacement for configure. Performs:
.nf
${\fIECONF_SOURCE\fR:-.}/configure \\
- \-\-prefix=/usr \\
- \-\-host=${CHOST} \\
- \-\-mandir=/usr/share/man \\
- \-\-infodir=/usr/share/info \\
- \-\-datadir=/usr/share \\
- \-\-sysconfdir=/etc \\
- \-\-localstatedir=/var/lib \\
+ \-\-prefix="${EPREFIX}"/usr \\
+ \-\-host="${EPREFIX}${CHOST} \\
+ \-\-mandir="${EPREFIX}"/usr/share/man \\
+ \-\-infodir="${EPREFIX}"/usr/share/info \\
+ \-\-datadir="${EPREFIX}"/usr/share \\
+ \-\-sysconfdir="${EPREFIX}"/etc \\
+ \-\-localstatedir="${EPREFIX}"/var/lib \\
\fI${EXTRA_ECONF}\fR \\
\fIconfigure options\fR || die "econf failed"
.fi
This is used as a replacement for make install. Performs:
.nf
make \\
- prefix=${D}/usr \\
- datadir=${D}/usr/share \\
- infodir=${D}/usr/share/info \\
- localstatedir=${D}/var/lib \\
- mandir=${D}/usr/share/man \\
- sysconfdir=${D}/etc \\
+ prefix=${ED}/usr \\
+ datadir=${ED}/usr/share \\
+ infodir=${ED}/usr/share/info \\
+ localstatedir=${ED}/var/lib \\
+ mandir=${ED}/usr/share/man \\
+ sysconfdir=${ED}/etc \\
\fI${EXTRA_EINSTALL}\fR \\
\fImake options\fR \\
install
does \fI*not*\fR run \fBprepalldocs\fR.
.TP
.B prepalldocs:
-Compresses all doc files in ${D}/usr/share/doc.
+Compresses all doc files in ${ED}/usr/share/doc.
.TP
.B prepallinfo:
-Compresses all info files in ${D}/usr/share/info.
+Compresses all info files in ${ED}/usr/share/info.
.TP
.B prepallman:
-Compresses all man files in ${D}/usr/share/man.
+Compresses all man files in ${ED}/usr/share/man.
.TP
.B prepallstrip:
Strips all executable files of debugging symboles. This includes libraries.
.B prepinfo:
If a \fIdir\fR is not specified, then \fBprepinfo\fR will assume the dir
\fIusr\fR. \fBprepinfo\fR will then compress all the files in
-${D}/\fIdir\fR/info.
+${ED}/\fIdir\fR/info.
.TP
.B prepman:
If a \fIdir\fR is not specified, then \fBprepman\fR will assume the dir
\fIusr\fR. \fBprepman\fR will then compress all the files in
-${D}/\fIdir\fR/man/*/.
+${ED}/\fIdir\fR/man/*/.
.TP
.B prepstrip:
-All the files found in ${D}/\fIdir\fR will be stripped. You may specify
+All the files found in ${ED}/\fIdir\fR will be stripped. You may specify
multiple directories.
.RE
.PD 1
.TP
\fBdosed\fR \fI"s:orig:change:g" <filename>\fR
-Performs sed in place on \fIfilename\fR inside ${D}. If no expression is
-given then \fI"s:${D}::g"\fR is used as the default expression.
+Performs sed in place on \fIfilename\fR inside ${ED}. If no expression is
+given then \fI"s:${D}::g"\fR is used as the default expression. Note
+that this expression does \fBNOT\fR use the offset prefix.
.br
.BR 'dosed\ "s:/usr/local:/usr:g"\ /usr/bin/some\-script'
-runs sed on ${D}/usr/bin/some\-script
+runs sed on ${ED}/usr/bin/some\-script
.TP
\fBdodir\fR \fI<path>\fR
-Creates a directory inside of ${D}.
+Creates a directory inside of ${ED}.
.br
.BR 'dodir\ /usr/lib/apache'
-creates ${D}/usr/lib/apache. Note that the do* functions will run
+creates ${ED}/usr/lib/apache. Note that the do* functions will run
\fBdodir\fR for you.
.TP
\fBdiropts\fR \fI[options for install(1)]\fR
Nicholas Jones <carpaski@gentoo.org>
Mike Frysinger <vapier@gentoo.org>
Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@gmail.com>
+Fabian Groffen <grobian@gentoo.org>
.fi
.SH "FILES"
.TP
_env_blacklist = [
"A", "AA", "CATEGORY", "DEPEND", "DESCRIPTION", "EAPI",
- "EBUILD_PHASE", "ED", "EMERGE_FROM", "EPREFIX", "EROOT",
+ "EBUILD_PHASE", "EMERGE_FROM", "EPREFIX", "EROOT",
"HOMEPAGE", "INHERITED", "IUSE",
"KEYWORDS", "LICENSE", "PDEPEND", "PF", "PKGUSE",
"PORTAGE_CONFIGROOT", "PORTAGE_IUSE",
"ACCEPT_LICENSE", "BASH_ENV", "BUILD_PREFIX", "D",
"DISTDIR", "DOC_SYMLINKS_DIR", "EBUILD",
"EBUILD_EXIT_STATUS_FILE", "EBUILD_FORCE_TEST",
- "EBUILD_PHASE", "ECLASSDIR", "ECLASS_DEPTH", "EMERGE_FROM",
+ "EBUILD_PHASE", "ECLASSDIR", "ECLASS_DEPTH", "ED",
+ "EMERGE_FROM", "EPREFIX", "EROOT",
"FEATURES", "FILESDIR", "HOME", "NOCOLOR", "PATH",
"PKGDIR",
"PKGUSE", "PKG_LOGDIR", "PKG_TMPDIR",
self["ROOT"] = target_root
self.backup_changes("ROOT")
+ # Prefix forward compatability, set EPREFIX to the empty string
+ self["EPREFIX"] = ''
+ self.backup_changes("EPREFIX")
+ self["EROOT"] = target_root
+ self.backup_changes("EROOT")
+
self.pusedict = {}
self.pkeywordsdict = {}
self._plicensedict = {}
_validate_cache_for_unsupported_eapis = False
_glep_55_enabled = True
+ # inject EPREFIX as it needs to be available using portageq
+ # TODO: this is just forward compatability, need to use EPREFIX
+ self["EPREFIX"] = ''
+
for k in self._case_insensitive_vars:
if k in self:
self[k] = self[k].lower()
# due to how it's coded... Don't overwrite this so we can use it.
mysettings["PORTAGE_DEBUG"] = "1"
+ # Prefix forward compatability
+ mysettings["EPREFIX"] = ''
+ mysettings["EROOT"] = myroot
+
mysettings["ROOT"] = myroot
mysettings["STARTDIR"] = getcwd()
mysettings["EBUILD"] = ebuild_path
mysettings["D"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image") + os.sep
mysettings["T"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "temp")
+ # Prefix forward compatability
+ mysettings["ED"] = mysettings["D"]
+
mysettings["PORTAGE_BASHRC"] = os.path.join(
mysettings["PORTAGE_CONFIGROOT"], EBUILD_SH_ENV_FILE)
mysettings["EBUILD_EXIT_STATUS_FILE"] = os.path.join(