public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] RFC: Adding git-2.eclass support to xfconf.eclass, give it a glance
@ 2011-06-09 15:58 Samuli Suominen
  0 siblings, 0 replies; only message in thread
From: Samuli Suominen @ 2011-06-09 15:58 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

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


[-- Attachment #2: xfconf.eclass.patch --]
[-- Type: text/plain, Size: 3055 bytes --]

--- 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 {} +
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-06-09 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-09 15:58 [gentoo-dev] RFC: Adding git-2.eclass support to xfconf.eclass, give it a glance Samuli Suominen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox