summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /eclass/xfconf.eclass
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'eclass/xfconf.eclass')
-rw-r--r--eclass/xfconf.eclass154
1 files changed, 154 insertions, 0 deletions
diff --git a/eclass/xfconf.eclass b/eclass/xfconf.eclass
new file mode 100644
index 000000000000..b35964495714
--- /dev/null
+++ b/eclass/xfconf.eclass
@@ -0,0 +1,154 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: xfconf.eclass
+# @MAINTAINER:
+# XFCE maintainers <xfce@gentoo.org>
+# @BLURB: Default XFCE ebuild layout
+# @DESCRIPTION:
+# Default XFCE ebuild layout
+
+# @ECLASS-VARIABLE: EAUTORECONF
+# @DESCRIPTION:
+# Run eautoreconf instead of elibtoolize if the variable is set
+
+if [[ -n ${EAUTORECONF} ]] ; then
+ AUTOTOOLS_AUTO_DEPEND=yes
+else
+ : ${AUTOTOOLS_AUTO_DEPEND:=no}
+fi
+
+# @ECLASS-VARIABLE: XFCONF
+# @DESCRIPTION:
+# This should be an array defining arguments for econf
+
+unset _xfconf_live
+[[ $PV == *9999* ]] && _xfconf_live=git-2
+
+inherit ${_xfconf_live} autotools 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.10"
+
+[[ -n $_xfconf_live ]] && _xfconf_deps+=" dev-util/gtk-doc ${_xfconf_m4}"
+[[ -n $EAUTORECONF ]] && _xfconf_deps+=" ${_xfconf_m4}"
+
+RDEPEND=""
+DEPEND="${_xfconf_deps}"
+
+unset _xfconf_deps
+unset _xfconf_m4
+
+case ${EAPI:-0} in
+ 5) ;;
+ *) die "Unknown EAPI." ;;
+esac
+
+[[ -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:
+# If IUSE has debug, return --enable-debug=minimum.
+# If USE debug is enabled, return --enable-debug which is the same as --enable-debug=yes.
+# If USE debug is enabled and the XFCONF_FULL_DEBUG variable is set, return --enable-debug=full.
+xfconf_use_debug() {
+ if has debug ${IUSE}; then
+ if use debug; then
+ if [[ -n $XFCONF_FULL_DEBUG ]]; then
+ echo "--enable-debug=full"
+ else
+ echo "--enable-debug"
+ fi
+ else
+ echo "--enable-debug=minimum"
+ fi
+ else
+ ewarn "${FUNCNAME} called without debug in IUSE"
+ 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:
+# Process PATCHES with epatch and run epatch_user followed by run of
+# elibtoolize, or eautoreconf if EAUTORECONF is set.
+xfconf_src_prepare() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"
+ epatch_user
+
+ if [[ -n $EAUTORECONF ]]; then
+ AT_M4DIR=${EPREFIX}/usr/share/xfce4/dev-tools/m4macros eautoreconf
+ else
+ elibtoolize
+ fi
+}
+
+# @FUNCTION: xfconf_src_configure
+# @DESCRIPTION:
+# Run econf with opts from the XFCONF array
+xfconf_src_configure() {
+ debug-print-function ${FUNCNAME} "$@"
+ [[ -n $_xfconf_live ]] && XFCONF+=( --enable-maintainer-mode )
+ econf "${XFCONF[@]}"
+}
+
+# @FUNCTION: xfconf_src_install
+# @DESCRIPTION:
+# Run emake install to DESTDIR, einstalldocs to process DOCS and
+# prune_libtool_files --all to always remove libtool files (.la)
+xfconf_src_install() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ # FIXME
+ if [[ -n $_xfconf_live ]] && ! [[ -e ChangeLog ]]; then
+ touch ChangeLog
+ fi
+
+ emake DESTDIR="${D}" "$@" install
+
+ einstalldocs
+
+ prune_libtool_files --all
+}
+
+# @FUNCTION: xfconf_pkg_preinst
+# @DESCRIPTION:
+# Run gnome2_icon_savelist
+xfconf_pkg_preinst() {
+ debug-print-function ${FUNCNAME} "$@"
+ gnome2_icon_savelist
+}
+
+# @FUNCTION: xfconf_pkg_postinst
+# @DESCRIPTION:
+# Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update
+xfconf_pkg_postinst() {
+ debug-print-function ${FUNCNAME} "$@"
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}
+
+# @FUNCTION: xfconf_pkg_postrm
+# @DESCRIPTION:
+# Run fdo-mime_{desktop,mime}_database_update and gnome2_icon_cache_update
+xfconf_pkg_postrm() {
+ debug-print-function ${FUNCNAME} "$@"
+ fdo-mime_desktop_database_update
+ fdo-mime_mime_database_update
+ gnome2_icon_cache_update
+}