Package: ptex-jisfonts
Version: 2-16
Severity: normal
Tags: patch

Since 5.95a+1p1.7a-1 of dvipsk-ja, /etc/texmf/dvipsj/config.ps is
changed and jisftconfig does not work due to this change.

They are changed to use /etc/texmf/dvipsj/psfonts_jp.map, so I think
it is better for jisftconfig to rewrite it instead of config.ps.  The
attached patch do this according to the version of dvipsk-ja.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.27-2-k7
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)

Versions of packages ptex-jisfonts depends on:
ii  debconf [debconf-2.0]      1.4.62        Debian configuration management sy
ii  ptex-bin                   3.1.5+0.04a-1 The ASCII pTeX binary files

ptex-jisfonts recommends no packages.

-- debconf information:
* ptex-jisfonts/jisftconfig:

Best regards,
--
 Hidetaka Iwai
 [EMAIL PROTECTED]

--- /usr/sbin/jisftconfig       2005-11-13 00:18:23.000000000 +0900
+++ jisftconfig 2005-12-12 21:27:12.000000000 +0900
@@ -2,6 +2,7 @@
 
 map=/etc/texmf/vfontmap
 cfg=/etc/texmf/dvipsj/config.ps
+psfonts_jp_map=/etc/texmf/dvipsj/psfonts_jp.map
 
 checkinstalled ()
 {
@@ -46,23 +47,39 @@
                fi
        fi
 
-# for config.ps (dvipsk-ja)
-       if [ -f ${cfg} ] && [ ${dvipsk_ja:-0} = "installed" ] ; then
+# for dvipsk-ja
+       if [ ${dvipsk_ja:-0} = "installed" ]; then
+           if dpkg --compare-versions ${dvipsk_ja_v} lt 5.95a+jp1.7a-1 && \
+               [ -f ${cfg} ]; then
+               # before version 5.95a+jp1.7a-1
                if ! grep -q "%-- ptex-jisfonts begin" ${cfg}; then
-               cp -f ${cfg} ${cfg}_giro
-               sed -e '/^p +psfonts.amz/a\
+                   cp -f ${cfg} ${cfg}_giro
+                   sed -e '/^p +psfonts.amz/a\
 %-- ptex-jisfonts begin\
 p +jis.map\
 %-- ptex-jisfonts end' < ${cfg} > ${cfg}_$$ && \
-               mv -f ${cfg}_$$ ${cfg}
+                       mv -f ${cfg}_$$ ${cfg}
                fi
+           elif dpkg --compare-versions ${dvipsk_ja_v} ge 5.95a+jp1.7a-1 && \
+               [ -f ${psfonts_jp_map} ]; then
+               # version 5.95a+jp1.7a-1 or later has psfonts_jp.map
+               if ! grep -q "%-- ptex-jisfonts begin" ${psfonts_jp_map}; then
+                   cp -f ${psfonts_jp_map} ${psfonts_jp_map}_giro
+                   sed -e '/^cidgoth-v/a\
+%-- ptex-jisfonts begin\
+rml-jis                 Ryumin-Light-H\
+gbm-jis                 GothicBBB-Medium-H\
+%-- ptex-jisfonts end' < ${psfonts_jp_map} > ${psfonts_jp_map}_$$ && \
+                       mv -f ${psfonts_jp_map}_$$ ${psfonts_jp_map}
+               fi
+           fi
        fi
-
 ;;
 
 clean)
        rm -f ${map}_giro
        rm -f ${cfg}_giro
+       rm -f ${psfonts_jp_map}_giro
 ;;
 
 remove)
@@ -76,6 +93,12 @@
                ${cfg} > ${cfg}_$$ && mv -f ${cfg}_$$ ${cfg}
        fi
 
+       if [ -f ${psfonts_jp_map} ] ; then
+           sed -e '/%-- ptex-jisfonts begin/,/%-- ptex-jisfonts end/d' < \
+               ${psfonts_jp_map} > ${psfonts_jp_map}_$$ && \
+               mv -f ${psfonts_jp_map}_$$ ${psfonts_jp_map}
+       fi
+
 ;;
 
 *)

Attachment: pgpjFFtp8cO5c.pgp
Description: PGP signature

Reply via email to