diff -u fontconfig-2.8.0/debian/control fontconfig-2.8.0/debian/control --- fontconfig-2.8.0/debian/control +++ fontconfig-2.8.0/debian/control @@ -5,7 +5,7 @@ XSBC-Original-Maintainer: Keith Packard Uploaders: Josselin Mouette Build-Depends: cdbs (>= 0.4.90ubuntu8), debhelper (>= 8.1.2ubuntu2), - libfreetype6-dev (>= 2.1.7), libexpat1-dev, defoma (>= 0.7.0), + libfreetype6-dev (>= 2.1.7), libexpat1-dev, binutils (>= 2.12.90.0.9), po-debconf Standards-Version: 3.8.3 @@ -14,7 +14,6 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, fontconfig-config Replaces: fontconfig-config (<< 2.5.93-1) -Suggests: defoma (>= 0.7.0) Multi-Arch: foreign Description: generic font configuration library - support binaries Fontconfig is a font configuration and customization library, which @@ -30,8 +29,8 @@ This package contains a program to maintain the fontconfig cache (fc-cache), a sample program to list installed fonts (fc-list), a program to test the matching rules (fc-match) and a program to dump the binary - cache files in string form (fc-cat). It also makes fonts managed by defoma - available to fontconfig applications. + cache files in string form (fc-cat). It no longer makes fonts managed by + defoma available to fontconfig applications. Package: fontconfig-config Section: fonts diff -u fontconfig-2.8.0/debian/fontconfig.postinst fontconfig-2.8.0/debian/fontconfig.postinst --- fontconfig-2.8.0/debian/fontconfig.postinst +++ fontconfig-2.8.0/debian/fontconfig.postinst @@ -9,18 +9,6 @@ exit 0 fi -if [ "$1" = configure ]; then - # If defoma is installed, ensure Defoma subst file exists, with some default substitutions - if [ -x "`which defoma-subst`" ]; then - if ! defoma-subst check-rule fontconfig; then - defoma-subst new-rule fontconfig \ - 'serif --GeneralFamily,* Roman --Shape Serif Upright --Weight Medium' \ - 'sans-serif --GeneralFamily,* SansSerif --Shape NoSerif Upright --Weight Medium' \ - 'monospace --Width,* Fixed --GeneralFamily,2 Typewriter --Shape Upright --Weight Medium' - fi - fi -fi - #DEBHELPER# if [ "$1" = configure ]; then diff -u fontconfig-2.8.0/debian/changelog fontconfig-2.8.0/debian/changelog --- fontconfig-2.8.0/debian/changelog +++ fontconfig-2.8.0/debian/changelog @@ -1,3 +1,10 @@ +fontconfig (2.8.0-3ubuntu9) precise-proposed; urgency=low + + * Cherry pick from Debian experimental: Remove defoma support. + Closes: #651493. + + -- Steve Langasek Tue, 17 Apr 2012 22:28:20 -0700 + fontconfig (2.8.0-3ubuntu8) precise; urgency=low * Drop 08_ug_us_orth.patch again, as per Eagle Burkut. (Locale was renamed reverted: --- fontconfig-2.8.0/debian/fontconfig.links +++ fontconfig-2.8.0.orig/debian/fontconfig.links @@ -1 +0,0 @@ -/var/lib/defoma/fontconfig.d/fonts.conf /etc/fonts/conf.d/30-defoma.conf diff -u fontconfig-2.8.0/debian/rules fontconfig-2.8.0/debian/rules --- fontconfig-2.8.0/debian/rules +++ fontconfig-2.8.0/debian/rules @@ -40,4 +39,0 @@ - -# defoma stuff -binary-post-install/fontconfig:: - dh_installdefoma diff -u fontconfig-2.8.0/debian/fontconfig.postrm fontconfig-2.8.0/debian/fontconfig.postrm --- fontconfig-2.8.0/debian/fontconfig.postrm +++ fontconfig-2.8.0/debian/fontconfig.postrm @@ -5,10 +5,7 @@ case "$1" in purge) rm -f /var/log/fontconfig.log - rm -rf /var/lib/defoma/fontconfig.d - rm -f /etc/defoma/fontconfig.subst-rule rm -rf /var/cache/fontconfig - rmdir /etc/defoma 2> /dev/null || true ;; esac diff -u fontconfig-2.8.0/debian/fontconfig-config.postinst fontconfig-2.8.0/debian/fontconfig-config.postinst --- fontconfig-2.8.0/debian/fontconfig-config.postinst +++ fontconfig-2.8.0/debian/fontconfig-config.postinst @@ -25,9 +25,16 @@ CONFAVAIL=/etc/fonts/conf.avail CONFDIR=/etc/fonts/conf.d -# Add the defoma configuration -defoma_link="30-defoma.conf" -ln -sf /var/lib/defoma/fontconfig.d/fonts.conf $CONFDIR/$defoma_link +# Remove old defoma stuff +if [ -x "`which defoma-app 2>/dev/null`" ]; then + defoma-app purge fontconfig >/dev/null || true +fi +DEFOMA=/var/lib/defoma/fontconfig.d/ +if [ -d $DEFOMA ]; then + rm -f $DEFOMA/fonts.conf + rmdir $DEFOMA +fi +rm -f /etc/defoma/fontconfig.subst-rule unhinted="10-unhinted.conf" autohint="10-autohint.conf" reverted: --- fontconfig-2.8.0/debian/fontconfig.defoma +++ fontconfig-2.8.0.orig/debian/fontconfig.defoma @@ -1,240 +0,0 @@ -# -*- perl -*- -# Defoma configuration script for fontconfig -# Copyright © 2003 Angus Lees -# This file is hereby placed into the public domain. - -@ACCEPT_CATEGORIES = qw(type1 truetype cid); -# .. and any other categories supported by freetype - -package fontconfig; - -use Debian::Defoma::Common; -use Debian::Defoma::Id; -use Debian::Defoma::Subst; - -use strict; -use warnings; - -my $PkgDir = "$ROOTDIR/fontconfig.d"; -my ($Id, $Sb); - -my %UpdatedDirectories = (); - -sub init { - $Id ||= defoma_id_open_cache() or return 1; - $Sb ||= defoma_subst_open(rulename => 'fontconfig', - threshold => 70, - idobject => $Id) or return 1; - - return 0; -} - -sub register { - my $font = shift; - my $hints = parse_hints_start(@_); - - return 1 unless $hints->{FontName}; - - my $priority = $hints->{Priority} || 20; - my ($fontname) = split / +/, $hints->{FontName}; - my @alias = split / +/, $hints->{Alias} if $hints->{Alias}; - - defoma_id_register($Id, type => 'real', font => $font, - id => $fontname, priority => $priority, - hints => join(' ', @_)); - - foreach my $alias (@alias) { - defoma_id_register($Id, type => 'alias', font => $font, - id => $alias, priority => $priority, - origin => $fontname); - } - - defoma_subst_register($Sb, $font, $fontname); - - return 0; -} - -sub unregister { - my $font = shift; - defoma_subst_unregister($Sb, $font); - defoma_id_unregister($Id, type => 'alias', font => $font); - defoma_id_unregister($Id, type => 'real', font => $font); - return 0; -} - -sub dirname { - my $path = shift; - - $path =~ s/\/[^\/]*$//; - return $path; -} - -sub do_install_real { - my $font = shift; - my $id = shift; - - my $dir = dirname ($font); - $UpdatedDirectories{$dir} = 1; - return 0; -} - -sub do_remove_real { - my $font = shift; - my $id = shift; - - my $dir = dirname ($font); - $UpdatedDirectories{$dir} = 1; - - return 0; -} - -sub fontconfig_dirs { - my %dirs = (); - - system ('fc-cache', '-s'); - open my $file, "fc-list : file |" or return (); - while (<$file>) { - my $dir = dirname ($_); - if (!exists $dirs{$dir}) { - $dirs{$dir} = 1; - } - } - close $file; - return %dirs; -} - -# -# Clean up from old fontconfig defoma mechanism which -# placed symlinks to each fontfile in the fontconfig.d directory -# -sub clean_oldstyle_dirs { - opendir (DIR, $PkgDir) or return 1; - my @dirs = grep { /^[^.]/ && -d "$PkgDir/$_" } readdir (DIR); - closedir DIR; - foreach my $dir (@dirs) { - my $subdir = "$PkgDir/$dir"; - if (opendir (DIR, $subdir)) { - my @files = grep { /^[^.]/ && -l "$subdir/$_" } readdir (DIR); - closedir DIR; - foreach my $file (@files) { - if ( -l "$subdir/$file" ) { - unlink "$subdir/$file"; - } - } - rmdir $subdir; - } - } -} - -sub term { - return unless $Id; - - -e "/etc/fonts/fonts.conf" or return 0; - - clean_oldstyle_dirs (); - # - # Update modified directories - # - - my @dirs = keys (%UpdatedDirectories); - if (@dirs) { - print "Updating fontconfig cache for @dirs\n"; - system ("fc-cache", "-f", @dirs); - # - # make sure caches leading to new directories are updated - # - system ("fc-cache", "-s"); - } - - # Empty our config file to see - # which directories are reachable without it - - open my $smash_fh, '>', "$PkgDir/fonts.conf" or return 1; - print $smash_fh < - - - - -EOF - close $smash_fh; - my %dirs = fontconfig_dirs (); - - open my $fh, '>', "$PkgDir/fonts.conf" or return 1; - - print $fh < - - - -EOF - - # directories - my %newdirs = (); - - foreach (defoma_id_get_font($Id, installed => type => 'SrI')) { - my $dir = dirname($Id->{e_font}->[$_]); - if (!exists $dirs{$dir} && !exists $newdirs{$dir}) { - print $fh " $dir\n"; - $newdirs{$dir} = 1; - } - } - - # aliases - foreach (defoma_id_get_font($Id, installed => type => 'SaI')) { - print $fh < - $Id->{e_id}->[$_] - $Id->{e_depid}->[$_] - -EOF - } - - # substituded fonts - foreach (defoma_id_get_font($Id, installed => type => 'SSI')) { - print $fh < - $Id->{e_id}->[$_] - $Id->{e_depid}->[$_] - -EOF - } - - print $fh "\n"; - - close $fh; - - defoma_subst_close($Sb); - defoma_id_close_cache($Id); - - system ("fc-cache", "-s"); - return 0; -} - -sub main { - my $cmd = shift; - - if ($cmd eq 'init') { - init(); - } elsif ($cmd eq 'register') { - return register(@_); - } elsif ($cmd eq 'unregister') { - return unregister(@_); - } elsif ($cmd eq 'do-install-real') { - return do_install_real(@_); - } elsif ($cmd eq 'do-remove-real') { - return do_remove_real(@_); - } elsif ($cmd eq 'term') { - return term(@_); - } - - 0; -} - -no warnings; - -*truetype = \&main; -*type1 = \&main; -*cid = \&main; - -1;