tags 542338 patch
thanks

The attached patch roughly implements dropping defoma support in this
package.

Please notice that I have a few doubts:
- the package doesn't provide any defoma hints file
- it only provides a defoma script
- there are mysterious references to "DEFOMAFILES" in
update-vflibcap. I tried to drop them but I'm unsure whether that
script is still useful now..:-)

So, handle with care...but please drop defoma support.

-- 


diff -Nru vflib3-3.6.14.dfsg.old/debian/control vflib3-3.6.14.dfsg/debian/control
--- vflib3-3.6.14.dfsg.old/debian/control	2011-12-01 18:55:35.123731341 +0100
+++ vflib3-3.6.14.dfsg/debian/control	2011-12-01 18:54:23.877743231 +0100
@@ -2,7 +2,7 @@
 Section: devel
 Priority: optional
 Maintainer: OHURA Makoto <oh...@debian.org>
-Build-Depends: autotools-dev, debhelper (>> 4.0.0), defoma, dpatch, gettext, libfreetype6-dev, libkpathsea-dev, libt1-dev, libx11-dev, autoconf2.13, xutils-dev
+Build-Depends: autotools-dev, debhelper (>> 4.0.0), dpatch, gettext, libfreetype6-dev, libkpathsea-dev, libt1-dev, libx11-dev, autoconf2.13, xutils-dev
 Standards-Version: 3.7.2
 
 Package: vflib3-dev
@@ -58,7 +58,7 @@
 Package: vflib3
 Section: libs
 Architecture: any
-Depends: ${shlibs:Depends}, defoma
+Depends: ${shlibs:Depends}
 Conflicts: watanabe-vfont (<< 1-6.6), asiya24-vfont (<< 1-6.6)
 Suggests: watanabe-vfont (>> 1-6.6), asiya24-vfont (>> 1-6.6)
 Description: Versatile Font Library
diff -Nru vflib3-3.6.14.dfsg.old/debian/rules vflib3-3.6.14.dfsg/debian/rules
--- vflib3-3.6.14.dfsg.old/debian/rules	2011-12-01 18:55:35.119731232 +0100
+++ vflib3-3.6.14.dfsg/debian/rules	2011-12-01 18:58:04.249960301 +0100
@@ -116,7 +116,6 @@
 	# Shut lintian up
 	chmod +x $(CURDIR)/debian/vflib3/usr/share/VFlib/3.6.14/t1lib/mkt1enc.sh
 
-	dh_installdefoma -a
 	dh_installdocs -a
 	dh_installman -a
 
diff -Nru vflib3-3.6.14.dfsg.old/debian/update-vflibcap vflib3-3.6.14.dfsg/debian/update-vflibcap
--- vflib3-3.6.14.dfsg.old/debian/update-vflibcap	2011-12-01 18:55:35.119731232 +0100
+++ vflib3-3.6.14.dfsg/debian/update-vflibcap	2011-12-01 19:01:30.423713565 +0100
@@ -3,7 +3,6 @@
 # Copyright 2002 Masayuki Hatta <mha...@debian.org>
 # Public Domain.
 
-DEFOMAFILES=`if [ -d /var/lib/defoma/vflib3.d ]; then /bin/ls -1 /var/lib/defoma/vflib3.d/* 2> /dev/null| egrep -v '(id-cache|.dpkg-[a-z]*|~)$'; fi`
 VFLIBDIR=/etc/vflib3
 VFLIBCAPCOMMON=/etc/vflib3/vflibcaps-common/vflibcap.in
 VFLIBCAPCOMMON2=/etc/vflib3/vflibcaps-common/vflibcap-tex.in
@@ -32,12 +31,12 @@
 (echo "### This file is automatically generated by update-vflibcap"; \
  echo "#"; \
  echo "# Please do not edit this file directly. If you want to change or add"; \
- echo "# anything please take a look at the files in /var/lib/defoma/,vflib3.d  and invoke"; \
+ echo "# anything please invoke"; \
  echo "# update-vflibcap.";  \
  echo "#"; \
  echo "###" ) > ${VFLIBDIR}/vflibcap.new
 
-cat ${VFLIBCAPCOMMON} ${DEFOMAFILES} >> ${VFLIBDIR}/vflibcap.new
+cat ${VFLIBCAPCOMMON} >> ${VFLIBDIR}/vflibcap.new
 mv ${VFLIBDIR}/vflibcap.new ${VFLIBDIR}/vflibcap
 
 #
@@ -47,12 +46,12 @@
 (echo "### This file is automatically generated by update-vflibcap"; \
  echo "#"; \
  echo "# Please do not edit this file directly. If you want to change or add"; \
- echo "# anything please take a look at the files in /var/lib/defoma/vflib3.d, and invoke"; \
+ echo "# anything please invoke"; \
  echo "# update-vflibcap.";  \
  echo "#"; \
  echo "###" ) > ${VFLIBDIR}/vflibcap-tex.new
 
-cat ${VFLIBCAPCOMMON2} ${DEFOMAFILES} >> ${VFLIBDIR}/vflibcap-tex.new
+cat ${VFLIBCAPCOMMON2} >> ${VFLIBDIR}/vflibcap-tex.new
 mv ${VFLIBDIR}/vflibcap-tex.new ${VFLIBDIR}/vflibcap-tex
 
 if [ "$VERBOSE" = "true" ]; then
