public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Benda XU" <heroxbd@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/heroxbd:master commit in: eclass/
Date: Mon, 23 May 2016 06:18:59 +0000 (UTC)	[thread overview]
Message-ID: <1463889781.eae808b55c1155d75825122ed5d875f7bf277c86.heroxbd@gentoo> (raw)
Message-ID: <20160523061859.xP57rzqvvDy5ahRoRBmp7gpGaQhGpXJ_IJwGaq9frLI@z> (raw)

commit:     eae808b55c1155d75825122ed5d875f7bf277c86
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 04:03:01 2016 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sun May 22 04:03:01 2016 +0000
URL:        https://gitweb.gentoo.org/dev/heroxbd.git/commit/?id=eae808b5

Revert "prefix.eclass: merged"

This reverts commit abe0e1cb5fc08292397e3c38895185ec9481c9dc.

 eclass/prefix.eclass | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/eclass/prefix.eclass b/eclass/prefix.eclass
new file mode 100644
index 0000000..1f3c4b0
--- /dev/null
+++ b/eclass/prefix.eclass
@@ -0,0 +1,52 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: prefix.eclass
+# @MAINTAINER:
+# Feel free to contact the Prefix team through <prefix@gentoo.org> if
+# you have problems, suggestions or questions.
+# @BLURB: Eclass to provide Prefix functionality
+# @DESCRIPTION:
+# Gentoo Prefix allows users to install into a self defined offset
+# located somewhere in the filesystem.  Prefix ebuilds require
+# additional functions and variables which are defined by this eclass.
+
+# @ECLASS-VARIABLE: EPREFIX
+# @DESCRIPTION:
+# The offset prefix of a Gentoo Prefix installation.  When Gentoo Prefix
+# is not used, ${EPREFIX} should be "".  Prefix Portage sets EPREFIX,
+# hence this eclass has nothing to do here in that case.
+# Note that setting EPREFIX in the environment with Prefix Portage sets
+# Portage into cross-prefix mode.
+if [[ ! ${EPREFIX+set} ]]; then
+	export EPREFIX=''
+fi
+
+
+# @FUNCTION: eprefixify
+# @USAGE: <list of to be eprefixified files>
+# @DESCRIPTION:
+# replaces @GENTOO_PORTAGE_EPREFIX@ with ${EPREFIX} for the given files,
+# dies if no arguments are given, a file does not exist, or changing a
+# file failed.
+eprefixify() {
+	[[ $# -lt 1 ]] && die "at least one argument required"
+
+	einfo "Adjusting to prefix ${EPREFIX:-/}"
+	local x
+	for x in "$@" ; do
+		if [[ -e ${x} ]] ; then
+			ebegin "  ${x##*/}"
+			sed -i -e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}|g" "${x}"
+			eend $? || die "failed to eprefixify ${x}"
+		else
+			die "${x} does not exist"
+		fi
+	done
+
+	return 0
+}
+
+
+# vim: tw=72:


             reply	other threads:[~2016-05-23  6:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-26  4:05 Benda XU [this message]
2016-05-23  6:18 ` [gentoo-commits] dev/heroxbd:master commit in: eclass/ Benda XU
  -- strict thread matches above, loose matches on Subject: below --
2017-11-27  1:09 [gentoo-commits] proj/android:master " Benda XU
2017-08-30  9:22 Benda XU
2017-08-07  6:12 Benda XU
2017-02-09  4:52 Benda XU
2017-01-07 14:29 Benda XU
2016-10-24 12:30 Benda XU
2016-07-21 12:38 Benda XU
2016-07-21  2:23 [gentoo-commits] dev/heroxbd:master " Benda XU
2016-07-21  2:19 ` [gentoo-commits] proj/android:master " Benda XU
2016-07-21  2:19 Benda XU
2016-06-24  3:07 Benda XU
2016-06-15 11:40 Benda XU
2016-06-15 10:56 Benda XU
2016-06-14  2:00 Benda XU
2016-06-07 10:48 Benda XU
2016-05-26  4:05 Benda XU
2016-05-26  4:05 Benda XU
2016-05-26  4:05 Benda XU
2016-05-23 16:15 [gentoo-commits] dev/heroxbd:master " Benda XU
2016-05-26  4:05 ` [gentoo-commits] proj/android:master " Benda XU
2016-05-23  6:18 [gentoo-commits] dev/heroxbd:master " Benda XU
2016-05-26  4:05 ` [gentoo-commits] proj/android:master " Benda XU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463889781.eae808b55c1155d75825122ed5d875f7bf277c86.heroxbd@gentoo \
    --to=heroxbd@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox