Accepting request 133761 from Publishing:TeXLive

- Make update script to run updmap-sys only once on texhash 

- Fix update script: do not override with wrong md5 check sum for
  language format check 
- Run updmap-sys only if required

- Change font config semantic as the font directories below
  /usr/share/fonts will be always found by freetype

OBS-URL: https://build.opensuse.org/request/show/133761
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/texlive-filesystem?expand=0&rev=2
This commit is contained in:
Stephan Kulow 2012-09-13 05:07:45 +00:00 committed by Git OBS Bridge
commit 03da4908fa
6 changed files with 3413 additions and 3354 deletions

View File

@ -6,6 +6,7 @@
<!-- all subdirectories of these directories are added as well -->
<!-- ** WARNING: THIS IS A HUGE LIST OF FONTS AND THEREFORE IT ** -->
<!-- ** WILL SLOW DOWN ALL PROGRAMS USING FONTCONFIG ** -->
<!-- ** USE THE fc-cache(1) UTILITY TO AVOID SUCH A SLOW DOWN ** -->
<!-- ************************************************************ -->
<fontconfig>

View File

@ -4,6 +4,9 @@
<!-- ************************************************************ -->
<!-- list of font directories of TeXLive packages -->
<!-- all subdirectories of these directories are added as well -->
<!-- ** WARNING: THIS IS A HUGE LIST OF FONTS AND THEREFORE IT ** -->
<!-- ** WILL SLOW DOWN ALL PROGRAMS USING FONTCONFIG ** -->
<!-- ** USE THE fc-cache(1) UTILITY TO AVOID SUCH A SLOW DOWN ** -->
<!-- ************************************************************ -->
<fontconfig>

View File

@ -4,6 +4,11 @@
<!-- ************************************************************ -->
<!-- list of font directories of TeXLive packages -->
<!-- all subdirectories of these directories are added as well -->
<!-- ** WARNING: THIS IS A HUGE LIST OF FONTS AND THEREFORE IT ** -->
<!-- ** WILL SLOW DOWN ALL PROGRAMS USING FONTCONFIG ** -->
<!-- ** USE THE fc-cache(1) UTILITY TO AVOID SUCH A SLOW DOWN ** -->
<!-- ** Be aware that the configurations in the files ** -->
<!-- ** 58-texlive*.conf will not be affected by this ** -->
<!-- ************************************************************ -->
<fontconfig>

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Wed Sep 12 09:54:02 UTC 2012 - werner@suse.de
- Make update script to run updmap-sys only once on texhash
-------------------------------------------------------------------
Tue Sep 11 15:18:34 UTC 2012 - werner@suse.de
- Fix update script: do not override with wrong md5 check sum for
language format check
- Run updmap-sys only if required
-------------------------------------------------------------------
Thu Aug 2 13:17:40 UTC 2012 - werner@suse.de
- Change font config semantic as the font directories below
/usr/share/fonts will be always found by freetype
-------------------------------------------------------------------
Fri Jul 13 07:34:32 UTC 2012 - werner@suse.de

File diff suppressed because it is too large Load Diff

View File

