- Fixed pdftoraster so that it waits for its sub-process to exit.
- Another gdevcups duplex fix from upstream revision 10631 (bug #541604).
This commit is contained in:
parent
4a93f4fa87
commit
d7e1d637e5
@ -1,6 +1,6 @@
|
|||||||
diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/gdevcups.c
|
diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/gdevcups.c
|
||||||
--- ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis 2010-01-21 11:17:55.974149011 +0000
|
--- ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis 2010-01-25 08:34:15.197084192 +0000
|
||||||
+++ ghostscript-8.70/cups/gdevcups.c 2010-01-21 11:18:54.823149257 +0000
|
+++ ghostscript-8.70/cups/gdevcups.c 2010-01-25 08:34:21.603208913 +0000
|
||||||
@@ -605,8 +605,6 @@ private void
|
@@ -605,8 +605,6 @@ private void
|
||||||
cups_get_matrix(gx_device *pdev, /* I - Device info */
|
cups_get_matrix(gx_device *pdev, /* I - Device info */
|
||||||
gs_matrix *pmat) /* O - Physical transform matrix */
|
gs_matrix *pmat) /* O - Physical transform matrix */
|
||||||
@ -141,7 +141,17 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
pmat->xx = (float)cups->header.HWResolution[0] / 72.0;
|
pmat->xx = (float)cups->header.HWResolution[0] / 72.0;
|
||||||
pmat->xy = 0.0;
|
pmat->xy = 0.0;
|
||||||
pmat->yx = 0.0;
|
pmat->yx = 0.0;
|
||||||
@@ -2799,6 +2703,7 @@ cups_put_params(gx_device *pdev, /*
|
@@ -2792,13 +2696,16 @@ cups_put_params(gx_device *pdev, /*
|
||||||
|
int color_set; /* Were the color attrs set? */
|
||||||
|
gdev_prn_space_params sp; /* Space parameter data */
|
||||||
|
int width, /* New width of page */
|
||||||
|
- height; /* New height of page */
|
||||||
|
+ height; /* New height of page */
|
||||||
|
+ static int width_old = 0, /* Previous width */
|
||||||
|
+ height_old = 0; /* Previous height */
|
||||||
|
ppd_attr_t *backside = NULL,
|
||||||
|
*backsiderequiresflippedmargins = NULL;
|
||||||
|
float swap;
|
||||||
int xflip = 0,
|
int xflip = 0,
|
||||||
yflip = 0;
|
yflip = 0;
|
||||||
int found = 0;
|
int found = 0;
|
||||||
@ -149,32 +159,22 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
|
|
||||||
dprintf2("DEBUG2: cups_put_params(%p, %p)\n", pdev, plist);
|
dprintf2("DEBUG2: cups_put_params(%p, %p)\n", pdev, plist);
|
||||||
|
|
||||||
@@ -2895,6 +2800,15 @@ cups_put_params(gx_device *pdev, /*
|
@@ -2897,6 +2804,14 @@ cups_put_params(gx_device *pdev, /*
|
||||||
size_set = param_read_float_array(plist, ".MediaSize", &arrayval) == 0 ||
|
|
||||||
param_read_float_array(plist, "PageSize", &arrayval) == 0;
|
|
||||||
margins_set = param_read_float_array(plist, "Margins", &arrayval) == 0;
|
margins_set = param_read_float_array(plist, "Margins", &arrayval) == 0;
|
||||||
|
color_set = param_read_int(plist, "cupsColorSpace", &intval) == 0 ||
|
||||||
|
param_read_int(plist, "cupsBitsPerColor", &intval) == 0;
|
||||||
+ /* We also recompute page size and margins if we simply get onto a new
|
+ /* We also recompute page size and margins if we simply get onto a new
|
||||||
+ page without necessarily having a page size change in the PostScript
|
+ page without necessarily having a page size change in the PostScript
|
||||||
+ code, as for some printers margins have to flipped on the back sides of
|
+ code, as for some printers margins have to flipped on the back sides of
|
||||||
+ the sheets (even pages) when printing duplex */
|
+ the sheets (even pages) when printing duplex */
|
||||||
+ if (cups->page != lastpage) {
|
+ if (cups->page != lastpage) {
|
||||||
+ size_set = 1;
|
+ size_set = 1;
|
||||||
+ margins_set = 1;
|
|
||||||
+ lastpage = cups->page;
|
+ lastpage = cups->page;
|
||||||
+ }
|
+ }
|
||||||
color_set = param_read_int(plist, "cupsColorSpace", &intval) == 0 ||
|
|
||||||
param_read_int(plist, "cupsBitsPerColor", &intval) == 0;
|
|
||||||
|
|
||||||
@@ -2995,7 +2909,7 @@ cups_put_params(gx_device *pdev, /*
|
stringoption(MediaClass, "MediaClass")
|
||||||
* Update margins/sizes as needed...
|
stringoption(MediaColor, "MediaColor")
|
||||||
*/
|
@@ -3011,6 +2926,7 @@ cups_put_params(gx_device *pdev, /*
|
||||||
|
|
||||||
- if (size_set)
|
|
||||||
+ if (size_set || margins_set)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Compute the page margins...
|
|
||||||
@@ -3011,6 +2925,7 @@ cups_put_params(gx_device *pdev, /*
|
|
||||||
if (cupsPPD != NULL)
|
if (cupsPPD != NULL)
|
||||||
{
|
{
|
||||||
dprintf1("DEBUG2: cups->header.Duplex = %d\n", cups->header.Duplex);
|
dprintf1("DEBUG2: cups->header.Duplex = %d\n", cups->header.Duplex);
|
||||||
@ -182,7 +182,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
dprintf1("DEBUG2: cups->page = %d\n", cups->page);
|
dprintf1("DEBUG2: cups->page = %d\n", cups->page);
|
||||||
dprintf1("DEBUG2: cupsPPD = %p\n", cupsPPD);
|
dprintf1("DEBUG2: cupsPPD = %p\n", cupsPPD);
|
||||||
|
|
||||||
@@ -3034,10 +2949,13 @@ cups_put_params(gx_device *pdev, /*
|
@@ -3034,10 +2950,13 @@ cups_put_params(gx_device *pdev, /*
|
||||||
{
|
{
|
||||||
xflip = 1;
|
xflip = 1;
|
||||||
if (backsiderequiresflippedmargins &&
|
if (backsiderequiresflippedmargins &&
|
||||||
@ -198,7 +198,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
}
|
}
|
||||||
else if (cups->header.Duplex &&
|
else if (cups->header.Duplex &&
|
||||||
(!cups->header.Tumble &&
|
(!cups->header.Tumble &&
|
||||||
@@ -3046,10 +2964,13 @@ cups_put_params(gx_device *pdev, /*
|
@@ -3046,10 +2965,13 @@ cups_put_params(gx_device *pdev, /*
|
||||||
{
|
{
|
||||||
xflip = 0;
|
xflip = 0;
|
||||||
if (backsiderequiresflippedmargins &&
|
if (backsiderequiresflippedmargins &&
|
||||||
@ -214,7 +214,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
}
|
}
|
||||||
else if (cups->header.Duplex &&
|
else if (cups->header.Duplex &&
|
||||||
((!cups->header.Tumble &&
|
((!cups->header.Tumble &&
|
||||||
@@ -3061,13 +2982,17 @@ cups_put_params(gx_device *pdev, /*
|
@@ -3061,13 +2983,17 @@ cups_put_params(gx_device *pdev, /*
|
||||||
{
|
{
|
||||||
xflip = 1;
|
xflip = 1;
|
||||||
if (backsiderequiresflippedmargins &&
|
if (backsiderequiresflippedmargins &&
|
||||||
@ -234,7 +234,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
xflip = 0;
|
xflip = 0;
|
||||||
yflip = 0;
|
yflip = 0;
|
||||||
}
|
}
|
||||||
@@ -3104,9 +3029,20 @@ cups_put_params(gx_device *pdev, /*
|
@@ -3104,9 +3030,20 @@ cups_put_params(gx_device *pdev, /*
|
||||||
((strlen(cups->header.cupsPageSizeName) == 0) ||
|
((strlen(cups->header.cupsPageSizeName) == 0) ||
|
||||||
(strcasecmp(cups->header.cupsPageSizeName, size->name) == 0)) &&
|
(strcasecmp(cups->header.cupsPageSizeName, size->name) == 0)) &&
|
||||||
#endif
|
#endif
|
||||||
@ -257,7 +257,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
@@ -3148,9 +3084,20 @@ cups_put_params(gx_device *pdev, /*
|
@@ -3148,9 +3085,20 @@ cups_put_params(gx_device *pdev, /*
|
||||||
((strlen(cups->header.cupsPageSizeName) == 0) ||
|
((strlen(cups->header.cupsPageSizeName) == 0) ||
|
||||||
(strcasecmp(cups->header.cupsPageSizeName, size->name) == 0)) &&
|
(strcasecmp(cups->header.cupsPageSizeName, size->name) == 0)) &&
|
||||||
#endif
|
#endif
|
||||||
@ -280,16 +280,27 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
@@ -3258,7 +3205,7 @@ cups_put_params(gx_device *pdev, /*
|
@@ -3290,12 +3238,17 @@ cups_put_params(gx_device *pdev, /*
|
||||||
* Reallocate memory if the size or color depth was changed...
|
|
||||||
*/
|
|
||||||
|
|
||||||
- if (color_set || size_set)
|
|
||||||
+ if (color_set || size_set || margins_set)
|
|
||||||
{
|
|
||||||
/*
|
/*
|
||||||
* Make sure the page image is the correct size - current Ghostscript
|
* Don't reallocate memory unless the device has been opened...
|
||||||
@@ -3769,13 +3716,22 @@ cups_print_chunked(gx_device_printer *pd
|
+ * Also reallocate only if the size has actually changed...
|
||||||
|
*/
|
||||||
|
|
||||||
|
- if (pdev->is_open)
|
||||||
|
+ if (pdev->is_open && (width != width_old || height != height_old))
|
||||||
|
{
|
||||||
|
+
|
||||||
|
+ width_old = width;
|
||||||
|
+ height_old = height;
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
- * Device is open, so reallocate...
|
||||||
|
+ * Device is open and size has changed, so reallocate...
|
||||||
|
*/
|
||||||
|
|
||||||
|
dprintf4("DEBUG2: Reallocating memory, [%.0f %.0f] = %dx%d pixels...\n",
|
||||||
|
@@ -3769,13 +3722,22 @@ cups_print_chunked(gx_device_printer *pd
|
||||||
unsigned char *srcptr, /* Pointer to data */
|
unsigned char *srcptr, /* Pointer to data */
|
||||||
*dstptr; /* Pointer to bits */
|
*dstptr; /* Pointer to bits */
|
||||||
int count; /* Count for loop */
|
int count; /* Count for loop */
|
||||||
@ -314,7 +325,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
}
|
}
|
||||||
if (cups->header.Duplex && cupsPPD &&
|
if (cups->header.Duplex && cupsPPD &&
|
||||||
((!cups->header.Tumble &&
|
((!cups->header.Tumble &&
|
||||||
@@ -3785,19 +3741,36 @@ cups_print_chunked(gx_device_printer *pd
|
@@ -3785,19 +3747,36 @@ cups_print_chunked(gx_device_printer *pd
|
||||||
(backside && (!strcasecmp(backside->value, "Flipped") ||
|
(backside && (!strcasecmp(backside->value, "Flipped") ||
|
||||||
!strcasecmp(backside->value, "ManualTumble"))))) &&
|
!strcasecmp(backside->value, "ManualTumble"))))) &&
|
||||||
!(cups->page & 1))
|
!(cups->page & 1))
|
||||||
@ -357,7 +368,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Grab the scanline data...
|
* Grab the scanline data...
|
||||||
@@ -3809,7 +3782,7 @@ cups_print_chunked(gx_device_printer *pd
|
@@ -3809,7 +3788,7 @@ cups_print_chunked(gx_device_printer *pd
|
||||||
gs_exit(gs_lib_ctx_get_non_gc_memory_t(), 1);
|
gs_exit(gs_lib_ctx_get_non_gc_memory_t(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,7 +377,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Flip the raster data before writing it...
|
* Flip the raster data before writing it...
|
||||||
@@ -3963,13 +3936,22 @@ cups_print_banded(gx_device_printer *pde
|
@@ -3963,13 +3942,22 @@ cups_print_banded(gx_device_printer *pde
|
||||||
unsigned char *srcptr; /* Pointer to data */
|
unsigned char *srcptr; /* Pointer to data */
|
||||||
unsigned char *cptr, *mptr, *yptr, /* Pointer to components */
|
unsigned char *cptr, *mptr, *yptr, /* Pointer to components */
|
||||||
*kptr, *lcptr, *lmptr; /* ... */
|
*kptr, *lcptr, *lmptr; /* ... */
|
||||||
@ -391,7 +402,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
}
|
}
|
||||||
if (cups->header.Duplex && cupsPPD &&
|
if (cups->header.Duplex && cupsPPD &&
|
||||||
((!cups->header.Tumble &&
|
((!cups->header.Tumble &&
|
||||||
@@ -3979,12 +3961,30 @@ cups_print_banded(gx_device_printer *pde
|
@@ -3979,12 +3967,30 @@ cups_print_banded(gx_device_printer *pde
|
||||||
(backside && (!strcasecmp(backside->value, "Flipped") ||
|
(backside && (!strcasecmp(backside->value, "Flipped") ||
|
||||||
!strcasecmp(backside->value, "ManualTumble"))))) &&
|
!strcasecmp(backside->value, "ManualTumble"))))) &&
|
||||||
!(cups->page & 1))
|
!(cups->page & 1))
|
||||||
@ -426,7 +437,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Loop through the page bitmap and write banded pixels... We have
|
* Loop through the page bitmap and write banded pixels... We have
|
||||||
@@ -4001,7 +4001,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4001,7 +4007,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
bandbytes = cups->header.cupsBytesPerLine / cups->color_info.num_components;
|
bandbytes = cups->header.cupsBytesPerLine / cups->color_info.num_components;
|
||||||
#endif /* CUPS_RASTER_SYNCv1 */
|
#endif /* CUPS_RASTER_SYNCv1 */
|
||||||
|
|
||||||
@ -435,7 +446,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Grab the scanline data...
|
* Grab the scanline data...
|
||||||
@@ -4021,7 +4021,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4021,7 +4027,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
memset(dst, 0, cups->header.cupsBytesPerLine);
|
memset(dst, 0, cups->header.cupsBytesPerLine);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -444,7 +455,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
cptr = dst + bandbytes - 1;
|
cptr = dst + bandbytes - 1;
|
||||||
else
|
else
|
||||||
cptr = dst;
|
cptr = dst;
|
||||||
@@ -4040,7 +4040,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4040,7 +4046,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
switch (cups->header.cupsColorSpace)
|
switch (cups->header.cupsColorSpace)
|
||||||
{
|
{
|
||||||
default :
|
default :
|
||||||
@ -453,7 +464,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
x > 0;
|
x > 0;
|
||||||
x --, srcptr ++)
|
x --, srcptr ++)
|
||||||
{
|
{
|
||||||
@@ -4051,7 +4051,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4051,7 +4057,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if (*srcptr & 0x10)
|
if (*srcptr & 0x10)
|
||||||
*yptr |= bit;
|
*yptr |= bit;
|
||||||
|
|
||||||
@ -462,7 +473,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
if (bit < 128)
|
if (bit < 128)
|
||||||
bit <<= 1;
|
bit <<= 1;
|
||||||
@@ -4077,7 +4077,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4077,7 +4083,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if (*srcptr & 0x1)
|
if (*srcptr & 0x1)
|
||||||
*yptr |= bit;
|
*yptr |= bit;
|
||||||
|
|
||||||
@ -471,7 +482,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
if (bit < 128)
|
if (bit < 128)
|
||||||
bit <<= 1;
|
bit <<= 1;
|
||||||
@@ -4107,7 +4107,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4107,7 +4113,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
case CUPS_CSPACE_CMYK :
|
case CUPS_CSPACE_CMYK :
|
||||||
case CUPS_CSPACE_YMCK :
|
case CUPS_CSPACE_YMCK :
|
||||||
case CUPS_CSPACE_KCMY :
|
case CUPS_CSPACE_KCMY :
|
||||||
@ -480,7 +491,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
x > 0;
|
x > 0;
|
||||||
x --, srcptr ++)
|
x --, srcptr ++)
|
||||||
{
|
{
|
||||||
@@ -4120,7 +4120,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4120,7 +4126,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if (*srcptr & 0x10)
|
if (*srcptr & 0x10)
|
||||||
*kptr |= bit;
|
*kptr |= bit;
|
||||||
|
|
||||||
@ -489,7 +500,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
if (bit < 128)
|
if (bit < 128)
|
||||||
bit <<= 1;
|
bit <<= 1;
|
||||||
@@ -4149,7 +4149,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4149,7 +4155,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if (*srcptr & 0x1)
|
if (*srcptr & 0x1)
|
||||||
*kptr |= bit;
|
*kptr |= bit;
|
||||||
|
|
||||||
@ -498,7 +509,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
if (bit < 128)
|
if (bit < 128)
|
||||||
bit <<= 1;
|
bit <<= 1;
|
||||||
@@ -4175,7 +4175,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4175,7 +4181,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CUPS_CSPACE_KCMYcm :
|
case CUPS_CSPACE_KCMYcm :
|
||||||
@ -507,7 +518,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
x > 0;
|
x > 0;
|
||||||
x --, srcptr ++)
|
x --, srcptr ++)
|
||||||
{
|
{
|
||||||
@@ -4198,7 +4198,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4198,7 +4204,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if (*srcptr & 0x01)
|
if (*srcptr & 0x01)
|
||||||
*lmptr |= bit;
|
*lmptr |= bit;
|
||||||
|
|
||||||
@ -516,7 +527,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
if (bit < 128)
|
if (bit < 128)
|
||||||
bit <<= 1;
|
bit <<= 1;
|
||||||
@@ -4236,7 +4236,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4236,7 +4242,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
switch (cups->header.cupsColorSpace)
|
switch (cups->header.cupsColorSpace)
|
||||||
{
|
{
|
||||||
default :
|
default :
|
||||||
@ -525,7 +536,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
x > 0;
|
x > 0;
|
||||||
x --, srcptr ++)
|
x --, srcptr ++)
|
||||||
switch (bit)
|
switch (bit)
|
||||||
@@ -4249,7 +4249,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4249,7 +4255,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if ((temp = *srcptr & 0x03) != 0)
|
if ((temp = *srcptr & 0x03) != 0)
|
||||||
*yptr |= temp << 6;
|
*yptr |= temp << 6;
|
||||||
|
|
||||||
@ -534,7 +545,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
bit = 0x03;
|
bit = 0x03;
|
||||||
cptr --;
|
cptr --;
|
||||||
@@ -4267,7 +4267,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4267,7 +4273,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if ((temp = *srcptr & 0x03) != 0)
|
if ((temp = *srcptr & 0x03) != 0)
|
||||||
*yptr |= temp << 4;
|
*yptr |= temp << 4;
|
||||||
|
|
||||||
@ -543,7 +554,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
bit = 0xc0;
|
bit = 0xc0;
|
||||||
else
|
else
|
||||||
bit = 0x0c;
|
bit = 0x0c;
|
||||||
@@ -4280,7 +4280,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4280,7 +4286,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if ((temp = *srcptr & 0x03) != 0)
|
if ((temp = *srcptr & 0x03) != 0)
|
||||||
*yptr |= temp << 2;
|
*yptr |= temp << 2;
|
||||||
|
|
||||||
@ -552,7 +563,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
bit = 0x30;
|
bit = 0x30;
|
||||||
else
|
else
|
||||||
bit = 0x03;
|
bit = 0x03;
|
||||||
@@ -4293,7 +4293,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4293,7 +4299,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if ((temp = *srcptr & 0x03) != 0)
|
if ((temp = *srcptr & 0x03) != 0)
|
||||||
*yptr |= temp;
|
*yptr |= temp;
|
||||||
|
|
||||||
@ -561,7 +572,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
bit = 0x0c;
|
bit = 0x0c;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -4313,7 +4313,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4313,7 +4319,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
case CUPS_CSPACE_YMCK :
|
case CUPS_CSPACE_YMCK :
|
||||||
case CUPS_CSPACE_KCMY :
|
case CUPS_CSPACE_KCMY :
|
||||||
case CUPS_CSPACE_KCMYcm :
|
case CUPS_CSPACE_KCMYcm :
|
||||||
@ -570,7 +581,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
x > 0;
|
x > 0;
|
||||||
x --, srcptr ++)
|
x --, srcptr ++)
|
||||||
switch (bit)
|
switch (bit)
|
||||||
@@ -4328,7 +4328,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4328,7 +4334,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if ((temp = *srcptr & 0x03) != 0)
|
if ((temp = *srcptr & 0x03) != 0)
|
||||||
*kptr |= temp << 6;
|
*kptr |= temp << 6;
|
||||||
|
|
||||||
@ -579,7 +590,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
bit = 0x03;
|
bit = 0x03;
|
||||||
cptr --;
|
cptr --;
|
||||||
@@ -4349,7 +4349,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4349,7 +4355,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if ((temp = *srcptr & 0x03) != 0)
|
if ((temp = *srcptr & 0x03) != 0)
|
||||||
*kptr |= temp << 4;
|
*kptr |= temp << 4;
|
||||||
|
|
||||||
@ -588,7 +599,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
bit = 0xc0;
|
bit = 0xc0;
|
||||||
else
|
else
|
||||||
bit = 0x0c;
|
bit = 0x0c;
|
||||||
@@ -4364,7 +4364,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4364,7 +4370,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if ((temp = *srcptr & 0x03) != 0)
|
if ((temp = *srcptr & 0x03) != 0)
|
||||||
*kptr |= temp << 2;
|
*kptr |= temp << 2;
|
||||||
|
|
||||||
@ -597,7 +608,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
bit = 0x30;
|
bit = 0x30;
|
||||||
else
|
else
|
||||||
bit = 0x03;
|
bit = 0x03;
|
||||||
@@ -4379,7 +4379,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4379,7 +4385,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
if ((temp = *srcptr & 0x03) != 0)
|
if ((temp = *srcptr & 0x03) != 0)
|
||||||
*kptr |= temp;
|
*kptr |= temp;
|
||||||
|
|
||||||
@ -606,7 +617,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
bit = 0x0c;
|
bit = 0x0c;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -4401,7 +4401,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4401,7 +4407,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
switch (cups->header.cupsColorSpace)
|
switch (cups->header.cupsColorSpace)
|
||||||
{
|
{
|
||||||
default :
|
default :
|
||||||
@ -615,7 +626,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
x > 0;
|
x > 0;
|
||||||
x --, srcptr += 2)
|
x --, srcptr += 2)
|
||||||
switch (bit)
|
switch (bit)
|
||||||
@@ -4416,7 +4416,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4416,7 +4422,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
|
|
||||||
bit = 0x0f;
|
bit = 0x0f;
|
||||||
|
|
||||||
@ -624,7 +635,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
cptr --;
|
cptr --;
|
||||||
mptr --;
|
mptr --;
|
||||||
@@ -4433,7 +4433,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4433,7 +4439,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
|
|
||||||
bit = 0xf0;
|
bit = 0xf0;
|
||||||
|
|
||||||
@ -633,7 +644,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
cptr ++;
|
cptr ++;
|
||||||
mptr ++;
|
mptr ++;
|
||||||
@@ -4450,7 +4450,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4450,7 +4456,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
case CUPS_CSPACE_YMCK :
|
case CUPS_CSPACE_YMCK :
|
||||||
case CUPS_CSPACE_KCMY :
|
case CUPS_CSPACE_KCMY :
|
||||||
case CUPS_CSPACE_KCMYcm :
|
case CUPS_CSPACE_KCMYcm :
|
||||||
@ -642,7 +653,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
x > 0;
|
x > 0;
|
||||||
x --, srcptr += 2)
|
x --, srcptr += 2)
|
||||||
switch (bit)
|
switch (bit)
|
||||||
@@ -4467,7 +4467,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4467,7 +4473,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
|
|
||||||
bit = 0x0f;
|
bit = 0x0f;
|
||||||
|
|
||||||
@ -651,7 +662,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
cptr --;
|
cptr --;
|
||||||
mptr --;
|
mptr --;
|
||||||
@@ -4487,7 +4487,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4487,7 +4493,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
|
|
||||||
bit = 0xf0;
|
bit = 0xf0;
|
||||||
|
|
||||||
@ -660,7 +671,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
{
|
{
|
||||||
cptr ++;
|
cptr ++;
|
||||||
mptr ++;
|
mptr ++;
|
||||||
@@ -4504,7 +4504,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4504,7 +4510,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
switch (cups->header.cupsColorSpace)
|
switch (cups->header.cupsColorSpace)
|
||||||
{
|
{
|
||||||
default :
|
default :
|
||||||
@ -669,7 +680,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
for (x = cups->width; x > 0; x --)
|
for (x = cups->width; x > 0; x --)
|
||||||
{
|
{
|
||||||
*cptr-- = *srcptr++;
|
*cptr-- = *srcptr++;
|
||||||
@@ -4527,7 +4527,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4527,7 +4533,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
case CUPS_CSPACE_YMCK :
|
case CUPS_CSPACE_YMCK :
|
||||||
case CUPS_CSPACE_KCMY :
|
case CUPS_CSPACE_KCMY :
|
||||||
case CUPS_CSPACE_KCMYcm :
|
case CUPS_CSPACE_KCMYcm :
|
||||||
@ -678,7 +689,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
for (x = cups->width; x > 0; x --)
|
for (x = cups->width; x > 0; x --)
|
||||||
{
|
{
|
||||||
*cptr-- = *srcptr++;
|
*cptr-- = *srcptr++;
|
||||||
@@ -4551,7 +4551,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4551,7 +4557,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
switch (cups->header.cupsColorSpace)
|
switch (cups->header.cupsColorSpace)
|
||||||
{
|
{
|
||||||
default :
|
default :
|
||||||
@ -687,7 +698,7 @@ diff -up ghostscript-8.70/cups/gdevcups.c.gdevcups-y-axis ghostscript-8.70/cups/
|
|||||||
for (x = cups->width; x > 0; x --, srcptr += 6)
|
for (x = cups->width; x > 0; x --, srcptr += 6)
|
||||||
{
|
{
|
||||||
*cptr-- = srcptr[1];
|
*cptr-- = srcptr[1];
|
||||||
@@ -4580,7 +4580,7 @@ cups_print_banded(gx_device_printer *pde
|
@@ -4580,7 +4586,7 @@ cups_print_banded(gx_device_printer *pde
|
||||||
case CUPS_CSPACE_YMCK :
|
case CUPS_CSPACE_YMCK :
|
||||||
case CUPS_CSPACE_KCMY :
|
case CUPS_CSPACE_KCMY :
|
||||||
case CUPS_CSPACE_KCMYcm :
|
case CUPS_CSPACE_KCMYcm :
|
||||||
|
39
ghostscript-pdftoraster-exit.patch
Normal file
39
ghostscript-pdftoraster-exit.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
diff -up ghostscript-8.70/cups/pdftoraster.c.pdftoraster-exit ghostscript-8.70/cups/pdftoraster.c
|
||||||
|
--- ghostscript-8.70/cups/pdftoraster.c.pdftoraster-exit 2008-10-17 23:58:21.000000000 +0100
|
||||||
|
+++ ghostscript-8.70/cups/pdftoraster.c 2010-01-25 10:15:42.269209639 +0000
|
||||||
|
@@ -35,6 +35,8 @@ MIT Open Source License - http://www.o
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <cups/raster.h>
|
||||||
|
+#include <sys/types.h>
|
||||||
|
+#include <sys/wait.h>
|
||||||
|
|
||||||
|
#define MAX_CHECK_COMMENT_LINES 20
|
||||||
|
#ifndef GS
|
||||||
|
@@ -123,6 +125,7 @@ int main(int argc, char *argv[], char *e
|
||||||
|
const char* apos;
|
||||||
|
int fds[2];
|
||||||
|
int pid;
|
||||||
|
+ int status;
|
||||||
|
|
||||||
|
parseOpts(argc, argv);
|
||||||
|
|
||||||
|
@@ -502,8 +505,17 @@ int main(int argc, char *argv[], char *e
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fclose(fp);
|
||||||
|
+ close (fds[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
- exit(0);
|
||||||
|
+ if (waitpid (pid, &status, 0) == -1) {
|
||||||
|
+ perror (GS);
|
||||||
|
+ exit (1);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (WIFEXITED (status))
|
||||||
|
+ exit(WEXITSTATUS (status));
|
||||||
|
+ else
|
||||||
|
+ exit(1);
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,7 @@ Summary: A PostScript interpreter and renderer.
|
|||||||
Name: ghostscript
|
Name: ghostscript
|
||||||
Version: %{gs_ver}
|
Version: %{gs_ver}
|
||||||
|
|
||||||
Release: 4%{?dist}
|
Release: 5%{?dist}
|
||||||
|
|
||||||
# Included CMap data is Redistributable, no modification permitted,
|
# Included CMap data is Redistributable, no modification permitted,
|
||||||
# see http://bugzilla.redhat.com/487510
|
# see http://bugzilla.redhat.com/487510
|
||||||
@ -29,6 +29,7 @@ Patch10: ghostscript-CVE-2009-4270.patch
|
|||||||
Patch11: ghostscript-vsnprintf.patch
|
Patch11: ghostscript-vsnprintf.patch
|
||||||
Patch12: ghostscript-gdevcups-y-axis.patch
|
Patch12: ghostscript-gdevcups-y-axis.patch
|
||||||
Patch13: ghostscript-cups-filters.patch
|
Patch13: ghostscript-cups-filters.patch
|
||||||
|
Patch14: ghostscript-pdftoraster-exit.patch
|
||||||
|
|
||||||
Requires: urw-fonts >= 1.1, ghostscript-fonts
|
Requires: urw-fonts >= 1.1, ghostscript-fonts
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
@ -141,6 +142,9 @@ rm -rf libpng zlib jpeg jasper
|
|||||||
# Install CUPS filter convs files in the correct place.
|
# Install CUPS filter convs files in the correct place.
|
||||||
%patch13 -p1 -b .cups-filters
|
%patch13 -p1 -b .cups-filters
|
||||||
|
|
||||||
|
# Fixed pdftoraster so that it waits for its sub-process to exit.
|
||||||
|
%patch14 -p1 -b .pdftoraster-exit
|
||||||
|
|
||||||
# Convert manual pages to UTF-8
|
# Convert manual pages to UTF-8
|
||||||
from8859_1() {
|
from8859_1() {
|
||||||
iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
|
iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_"
|
||||||
@ -296,10 +300,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/libijs-*.so*
|
%{_libdir}/libijs-*.so*
|
||||||
%dir %{_libdir}/%{name}
|
%dir %{_libdir}/%{name}
|
||||||
%{_libdir}/%{name}/%{gs_dot_ver}
|
%{_libdir}/%{name}/%{gs_dot_ver}
|
||||||
/usr/lib/cups/filter/pstopxl
|
|
||||||
%{_datadir}/cups/model/pxl*
|
|
||||||
%config(noreplace) /etc/ghostscript/%{gs_dot_ver}/*
|
%config(noreplace) /etc/ghostscript/%{gs_dot_ver}/*
|
||||||
/usr/lib/cups/filter/pdftoraster
|
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -330,6 +331,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/libgs.so
|
%{_libdir}/libgs.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 25 2010 Tim Waugh <twaugh@redhat.com> 8.70-5
|
||||||
|
- Fixed pdftoraster so that it waits for its sub-process to exit.
|
||||||
|
- Another gdevcups duplex fix from upstream revision 10631
|
||||||
|
(bug #541604).
|
||||||
|
|
||||||
* Fri Jan 22 2010 Tim Waugh <twaugh@redhat.com> 8.70-4
|
* Fri Jan 22 2010 Tim Waugh <twaugh@redhat.com> 8.70-4
|
||||||
- New ghostscript-cups sub-package for some additional filters:
|
- New ghostscript-cups sub-package for some additional filters:
|
||||||
pdftoraster; pstopxl. CUPS package still owns pstoraster for now.
|
pdftoraster; pstopxl. CUPS package still owns pstoraster for now.
|
||||||
|
Loading…
Reference in New Issue
Block a user