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