Blame SOURCES/ghostscript-cups-colord.patch
|
|
c9d7fc |
diff -up ghostscript-9.07/cups/gstoraster.c.cups-colord ghostscript-9.07/cups/gstoraster.c
|
|
|
c9d7fc |
--- ghostscript-9.07/cups/gstoraster.c.cups-colord 2013-07-01 17:06:10.977743028 +0100
|
|
|
c9d7fc |
+++ ghostscript-9.07/cups/gstoraster.c 2013-07-01 17:18:36.597852666 +0100
|
|
|
c9d7fc |
@@ -596,11 +596,21 @@ main (int argc, char **argv, char *envp[
|
|
|
c9d7fc |
|
|
|
c9d7fc |
qualifier = colord_get_qualifier_for_ppd (ppd);
|
|
|
c9d7fc |
if (qualifier != NULL) {
|
|
|
c9d7fc |
+ const char *env_printer = getenv("PRINTER");
|
|
|
c9d7fc |
+ char *device_id;
|
|
|
c9d7fc |
|
|
|
c9d7fc |
- fprintf(stderr, "DEBUG: PPD uses qualifier '%s.%s.%s'\n",
|
|
|
c9d7fc |
- qualifier[0], qualifier[1], qualifier[2]);
|
|
|
c9d7fc |
- icc_profile = colord_get_profile_for_device_id (getenv("PRINTER"),
|
|
|
c9d7fc |
- (const char**) qualifier);
|
|
|
c9d7fc |
+ if (env_printer) {
|
|
|
c9d7fc |
+ device_id = malloc (5 + strlen (env_printer) + 1);
|
|
|
c9d7fc |
+ if (device_id) {
|
|
|
c9d7fc |
+ strcpy (device_id, "cups-");
|
|
|
c9d7fc |
+ strcpy (device_id + 5, env_printer);
|
|
|
c9d7fc |
+ fprintf(stderr, "DEBUG: PPD uses qualifier '%s.%s.%s'\n",
|
|
|
c9d7fc |
+ qualifier[0], qualifier[1], qualifier[2]);
|
|
|
c9d7fc |
+ icc_profile = colord_get_profile_for_device_id (device_id,
|
|
|
c9d7fc |
+ (const char**) qualifier);
|
|
|
c9d7fc |
+ free (device_id);
|
|
|
c9d7fc |
+ }
|
|
|
c9d7fc |
+ }
|
|
|
c9d7fc |
|
|
|
c9d7fc |
/* fall back to the PPD */
|
|
|
c9d7fc |
if (icc_profile == NULL)
|