[ghostscript/f12/master] Applied patch to let gdevcups use automatic memory allocation.

Tim Waugh twaugh at fedoraproject.org
Thu Sep 2 15:15:58 UTC 2010


commit d24aadea6e24b25b1e746c62316b7908e17ad438
Author: Tim Waugh <twaugh at redhat.com>
Date:   Thu Sep 2 14:42:58 2010 +0100

    Applied patch to let gdevcups use automatic memory allocation.

 ghostscript-gdevcups-ripcache.patch |   31 +++++++++++++++++++++++++++++++
 ghostscript.spec                    |    7 +++++++
 2 files changed, 38 insertions(+), 0 deletions(-)
---
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 <twaugh at redhat.com> 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).
 


More information about the scm-commits mailing list