[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Pkg-fonts-devel] Proposed patch for transitioning away from defoma



tags 542336 patch
thanks

This is a proposed patch to transition away libwmf0.2-7 from defoma.

I'm not 100% sure about this patch because libwmf seems to do things
with defoma stuff which I don't exactly understand, so that patch
might be a bit naive.

-- 



diff -Nru libwmf-0.2.8.4.old/debian/changelog libwmf-0.2.8.4/debian/changelog
--- libwmf-0.2.8.4.old/debian/changelog	2011-11-15 19:05:00.076242030 +0100
+++ libwmf-0.2.8.4/debian/changelog	2011-12-17 20:13:09.103861555 +0100
@@ -1,3 +1,10 @@
+libwmf (0.2.8.4-8.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Transition away from defoma. Closes: #542336
+
+ -- Christian Perrier <bubulle@debian.org>  Sat, 17 Dec 2011 20:00:16 +0100
+
 libwmf (0.2.8.4-8.1) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru libwmf-0.2.8.4.old/debian/control libwmf-0.2.8.4/debian/control
--- libwmf-0.2.8.4.old/debian/control	2011-11-15 19:05:00.076242030 +0100
+++ libwmf-0.2.8.4/debian/control	2011-12-17 19:56:37.057422897 +0100
@@ -4,11 +4,11 @@
 Maintainer: Loic Minier <lool@dooz.org>
 Uploaders: Sebastian Dröge <slomo@debian.org>
 Standards-Version: 3.9.0
-Build-Depends: debhelper (>= 7), cdbs, quilt, defoma (>= 0.11), dh-autoreconf, autotools-dev, libfreetype6-dev, zlib1g-dev, libsm-dev, libice-dev, libx11-dev, libxt-dev, libexpat1-dev, libjpeg-dev, libpng12-dev, libgtk2.0-dev (>= 2.21.5), libgdk-pixbuf2.0-dev (>= 2.21.6)
+Build-Depends: debhelper (>= 7), cdbs, quilt, dh-autoreconf, autotools-dev, libfreetype6-dev, zlib1g-dev, libsm-dev, libice-dev, libx11-dev, libxt-dev, libexpat1-dev, libjpeg-dev, libpng12-dev, libgtk2.0-dev (>= 2.21.5), libgdk-pixbuf2.0-dev (>= 2.21.6)
 
 Package: libwmf0.2-7
 Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}, defoma (>= 0.11)
+Depends: ${misc:Depends}, ${shlibs:Depends}
 Recommends: gsfonts
 Description: Windows metafile conversion library
  Windows metafile (WMF) is a picture format used by many Windows