diff -Nru vflib3-3.6.14.dfsg.old/debian/vflib3.defoma vflib3-3.6.14.dfsg/debian/vflib3.defoma
--- vflib3-3.6.14.dfsg.old/debian/vflib3.defoma	2011-12-01 18:55:35.123731341 +0100
+++ vflib3-3.6.14.dfsg/debian/vflib3.defoma	1970-01-01 01:00:00.000000000 +0100
@@ -1,160 +0,0 @@
-#
-# vflib3.defoma - defoma script for VFlib3
-#
-
-@ACCEPT_CATEGORIES = ('truetype', 'type1');
-
-package vflib3;
-use strict;
-use POSIX;
-use File::Basename;
-
-use vars qw($ROOTDIR);
-
-use Debian::Defoma::Common;
-use Debian::Defoma::Font;
-use Debian::Defoma::Id;
-import Debian::Defoma::Font;
-import Debian::Defoma::Common;
-import Debian::Defoma::Id;
-
-my $PkgDir = $ROOTDIR . '/vflib3.d';
-my $VFLIBCAP = $PkgDir . '/vflibcap';
-my $GENERALFAMILY = $PkgDir . '/vflibcap.general-family';
-my $Id;
-
-sub init {
-  unless ($Id) {
-    $Id = defoma_id_open_cache();
-  }
-}
-
-sub tt_register {
-  my $font = shift;
-  my @hints = defoma_font_get_hints('truetype', $font);
-  my $h = parse_hints_start('', @hints);
-  $h->{Priority} = 20 if !defined($h->{Priority});
-  
-  defoma_id_register($Id,
-                     type => 'real', 
-                     font => $font,
-                     id => $h->{FontName},
-                     priority => $h->{Priority},
-                     hints => join(' ', @hints));
-}
-
-sub tt_unregister {
-  my $font = shift;
-  my ($name, $path, $suffix) = fileparse($font, '\..*'); 
-  
-  defoma_id_unregister($Id, type => 'real', font => $font);
-}
-
-sub t1_register {
-  my $font = shift;
-  my @hints = defoma_font_get_hints('type1', $font);
-  my $h = parse_hints_start('', @hints);
-  $h->{Priority} = 20 if !defined($h->{Priority});
-  
-  defoma_id_register($Id,
-                     type => 'real', 
-                     font => $font,
-                     id => $h->{FontName},
-                     priority => $h->{Priority},
-                     hints => join(' ', @hints));
-}
-
-sub t1_unregister {
-  my $font = shift;
-  my ($name, $path, $suffix) = fileparse($font, '\..*'); 
-  
-  defoma_id_unregister($Id, type => 'real', font => $font);
-}
-
-sub x_main {
-  my $type = shift;
-  my $file = "$VFLIBCAP.$type";
-  my @list = defoma_id_grep_cache($Id, 'installed');
-  my (%priority, %font);
-
-  open(F, ">$file.bak") or die "$file.bak: $!";
-  
-  foreach my $i (@list) {
-    my $font = $Id->{1}->[$i];
-    my @hints = defoma_id_get_hints($Id, $i);
-    my $h = parse_hints_start('', @hints);
-    $h->{Priority} = 20 if !defined($h->{Priority});
-    
-    print F ";;; $h->{FontName} Macro\n";
-    print F "(define-macro $h->{FontName}-Macro\n";
-    print F " (font-class $type)\n";
-    print F " (character-set \"$h->{Charset}\")\n" if defined($h->{Charset});
-# FIXME: ISO2022 is bad
-    print F " (encoding \"ISO2022 $h->{Encoding}\")\n" if defined($h->{Encoding});
-    print F " (font-file \"$font\")\n";
-    
-    if ($type eq "truetype") {
-      print F " (hinting \"on\")\n";
-    }
-    
-    print F ")\n\n";
-    print F ";;; $h->{FontName} Font\n";
-    print F "(define-macro $h->{FontName} $h->{FontName}-Macro)\n\n";
-
-    if (defined($h->{GeneralFamily})) {  
-      $priority{$h->{GeneralFamily}} = 0 if (!$priority{$h->{GeneralFamily}});
-      if ($priority{$h->{GeneralFamily}} < $h->{Priority} ) {
-        $priority{$h->{GeneralFamily}} = $h->{Priority};
-        $font{$h->{GeneralFamily}} = $h->{FontName};
-      }
-    }
-  }
-  close F;
-  rename "$file.bak", "$file"; 
-  
-  ### Debian GeneralFamily Font  ###
-  
-  open(F, ">$GENERALFAMILY.bak");
-  print F ";; Debian GeneralFamily Font\n";
-  foreach (keys %font) {
-    print F "(define-macro debian-vfont-$_ $font{$_}-Macro)\n";
-  }
-  close F;
-  rename "$GENERALFAMILY.bak", "$GENERALFAMILY";
-  defoma_id_close_cache($Id);
-  system("/usr/sbin/update-vflibcap -v");
-  
-  return 0;
-}
-
-  sub truetype {
-    my $com = shift;
-    if ($com eq 'init') {
-    return init();
-  } elsif ($com eq 'term') {
-    return x_main('truetype', @_);
-  } elsif ($com eq 'register') {
-    return tt_register(@_);
-  } elsif ($com eq 'unregister') {
-    return tt_unregister(@_);
-  } else {
-  }  
-  return 0;
-}
-
-sub type1 {
-  my $com = shift;
-  if ($com eq 'init') {
-    return init();
-  } elsif ($com eq 'term') {
-    return x_main('type1', @_);
-  } elsif ($com eq 'register') {
-    return t1_register(@_);
-  } elsif ($com eq 'unregister') {
-    return t1_unregister(@_);
-  } else {
-  }
-  return 0;
-}
-
-1;

Attachment: signature.asc
Description: Digital signature

Reply via email to