This patch will insert git-2.eclass support to xfconf.eclass.   I'm
looking for more eyes on this.

We have tested this working with the packages in tree, and the xfce
overlay with live ebuilds.

Note that this is just first step, and second patch will follow for
cleanups after this gets committed. I don't want to push everything at
once to keep this readable.

Thanks, Samuli

--- gentoo-x86/eclass/xfconf.eclass     2011-06-06 17:38:46.000000000 +0300
+++ xfconf.eclass       2011-06-09 18:54:45.000000000 +0300
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/xfconf.eclass,v 1.35 2011/06/06 
14:38:46 angelos Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/xfconf.eclass,v 1.34 2011/05/19 
22:39:07 ssuominen Exp $
 
 # @ECLASS: xfconf.eclass
 # @MAINTAINER:
@@ -17,41 +17,38 @@
 # @DESCRIPTION:
 # Run intltoolize --force --copy --automake if the variable is set
 
-# @ECLASS-VARIABLE: DOCS
-# @DESCRIPTION:
-# This should be an array defining documentation to install
-
-# @ECLASS-VARIABLE: PATCHES
-# @DESCRIPTION:
-# This should be an array defining patches to apply
-
 # @ECLASS-VARIABLE: XFCONF
 # @DESCRIPTION:
 # This should be an array defining arguments for econf
 
-inherit autotools base eutils fdo-mime gnome2-utils libtool
+[[ $PV == *9999* ]] && _xfconf_live=git-2
+
+inherit ${_xfconf_live} autotools base eutils fdo-mime gnome2-utils libtool
+
+EGIT_BOOTSTRAP="autogen.sh"
+EGIT_REPO_URI="git://git.xfce.org/xfce/${MY_PN:-${PN}}"
+
+_xfconf_deps=""
+_xfconf_m4=">=dev-util/xfce4-dev-tools-4.8.0"
 
-if [[ -n $EINTLTOOLIZE ]]; then
-       _xfce4_intltool="dev-util/intltool"
-fi
-
-if [[ -n $EAUTORECONF ]]; then
-       _xfce4_m4=">=dev-util/xfce4-dev-tools-4.8.0"
-fi
+[[ -n $_xfconf_live ]] && _xfconf_deps+=" dev-util/gtk-doc ${_xfconf_m4}"
+[[ -n $EINTLTOOLIZE ]] && _xfconf_deps+=" dev-util/intltool"
+[[ -n $EAUTORECONF ]] && _xfconf_deps+=" ${_xfconf_m4}"
 
 RDEPEND=""
-DEPEND="${_xfce4_intltool}
-       ${_xfce4_m4}"
+DEPEND="${_xfconf_deps}"
 
-unset _xfce4_intltool
-unset _xfce4_m4
+unset _xfconf_deps
+unset _xfconf_m4
 
 case ${EAPI:-0} in
        4|3) ;;
        *) die "Unknown EAPI." ;;
 esac
 
-EXPORT_FUNCTIONS src_prepare src_configure src_install pkg_preinst 
pkg_postinst pkg_postrm
+[[ -n $_xfconf_live ]] && _xfconf_live=src_unpack
+
+EXPORT_FUNCTIONS ${_xfconf_live} src_prepare src_configure src_install 
pkg_preinst pkg_postinst pkg_postrm
 
 # @FUNCTION: xfconf_use_debug
 # @DESCRIPTION:
@@ -74,6 +71,13 @@
        fi
 }
 
+# @FUNCTION: xfconf_src_unpack
+# @DESCRIPTION:
+# Run git-2_src_unpack if required
+xfconf_src_unpack() {
+       NOCONFIGURE=1 git-2_src_unpack
+}
+
 # @FUNCTION: xfconf_src_prepare
 # @DESCRIPTION:
 # Run base_src_prepare and eautoreconf or elibtoolize
@@ -100,6 +104,7 @@
 # Run econf with opts from the XFCONF array
 xfconf_src_configure() {
        debug-print-function ${FUNCNAME} "$@"
+       [[ -n $_xfconf_live ]] && XFCONF+=( --enable-maintainer-mode )
        econf "${XFCONF[@]}"
 }
 
@@ -108,9 +113,13 @@
 # Run emake install and install documentation in the DOCS array
 xfconf_src_install() {
        debug-print-function ${FUNCNAME} "$@"
-       emake DESTDIR="${D}" "$@" install || die
 
-       [[ -n ${DOCS[@]} ]] && dodoc "${DOCS[@]}"
+       # FIXME
+       if [[ -n $_xfconf_live ]] && ! [[ -e ChangeLog ]]; then
+               touch ChangeLog
+       fi
+
+       base_src_install "$@" || die
 
        find "${ED}" -name '*.la' -exec rm -f {} +
 

Reply via email to