commit: aa7722c3d97d1bfea987ff74fba2b35ae278d046
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 3 23:11:32 2014 +0000
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org>
CommitDate: Mon Nov 3 23:11:32 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=aa7722c3
eclass/gnome2-utils.eclass: sync with gentoo-x86
Support for multilib gdk-pixbuf.
---
eclass/gnome2-utils.eclass | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/eclass/gnome2-utils.eclass b/eclass/gnome2-utils.eclass
index a70e322..3ec3c4d 100644
--- a/eclass/gnome2-utils.eclass
+++ b/eclass/gnome2-utils.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2-utils.eclass,v 1.33
2013/09/15 19:29:11 pacho Exp $
+# $Header: $
# @ECLASS: gnome2-utils.eclass
# @MAINTAINER:
@@ -52,12 +52,6 @@ esac
# Path to glib-compile-schemas
: ${GLIB_COMPILE_SCHEMAS:="/usr/bin/glib-compile-schemas"}
-# @ECLASS-VARIABLE: GDK_PIXBUF_UPDATE_BIN
-# @INTERNAL
-# @DESCRIPTION:
-# Path to gdk-pixbuf-query-loaders
-: ${GDK_PIXBUF_UPDATE_BIN:="/usr/bin/gdk-pixbuf-query-loaders"}
-
# @ECLASS-VARIABLE: GNOME2_ECLASS_SCHEMAS
# @INTERNAL
# @DEFAULT_UNSET
@@ -409,7 +403,7 @@ gnome2_schemas_update() {
gnome2_gdk_pixbuf_savelist() {
has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
pushd "${ED}" 1>/dev/null
- export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find
"usr/$(get_libdir)/gdk-pixbuf-2.0" -type f 2>/dev/null)
+ export GNOME2_ECLASS_GDK_PIXBUF_LOADERS=$(find usr/lib*/gdk-pixbuf-2.0
-type f 2>/dev/null)
popd 1>/dev/null
}
@@ -420,7 +414,11 @@ gnome2_gdk_pixbuf_savelist() {
# This function should be called from pkg_postinst and pkg_postrm.
gnome2_gdk_pixbuf_update() {
has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT="${ROOT}"
- local updater="${EROOT}${GDK_PIXBUF_UPDATE_BIN}"
+ local updater="${EROOT}/usr/bin/${CHOST}-gdk-pixbuf-query-loaders"
+
+ if [[ ! -x ${updater} ]]; then
+ updater="${EROOT}/usr/bin/gdk-pixbuf-query-loaders"
+ fi
if [[ ! -x ${updater} ]]; then
debug-print "${updater} is not executable"
@@ -436,7 +434,8 @@ gnome2_gdk_pixbuf_update() {
local tmp_file=$(mktemp -t tmp.XXXXXXXXXX_gdkpixbuf)
${updater} 1> "${tmp_file}" &&
chmod 0644 "${tmp_file}" &&
- mv -f "${tmp_file}"
"${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache"
+ cp -f "${tmp_file}"
"${EROOT}usr/$(get_libdir)/gdk-pixbuf-2.0/2.10.0/loaders.cache" &&
+ rm "${tmp_file}" # don't replace this with mv, required for SELinux
support
eend $?
}