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] proj/android:master commit in: eclass/
Date: Thu, 26 May 2016 04:05:01 +0000 (UTC)	[thread overview]
Message-ID: <1463889828.da66246c68be060ea7484110fac298ac7fa4363d.heroxbd@gentoo> (raw)

commit:     da66246c68be060ea7484110fac298ac7fa4363d
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 04:03:48 2016 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Sun May 22 04:03:48 2016 +0000
URL:        https://gitweb.gentoo.org/proj/android.git/commit/?id=da66246c

prefix.eclass: add eprefixify_patch.

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

diff --git a/eclass/prefix.eclass b/eclass/prefix.eclass
index 1f3c4b0..101cce2 100644
--- a/eclass/prefix.eclass
+++ b/eclass/prefix.eclass
@@ -12,6 +12,8 @@
 # located somewhere in the filesystem.  Prefix ebuilds require
 # additional functions and variables which are defined by this eclass.
 
+inherit eutils
+
 # @ECLASS-VARIABLE: EPREFIX
 # @DESCRIPTION:
 # The offset prefix of a Gentoo Prefix installation.  When Gentoo Prefix
@@ -48,5 +50,28 @@ eprefixify() {
 	return 0
 }
 
+# @FUNCTION: eprefixify_patch
+# @USAGE: <list of patch files to be eprefixified>
+# @DESCRIPTION:
+# copies the patch files to ${T} and eprefixify before applying.
+# dies if no arguments are given, a file does not exist, or changing a
+# file failed.
+eprefixity_patch() {
+	[[ $# -lt 1 ]] && die "at least one argument required"
+
+	local x f
+	for x in "$@" ; do
+		if [[ -e ${x} ]] ; then
+			f=${x##*/}
+			cp "${x}" "${T}" || die "failed to copy patch"
+			eprefixify "${T}"/${f}
+			epatch "${T}"/${f}
+		else
+			die "${x} does not exist"
+		fi
+	done
+
+	return 0
+}
 
 # vim: tw=72:


WARNING: multiple messages have this Message-ID (diff)
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: <1463889828.da66246c68be060ea7484110fac298ac7fa4363d.heroxbd@gentoo> (raw)
Message-ID: <20160523061859.1JgUa0jDupo6h2BFM1dW9Frt9SBw_kvjmdZybLsKLTU@z> (raw)

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

prefix.eclass: add eprefixify_patch.

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

diff --git a/eclass/prefix.eclass b/eclass/prefix.eclass
index 1f3c4b0..101cce2 100644
--- a/eclass/prefix.eclass
+++ b/eclass/prefix.eclass
@@ -12,6 +12,8 @@
 # located somewhere in the filesystem.  Prefix ebuilds require
 # additional functions and variables which are defined by this eclass.
 
+inherit eutils
+
 # @ECLASS-VARIABLE: EPREFIX
 # @DESCRIPTION:
 # The offset prefix of a Gentoo Prefix installation.  When Gentoo Prefix
@@ -48,5 +50,28 @@ eprefixify() {
 	return 0
 }
 
+# @FUNCTION: eprefixify_patch
+# @USAGE: <list of patch files to be eprefixified>
+# @DESCRIPTION:
+# copies the patch files to ${T} and eprefixify before applying.
+# dies if no arguments are given, a file does not exist, or changing a
+# file failed.
+eprefixity_patch() {
+	[[ $# -lt 1 ]] && die "at least one argument required"
+
+	local x f
+	for x in "$@" ; do
+		if [[ -e ${x} ]] ; then
+			f=${x##*/}
+			cp "${x}" "${T}" || die "failed to copy patch"
+			eprefixify "${T}"/${f}
+			epatch "${T}"/${f}
+		else
+			die "${x} does not exist"
+		fi
+	done
+
+	return 0
+}
 
 # vim: tw=72:


             reply	other threads:[~2016-05-26  4:05 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=1463889828.da66246c68be060ea7484110fac298ac7fa4363d.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