From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q1QSj-00024X-2K for garchives@archives.gentoo.org; Sun, 20 Mar 2011 21:47:01 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A9500E031D; Sun, 20 Mar 2011 21:46:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 615BFE031D for ; Sun, 20 Mar 2011 21:46:53 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DBB2E1B4047 for ; Sun, 20 Mar 2011 21:46:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id E57158006A for ; Sun, 20 Mar 2011 21:46:51 +0000 (UTC) From: "Nirbheek Chauhan" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Nirbheek Chauhan" Message-ID: Subject: [gentoo-commits] proj/gnome:master commit in: eclass/ X-VCS-Repository: proj/gnome X-VCS-Files: eclass/gnome2-utils.eclass X-VCS-Directories: eclass/ X-VCS-Committer: nirbheek X-VCS-Committer-Name: Nirbheek Chauhan X-VCS-Revision: aeae4a681639753531354e5471dba3bb4b8aba8c Date: Sun, 20 Mar 2011 21:46:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 41ac359cb13b627509c6ec97ab7fb4c9 commit: aeae4a681639753531354e5471dba3bb4b8aba8c Author: Nirbheek Chauhan gentoo org> AuthorDate: Sun Mar 20 21:46:33 2011 +0000 Commit: Nirbheek Chauhan gentoo org> CommitDate: Sun Mar 20 21:46:33 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gnome.git;a=3D= commit;h=3Daeae4a68 gnome2-utils.eclass: moved to tree --- eclass/gnome2-utils.eclass | 268 --------------------------------------= ------ 1 files changed, 0 insertions(+), 268 deletions(-) diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass deleted file mode 100644 index c488dd9..0000000 --- a/eclass/gnome2-utils.eclass +++ /dev/null @@ -1,268 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.13 200= 8/10/22 21:04:53 eva Exp $ - -# -# gnome2-utils.eclass -# -# Set of auxiliary functions used to perform actions commonly needed by = packages -# using the GNOME framework. -# -# Maintained by Gentoo's GNOME herd -# - -case "${EAPI:-0}" in - 0|1|2|3) ;; - *) die "EAPI=3D${EAPI} is not supported" ;; -esac - -# Path to gconftool-2 -: ${GCONFTOOL_BIN:=3D"/usr/bin/gconftool-2"} - -# Directory where scrollkeeper-update should do its work -: ${SCROLLKEEPER_DIR:=3D"/var/lib/scrollkeeper"} - -# Path to scrollkeeper-update -: ${SCROLLKEEPER_UPDATE_BIN:=3D"/usr/bin/scrollkeeper-update"} - -# Path to gtk-update-icon-cache -: ${GTK_UPDATE_ICON_CACHE:=3D"/usr/bin/gtk-update-icon-cache"} - -# Path to glib-compile-schemas -: ${GLIB_COMPILE_SCHEMAS:=3D"/usr/bin/glib-compile-schemas"} - - - -DEPEND=3D">=3Dsys-apps/sed-4" - - - -# Find the GConf schemas that are about to be installed and save their l= ocation -# in the GNOME2_ECLASS_SCHEMAS environment variable -gnome2_gconf_savelist() { - has ${EAPI:-0} 0 1 2 && ! use prefix && ED=3D"${D}" - pushd "${ED}" &> /dev/null - export GNOME2_ECLASS_SCHEMAS=3D$(find 'etc/gconf/schemas/' -name '*.sch= emas' 2> /dev/null) - popd &> /dev/null -} - - -# Applies any schema files installed by the current ebuild to Gconf's da= tabase -# using gconftool-2 -gnome2_gconf_install() { - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" - local updater=3D"${EROOT}${GCONFTOOL_BIN}" - - if [[ ! -x "${updater}" ]]; then - debug-print "${updater} is not executable" - return - fi - - if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then - debug-print "No GNOME 2 GConf schemas found" - return - fi - - # We are ready to install the GCONF Scheme now - unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL - export GCONF_CONFIG_SOURCE=3D"$("${updater}" --get-default-source | sed= "s;:/;:${EROOT};")" - - einfo "Installing GNOME 2 GConf schemas" - - local F - for F in ${GNOME2_ECLASS_SCHEMAS}; do - if [[ -e "${EROOT}${F}" ]]; then - debug-print "Installing schema: ${F}" - "${updater}" --makefile-install-rule "${EROOT}${F}" 1>/dev/null - fi - done - - # have gconf reload the new schemas - pids=3D$(pgrep -x gconfd-2) - if [[ $? =3D=3D 0 ]] ; then - ebegin "Reloading GConf schemas" - kill -HUP ${pids} - eend $? - fi -} - - -# Removes schema files previously installed by the current ebuild from G= conf's -# database. -gnome2_gconf_uninstall() { - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" - local updater=3D"${EROOT}${GCONFTOOL_BIN}" - - if [[ ! -x "${updater}" ]]; then - debug-print "${updater} is not executable" - return - fi - - if [[ -z "${GNOME2_ECLASS_SCHEMAS}" ]]; then - debug-print "No GNOME 2 GConf schemas found" - return - fi - - unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL - export GCONF_CONFIG_SOURCE=3D"$("${updater}" --get-default-source | sed= "s;:/;:${EROOT};")" - - einfo "Uninstalling GNOME 2 GConf schemas" - - local F - for F in ${GNOME2_ECLASS_SCHEMAS}; do - if [[ -e "${EROOT}${F}" ]]; then - debug-print "Uninstalling gconf schema: ${F}" - "${updater}" --makefile-uninstall-rule "${EROOT}${F}" 1>/dev/null - fi - done - - # have gconf reload the new schemas - pids=3D$(pgrep -x gconfd-2) - if [[ $? =3D=3D 0 ]] ; then - ebegin "Reloading GConf schemas" - kill -HUP ${pids} - eend $? - fi -} - - -# Find the icons that are about to be installed and save their location -# in the GNOME2_ECLASS_ICONS environment variable -# That function should be called from pkg_preinst -gnome2_icon_savelist() { - has ${EAPI:-0} 0 1 2 && ! use prefix && ED=3D"${D}" - pushd "${ED}" &> /dev/null - export GNOME2_ECLASS_ICONS=3D$(find 'usr/share/icons' -maxdepth 1 -mind= epth 1 -type d 2> /dev/null) - popd &> /dev/null -} - - -# Updates Gtk+ icon cache files under /usr/share/icons if the current eb= uild -# have installed anything under that location. -gnome2_icon_cache_update() { - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" - local updater=3D"${EROOT}${GTK_UPDATE_ICON_CACHE}" - - if [[ ! -x "${updater}" ]] ; then - debug-print "${updater} is not executable" - return - fi - - if [[ -z "${GNOME2_ECLASS_ICONS}" ]]; then - debug-print "No icon cache to update" - return - fi - - ebegin "Updating icons cache" - - local retval=3D0 - local fails=3D( ) - - for dir in ${GNOME2_ECLASS_ICONS} - do - if [[ -f "${ROOT}${dir}/index.theme" ]] ; then - local rv=3D0 - - "${updater}" -qf "${EROOT}${dir}" - rv=3D$? - - if [[ ! $rv -eq 0 ]] ; then - debug-print "Updating cache failed on ${EROOT}${dir}" - - # Add to the list of failures - fails[$(( ${#fails[@]} + 1 ))]=3D"${EROOT}${dir}" - - retval=3D2 - fi - fi - done - - eend ${retval} - - for f in "${fails[@]}" ; do - eerror "Failed to update cache with icon $f" - done -} - - -# Workaround applied to Makefile rules in order to remove redundant -# calls to scrollkeeper-update and sandbox violations. -gnome2_omf_fix() { - local omf_makefiles filename - - omf_makefiles=3D"$@" - - if [[ -f ${S}/omf.make ]] ; then - omf_makefiles=3D"${omf_makefiles} ${S}/omf.make" - fi - - # testing fixing of all makefiles found - # The sort is important to ensure .am is listed before the respective .= in for - # maintainer mode regeneration not kicking in due to .am being newer th= an .in - for filename in $(find ./ -name "Makefile.in" -o -name "Makefile.am" |s= ort) ; do - omf_makefiles=3D"${omf_makefiles} ${filename}" - done - - ebegin "Fixing OMF Makefiles" - - local retval=3D0 - local fails=3D( ) - - for omf in ${omf_makefiles} ; do - local rv=3D0 - - sed -i -e 's:scrollkeeper-update:true:' "${omf}" - retval=3D$? - - if [[ ! $rv -eq 0 ]] ; then - debug-print "updating of ${omf} failed" - - # Add to the list of failures - fails[$(( ${#fails[@]} + 1 ))]=3D$omf - - retval=3D2 - fi - done - - eend $retval - - for f in "${fails[@]}" ; do - eerror "Failed to update OMF Makefile $f" - done -} - - -# Updates the global scrollkeeper database. -gnome2_scrollkeeper_update() { - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" - if [[ -x "${EROOT}${SCROLLKEEPER_UPDATE_BIN}" ]]; then - einfo "Updating scrollkeeper database ..." - "${EROOT}${SCROLLKEEPER_UPDATE_BIN}" -q -p "${EROOT}${SCROLLKEEPER_DIR= }" - fi -} - -gnome2_schemas_savelist() { - has ${EAPI:-0} 0 1 2 && ! use prefix && ED=3D"${D}" - pushd "${ED}" &>/dev/null - export GNOME2_ECLASS_GLIB_SCHEMAS=3D$(find 'usr/share/glib-2.0/schemas'= -name '*.gschema.xml' 2>/dev/null) - popd &>/dev/null -} - -gnome2_schemas_update() { - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=3D"${ROOT}" - local updater=3D"${EROOT}${GLIB_COMPILE_SCHEMAS}" - - if [[ ! -x ${updater} ]]; then - debug-print "${updater} is not executable" - return - fi - - if [[ -z ${GNOME2_ECLASS_GLIB_SCHEMAS} ]]; then - debug-print "No GSettings schemas to update" - return - fi - - ebegin "Updating GSettings schemas" - ${updater} --allow-any-name "$@" "${EROOT%/}/usr/share/glib-2.0/schemas= " &>/dev/null - eend $? -}