commit:     56391fc876909f63d3f22c4f504459d96cb0c80b
Author:     Gregory M. Turner <gmt <AT> be-evil <DOT> net>
AuthorDate: Wed Dec 16 07:38:35 2015 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed Dec 16 23:10:06 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56391fc8

sys-apps/install-xattr: support EPREFIX and tidy

As implemented install-xattr ebuilds fail on prefix due
to a hard-coded path in the (also hard-coded) Makefile.
Patch that up; while we're at it, tidy up the ebuilds
a bit.

Signed-off-by: Gregory M. Turner <gmt <AT> be-evil.net>

 sys-apps/install-xattr/install-xattr-9999.ebuild | 25 ++++++++----------------
 1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/sys-apps/install-xattr/install-xattr-9999.ebuild 
b/sys-apps/install-xattr/install-xattr-9999.ebuild
index 4273b3e..7ebd6fa 100644
--- a/sys-apps/install-xattr/install-xattr-9999.ebuild
+++ b/sys-apps/install-xattr/install-xattr-9999.ebuild
@@ -8,13 +8,16 @@ HOMEPAGE="https://dev.gentoo.org/~blueness/install-xattr/";
 
 inherit toolchain-funcs
 
+S="${WORKDIR}/${PN}"
+
 if [[ ${PV} == "9999" ]] ; then
        EGIT_REPO_URI="git://anongit.gentoo.org/proj/elfix.git"
-       inherit git-2
+       EGIT_CHECKOUT_DIR="${S}"
+       S+=/misc/${PN}
+       inherit git-r3
 else
        SRC_URI="https://dev.gentoo.org/~blueness/install-xattr/${P}.tar.bz2";
        KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 
~s390 ~sh ~sparc ~x86"
-       S=${WORKDIR}/${PN}
 fi
 
 LICENSE="GPL-3"
@@ -22,23 +25,11 @@ SLOT="0"
 
 src_prepare() {
        tc-export CC
-}
-
-src_compile() {
-       if [[ ${PV} == "9999" ]] ; then
-               cd "${WORKDIR}/${P}/misc/${PN}" || die
-       fi
-       default
-}
-
-src_install() {
-       if [[ ${PV} == "9999" ]] ; then
-               cd "${WORKDIR}/${P}/misc/${PN}" || die
-       fi
-       default
+       sed -e "s|^\\(PREFIX = \\)\\(/usr\\)$|\\1${EPREFIX}\\2|" \
+               -i Makefile || die "sed Makefile failed"
 }
 
 # We need to fix how tests are done
 src_test() {
-       true
+       return 0
 }

Reply via email to