[48585] trunk/dports/print/ghostscript

takanori at macports.org takanori at macports.org
Wed Mar 25 15:08:21 PDT 2009


Revision: 48585
          http://trac.macports.org/changeset/48585
Author:   takanori at macports.org
Date:     2009-03-25 15:08:20 -0700 (Wed, 25 Mar 2009)
Log Message:
-----------
ghostscript:
- Fixed a bug in gdevbit.c.
  (bit* devices always produced 0 length files when -dLastLine was not set, #18982)

Modified Paths:
--------------
    trunk/dports/print/ghostscript/Portfile

Added Paths:
-----------
    trunk/dports/print/ghostscript/files/patch-base_gdevbit.c.diff

Modified: trunk/dports/print/ghostscript/Portfile
===================================================================
--- trunk/dports/print/ghostscript/Portfile	2009-03-25 20:56:24 UTC (rev 48584)
+++ trunk/dports/print/ghostscript/Portfile	2009-03-25 22:08:20 UTC (rev 48585)
@@ -4,7 +4,7 @@
 
 name            ghostscript
 version         8.64
-revision        1
+revision        2
 categories      print
 maintainers     takanori openmaintainer
 description     GPL Ghostscript, An interpreter for PostScript and PDF
@@ -19,7 +19,8 @@
 distfiles       ${distname}.tar.gz:source \
                 ghostscript-fonts-other-6.0.tar.gz:fonts
 patchfiles      patch-base_macos-fw.mak.diff \
-                patch-base_macosx.mak.diff
+                patch-base_macosx.mak.diff \
+                patch-base_gdevbit.c.diff
 checksums       ${distname}.tar.gz rmd160 c0d5ab9a35cbc7311708ab91f0a4c47e332db121 \
                 ghostscript-fonts-other-6.0.tar.gz rmd160 ab60dbf71e7d91283a106c3df381cadfe173082f
 

Added: trunk/dports/print/ghostscript/files/patch-base_gdevbit.c.diff
===================================================================
--- trunk/dports/print/ghostscript/files/patch-base_gdevbit.c.diff	                        (rev 0)
+++ trunk/dports/print/ghostscript/files/patch-base_gdevbit.c.diff	2009-03-25 22:08:20 UTC (rev 48585)
@@ -0,0 +1,43 @@
+--- base/gdevbit.c.orig	2008-08-21 08:58:43.000000000 +0900
++++ base/gdevbit.c	2009-03-26 06:41:19.000000000 +0900
+@@ -11,7 +11,7 @@
+    San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
+ */
+ 
+-/* $Id: gdevbit.c 9007 2008-08-20 23:58:43Z giles $ */
++/* $Id: gdevbit.c 9470 2009-02-11 20:35:13Z henrys $ */
+ /* "Plain bits" devices to measure rendering time. */
+ 
+ #include "gdevprn.h"
+@@ -653,7 +653,7 @@
+ 		     pdev->color_info.depth == 32 ? cmyk_8bit_map_cmyk_color :
+ 		     bit_map_cmyk_color);
+     }
+-    /* Reset the sparable and linear shift, masks, bits. */
++    /* Reset the separable and linear shift, masks, bits. */
+     set_linear_color_bits_mask_shift(pdev);
+     pdev->color_info.separable_and_linear = GX_CINFO_SEP_LIN;
+     ((gx_device_bit *)pdev)->FirstLine = FirstLine;
+@@ -671,16 +671,18 @@
+     byte *in = gs_alloc_bytes(pdev->memory, line_size, "bit_print_page(in)");
+     byte *data;
+     int nul = !strcmp(pdev->fname, "nul") || !strcmp(pdev->fname, "/dev/null");
+-    int lnum = ((gx_device_bit *)pdev)->FirstLine;
+-    int bottom = ((gx_device_bit *)pdev)->LastLine;
++    int lnum = ((gx_device_bit *)pdev)->FirstLine >= pdev->height ?  pdev->height - 1 :
++		 ((gx_device_bit *)pdev)->FirstLine;
++    int bottom = ((gx_device_bit *)pdev)->LastLine >= pdev->height ?  pdev->height - 1 :
++		 ((gx_device_bit *)pdev)->LastLine;
+     int line_count = any_abs(bottom - lnum);
+     int i, step = lnum > bottom ? -1 : 1;
+ 
+     if (in == 0)
+ 	return_error(gs_error_VMerror);
+     if ((lnum == 0) && (bottom == 0))
+-	bottom = pdev->height - 1;
+-    for (i = 0; i < line_count; i++, lnum += step) {
++	line_count = pdev->height - 1;		/* default when LastLine == 0, FirstLine == 0 */
++    for (i = 0; i <= line_count; i++, lnum += step) {
+ 	gdev_prn_get_bits(pdev, lnum, in, &data);
+ 	if (!nul)
+ 	    fwrite(data, 1, line_size, prn_stream);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090325/27c4e8a6/attachment.html>


More information about the macports-changes mailing list