2 # Copyright 1999-2012 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
5 # Do not compress man pages which are smaller than this (in bytes). #169260
8 source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
10 if ! ___eapi_has_prefix_variables; then
15 mandir="${ED}usr/share/man"
20 if [[ ! -d ${mandir} ]] ; then
21 eqawarn "QA Notice: prepman called with non-existent dir '${mandir#${ED}}'"
25 # replaced by controllable compression in EAPI 4
26 ___eapi_has_docompress && exit 0
32 # use some heuristics to test if this is a real mandir
33 for subdir in "${mandir}"/man* "${mandir}"/*/man* ; do
34 [[ -d ${subdir} ]] && really_is_mandir=1 && break
37 [[ ${really_is_mandir} == 1 ]] && exec ecompressdir --limit ${SIZE_LIMIT} --queue "${mandir#${ED}}"