2 # Copyright 1999-2011 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
5 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
7 [[ " ${FEATURES} " == *" force-prefix "* ]] || \
8 case "$EAPI" in 0|1|2) ED=${D} ;; esac
11 mandir="${ED}usr/share/man"
16 if [[ ! -d ${mandir} ]] ; then
17 eqawarn "QA Notice: prepman called with non-existent dir '${mandir#${ED}}'"
21 # replaced by controllable compression in EAPI 4
22 has "${EAPI}" 0 1 2 3 || exit 0
28 # use some heuristics to test if this is a real mandir
29 for subdir in "${mandir}"/man* "${mandir}"/*/man* ; do
30 [[ -d ${subdir} ]] && really_is_mandir=1 && break
33 [[ ${really_is_mandir} == 1 ]] && exec ecompressdir --queue "${mandir#${ED}}"