summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@gentoo.org>2009-06-04 10:55:01 +0530
committerNirbheek Chauhan <nirbheek@gentoo.org>2009-06-04 13:15:29 +0530
commit74ffa80e19a301c5bf9ede1346532298194665a5 (patch)
treec693305cc4969950dd6b75f769ca9744f3efdfb7
parentx11-plugins/gtkparasite: ebuild review. (diff)
downloadgnome-live-74ffa80e19a301c5bf9ede1346532298194665a5.tar.gz
gnome-live-74ffa80e19a301c5bf9ede1346532298194665a5.tar.bz2
gnome-live-74ffa80e19a301c5bf9ede1346532298194665a5.zip
gnome2-live.eclass: Update for upstream git move
* PATCHES variable is no longer relative to ${FILESDIR} * cd $S after git_src_unpack
-rw-r--r--eclass/gnome2-live.eclass36
1 files changed, 25 insertions, 11 deletions
diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
index 6cff5a6..042198c 100644
--- a/eclass/gnome2-live.eclass
+++ b/eclass/gnome2-live.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
@@ -6,13 +6,22 @@
# gnome2-live.eclass
#
# Exports additional functions used by live ebuilds written for GNOME packages
-# Always to be imported *after* gnome2.eclass
+# Always to be imported *AFTER* gnome2.eclass
#
-# Author: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
+# Author: Nirbheek Chauhan <nirbheek@gentoo.org>
#
-inherit autotools gnome2 gnome2-utils libtool subversion
+inherit autotools gnome2 gnome2-utils libtool git
+
+# Stolen from git.eclass
+EXPORTED_FUNCTIONS="src_unpack pkg_postinst"
+case "${EAPI:-0}" in
+ 2) EXPORTED_FUNCTIONS="${EXPORTED_FUNCTIONS} src_prepare" ;;
+ 0|1) ;;
+ *) die "Unknown EAPI, Bug eclass maintainers." ;;
+esac
+EXPORT_FUNCTIONS ${EXPORTED_FUNCTIONS}
# DEPEND on dev-util/gtk-doc for gtkdocize
DEPEND="${DEPEND}
@@ -22,10 +31,10 @@ DEPEND="${DEPEND}
ELTCONF=${ELTCONF:-}
# Default module svn path
-MODPATH=${MODPATH:-"${PN}/trunk"}
+MODPATH=${MODPATH:-"${PN}"}
# SVN URI for the project
-ESVN_REPO_URI="http://svn.gnome.org/svn/${MODPATH}"
+EGIT_REPO_URI="git://git.gnome.org/${MODPATH}"
# Unset SRC_URI auto-set by gnome2.eclass
SRC_URI=""
@@ -34,13 +43,15 @@ gnome2-live_src_unpack() {
if test -n "${A}"; then
unpack ${A}
fi
- subversion_src_unpack
- [[ "${EAPI}" != 2 ]] && gnome2-live_src_prepare
+ git_src_unpack
+ has src_prepare ${EXPORTED_FUNCTIONS} || gnome2-live_src_prepare
}
gnome2-live_src_prepare() {
+ # Blame git.eclass
+ cd "${S}"
for i in ${PATCHES}; do
- epatch "${FILESDIR}/${i}"
+ epatch "${i}"
done
gtkdocize
@@ -70,11 +81,14 @@ gnome2_src_unpack() {
gnome2-live_src_unpack
}
+# So that it replaces gnome2_src_prepare in ebuilds that call it
+gnome2_src_prepare() {
+ gnome2-live_src_prepare
+}
+
# Run manually for ebuilds that have a custom pkg_postinst
gnome2-live_pkg_postinst() {
ewarn "This is a live ebuild, upstream trunks will mostly be UNstable"
ewarn "Do NOT report bugs about this package to Gentoo"
ewarn "Report upstream bugs (with patches if possible) instead."
}
-
-EXPORT_FUNCTIONS src_unpack src_prepare pkg_postinst