Use correct colord device ID in gstoraster.
This commit is contained in:
parent
31ae65acee
commit
b364eac6bc
29
ghostscript-cups-colord.patch
Normal file
29
ghostscript-cups-colord.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff -up ghostscript-9.07/cups/gstoraster.c.cups-colord ghostscript-9.07/cups/gstoraster.c
|
||||
--- ghostscript-9.07/cups/gstoraster.c.cups-colord 2013-07-01 17:06:10.977743028 +0100
|
||||
+++ ghostscript-9.07/cups/gstoraster.c 2013-07-01 17:18:36.597852666 +0100
|
||||
@@ -596,11 +596,21 @@ main (int argc, char **argv, char *envp[
|
||||
|
||||
qualifier = colord_get_qualifier_for_ppd (ppd);
|
||||
if (qualifier != NULL) {
|
||||
+ const char *env_printer = getenv("PRINTER");
|
||||
+ char *device_id;
|
||||
|
||||
- fprintf(stderr, "DEBUG: PPD uses qualifier '%s.%s.%s'\n",
|
||||
- qualifier[0], qualifier[1], qualifier[2]);
|
||||
- icc_profile = colord_get_profile_for_device_id (getenv("PRINTER"),
|
||||
- (const char**) qualifier);
|
||||
+ if (env_printer) {
|
||||
+ device_id = malloc (5 + strlen (env_printer) + 1);
|
||||
+ if (device_id) {
|
||||
+ strcpy (device_id, "cups-");
|
||||
+ strcpy (device_id + 5, env_printer);
|
||||
+ fprintf(stderr, "DEBUG: PPD uses qualifier '%s.%s.%s'\n",
|
||||
+ qualifier[0], qualifier[1], qualifier[2]);
|
||||
+ icc_profile = colord_get_profile_for_device_id (device_id,
|
||||
+ (const char**) qualifier);
|
||||
+ free (device_id);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
/* fall back to the PPD */
|
||||
if (icc_profile == NULL)
|
@ -5,7 +5,7 @@ Summary: A PostScript interpreter and renderer
|
||||
Name: ghostscript
|
||||
Version: %{gs_ver}
|
||||
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
|
||||
# Included CMap data is Redistributable, no modification permitted,
|
||||
# see http://bugzilla.redhat.com/487510
|
||||
@ -29,6 +29,7 @@ Patch10: ghostscript-gs_sprintf.patch
|
||||
Patch11: ghostscript-pdfwrite-segfault.patch
|
||||
Patch12: ghostscript-strange-fonts.patch
|
||||
Patch13: ghostscript-wrf-snprintf.patch
|
||||
Patch14: ghostscript-cups-colord.patch
|
||||
|
||||
Requires: urw-fonts >= 1.1, ghostscript-fonts
|
||||
Requires: poppler-data
|
||||
@ -150,6 +151,9 @@ rm -rf expat freetype icclib jasper jpeg lcms2 libpng openjpeg zlib cups/libs
|
||||
# Use more caution when converting floats to strings (bug #980085).
|
||||
%patch13 -p1 -b .wrf-snprintf
|
||||
|
||||
# Use correct colord device ID in gstoraster.
|
||||
%patch14 -p1 -b .cups-colord
|
||||
|
||||
# Remove pdfopt man pages which were mistakenly left in (bug #963882).
|
||||
rm man/{de/,}pdfopt.1
|
||||
|
||||
@ -349,6 +353,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/libgs.so
|
||||
|
||||
%changelog
|
||||
* Mon Jul 1 2013 Tim Waugh <twaugh@redhat.com> 9.07-8
|
||||
- Use correct colord device ID in gstoraster.
|
||||
|
||||
* Mon Jul 1 2013 Tim Waugh <twaugh@redhat.com> 9.07-7
|
||||
- Use more caution when converting floats to strings (bug #980085).
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user