summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJeremy Olexa <darkside@gentoo.org>2011-08-09 18:47:40 +0000
committerJeremy Olexa <darkside@gentoo.org>2011-08-09 18:47:40 +0000
commit101d42fa449649e51f7eaee69eb37ee7e5d427b6 (patch)
treec27436149c58b8060b032f2a463570516f9d21db /eclass
parentVersion bump with libpng15 compability patch wrt #378469 by Diego Elio Pettenò (diff)
downloadhistorical-101d42fa449649e51f7eaee69eb37ee7e5d427b6.tar.gz
historical-101d42fa449649e51f7eaee69eb37ee7e5d427b6.tar.bz2
historical-101d42fa449649e51f7eaee69eb37ee7e5d427b6.zip
migrate Gentoo Prefix changes
Diffstat (limited to 'eclass')
-rw-r--r--eclass/fdo-mime.eclass12
-rw-r--r--eclass/nsplugins.eclass14
2 files changed, 15 insertions, 11 deletions
diff --git a/eclass/fdo-mime.eclass b/eclass/fdo-mime.eclass
index e37699979ac4..eae5c1f5b89a 100644
--- a/eclass/fdo-mime.eclass
+++ b/eclass/fdo-mime.eclass
@@ -1,6 +1,6 @@
# 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
@@ -15,10 +15,11 @@
# 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
}
@@ -27,9 +28,10 @@ fdo-mime_desktop_database_update() {
# 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
}
diff --git a/eclass/nsplugins.eclass b/eclass/nsplugins.eclass
index fc95ed3f89e2..fa456c8eeb82 100644
--- a/eclass/nsplugins.eclass
+++ b/eclass/nsplugins.eclass
@@ -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/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>
#
@@ -16,12 +16,13 @@ PLUGINS_DIR="nsbrowser/plugins"
# ${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
}
@@ -29,13 +30,14 @@ src_mv_plugins() {
# ${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
}