[arch-commits] Commit in texlive-fontsextra/trunk (PKGBUILD texlive.install)

François Charette francois at archlinux.org
Tue Aug 18 08:53:37 UTC 2009


    Date: Tuesday, August 18, 2009 @ 04:53:36
  Author: francois
Revision: 49975

better handling of mapfiles during install

Modified:
  texlive-fontsextra/trunk/PKGBUILD
  texlive-fontsextra/trunk/texlive.install

-----------------+
 PKGBUILD        |   10 ++-
 texlive.install |  136 +++++++++++++++---------------------------------------
 2 files changed, 44 insertions(+), 102 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-08-18 08:50:48 UTC (rev 49974)
+++ PKGBUILD	2009-08-18 08:53:36 UTC (rev 49975)
@@ -2,17 +2,18 @@
 
 pkgname=texlive-fontsextra
 pkgver=2009.14419
-pkgrel=1
+pkgrel=2
 pkgdesc="TeX Live - all sorts of extra fonts"
 license=('GPL')
 arch=(any)
 depends=('texlive-core')
 groups=('texlive-most')
 url='http://tug.org/texlive/'
-source=("ftp://ftp.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip")
+source=("ftp://ftp.archlinux.org/other/texlive/$pkgname-$pkgver-src.zip" "$pkgname.maps")
 options=('!emptydirs')
 install=texlive.install
-md5sums=('36e8206b94f5e515c166d5b73727b010')
+md5sums=('b55a4774366e9b79fa14768a5a20a04a'
+         '0ddd05a2e3722be5881c9a95f3b37ff8')
 
 build() {
    cd $srcdir
@@ -20,6 +21,7 @@
    sed -i '/^#/d' CONTENTS || return 1
    _revnr=`echo $pkgver | sed 's/2009\.//'`
    install -m644 CONTENTS $pkgdir/usr/share/texmf-var/arch/installedpkgs/${pkgname}_${_revnr}.pkgs || return 1
+   install -m644 $pkgname.maps $pkgdir/usr/share/texmf-var/arch/installedpkgs/ || return 1
    for p in *.tar.xz; do 
 	   bsdtar -xf $p || return 1
    done
@@ -38,7 +40,7 @@
      find $pkgdir/usr/share/texmf-dist/scripts -type f -exec chmod a+x '{}' \;
    fi
    
-   # remove stuff depending on omega
+   # remove stuff depending on omega/aleph
    rm -rf $pkgdir/usr/share/texmf-dist/omega
    find $pkgdir/ -wholename '*ocherokee*' -delete
    find $pkgdir/ -wholename '*oinuit*' -delete

Modified: texlive.install
===================================================================
--- texlive.install	2009-08-18 08:50:48 UTC (rev 49974)
+++ texlive.install	2009-08-18 08:53:36 UTC (rev 49975)
@@ -1,5 +1,8 @@
-pre_install() {
-	cat >> /usr/share/texmf-config/web2c/updmap.cfg <<EOF
+PKGNAME="texlive-fontsextra"
+UPDMAP="/usr/share/texmf-config/web2c/updmap.cfg"
+SYNCWITHTREES=''
+NEWMAPS=`mktemp`
+cat <<EOF > $NEWMAPS
 Map Acorn.map
 Map AnnSton.map
 Map ArtNouv.map
@@ -90,6 +93,9 @@
 MixedMap semaf.map
 MixedMap trajan.map
 EOF
+
+pre_install() {
+	cat $NEWMAPS >> $UPDMAP
 }
 
 post_install() {
@@ -100,111 +106,45 @@
 	echo    " done." 
 }
 
+
+pre_upgrade() {
+  OLDMAPS="/usr/share/texmf-var/arch/installedpkgs/$PKGNAME.maps"
+  if [ -f $OLDMAPS ] ; then
+    MAPSDIFF=`mktemp`
+    TOADD=`mktemp`
+    diff -B $OLDMAPS $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
+  else
+    echo "Warning: file $PKGNAME.maps not found" 
+    echo "(ignore the above if updating from TL2008 or from TL2009 in testing)"
+    SYNCWITHTREES="--syncwithtrees"
+  fi
+}
+
+
 post_upgrade() {
 	echo    ">>> texlive: updating the filename database..."
 	texconfig-sys rehash
 	echo    ">>> texlive: updating the fontmap files with updmap..."
-	updmap-sys --quiet --nohash
+	updmap-sys --quiet --nohash $SYNCWITHTREES
 	echo    " done." 
 }
 
 pre_remove() {
-	MAPS="Acorn.map
-AnnSton.map
-ArtNouv.map
-ArtNouvc.map
-Carrickc.map
-Eichenla.map
-Eileen.map
-EileenBl.map
-Elzevier.map
-GotIn.map
-GoudyIn.map
-Kinigcap.map
-Konanur.map
-Kramer.map
-MnSymbol.map
-MorrisIn.map
-Nouveaud.map
-Romantik.map
-Rothdn.map
-RoyalIn.map
-Sanremo.map
-Starburst.map
-Typocaps.map
-Zallman.map
-antp.map
-antt.map
-archaicprw.map
-arev.map
-ascii.map
-augie.map
-auncial.map
-aurical.map
-belleek.map
-bera.map
-cm-lgc.map
-cmin.map
-cyklop.map
-dictsym.map
-dstroke.map
-epigrafica.map
-esvect.map
-fge.map
-fi4.map
-foekfont.map
-fonetika.map
-fourier-utopia-expert.map
-fourier.map
-gfsartemisia.map
-gfsbodoni.map
-gfscomplutum.map
-gfsdidot.map
-gfsneohellenic.map
-gfssolomos.map
-icelandic.map
-iwona.map
-kpfonts.map
-kurier.map
-libertine.map
-linearA.map
-mdbch.map
-mdput.map
-mdugm.map
-pbsi.map
-phaistos.map
-recycle.map
-slantcm.map
-troff-updmap.map
-uaq.map
-ugq.map
-yfrak.map
-yly.map
-yv1.map
-yv2.map
-yv3.map
-yvo.map
-yvt.map
-allrunes.map
-cm-super-t1.map
-cm-super-t2a.map
-cm-super-t2b.map
-cm-super-t2c.map
-cm-super-ts1.map
-cm-super-x2.map
-cmll.map
-hfbright.map
-lxfonts.map
-pigpen.map
-semaf.map
-trajan.map"
-for m in $MAPS; do sed -i "/^M.\+$m/d" /usr/share/texmf-config/web2c/updmap.cfg ; done
+for m in `cut -d' ' -f2 $NEWMAPS`; do 
+  sed -i "/\s$m/d" $UPDMAP ; 
+done
 }
 
 post_remove() {
-	echo    ">>> texlive: updating the filename database..."
-	texconfig-sys rehash
-	echo    ">>> texlive: updating the fontmap files with updmap..."
-	updmap-sys --quiet --nohash
-	echo    " done." 
+  post_install
 }




More information about the arch-commits mailing list