2
## ubuntu-default-ripcache-size-auto.dpatch by Till Kamppeter <till.kamppeter@gmail.com>
4
## DP: Set the default RIPCache to "auto" on Ubuntu. This makes Ghostscript
5
## DP: (pstoraster, pdftoraster) determine the needed amount of memory
6
## DP: completely automatically, which makes nearly all files rendering
7
## DP: correctly with the CUPS Raster output device. This requires Ghostscript
8
## DP: 9.00 or newer or Ghostscript with the appropriate change patched in.
9
## DP: As this is only assured for Ubuntu now, we apply the patch only to
10
## DP: Ubuntu and stay with the dynamic cache size approach for Debian.
11
## DP: The upstream hardcoded default of 8 MB (default of CUPS and of
12
## DP: Ghostscript 8.71 and older is too small for complex documents.
13
## DP: The RIPCache is also used by the imagetops CUPS filter, which will
14
## DP: default to 32 MB with our "auto" setting. It worked already perfectly
15
## DP: with the old 8 MB.
17
[ "`lsb_release -is 2>/dev/null`" = "Ubuntu" ] || { echo -n '(ignored)' >&2; exit 0; }
18
. /usr/share/dpatch/dpatch-run
21
diff -urNad cups-1.4.1~/scheduler/conf.c cups-1.4.1/scheduler/conf.c
22
--- cups-1.4.1~/scheduler/conf.c 2009-09-23 22:58:51.678030419 +0200
23
+++ cups-1.4.1/scheduler/conf.c 2009-09-23 22:59:03.426053168 +0200
26
cupsdClearString(&DefaultPaperSize);
28
- cupsdSetString(&RIPCache, "8m");
29
+ cupsdSetString(&RIPCache, "auto");
31
cupsdSetString(&TempDir, NULL);
33
diff -urNad cups-1.4.1~/scheduler/cupsfilter.c cups-1.4.1/scheduler/cupsfilter.c
34
--- cups-1.4.1~/scheduler/cupsfilter.c 2009-06-05 23:38:52.000000000 +0200
35
+++ cups-1.4.1/scheduler/cupsfilter.c 2009-09-23 22:58:57.158032299 +0200
38
set_string(&FontPath, CUPS_FONTPATH);
40
- set_string(&RIPCache, "8m");
41
+ set_string(&RIPCache, "auto");
43
if ((temp = getenv("CUPS_SERVERBIN")) != NULL)
44
set_string(&ServerBin, temp);