From 1195a89b90484e4ab11b1ec69fc141e5240d55d6 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Nov 24 2004 09:39:47 +0000 Subject: - Minor PPD.pm fix for PPD import. --- diff --git a/foomatic-bad-utf8.patch b/foomatic-bad-utf8.patch new file mode 100644 index 0000000..19eaf2c --- /dev/null +++ b/foomatic-bad-utf8.patch @@ -0,0 +1,24 @@ +--- foomatic-db-engine-3.0.2/lib/Foomatic/PPD.pm.bad-utf8 2002-10-11 02:16:34.000000000 +0100 ++++ foomatic-db-engine-3.0.2/lib/Foomatic/PPD.pm 2004-11-23 19:32:26.000000000 +0000 +@@ -300,11 +300,17 @@ + sub xml_esc { + my ($in) = (@_); + +- $in =~ s!&!&!g; +- $in =~ s!!>!g; ++ @chars = split(//,$in); ++ $ascii = ""; ++ foreach (@chars) { ++ if (ord ($_) > 127) { $_="?"; } ++ $ascii .= $_; ++ } ++ $ascii =~ s!&!&!g; ++ $ascii =~ s!!>!g; + +- return $in; ++ return $ascii; + } + + sub pdq_filter { diff --git a/foomatic.spec b/foomatic.spec index c43e972..fdac31c 100644 --- a/foomatic.spec +++ b/foomatic.spec @@ -6,7 +6,7 @@ Summary: Foomatic printer database. Name: foomatic Version: 3.0.2 -Release: 7 +Release: 8 License: GPL Group: System Environment/Libraries @@ -65,6 +65,9 @@ Patch13: foomatic-ieee1284.patch # Make foomatic-db-engine build. Patch14: foomatic-ampathxml.patch +# Handle non-UTF-8 encodings in imported PPD files. +Patch15: foomatic-bad-utf8.patch + Url: http://www.linuxprinting.org BuildRequires: perl >= 3:5.8.1 BuildRequires: libxml2-devel @@ -120,6 +123,7 @@ chmod a+x mkinstalldirs %patch6 -p1 -b .ppdload %patch14 -p1 -b .ampathxml %patch10 -p1 -b .xml-cflags +%patch15 -p1 -b .bad-utf8 ./make_configure popd @@ -272,6 +276,9 @@ rm -fr %buildroot $RPM_BUILD_DIR/%{name} %{_mandir}/*/* %changelog +* Wed Nov 24 2004 Tim Waugh 3.0.2-8 +- Minor PPD.pm fix for PPD import. + * Mon Nov 22 2004 Tim Waugh 3.0.2-7 - Applied some foomatic-rip fixes from CVS.