[arch-commits] Commit in texlive-core/trunk (PKGBUILD texlive.install)
Rémy Oudompheng
remy at archlinux.org
Mon Jan 10 11:07:00 UTC 2011
Date: Monday, January 10, 2011 @ 06:06:59
Author: remy
Revision: 105542
Change generation of updmap.cfg to a simpler logic, using
/etc/texmf/web2c/updmap-local.cfg for customizations.
Modified:
texlive-core/trunk/PKGBUILD
texlive-core/trunk/texlive.install
-----------------+
PKGBUILD | 2 -
texlive.install | 59 +++++++++++++++++-------------------------------------
2 files changed, 20 insertions(+), 41 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2011-01-10 11:06:49 UTC (rev 105541)
+++ PKGBUILD 2011-01-10 11:06:59 UTC (rev 105542)
@@ -2,7 +2,7 @@
pkgname=texlive-core
pkgver=2010.20954
-pkgrel=1
+pkgrel=2
pkgdesc="TeX Live core distribution"
license=('GPL')
arch=(any)
Modified: texlive.install
===================================================================
--- texlive.install 2011-01-10 11:06:49 UTC (rev 105541)
+++ texlive.install 2011-01-10 11:06:59 UTC (rev 105542)
@@ -1,12 +1,19 @@
PKGNAME="texlive-core"
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" >> $UPDMAP
+ 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..."
@@ -20,43 +27,15 @@
echo " see http://wiki.archlinux.org/index.php/TeX_Live"
}
-pre_upgrade() {
- if [[ "$2" == 200* ]]; then
- OLDMAPS="usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
- echo "Info: copying previous updmap.cfg from /usr/share/texmf-config/web2c/"
- echo " to /etc/texmf/web2c/ (and keeping new one as updmap.cfg.pacnew)"
- mv etc/texmf/web2c/updmap.cfg /etc/texmf/web2c/updmap.cfg.pacnew
- cp usr/share/texmf-config/web2c/updmap.cfg.pacsave etc/texmf/web2c/updmap.cfg
- else
- # $2 >= 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"
- SYNCWITHTREES="--syncwithtrees"
- fi
-}
-
post_upgrade() {
- echo ">>> texlive: updating updmap.cfg with new map files..."
- if [ -f "$OLDMAPSSAVE" ] ; then
- MAPSDIFF=`mktemp`
- TOADD=`mktemp`
- diff -B -w $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..."
More information about the arch-commits
mailing list