From d24aadea6e24b25b1e746c62316b7908e17ad438 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Thu, 2 Sep 2010 14:42:58 +0100 Subject: [PATCH] Applied patch to let gdevcups use automatic memory allocation. --- ghostscript-gdevcups-ripcache.patch | 31 +++++++++++++++++++++++++++++ ghostscript.spec | 7 +++++++ 2 files changed, 38 insertions(+) create mode 100644 ghostscript-gdevcups-ripcache.patch diff --git a/ghostscript-gdevcups-ripcache.patch b/ghostscript-gdevcups-ripcache.patch new file mode 100644 index 0000000..9c6347d --- /dev/null +++ b/ghostscript-gdevcups-ripcache.patch @@ -0,0 +1,31 @@ +diff -up ghostscript-8.71/cups/gdevcups.c.gdevcups-ripcache ghostscript-8.71/cups/gdevcups.c +--- ghostscript-8.71/cups/gdevcups.c.gdevcups-ripcache 2010-09-02 14:38:53.886818591 +0100 ++++ ghostscript-8.71/cups/gdevcups.c 2010-09-02 14:40:49.925943426 +0100 +@@ -915,8 +915,7 @@ cups_get_space_params(const gx_device_pr + switch (sscanf(cache_env, "%f%254s", &cache_size, cache_units)) + { + case 0 : +- cache_size = 8 * 1024 * 1024; +- break; ++ return; + case 1 : + cache_size *= 4 * CUPS_TILE_SIZE * CUPS_TILE_SIZE; + break; +@@ -933,12 +932,15 @@ cups_get_space_params(const gx_device_pr + } + } + else +- cache_size = 8 * 1024 * 1024; ++ return; ++ ++ if (cache_size == 0) ++ return; + + dprintf1("DEBUG2: cache_size = %.0f\n", cache_size); + + space_params->MaxBitmap = (int)cache_size; +- space_params->BufferSpace = (int)cache_size / 10; ++ space_params->BufferSpace = (int)cache_size; + } + + diff --git a/ghostscript.spec b/ghostscript.spec index d20b29c..7d656cd 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -41,6 +41,7 @@ Patch22: ghostscript-SEARCH_HERE_FIRST.patch Patch23: ghostscript--P-.patch Patch24: ghostscript-epstopdf-failure.patch Patch25: ghostscript-bbox-close.patch +Patch26: ghostscript-gdevcups-ripcache.patch Requires: urw-fonts >= 1.1, ghostscript-fonts BuildRequires: xz @@ -190,6 +191,10 @@ rm -rf libpng zlib jpeg jasper # Applied patch to fix NULL dereference in bbox driver (bug #591624). %patch25 -p1 -b .bbox-close +# Applied patch to let gdevcups use automatic memory allocation. Use +# RIPCache=auto in /etc/cups/cupsd.conf to enable. +%patch26 -p1 -b .gdevcups-ripcache + # Convert manual pages to UTF-8 from8859_1() { iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_" @@ -379,6 +384,8 @@ rm -rf $RPM_BUILD_ROOT %changelog * Thu Sep 2 2010 Tim Waugh 8.71-12 +- Applied patch to let gdevcups use automatic memory allocation. Use + RIPCache=auto in /etc/cups/cupsd.conf to enable. - Applied patch to fix NULL dereference in bbox driver (bug #591624). - Applied upstream patch to fix iname.c segfault (bug #465311).