From e9d3d79e4f1f2cbc8078293d78deb6e5dfbbb987 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 21 Aug 2013 12:54:19 +0100 Subject: [PATCH 1/2] Tweak filter costs for gstoraster (part of bug #998977). Resolves: rhbz#998977 --- ghostscript-gstoraster-costs.patch | 11 +++++++++++ ghostscript.spec | 9 ++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ghostscript-gstoraster-costs.patch diff --git a/ghostscript-gstoraster-costs.patch b/ghostscript-gstoraster-costs.patch new file mode 100644 index 0000000..e811d47 --- /dev/null +++ b/ghostscript-gstoraster-costs.patch @@ -0,0 +1,11 @@ +diff -up ghostscript-9.07/cups/gstoraster.convs.gstoraster-costs ghostscript-9.07/cups/gstoraster.convs +--- ghostscript-9.07/cups/gstoraster.convs.gstoraster-costs 2013-02-14 07:58:16.000000000 +0000 ++++ ghostscript-9.07/cups/gstoraster.convs 2013-08-21 12:52:25.255346352 +0100 +@@ -26,5 +26,5 @@ + # + # CUPS file conversion rules for gstoraster filter + +-application/vnd.cups-pdf application/vnd.cups-raster 66 gstoraster +-application/vnd.cups-postscript application/vnd.cups-raster 100 gstoraster ++application/vnd.cups-pdf application/vnd.cups-raster 99 gstoraster ++application/vnd.cups-postscript application/vnd.cups-raster 200 gstoraster diff --git a/ghostscript.spec b/ghostscript.spec index 82b3ef5..367524e 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -5,7 +5,7 @@ Summary: A PostScript interpreter and renderer Name: ghostscript Version: %{gs_ver} -Release: 11%{?dist} +Release: 12%{?dist} # Included CMap data is Redistributable, no modification permitted, # see http://bugzilla.redhat.com/487510 @@ -31,6 +31,7 @@ Patch12: ghostscript-strange-fonts.patch Patch13: ghostscript-wrf-snprintf.patch Patch14: ghostscript-cups-colord.patch Patch15: ghostscript-zfapi-crash.patch +Patch16: ghostscript-gstoraster-costs.patch Requires: urw-fonts >= 1.1, ghostscript-fonts Requires: poppler-data @@ -158,6 +159,9 @@ rm -rf expat freetype icclib jasper jpeg lcms lcms2 libpng openjpeg zlib cups/li # Upstream patch from bug #693921 to avoid zfapi crash (bug #969785). %patch15 -p1 -b .zfapi-crash +# Tweak filter costs for gstoraster (part of bug #998977). +%patch16 -p1 -b .gstoraster-costs + # Remove pdfopt man pages which were mistakenly left in (bug #963882). rm man/{de/,}pdfopt.1 @@ -357,6 +361,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libgs.so %changelog +* Wed Aug 21 2013 Tim Waugh 9.07-12 +- Tweak filter costs for gstoraster (part of bug #998977). + * Thu Jul 18 2013 Tim Waugh 9.07-11 - Remove bundled (and unused) lcms source. - Fixed license tag (AGPLv3+). From 836e3bbdeddd079474501964f6bf759e1802bf84 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 22 Aug 2013 15:37:20 +0100 Subject: [PATCH 2/2] Fixed character set conversion issue in pdfwrite (bug #999927). Resolves: rhbz#999927 --- ghostscript-pdf-charset-conv.patch | 17 +++++++++++++++++ ghostscript.spec | 9 ++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ghostscript-pdf-charset-conv.patch diff --git a/ghostscript-pdf-charset-conv.patch b/ghostscript-pdf-charset-conv.patch new file mode 100644 index 0000000..ef1b745 --- /dev/null +++ b/ghostscript-pdf-charset-conv.patch @@ -0,0 +1,17 @@ +diff -up ghostscript-9.07/base/gdevpdfe.c.pdf-charset-conv ghostscript-9.07/base/gdevpdfe.c +--- ghostscript-9.07/base/gdevpdfe.c.pdf-charset-conv 2013-08-22 15:17:11.883531983 +0100 ++++ ghostscript-9.07/base/gdevpdfe.c 2013-08-22 15:17:46.762697347 +0100 +@@ -380,10 +380,10 @@ pdf_xmp_write_translated(gx_device_pdf * + } + memset(buf1, 0x00, (j * sizeof(UTF16)) + 2); + for (i = 0; i < j; i++) { +- if (buf0[i] <= 0x7f || buf0[0] >= 0xAE) { +- if (buf0[0] == 0x7f) { ++ if (buf0[i] <= 0x7f || buf0[i] >= 0xAE) { ++ if (buf0[i] == 0x7f) { + emprintf1(pdev->memory, "PDFDocEncoding %x cannot be represented in Unicode\n", +- buf0[0]); ++ buf0[i]); + } else + buf1[(i * 2) + 3] = buf0[i]; + } else { diff --git a/ghostscript.spec b/ghostscript.spec index 367524e..5130845 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -5,7 +5,7 @@ Summary: A PostScript interpreter and renderer Name: ghostscript Version: %{gs_ver} -Release: 12%{?dist} +Release: 13%{?dist} # Included CMap data is Redistributable, no modification permitted, # see http://bugzilla.redhat.com/487510 @@ -32,6 +32,7 @@ Patch13: ghostscript-wrf-snprintf.patch Patch14: ghostscript-cups-colord.patch Patch15: ghostscript-zfapi-crash.patch Patch16: ghostscript-gstoraster-costs.patch +Patch17: ghostscript-pdf-charset-conv.patch Requires: urw-fonts >= 1.1, ghostscript-fonts Requires: poppler-data @@ -162,6 +163,9 @@ rm -rf expat freetype icclib jasper jpeg lcms lcms2 libpng openjpeg zlib cups/li # Tweak filter costs for gstoraster (part of bug #998977). %patch16 -p1 -b .gstoraster-costs +# Fixed character set conversion issue in pdfwrite (bug #999927). +%patch17 -p1 -b .pdf-charset-conv + # Remove pdfopt man pages which were mistakenly left in (bug #963882). rm man/{de/,}pdfopt.1 @@ -361,6 +365,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libgs.so %changelog +* Thu Aug 22 2013 Tim Waugh 9.07-13 +- Fixed character set conversion issue in pdfwrite (bug #999927). + * Wed Aug 21 2013 Tim Waugh 9.07-12 - Tweak filter costs for gstoraster (part of bug #998977).