[arch-commits] Commit in texlive-fontsextra/trunk (PKGBUILD texlive.install)
Rémy Oudompheng
remy at archlinux.org
Mon Jan 10 11:07:26 UTC 2011
Date: Monday, January 10, 2011 @ 06:07:25
Author: remy
Revision: 105544
Change generation of updmap.cfg to a simpler logic, using
/tec/texmf/web2c/updmap-local.cfg for customizations.
Modified:
texlive-fontsextra/trunk/PKGBUILD
texlive-fontsextra/trunk/texlive.install
-----------------+
PKGBUILD | 4 +--
texlive.install | 58 ++++++++++++++++++------------------------------------
2 files changed, 22 insertions(+), 40 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2011-01-10 11:07:09 UTC (rev 105543)
+++ PKGBUILD 2011-01-10 11:07:25 UTC (rev 105544)
@@ -1,8 +1,8 @@
-# Maintainer: Firmicus <firmicus āt gmx dōt net>
+# Maintainer: Rémy Oudompheng <remy.archlinux.org>
pkgname=texlive-fontsextra
pkgver=2010.20923
-pkgrel=1
+pkgrel=2
pkgdesc="TeX Live - all sorts of extra fonts"
license=('GPL')
arch=(any)
Modified: texlive.install
===================================================================
--- texlive.install 2011-01-10 11:07:09 UTC (rev 105543)
+++ texlive.install 2011-01-10 11:07:25 UTC (rev 105544)
@@ -1,12 +1,19 @@
PKGNAME="texlive-fontsextra"
UPDMAP="etc/texmf/web2c/updmap.cfg"
+UPDMAPLOCAL="etc/texmf/web2c/updmap-local.cfg"
SYNCWITHTREES=''
-OLDMAPSSAVE=`mktemp`
-NEWMAPS="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
+MAPFILE="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
+
post_install() {
- echo ">>> texlive: updating updmap.cfg with new map files..."
- cat "$NEWMAPS" >> $UPDMA
+ TMPFILE=`mktemp`
+ echo ">>> texlive: saving updmap.cfg as $TMPFILE..."
+ cp "$UPDMAP" "$TMPFILE"
+ echo ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+ echo " into /etc/texmf/web2c/updmap-local.cfg"
+ cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+ cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+ [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
echo ">>> texlive: updating the filename database..."
usr/bin/mktexlsr
echo ">>> texlive: updating the fontmap files with updmap..."
@@ -14,40 +21,15 @@
echo " done."
}
-
-pre_upgrade() {
- if [[ "$2" == 200* ]]; then
- OLDMAPS="usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
- else # >= 2010
- OLDMAPS="var/lib/texmf/arch/installedpkgs/$PKGNAME.maps"
- fi
- if [ -f $OLDMAPS ] ; then
- # temporarily saving old maps file
- cp "$OLDMAPS" "$OLDMAPSSAVE"
- else
- echo "Warning: file $OLDMAPS not found"
- echo "(ignore the above if updating from TL2008 or from TL2009 in testing)"
- SYNCWITHTREES="--syncwithtrees"
- fi
-}
-
post_upgrade() {
- echo ">>> texlive: updating updmap.cfg with new map files..."
- if [ -f "$OLDMAPSSAVE" ] ; then
- MAPSDIFF=`mktemp`
- TOADD=`mktemp`
- diff -B $OLDMAPSSAVE $NEWMAPS | sed 's/\s\+/ /g' > $MAPSDIFF
- TOREMOVE=`cat $MAPSDIFF | egrep '^<' | cut -d' ' -f3`
- cat $MAPSDIFF | egrep '^>' | sed 's/^> //' > $TOADD
- if [ "x$TOREMOVE" != "x" ]; then
- for map in $TOREMOVE; do
- sed -i "/\s$map/d" $UPDMAP
- done
- fi
- if [ -s $TOADD ]; then
- cat $TOADD >> $UPDMAP
- fi
- fi
+ TMPFILE=`mktemp`
+ echo ">>> texlive: saving updmap.cfg as $TMPFILE..."
+ cp "$UPDMAP" "$TMPFILE"
+ echo ">>> texlive: regenerating updmap.cfg (custom additions shoud go"
+ echo " into /etc/texmf/web2c/updmap-local.cfg"
+ cp usr/share/texmf/web2c/updmap-hdr.cfg $UPDMAP
+ cat var/lib/texmf/arch/installedpkgs/*.maps >> $UPDMAP
+ [ -f "$UPDMAPLOCAL" ] && cat "$UPDMAPLOCAL" >> $UPDMAP
echo ">>> texlive: updating the filename database..."
usr/bin/mktexlsr
echo ">>> texlive: updating the fontmap files with updmap..."
@@ -56,7 +38,7 @@
}
pre_remove() {
-for m in `cut -d' ' -f2 $NEWMAPS`; do
+for m in `cut -d' ' -f2 $MAPFILE`; do
sed -i "/\s$m/d" $UPDMAP ;
done
}
More information about the arch-commits
mailing list