Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Ryan Hill <dirtyepic@g.o>
Subject: Re: How to pass list of paths to eclass?
Date: Tue, 11 Dec 2007 20:31:36 -0600
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 "${FONT_CONF[@]}"; 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 (OpenPGP digital signature)
References:
How to pass list of paths to eclass?
-- Peter Volkov
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: How to pass list of paths to eclass?
Next by thread:
Re: How to pass list of paths to eclass?
Previous by date:
Re: EAPI placement
Next by date:
Re: [RFC] gnupg-2 stable plans


Updated Jun 17, 2009

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.