Peter Volkov wrote:
> Some eclasses (kernel-2, font) use variable to pass space separated PATH
> to patch or fontconfig files from ebuild to eclass. In ebuild we use:
> 
> FONT_CONF="path1 path2"
> 
> Then eclasses use the variable:
> 
> for conffile in ${FONT_CONF}; do
>       ...
> done
> 
> The problem with this doesn't work if path{1,2} contain spaces. The
> solution I'm thinking about is to you arrays:
> 
> FONT_CONF=("path1" "path2")
> 
> for conffile in "[EMAIL PROTECTED]"; do 
>       ...
> done
> 
> But is this good idea? Are there better?

I was also thinking about changing it to a function instead of a variable,
so ebuilds would do something like:

dofontconfig "${FILESDIR}"/50-myconfig "${FILESDIR}"/51-myotherconfig

dofontconfig() {
        insinto /etc/fonts/conf.avail/
        for conf in "$@"; do
                [[ -e ${conf} ]] && doins "${conf}"
        done
}

course this would require a bit of ebuild editing.  not many ebuilds
use FONT_CONF though.

on the other hand, the nicety of the variable is that font ebuilds
rarely need to contain a src_install.


-- 
                        looks like christmas at fifty-five degrees
                                    this latitude weakens my knees
    EFFD 380E 047A 4B51 D2BD  C64F 8AA8 8346 F9A4 0662 (0xF9A40662)

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to