@ -46,12 +46,18 @@ test $size -lt 80 && > /var/run/texlive/run-mktexlsr
rotator ()
{
local -i i=0
local -i i=0 n=0
local -a elements=('|' '/' '-' '\')
while read -s -n 1 ; do
printf "\r[${elements[((i++%4))]}]"
let n=1
done
echo
((n > 0)) && echo
}
atexit()
{
exec 4>&-
}
if test $VERBOSE = true ; then
@ -59,6 +65,7 @@ if test $VERBOSE = true ; then
else
exec 4> /dev/null
fi
trap atexit EXIT
type -p mktexlsr &> /dev/null || { echo "${0##*/}: No mktexlsr in PATH ... skipping" 1>&2; exit 0 ; }
@ -72,6 +79,7 @@ for run in /var/run/texlive/run-mktexlsr* ; do
let rc+=$?
test $VERBOSE = true && echo
rm -f /var/run/texlive/run-mktexlsr*
> /var/run/texlive/sync-updmap
done
type -p kpsewhich &> /dev/null || { echo "${0##*/}: No kpsewhich in PATH ... skipping" 1>&2; exit 0 ; }
@ -159,10 +167,23 @@ tcfmgr ()
enablemaps ()
{
updmap-sys --quiet --nohash --listmaps < /dev/null 2> /dev/null | \
sed -n -r 's@(#![[:space:]])(Mixed)?Map[[:space:]]*@@gp' | \
local -i rc=0
local -i hash=0
local maps=($(updmap-sys --quiet --nohash --listmaps < /dev/null 2> /dev/null | \
sed -n -r 's@(#![[:blank:]])(Mixed|Kanji)?Map[[:blank:]]*@@gp' | \
xargs -r kpsewhich --format=map 2> /dev/null | \
sed -r 's@.*/([^/]*)@\1@g'
sed -r 's@.*/([^/]*)@\1@g'))
local line emap
((${#maps} == 0)) && return $rc
for line in ${maps[@]} ; do
let hash++
line='^#![[:blank:]]*((Mixed|Kanji)?Map)[[:blank:]]*('$line')'
emap=$(sed -n -r "s/$line/\1=\3/p" ${cfg})
updmap-sys --nohash --nomkmap --enable $emap
let rc+=$?
done
((hash > 0)) && > /var/run/texlive/run-mktexlsr
return $rc
}
#
@ -175,8 +196,8 @@ for run in /var/run/texlive/run-fmtutil* ; do
language)
test -n "${cnf_ldat}" -a -n "${cnf_ldef}" || continue
set -- $(md5sum < ${cnf_ldat})
set -- $(md5sum < ${cnf_ldef})
echo $1 > ${md5_ldat}
set -- $(md5sum < ${cnf_ldef})
echo $1 > ${md5_ldef}
test $VERBOSE = true && echo -en "\r[ ]Handle language.dat setups."
fmtutil-sys --byhyphen ${cnf_ldat} < /dev/null 1>&4 2>&4
@ -196,35 +217,53 @@ for run in /var/run/texlive/run-fmtutil* ; do
esac
rm -f /var/run/texlive/run-fmtutil*
done
for run in /var/run/texlive/run-updmap* ; do
if test -e $run ; then
type -p updmap-sys &> /dev/null || { echo "${0##*/}: No updmap-sys in PATH ... skipping" 1>&2; break; }
test $VERBOSE = true && echo -en "\r[ ]Updating TeX font mappings."
test -e $run || break
type -p updmap-sys &> /dev/null || { echo "${0##*/}: No updmap-sys in PATH ... skipping" 1>&2; break; }
cfg=$(tcfmgr --cmd find --file updmap.cfg)
test -e $cfg || break
test $VERBOSE = true && echo -en "\r[ ]Updating TeX font mappings."
updmap-sys --nohash --nomkmap --syncwithtrees < /dev/null 1>&4 2>&4
let rc+=$?
enablemaps $cfg < /dev/null 1>&4 2>&4
let rc+=$?
if test -e /var/run/texlive/run-mktexlsr ; then
updmap-sys < /dev/null 1>&4 2>&4
let rc+=$?
else
updmap-sys --nohash < /dev/null 1>&4 2>&4
let rc+=$?
test $VERBOSE = true && echo
rm -f /var/run/texlive/run-updmap*
else
type -p updmap-sys &> /dev/null || break
typeset -i n=0
cfg=$(tcfmgr --cmd find --file updmap.cfg)
if test -e ${cfg} ; then
test $VERBOSE = true && echo -en "\r[ ]Updating TeX font mappings."
updmap-sys --nohash --nomkmap --syncwithtrees < /dev/null 1>&4 2>&4
let rc+=$?
enablemaps | \
while read line ; do
line='^#![[:space:]]*((Mixed)?Map)[[:space:]]*('$line')'
emap=$(sed -n -r "s/$line/\1=\3/p" ${cfg})
updmap-sys --nohash --nomkmap --enable $emap < /dev/null 1>&4 2>&4
let rc+=$?
done
updmap-sys < /dev/null 1>&4 2>&4
let rc+=$?
test $VERBOSE = true && echo
fi
fi
# test $VERBOSE = true && echo
rm -f /var/run/texlive/run-updmap*
rm -f /var/run/texlive/sync-updmap*
rm -f /var/run/texlive/run-mktexlsr*
done
for run in /var/run/texlive/sync-updmap* ; do
test -e $run || break
type -p updmap-sys &> /dev/null || break
cfg=$(tcfmgr --cmd find --file updmap.cfg)
test -e $cfg || break
test $VERBOSE = true && echo -en "\r[ ]Updating TeX font mappings."
updmap-sys --nohash --nomkmap --syncwithtrees < /dev/null 1>&4 2>&4
let rc+=$?
enablemaps $cfg < /dev/null 1>&4 2>&4
let rc+=$?
if test -e /var/run/texlive/run-mktexlsr ; then
updmap-sys < /dev/null 1>&4 2>&4
let rc+=$?
rm -f /var/run/texlive/run-mktexlsr*
else
updmap-sys --nohash < /dev/null 1>&4 2>&4
let rc+=$?
fi
# test $VERBOSE = true && echo
rm -f /var/run/texlive/sync-updmap*
rm -f /var/run/texlive/run-mktexlsr*
done
if test -x /usr/bin/mtxrun ; then
test $VERBOSE = true && echo -en "\r[ ]Generate file database."
TEXMF=${TEXMFDIST} \
@ -245,7 +284,7 @@ type -p texconfig-sys &> /dev/null || exit 0
# Configuration broken
#
if test ! -e "$TEXMFCNFFILE" ; then
echo "${0##*/}: Configuration of texlive installation not found."
echo "${0##*/}: Configuration of texlive installation not found." 1>&2
exit 0
fi
@ -604,8 +643,5 @@ then
fi
fi
if test $VERBOSE = true ; then
exec 4>&-
fi
##
exit $rc