Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 144523 Details for
Bug 210884
New eselect module and eclass for pango modules
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
pango.eselect-0.1
pango.eselect-0.1 (text/plain), 3.21 KB, created by
David Leverton
on 2008-02-24 19:08:47 UTC
(
hide
)
Description:
pango.eselect-0.1
Filename:
MIME Type:
Creator:
David Leverton
Created:
2008-02-24 19:08:47 UTC
Size:
3.21 KB
patch
obsolete
># Copyright 1999-2008 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > >inherit config output > >DESCRIPTION="Manage the /etc/pango/pango.modules file" >MAINTAINER="gnome@gentoo.org" >VERSION=0.1 > ># Partially based on env.eselect > >MIME_WHITELIST="text/plain text/x-makefile" > >is_envfile() { > local mime envfile=${1} > > # Make sure it is a file and no backup file > [[ -f ${envfile} ]] || return 1 > [[ -n ${envfile##*~} ]] || return 1 > [[ ${envfile##*.} != bak ]] || return 1 > > mime=$(file -i ${envfile} | cut -d ' ' -f 2 | sed -e 's/;$//') > if ! has ${mime} ${MIME_WHITELIST} ; then > echo "Skipping non-text file ${envfile}." > return 1 > fi > > return 0 >} > >update_pango_modules() { > local dirsuffix=${1} > local env_d=/etc/env.d/pango${dirsuffix} pango_modules=/etc/pango${dirsuffix}/pango.modules > local -a envfiles modulespath > local pango_module_version new_pango_module_version my_module_version > envfiles=( ${env_d}/* ) > > for envfile in ${envfiles[@]} ; do > if [[ -d ${envfile} ]]; then > update_pango_modules ${envfile#/etc/env.d/pango} > continue > fi > is_envfile ${envfile} || continue > > new_pango_module_version="$(load_config ${envfile} PangoModuleVersion)" > if [[ -n ${pango_module_version} && -n ${new_pango_module_version} && > ${pango_module_version} != ${new_pango_module_version} ]]; then > die "Multiple files in ${env_d} define conflicting PangoModuleVersion" > elif [[ -n ${new_pango_module_version} ]]; then > pango_module_version=${new_pango_module_version} > fi > done > > for envfile in ${envfiles[@]} ; do > is_envfile ${envfile} || continue > > my_module_version="$(load_config ${envfile} MyModuleVersion)" > if [[ -z ${my_module_version} ]]; then > write_warning_msg "Skipping ${envfile} because it does not define a module version" > continue > fi > > [[ -n ${pango_module_version} ]] || die "Couldn't determine Pango module version for ${env_d}" > > if [[ ${my_module_version} != ${pango_module_version} ]]; then > write_warning_msg "Skipping ${envfile} because it uses module version ${my_module_version}, but Pango uses ${pango_module_version}" > continue > fi > > modulespath[${#modulespath[@]}]="$(load_config ${envfile} ModulesPath)" > done > > if [[ -z ${modulespath[@]} ]]; then > if [[ -f ${pango_modules} ]]; then > echo "Removing ${pango_modules}..." > rm ${pango_modules} > fi > return > fi > > local tmprc="$(mktemp /tmp/pangorc.XXXXXX)" > [[ -n ${tmprc} ]] || die "Could not create temporary file" > cat <<-EOF >${tmprc} > [Pango] > ModulesPath=$(IFS=:; echo "${modulespath[*]}") > EOF > > local querymodules > if [[ $(uname -m) == x86_64 && ${dirsuffix} == /i?86-* ]]; then > querymodules=pango-querymodules32 > else > querymodules=pango-querymodules > fi > > if [[ -z $(type -P ${querymodules}) ]]; then > write_warning_msg "${querymodules} not found, removing ${pango_modules}" > rm ${pango_modules} > return > fi > > mkdir -p ${pango_modules%/*} > echo "Regenerating ${pango_modules}..." > PANGO_RC_FILE=${tmprc} ${querymodules} >${pango_modules} > rm -f ${tmprc} >} > >### update action > >describe_update() { > echo "Update /etc/pango/pango.modules from all scripts in /etc/env.d/pango/" >} > >do_update() { > [[ ${ROOT:-/} != / ]] && die 'Sorry, ${ROOT} != / is not supported' > update_pango_modules >} > ># vim: ft=eselect
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 210884
:
144110
|
144111
|
144112
|
144114
|
144115
|
144366
|
144368
|
144370
|
144372
| 144523 |
144524
|
144528