diff options
author | Donnie Berkholz <dberkholz@gentoo.org> | 2006-10-17 14:06:55 -0700 |
---|---|---|
committer | Donnie Berkholz <dberkholz@gentoo.org> | 2006-10-17 14:06:55 -0700 |
commit | 3a7d1c6aa33b3c89b3b2ec9d83e5a9ea3a1d4941 (patch) | |
tree | 2a11fb0b06ee4e280fcbd276b51b704229024668 | |
parent | Add x-modular eclass for some reworking (diff) | |
download | dberkholz-3a7d1c6aa33b3c89b3b2ec9d83e5a9ea3a1d4941.tar.gz dberkholz-3a7d1c6aa33b3c89b3b2ec9d83e5a9ea3a1d4941.tar.bz2 dberkholz-3a7d1c6aa33b3c89b3b2ec9d83e5a9ea3a1d4941.zip |
x-modular.eclass: stop using two different ways to detect font directories.
-rw-r--r-- | eclass/x-modular.eclass | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/eclass/x-modular.eclass b/eclass/x-modular.eclass index a5e25ea..4c2b792 100644 --- a/eclass/x-modular.eclass +++ b/eclass/x-modular.eclass @@ -366,9 +366,8 @@ x-modular_src_install() { } x-modular_pkg_preinst() { - if [[ -n "${FONT}" ]]; then - discover_font_dirs - fi + # We no longer do anything here, but we can't remove it from the API + : } x-modular_pkg_postinst() { @@ -419,8 +418,8 @@ cleanup_fonts() { } setup_fonts() { - if [[ ! -n "${FONT_DIRS}" ]]; then - msg="FONT_DIRS is empty. The ebuild should set it to at least one subdir of /usr/share/fonts." + if [[ ! -n "${FONT_DIR}" ]]; then + msg="FONT_DIR is empty. The ebuild should set it to at least one subdir of /usr/share/fonts." eerror "${msg}" die "${msg}" fi @@ -457,17 +456,14 @@ install_driver_hwdata() { } discover_font_dirs() { - pushd ${IMAGE}/usr/share/fonts - FONT_DIRS="$(find . -maxdepth 1 -mindepth 1 -type d)" - FONT_DIRS="$(echo ${FONT_DIRS} | sed -e 's:./::g')" - popd + FONT_DIRS="${FONT_DIR}" } create_fonts_scale() { ebegin "Creating fonts.scale files" local x - for FONT_DIR in ${FONT_DIRS}; do - x=${ROOT}/usr/share/fonts/${FONT_DIR} + for DIR in ${FONT_DIR}; do + x=${ROOT}/usr/share/fonts/${DIR} [[ -z "$(ls ${x}/)" ]] && continue [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue @@ -511,8 +507,8 @@ create_fonts_scale() { create_fonts_dir() { ebegin "Generating fonts.dir files" - for FONT_DIR in ${FONT_DIRS}; do - x=${ROOT}/usr/share/fonts/${FONT_DIR} + for DIR in ${FONT_DIR}; do + x=${ROOT}/usr/share/fonts/${DIR} [[ -z "$(ls ${x}/)" ]] && continue [[ "$(ls ${x}/)" = "fonts.cache-1" ]] && continue @@ -529,8 +525,8 @@ create_fonts_dir() { fix_font_permissions() { ebegin "Fixing permissions" - for FONT_DIR in ${FONT_DIRS}; do - find ${ROOT}/usr/share/fonts/${FONT_DIR} -type f -name 'font.*' \ + for DIR in ${FONT_DIR}; do + find ${ROOT}/usr/share/fonts/${DIR} -type f -name 'font.*' \ -exec chmod 0644 {} \; done eend 0 |