# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/fdo-mime.eclass,v 1.10 2011/04/21 21:21:26 eva Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/fdo-mime.eclass,v 1.11 2011/08/09 18:43:05 darkside Exp $
# @ECLASS: fdo-mime.eclass
# @MAINTAINER: freedesktop-bugs@gentoo.org
# Updates the desktop database.
# Generates a list of mimetypes linked to applications that can handle them
fdo-mime_desktop_database_update() {
- if [ -x "/usr/bin/update-desktop-database" ]
+ has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
+ if [ -x "${EPREFIX}/usr/bin/update-desktop-database" ]
then
einfo "Updating desktop mime database ..."
- "/usr/bin/update-desktop-database" -q "${ROOT}/usr/share/applications"
+ "${EPREFIX}/usr/bin/update-desktop-database" -q "${EROOT}/usr/share/applications"
fi
}
# Update the mime database.
# Creates a general list of mime types from several sources
fdo-mime_mime_database_update() {
- if [ -x "/usr/bin/update-mime-database" ]
+ has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
+ if [ -x "${EPREFIX}/usr/bin/update-mime-database" ]
then
einfo "Updating shared mime info database ..."
- "/usr/bin/update-mime-database" "${ROOT}/usr/share/mime"
+ "${EPREFIX}/usr/bin/update-mime-database" "${EROOT%/}/usr/share/mime"
fi
}
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/nsplugins.eclass,v 1.24 2009/05/01 23:03:00 nirbheek Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/nsplugins.eclass,v 1.25 2011/08/09 18:47:40 darkside Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
# ${D}/usr/$(get_libdir)/${PLUGIN_DIR}. First argument should be
# the full path (without $D) to old plugin dir.
src_mv_plugins() {
+ has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}"
# Move plugins dir. We use keepdir so that it might not be unmerged
# by mistake ...
keepdir /usr/$(get_libdir)/${PLUGINS_DIR}
- cp -a "${D}"/$1/* "${D}"/usr/$(get_libdir)/${PLUGINS_DIR}
- rm -rf "${D}"/$1
+ cp -a "${ED}"/$1/* "${ED}"/usr/$(get_libdir)/${PLUGINS_DIR}
+ rm -rf "${ED}"/$1
dosym /usr/$(get_libdir)/${PLUGINS_DIR} $1
}
# ${ROOT}/usr/$(get_libdir)/${PLUGIN_DIR}. First argument should be
# the full path (without $ROOT) to old plugin dir.
pkg_mv_plugins() {
+ has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${ROOT}"
# Move old plugins dir
if [ -d "${ROOT}/$1" -a ! -L "${ROOT}/$1" ]
then
- mkdir -p "${ROOT}"/usr/$(get_libdir)/${PLUGINS_DIR}
- cp -a "${ROOT}"/$1/* "${ROOT}"/usr/$(get_libdir)/${PLUGINS_DIR}
- rm -rf "${ROOT}"/$1
+ mkdir -p "${EROOT}"/usr/$(get_libdir)/${PLUGINS_DIR}
+ cp -a "${EROOT}"/$1/* "${EROOT}"/usr/$(get_libdir)/${PLUGINS_DIR}
+ rm -rf "${EROOT}"/$1
fi
}