diff -Nru libwmf-0.2.8.4.old/debian/defoma libwmf-0.2.8.4/debian/defoma
--- libwmf-0.2.8.4.old/debian/defoma	2011-11-15 19:05:00.072241921 +0100
+++ libwmf-0.2.8.4/debian/defoma	1970-01-01 01:00:00.000000000 +0100
@@ -1,128 +0,0 @@
-# libwmf.defoma: Generate XML fontmap for libwmf.  -*- Perl -*-
-
-@ACCEPT_CATEGORIES = qw(truetype type1);
-
-package libwmf0_2_7;
-use Debian::Defoma::Common;
-use Debian::Defoma::Id;
-
-my $PkgDir = "$ROOTDIR/libwmf0.2-7.d";
-my $Fontmap = "$PkgDir/fontmap";
-my $Id;
-
-sub init {
-    $Id ||= defoma_id_open_cache();
-
-    return 0;
-}
-
-sub register {
-    my($font, @hints) = @_;
-
-    my $hint = parse_hints_start(@hints);
-    defined($hint->{FontName}) or return 1;
-    my $fontname = $hint->{FontName};
-    $fontname =~ s/ .*//;
-    my $priority = $hint->{Priority} || 20;
-
-    defoma_id_register($Id, type => 'real', font => $font,
-		       id => $fontname, priority => $priority,
-		       hints => join(' ', @hints));
-    if (defined($hint->{Alias})) {
-	for my $alias (split(/ /, $hint->{Alias})) {
-	    defoma_id_register($Id, type => 'alias', font => $font,
-			       id => $alias, priority => $priority,
-			       origin => $fontname);
-	}
-    }
-
-    return 0;
-}
-
-sub unregister {
-    my($font) = @_;
-
-    defoma_id_unregister($Id, type => 'alias', font => $font);
-    defoma_id_unregister($Id, type => 'real',  font => $font);
-
-    return 0;
-}
-
-sub term {
-    if ($Id) {
-	open(FONTMAP, ">$Fontmap.tmp") or die "$Fontmap.tmp: $!\n";
-
-	print FONTMAP "<?xml version=\"1.0\"?>\n";
-	print FONTMAP "<fontmap>\n";
-
-	for my $i (defoma_id_grep_cache($Id, 'installed', sorttype => 'p')) {
-	    my $hint = parse_hints_start(defoma_id_get_hints($Id, $i));
-	    my @attrs;
-
-	    push(@attrs, format => $Id->{e_category}->[$i]);
-
-	    push(@attrs, metrics => $hint->{AFM})
-		if defined($hint->{AFM});
-
-	    push(@attrs, glyphs => $Id->{e_font}->[$i]);
-
-	    push(@attrs, name => $Id->{e_id}->[$i]);
-
-	    my $fullname = $Id->{e_id}->[$i];
-	    # ipa_font_sys_map() determines whether a font is italic by
-	    # searching the full name.
-	    $fullname .= " ($1)"
-		if $fullname !~ /Italic|Oblique/
-		   && defined($hint->{Shape})
-		   && $hint->{Shape} =~ /(Italic|Oblique)/;
-	    push @attrs, fullname => $fullname;
-
-	    my $familyname;
-	    if (defined($hint->{Family})) {
-		$familyname = $hint->{Family};
-		$familyname =~ tr/_/ /;
-	    } else {
-		$familyname = $Id->{e_id}->[$i];
-	    }
-	    push(@attrs, familyname => $familyname);
-
-	    push(@attrs, weight => $hint->{Weight})
-		if defined($hint->{Weight});
-
-	    push(@attrs, version => '0.1');
-
-	    print FONTMAP "  <font";
-	    while (my($attr, $value) = splice(@attrs, 0, 2)) {
-		print FONTMAP " $attr=\"$value\"";
-	    }
-	    print FONTMAP "/>\n";
-	}
-
-	print FONTMAP "</fontmap>\n";
-
-	close(FONTMAP) or die "$Fontmap.tmp: $!\n";
-
-	# Atomically replace old fontmap.
-	rename("$Fontmap.tmp", $Fontmap) or die "$Fontmap: $!\n" ;
-
-	defoma_id_close_cache($Id);
-	undef($Id);
-    }
-
-    return 0;
-}
-
-sub dispatch {
-    my($command, @args) = @_;
-
-    if (my $code = __PACKAGE__->can($command)) {
-	return $code->(@args);
-    } else {
-	return 0;
-    }
-}
-
-*truetype = *dispatch;
-*type1 = *dispatch;
-
-1;
diff -Nru libwmf-0.2.8.4.old/debian/dirs libwmf-0.2.8.4/debian/dirs
--- libwmf-0.2.8.4.old/debian/dirs	2011-11-15 19:05:00.076242030 +0100
+++ libwmf-0.2.8.4/debian/dirs	1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-var/lib/defoma/libwmf0.2-7.d
diff -Nru libwmf-0.2.8.4.old/debian/rules libwmf-0.2.8.4/debian/rules
--- libwmf-0.2.8.4.old/debian/rules	2011-11-15 19:05:00.076242030 +0100
+++ libwmf-0.2.8.4/debian/rules	2011-12-17 19:57:35.346977526 +0100
@@ -8,10 +8,6 @@
 libwmf_pkg := libwmf0.2-7
 
 DEB_CONFIGURE_EXTRA_FLAGS += --with-docdir=/usr/share/doc/$(libwmf_pkg) \
-	     --with-fontdir=/var/lib/defoma/$(libwmf_pkg).d \
-	     --with-gsfontdir=/var/lib/defoma/$(libwmf_pkg).d \
-	     --with-sysfontmap=/var/lib/defoma/$(libwmf_pkg).d/fontmap \
-	     --with-gsfontmap=/var/lib/defoma/$(libwmf_pkg).d/fontmap.gs \
 	     --with-xtrafontmap=/etc/libwmf.fontmap
 
 DEB_DH_MAKESHLIBS_ARGS_$(libwmf_pkg) += -X "/usr/lib/gdk-pixbuf-2.0" -V "$(libwmf_pkg) (>= 0.2.8.4)"

Attachment: signature.asc
Description: Digital signature


Reply to: