diff options
author | mef <mef@pkgsrc.org> | 2012-10-08 05:40:11 +0000 |
---|---|---|
committer | mef <mef@pkgsrc.org> | 2012-10-08 05:40:11 +0000 |
commit | 0891d27143f5304bea6695ff59b31ad6c3c24ec0 (patch) | |
tree | 941085ec348c268518a100860528e87b703d983c /print | |
parent | 601d6455d3fd77a5318b12df0e8cb249b08af508 (diff) | |
download | pkgsrc-0891d27143f5304bea6695ff59b31ad6c3c24ec0.tar.gz |
To-be-deleted file existed, sorry, cvs delete them
Diffstat (limited to 'print')
-rw-r--r-- | print/ghostscript/patches/patch-aa | 13 | ||||
-rw-r--r-- | print/ghostscript/patches/patch-ab | 13 | ||||
-rw-r--r-- | print/ghostscript/patches/patch-ac | 30 | ||||
-rw-r--r-- | print/ghostscript/patches/patch-ad | 31 | ||||
-rw-r--r-- | print/ghostscript/patches/patch-ae | 214 | ||||
-rw-r--r-- | print/ghostscript/patches/patch-ag | 13 | ||||
-rw-r--r-- | print/ghostscript/patches/patch-ak | 196 | ||||
-rw-r--r-- | print/ghostscript/patches/patch-am | 13 | ||||
-rw-r--r-- | print/ghostscript/patches/patch-ba | 47 | ||||
-rw-r--r-- | print/ghostscript/patches/patch-bb | 50 | ||||
-rw-r--r-- | print/ghostscript/patches/patch-bc | 42 | ||||
-rw-r--r-- | print/ghostscript/patches/patch-bd | 98 |
12 files changed, 0 insertions, 760 deletions
diff --git a/print/ghostscript/patches/patch-aa b/print/ghostscript/patches/patch-aa deleted file mode 100644 index a3047c5b222..00000000000 --- a/print/ghostscript/patches/patch-aa +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-aa,v 1.6 2010/03/04 11:16:27 tnn Exp $ - ---- base/gsnogc.c.orig 2009-11-25 19:59:11.000000000 +0000 -+++ base/gsnogc.c -@@ -32,7 +32,7 @@ nogc_alloc_string(gs_memory_t * mem, uin - static void - nogc_free_string(gs_memory_t * mem, byte * str, uint size, client_name_t cname) - { -- return gs_free_object(mem, str, cname); -+ gs_free_object(mem, str, cname); - } - - static byte * diff --git a/print/ghostscript/patches/patch-ab b/print/ghostscript/patches/patch-ab deleted file mode 100644 index ec077eeb70c..00000000000 --- a/print/ghostscript/patches/patch-ab +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ab,v 1.3 2009/02/12 19:51:08 drochner Exp $ - ---- base/unixinst.mak.orig 2007-08-14 22:48:29.000000000 +0200 -+++ base/unixinst.mak -@@ -151,7 +151,7 @@ install-man: $(PSMANDIR)/gs.1 - ln -s ps2pdf.$(man1ext) $$f.$(man1ext) ) ;\ - done ;\ - fi ;\ -- if ( test -f $$man1dir/ps2lp.$(man1ext) ) ;\ -+ if ( test -f $$man1dir/gslp.$(man1ext) ) ;\ - then for f in $(MAN1_LINKS_GSLP) ;\ - do ( cd $$man1dir; rm -f $$f.$(man1ext) ;\ - ln -s gslp.$(man1ext) $$f.$(man1ext) ) ;\ diff --git a/print/ghostscript/patches/patch-ac b/print/ghostscript/patches/patch-ac deleted file mode 100644 index 5f9c16d18fe..00000000000 --- a/print/ghostscript/patches/patch-ac +++ /dev/null @@ -1,30 +0,0 @@ -$NetBSD: patch-ac,v 1.9 2010/03/04 11:16:27 tnn Exp $ - ---- base/gdevpx.c.orig 2009-12-12 03:45:55.000000000 +0000 -+++ base/gdevpx.c -@@ -730,8 +730,10 @@ pclxl_write_image_data_DeltaRow(gx_devic - "pclxl_write_image_data_DeltaRow(buf)"); - prow = gs_alloc_bytes(xdev->v_memory, width_bytes, "pclxl_write_image_data_DeltaRow(prow)"); - /* the RLE routine can write uncompressed without extra-allocation */ -- if ((buf == 0) || (prow == 0)) -- return pclxl_write_image_data_RLE(xdev, data, data_bit, raster, width_bits, y, height); -+ if ((buf == 0) || (prow == 0)) { -+ pclxl_write_image_data_RLE(xdev, data, data_bit, raster, width_bits, y, height); -+ return; -+ } - /* initialize the seed row */ - memset(prow, 0, width_bytes); - cdata = buf; -@@ -760,8 +762,10 @@ pclxl_write_image_data(gx_device_pclxl * - uint raster, uint width_bits, int y, int height) - { - /* If we only have 1 line, it does not make sense to do DeltaRow */ -- if (height < 2) -- return pclxl_write_image_data_RLE(xdev, data, data_bit, raster, width_bits, y, height); -+ if (height < 2) { -+ pclxl_write_image_data_RLE(xdev, data, data_bit, raster, width_bits, y, height); -+ return; -+ } - - switch(xdev->CompressMode){ - case eDeltaRowCompression: diff --git a/print/ghostscript/patches/patch-ad b/print/ghostscript/patches/patch-ad deleted file mode 100644 index a636862ca57..00000000000 --- a/print/ghostscript/patches/patch-ad +++ /dev/null @@ -1,31 +0,0 @@ -$NetBSD: patch-ad,v 1.3 2007/08/08 17:32:07 joerg Exp $ - ---- lib/pv.sh.orig 2007-07-05 12:41:52.000000000 +0200 -+++ lib/pv.sh -@@ -30,21 +30,13 @@ fi - # executable name set in the makefile - GS_EXECUTABLE=gs - --TEMPDIR=. - PAGE=$1 - shift - FILE="$1" -+TEMPFILE=`mktemp -t ${FILE}XXXXXX` || exit 1 - shift --if test -z "$TEMPDIR"; then -- TEMPDIR=/tmp --fi --if which mktemp >/dev/null 2>/dev/null; then -- tmpfile="`mktemp $TEMPDIR/\"$FILE\".pv.XXXXXX`" --else -- tmpfile="$TEMPDIR/$FILE.$$.pv" --fi --trap "rm -rf $tmpfile" 0 1 2 15 --#dvips -D$RESOLUTION -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile --dvips -p $PAGE -n 1 "$FILE" "$@" -o $tmpfile --$GS_EXECUTABLE $tmpfile -+trap "rm -rf $TEMPFILE" 0 1 2 15 -+#dvips -D$RESOLUTION -p $PAGE -n 1 $FILE $* -o $TEMPFILE -+dvips -p $PAGE -n 1 $FILE $* -o $TEMPFILE -+gs $TEMPFILE - exit 0 diff --git a/print/ghostscript/patches/patch-ae b/print/ghostscript/patches/patch-ae deleted file mode 100644 index d491587315c..00000000000 --- a/print/ghostscript/patches/patch-ae +++ /dev/null @@ -1,214 +0,0 @@ -$NetBSD: patch-ae,v 1.6 2010/11/23 11:10:16 tron Exp $ - -Security patch for CVE-2010-2055 by Dr. Werner Fink taken from here: - -http://bugs.ghostscript.com/attachment.cgi?id=6449 - ---- psi/zfile.c.orig 2009-10-04 13:42:07.000000000 +0100 -+++ psi/zfile.c 2010-11-23 11:03:52.000000000 +0000 -@@ -902,6 +902,90 @@ - return 0; - } - -+/* return zero for success, -ve for error, +1 for continue */ -+static int -+lib_file_open_search_with_no_combine(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p, -+ const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile, -+ gx_io_device *iodev, bool starting_arg_file, char *fmode) -+{ -+ stream *s; -+ uint blen1 = blen; -+ if (gp_file_name_reduce(fname, flen, buffer, &blen1) != gp_combine_success) -+ goto skip; -+ if (iodev_os_open_file(iodev, (const char *)buffer, blen1, -+ (const char *)fmode, &s, (gs_memory_t *)mem) == 0) { -+ if (starting_arg_file || -+ check_file_permissions_aux(i_ctx_p, buffer, blen1) >= 0) { -+ *pclen = blen1; -+ make_stream_file(pfile, s, "r"); -+ return 0; -+ } -+ sclose(s); -+ return_error(e_invalidfileaccess); -+ } -+ skip:; -+ return 1; -+} -+ -+/* return zero for success, -ve for error, +1 for continue */ -+static int -+lib_file_open_search_with_combine(gs_file_path_ptr lib_path, const gs_memory_t *mem, i_ctx_t *i_ctx_p, -+ const char *fname, uint flen, char *buffer, int blen, uint *pclen, ref *pfile, -+ gx_io_device *iodev, bool starting_arg_file, char *fmode) -+{ -+ stream *s; -+ const gs_file_path *pfpath = lib_path; -+ uint pi; -+ -+ for (pi = 0; pi < r_size(&pfpath->list); ++pi) { -+ const ref *prdir = pfpath->list.value.refs + pi; -+ const char *pstr = (const char *)prdir->value.const_bytes; -+ uint plen = r_size(prdir), blen1 = blen; -+ gs_parsed_file_name_t pname; -+ gp_file_name_combine_result r; -+ -+ /* We need to concatenate and parse the file name here -+ * if this path has a %device% prefix. */ -+ if (pstr[0] == '%') { -+ int code; -+ -+ /* We concatenate directly since gp_file_name_combine_* -+ * rules are not correct for other devices such as %rom% */ -+ code = gs_parse_file_name(&pname, pstr, plen); -+ if (code < 0) -+ continue; -+ memcpy(buffer, pname.fname, pname.len); -+ memcpy(buffer+pname.len, fname, flen); -+ code = pname.iodev->procs.open_file(pname.iodev, buffer, pname.len + flen, fmode, -+ &s, (gs_memory_t *)mem); -+ if (code < 0) -+ continue; -+ make_stream_file(pfile, s, "r"); -+ /* fill in the buffer with the device concatenated */ -+ memcpy(buffer, pstr, plen); -+ memcpy(buffer+plen, fname, flen); -+ *pclen = plen + flen; -+ return 0; -+ } else { -+ r = gp_file_name_combine(pstr, plen, -+ fname, flen, false, buffer, &blen1); -+ if (r != gp_combine_success) -+ continue; -+ if (iodev_os_open_file(iodev, (const char *)buffer, blen1, (const char *)fmode, -+ &s, (gs_memory_t *)mem) == 0) { -+ if (starting_arg_file || -+ check_file_permissions_aux(i_ctx_p, buffer, blen1) >= 0) { -+ *pclen = blen1; -+ make_stream_file(pfile, s, "r"); -+ return 0; -+ } -+ sclose(s); -+ return_error(e_invalidfileaccess); -+ } -+ } -+ } -+ return 1; -+} - - /* Return a file object of of the file searched for using the search paths. */ - /* The fname cannot contain a device part (%...%) but the lib paths might. */ -@@ -919,6 +1003,8 @@ - char fmode[4] = { 'r', 0, 0, 0 }; /* room for binary suffix */ - stream *s; - gx_io_device *iodev = iodev_default; -+ gs_main_instance *minst = get_minst_from_memory(mem); -+ int code; - - /* when starting arg files (@ files) iodev_default is not yet set */ - if (iodev == 0) -@@ -932,75 +1018,36 @@ - search_with_no_combine = starting_arg_file; - search_with_combine = true; - } -- if (search_with_no_combine) { -- uint blen1 = blen; -- -- if (gp_file_name_reduce(fname, flen, buffer, &blen1) != gp_combine_success) -- goto skip; -- if (iodev_os_open_file(iodev, (const char *)buffer, blen1, -- (const char *)fmode, &s, (gs_memory_t *)mem) == 0) { -- if (starting_arg_file || -- check_file_permissions_aux(i_ctx_p, buffer, blen1) >= 0) { -- *pclen = blen1; -- make_stream_file(pfile, s, "r"); -- return 0; -- } -- sclose(s); -- return_error(e_invalidfileaccess); -- } -- skip:; -- } -- if (search_with_combine) { -- const gs_file_path *pfpath = lib_path; -- uint pi; -- -- for (pi = 0; pi < r_size(&pfpath->list); ++pi) { -- const ref *prdir = pfpath->list.value.refs + pi; -- const char *pstr = (const char *)prdir->value.const_bytes; -- uint plen = r_size(prdir), blen1 = blen; -- gs_parsed_file_name_t pname; -- gp_file_name_combine_result r; -- -- /* We need to concatenate and parse the file name here -- * if this path has a %device% prefix. */ -- if (pstr[0] == '%') { -- int code; -- -- /* We concatenate directly since gp_file_name_combine_* -- * rules are not correct for other devices such as %rom% */ -- code = gs_parse_file_name(&pname, pstr, plen); -- if (code < 0) -- continue; -- memcpy(buffer, pname.fname, pname.len); -- memcpy(buffer+pname.len, fname, flen); -- code = pname.iodev->procs.open_file(pname.iodev, buffer, pname.len + flen, fmode, -- &s, (gs_memory_t *)mem); -- if (code < 0) -- continue; -- make_stream_file(pfile, s, "r"); -- /* fill in the buffer with the device concatenated */ -- memcpy(buffer, pstr, plen); -- memcpy(buffer+plen, fname, flen); -- *pclen = plen + flen; -- return 0; -- } else { -- r = gp_file_name_combine(pstr, plen, -- fname, flen, false, buffer, &blen1); -- if (r != gp_combine_success) -- continue; -- if (iodev_os_open_file(iodev, (const char *)buffer, blen1, (const char *)fmode, -- &s, (gs_memory_t *)mem) == 0) { -- if (starting_arg_file || -- check_file_permissions_aux(i_ctx_p, buffer, blen1) >= 0) { -- *pclen = blen1; -- make_stream_file(pfile, s, "r"); -- return 0; -- } -- sclose(s); -- return_error(e_invalidfileaccess); -- } -- } -- } -+ if (minst->search_here_first) { -+ if (search_with_no_combine) { -+ code = lib_file_open_search_with_no_combine(lib_path, mem, i_ctx_p, -+ fname, flen, buffer, blen, pclen, pfile, -+ iodev, starting_arg_file, fmode); -+ if (code <= 0) /* +ve means continue continue */ -+ return code; -+ } -+ if (search_with_combine) { -+ code = lib_file_open_search_with_combine(lib_path, mem, i_ctx_p, -+ fname, flen, buffer, blen, pclen, pfile, -+ iodev, starting_arg_file, fmode); -+ if (code <= 0) /* +ve means continue searching */ -+ return code; -+ } -+ } else { -+ if (search_with_combine) { -+ code = lib_file_open_search_with_combine(lib_path, mem, i_ctx_p, -+ fname, flen, buffer, blen, pclen, pfile, -+ iodev, starting_arg_file, fmode); -+ if (code <= 0) /* +ve means continue searching */ -+ return code; -+ } -+ if (search_with_no_combine) { -+ code = lib_file_open_search_with_no_combine(lib_path, mem, i_ctx_p, -+ fname, flen, buffer, blen, pclen, pfile, -+ iodev, starting_arg_file, fmode); -+ if (code <= 0) /* +ve means continue searching */ -+ return code; -+ } - } - return_error(e_undefinedfilename); - } diff --git a/print/ghostscript/patches/patch-ag b/print/ghostscript/patches/patch-ag deleted file mode 100644 index 2896d330417..00000000000 --- a/print/ghostscript/patches/patch-ag +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ag,v 1.4 2009/08/31 20:12:20 wiz Exp $ - ---- cups/cups.mak.orig 2009-03-07 21:46:16.000000000 +0000 -+++ cups/cups.mak -@@ -51,7 +51,7 @@ pdftoraster_=cups/pdftoraster.c - - $(PDFTORASTER_XE): $(pdftoraster_) - if [ "$(CUPSPDFTORASTER)" = "1" ]; then \ -- $(GLCC) $(LDFLAGS) -DBINDIR='"$(bindir)"' -DGS='"$(GS)"' -o $@ $(pdftoraster_) `cups-config --image --libs`; \ -+ $(GLCC) $(LDFLAGS) -DBINDIR='"$(bindir)"' -DGS='"$(GS)"' -o $@ $(pdftoraster_) `cups-config --ldflags --image --libs`; \ - fi - - install: install-cups diff --git a/print/ghostscript/patches/patch-ak b/print/ghostscript/patches/patch-ak deleted file mode 100644 index dca4f07607f..00000000000 --- a/print/ghostscript/patches/patch-ak +++ /dev/null @@ -1,196 +0,0 @@ -$NetBSD: patch-ak,v 1.5 2011/01/15 14:08:10 wiz Exp $ - -Fix build with png-1.5. From John Bowler. - ---- base/gdevpng.c.orig 2008-07-17 02:34:01.000000000 +0000 -+++ base/gdevpng.c -@@ -36,12 +36,14 @@ - #include "gdevpccm.h" - #include "gscdefs.h" - --#define PNG_INTERNAL - /* - * libpng versions 1.0.3 and later allow disabling access to the stdxxx - * files while retaining support for FILE * I/O. -+ * -+ * This is a misunderstanding - this is a build time option for libpng, -+ * it has no effect on a user of libpng. - */ --#define PNG_NO_CONSOLE_IO -+/*#define PNG_NO_CONSOLE_IO*/ - /* - * Earlier libpng versions require disabling FILE * I/O altogether. - * This produces a compiler warning about no prototype for png_init_io. -@@ -280,7 +282,7 @@ png_print_page(gx_device_printer * pdev, - goto done; - } - /* set error handling */ -- if (setjmp(png_ptr->jmpbuf)) { -+ if (setjmp(png_jmpbuf(png_ptr))) { - /* If we get here, we had a problem reading the file */ - code = gs_note_error(gs_error_VMerror); - goto done; -@@ -290,19 +292,12 @@ png_print_page(gx_device_printer * pdev, - png_init_io(png_ptr, file); - - /* set the file information here */ -- info_ptr->width = pdev->width; -- info_ptr->height = pdev->height; -- /* resolution is in pixels per meter vs. dpi */ -- info_ptr->x_pixels_per_unit = -- (png_uint_32) (pdev->HWResolution[0] * (100.0 / 2.54)); -- info_ptr->y_pixels_per_unit = -- (png_uint_32) (pdev->HWResolution[1] * (100.0 / 2.54)); -- info_ptr->phys_unit_type = PNG_RESOLUTION_METER; -- info_ptr->valid |= PNG_INFO_pHYs; - switch (depth) { - case 32: -- info_ptr->bit_depth = 8; -- info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA; -+ png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height, -+ 8, PNG_COLOR_TYPE_RGB_ALPHA, -+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, -+ PNG_FILTER_TYPE_DEFAULT); - png_set_invert_alpha(png_ptr); - { gx_device_pngalpha *ppdev = (gx_device_pngalpha *)pdev; - png_color_16 background; -@@ -315,57 +310,69 @@ png_print_page(gx_device_printer * pdev, - } - break; - case 48: -- info_ptr->bit_depth = 16; -- info_ptr->color_type = PNG_COLOR_TYPE_RGB; -+ png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height, -+ 16, PNG_COLOR_TYPE_RGB, -+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, -+ PNG_FILTER_TYPE_DEFAULT); - #if defined(ARCH_IS_BIG_ENDIAN) && (!ARCH_IS_BIG_ENDIAN) - png_set_swap(png_ptr); - #endif - break; - case 24: -- info_ptr->bit_depth = 8; -- info_ptr->color_type = PNG_COLOR_TYPE_RGB; -+ png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height, -+ 8, PNG_COLOR_TYPE_RGB, -+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, -+ PNG_FILTER_TYPE_DEFAULT); - break; - case 8: -- info_ptr->bit_depth = 8; -- if (gx_device_has_color(pdev)) -- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; -- else -- info_ptr->color_type = PNG_COLOR_TYPE_GRAY; -+ png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height, -+ 8, gx_device_has_color(pdev) ? -+ PNG_COLOR_TYPE_PALETTE : PNG_COLOR_TYPE_GRAY, -+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, -+ PNG_FILTER_TYPE_DEFAULT); - break; - case 4: -- info_ptr->bit_depth = 4; -- info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; -+ png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height, -+ 4, PNG_COLOR_TYPE_PALETTE, -+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, -+ PNG_FILTER_TYPE_DEFAULT); - break; - case 1: -- info_ptr->bit_depth = 1; -- info_ptr->color_type = PNG_COLOR_TYPE_GRAY; -+ png_set_IHDR(png_ptr, info_ptr, pdev->width, pdev->height, -+ 1, PNG_COLOR_TYPE_GRAY, -+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, -+ PNG_FILTER_TYPE_DEFAULT); - /* invert monocrome pixels */ - png_set_invert_mono(png_ptr); - break; -+ default: -+ png_error(png_ptr, "invalid bit depth"); - } - -+ /* resolution is in pixels per meter vs. dpi */ -+ png_set_pHYs(png_ptr, info_ptr, -+ (png_uint_32) (pdev->HWResolution[0] * (100.0 / 2.54)), -+ (png_uint_32) (pdev->HWResolution[1] * (100.0 / 2.54)), -+ PNG_RESOLUTION_METER); -+ - /* set the palette if there is one */ -- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) { -+ if (png_get_color_type(png_ptr, info_ptr) == PNG_COLOR_TYPE_PALETTE) { - int i; - int num_colors = 1 << depth; - gx_color_value rgb[3]; -+ png_color palette[256]; -+ -+ if (num_colors > 256) -+ num_colors = 256; - -- info_ptr->palette = -- (void *)gs_alloc_bytes(mem, 256 * sizeof(png_color), -- "png palette"); -- if (info_ptr->palette == 0) { -- code = gs_note_error(gs_error_VMerror); -- goto done; -- } -- info_ptr->num_palette = num_colors; -- info_ptr->valid |= PNG_INFO_PLTE; - for (i = 0; i < num_colors; i++) { - (*dev_proc(pdev, map_color_rgb)) ((gx_device *) pdev, - (gx_color_index) i, rgb); -- info_ptr->palette[i].red = gx_color_value_to_byte(rgb[0]); -- info_ptr->palette[i].green = gx_color_value_to_byte(rgb[1]); -- info_ptr->palette[i].blue = gx_color_value_to_byte(rgb[2]); -+ palette[i].red = gx_color_value_to_byte(rgb[0]); -+ palette[i].green = gx_color_value_to_byte(rgb[1]); -+ palette[i].blue = gx_color_value_to_byte(rgb[2]); - } -+ png_set_PLTE(png_ptr, info_ptr, palette, num_colors); - } - /* add comment */ - strncpy(software_key, "Software", sizeof(software_key)); -@@ -375,15 +382,14 @@ png_print_page(gx_device_printer * pdev, - text_png.key = software_key; - text_png.text = software_text; - text_png.text_length = strlen(software_text); -- info_ptr->text = &text_png; -- info_ptr->num_text = 1; -+ png_set_text(png_ptr, info_ptr, &text_png, 1); - - /* write the file information */ - png_write_info(png_ptr, info_ptr); - - /* don't write the comments twice */ -- info_ptr->num_text = 0; -- info_ptr->text = NULL; -+ /*info_ptr->num_text = 0;*/ -+ /*info_ptr->text = NULL;*/ - - /* Write the contents of the image. */ - for (y = 0; y < height; y++) { -@@ -395,7 +401,7 @@ png_print_page(gx_device_printer * pdev, - png_write_end(png_ptr, info_ptr); - - /* if you alloced the palette, free it here */ -- gs_free_object(mem, info_ptr->palette, "png palette"); -+ /*gs_free_object(mem, info_ptr->palette, "png palette");*/ - - done: - /* free the structures */ -@@ -405,6 +411,7 @@ png_print_page(gx_device_printer * pdev, - return code; - } - -+#if 0 /* not required in 1.5 */ - /* - * Patch around a static reference to a never-used procedure. - * This could be avoided if we were willing to edit pngconf.h to -@@ -422,6 +429,7 @@ png_push_fill_buffer(png_structp png_ptr - { - } - #endif -+#endif - - static int - pngalpha_open(gx_device * pdev) diff --git a/print/ghostscript/patches/patch-am b/print/ghostscript/patches/patch-am deleted file mode 100644 index 56d864dfb9f..00000000000 --- a/print/ghostscript/patches/patch-am +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-am,v 1.3 2010/03/11 12:53:52 drochner Exp $ - ---- lib/pdf2dsc.ps.orig 2010-03-11 11:43:37.000000000 +0000 -+++ lib/pdf2dsc.ps -@@ -116,7 +116,7 @@ systemdict /.setsafe known { .setsafe } - DSCfile PDFname write==only - ( \(r\) file { DELAYSAFER { .setsafe } if } stopped pop\n) puts - ( pdfopen begin\n) puts -- ( copy_trailer_attrs\n) puts -+ ( process_trailer_attrs\n) puts - (%%EndSetup\n) puts - - /.hasPageLabels false def % see "Page Labels" in the PDF Reference diff --git a/print/ghostscript/patches/patch-ba b/print/ghostscript/patches/patch-ba deleted file mode 100644 index 8becb375bf4..00000000000 --- a/print/ghostscript/patches/patch-ba +++ /dev/null @@ -1,47 +0,0 @@ -$NetBSD: patch-ba,v 1.3 2010/06/30 12:44:55 tron Exp $ - -Fix for security vulnerability reported in CVE-2010-1628 taken from here: - -http://bugs.ghostscript.com/attachment.cgi?id=6350 - ---- psi/idosave.h.orig 2008-08-28 23:48:19.000000000 +0100 -+++ psi/idosave.h 2010-06-30 13:31:32.000000000 +0100 -@@ -18,6 +18,22 @@ - # define idosave_INCLUDED - - /* -+ * Structure for saved change chain for save/restore. Because of the -+ * garbage collector, we need to distinguish the cases where the change -+ * is in a static object, a dynamic ref, or a dynamic struct. -+ */ -+typedef struct alloc_change_s alloc_change_t; -+struct alloc_change_s { -+ alloc_change_t *next; -+ ref_packed *where; -+ ref contents; -+#define AC_OFFSET_STATIC (-2) /* static object */ -+#define AC_OFFSET_REF (-1) /* dynamic ref */ -+#define AC_OFFSET_ALLOCATED (-3) /* a newly allocated ref array */ -+ short offset; /* if >= 0, offset within struct */ -+}; -+ -+/* - * Save a change that must be undone by restore. We have to pass the - * pointer to the containing object to alloc_save_change for two reasons: - * -@@ -29,6 +45,7 @@ - * relocate the pointer to it from the change record during garbage - * collection. - */ -+ - int alloc_save_change(gs_dual_memory_t *dmem, const ref *pcont, - ref_packed *ptr, client_name_t cname); - int alloc_save_change_in(gs_ref_memory_t *mem, const ref *pcont, -@@ -36,6 +53,6 @@ - /* Remove an AC_OFFSET_ALLOCATED element. */ - void alloc_save_remove(gs_ref_memory_t *mem, ref_packed *obj, client_name_t cname); - /* Allocate a structure for recording an allocation event. */ --int alloc_save_change_alloc(gs_ref_memory_t *mem, client_name_t cname, ref_packed ***ppr); -+int alloc_save_change_alloc(gs_ref_memory_t *mem, client_name_t cname, alloc_change_t **pcp); - - #endif /* idosave_INCLUDED */ diff --git a/print/ghostscript/patches/patch-bb b/print/ghostscript/patches/patch-bb deleted file mode 100644 index 27baf7fbd51..00000000000 --- a/print/ghostscript/patches/patch-bb +++ /dev/null @@ -1,50 +0,0 @@ -$NetBSD: patch-bb,v 1.3 2010/06/30 12:44:55 tron Exp $ - -Fix for security vulnerability reported in CVE-2010-1628 taken from here: - -http://bugs.ghostscript.com/attachment.cgi?id=6350 - ---- psi/isave.c.orig 2008-08-28 23:48:19.000000000 +0100 -+++ psi/isave.c 2010-06-30 13:31:32.000000000 +0100 -@@ -156,22 +156,6 @@ - /* A link to igcref.c . */ - ptr_proc_reloc(igc_reloc_ref_ptr_nocheck, ref_packed); - --/* -- * Structure for saved change chain for save/restore. Because of the -- * garbage collector, we need to distinguish the cases where the change -- * is in a static object, a dynamic ref, or a dynamic struct. -- */ --typedef struct alloc_change_s alloc_change_t; --struct alloc_change_s { -- alloc_change_t *next; -- ref_packed *where; -- ref contents; --#define AC_OFFSET_STATIC (-2) /* static object */ --#define AC_OFFSET_REF (-1) /* dynamic ref */ --#define AC_OFFSET_ALLOCATED (-3) /* a newly allocated ref array */ -- short offset; /* if >= 0, offset within struct */ --}; -- - static - CLEAR_MARKS_PROC(change_clear_marks) - { -@@ -519,7 +503,7 @@ - - /* Allocate a structure for recording an allocation event. */ - int --alloc_save_change_alloc(gs_ref_memory_t *mem, client_name_t cname, ref_packed ***ppr) -+alloc_save_change_alloc(gs_ref_memory_t *mem, client_name_t cname, alloc_change_t **pcp) - { - register alloc_change_t *cp; - -@@ -533,8 +517,7 @@ - cp->where = 0; - cp->offset = AC_OFFSET_ALLOCATED; - make_null(&cp->contents); -- mem->changes = cp; -- *ppr = &cp->where; -+ *pcp = cp; - return 1; - } - diff --git a/print/ghostscript/patches/patch-bc b/print/ghostscript/patches/patch-bc deleted file mode 100644 index f5d7987ef0d..00000000000 --- a/print/ghostscript/patches/patch-bc +++ /dev/null @@ -1,42 +0,0 @@ -$NetBSD: patch-bc,v 1.3 2010/06/30 12:44:55 tron Exp $ - -Fix for security vulnerability reported in CVE-2010-1628 taken from here: - -http://bugs.ghostscript.com/attachment.cgi?id=6350 - ---- psi/ialloc.c.orig 2008-08-28 23:48:19.000000000 +0100 -+++ psi/ialloc.c 2010-06-30 13:31:32.000000000 +0100 -@@ -185,7 +185,14 @@ - */ - chunk_t *pcc = mem->pcc; - ref *end; -+ alloc_change_t *cp = 0; -+ int code = 0; - -+ if ((gs_memory_t *)mem != mem->stable_memory) { -+ code = alloc_save_change_alloc(mem, "gs_alloc_ref_array", &cp); -+ if (code < 0) -+ return code; -+ } - obj = gs_alloc_struct_array((gs_memory_t *) mem, num_refs + 1, - ref, &st_refs, cname); - if (obj == 0) -@@ -210,14 +217,10 @@ - chunk_locate_ptr(obj, &cl); - cl.cp->has_refs = true; - } -- if ((gs_memory_t *)mem != mem->stable_memory) { -- ref_packed **ppr = 0; -- int code = alloc_save_change_alloc(mem, "gs_alloc_ref_array", &ppr); -- if (code < 0) -- return code; -- if (ppr) -- *ppr = (ref_packed *)obj; -- } -+ if (cp) { -+ mem->changes = cp; -+ cp->where = (ref_packed *)obj; -+ } - } - make_array(parr, attrs | mem->space, num_refs, obj); - return 0; diff --git a/print/ghostscript/patches/patch-bd b/print/ghostscript/patches/patch-bd deleted file mode 100644 index 28c27361072..00000000000 --- a/print/ghostscript/patches/patch-bd +++ /dev/null @@ -1,98 +0,0 @@ -$NetBSD: patch-bd,v 1.3 2010/11/13 17:03:00 bouyer Exp $ - -From 6d26e9b1c38d8c0f0ab4af42c513cb23f3ae1656 Mon Sep 17 00:00:00 2001 -From: till <till@a1074d23-0009-0410-80fe-cf8c14f379e6> -Date: Tue, 9 Mar 2010 16:35:06 +0000 -Subject: [PATCH] Fixes on CUPS Raster output device: - - Fixed memory reallocation on bitmap size change. Reallocation is not only - needed when dimendions and margins change, but also when the color depth - changes. Fixes bugs #691029 and #691108. - - Fixed arrayoption() macro in cups_put_params() function. Array values did - not get actually set in cups.header data structure. Bug only showed via - a compiler warning. - - Silenced compiler warning by presetting c0..c3 in cups_map_cmyk() to zero. - -git-svn-id: http://svn.ghostscript.com/ghostscript/trunk/gs@10890 a1074d23-0009-0410-80fe-cf8c14f379e6 ---- - cups/gdevcups.c | 32 +++++++++++++++++++++++--------- - 1 files changed, 23 insertions(+), 9 deletions(-) - -diff --git a/cups/gdevcups.c b/cups/gdevcups.c -index 551b806..4000abf 100644 ---- a/cups/gdevcups.c -+++ cups/gdevcups.c -@@ -975,7 +975,8 @@ cups_map_cmyk(gx_device *pdev, /* I - Device info */ - frac k, /* I - Black value */ - frac *out) /* O - Device colors */ - { -- int c0, c1, c2, c3; /* Temporary color values */ -+ int c0 = 0, c1 = 0, -+ c2 = 0, c3 = 0; /* Temporary color values */ - float rr, rg, rb, /* Real RGB colors */ - ciex, ciey, ciez, /* CIE XYZ colors */ - ciey_yn, /* Normalized luminance */ -@@ -2703,9 +2704,13 @@ cups_put_params(gx_device *pdev, /* I - Device info */ - 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 */ -+ colorspace, /* New color space */ -+ bitspercolor; /* New bits per color */ - static int width_old = 0, /* Previous width */ -- height_old = 0; /* Previous height */ -+ height_old = 0, /* Previous height */ -+ colorspace_old = 0,/* Previous color space */ -+ bitspercolor_old = 0;/* Previous bits per color */ - ppd_attr_t *backside = NULL, - *backsiderequiresflippedmargins = NULL; - float swap; -@@ -2800,9 +2805,10 @@ cups_put_params(gx_device *pdev, /* I - Device info */ - else if (code == 0) \ - { \ - dprintf1("DEBUG: Setting %s to", sname); \ -- for (i = 0; i < count; i ++) \ -- dprintf1(" %d", (unsigned)(arrayval.data[i])); \ -- cups->header.name[i] = (unsigned)arrayval.data[i]; \ -+ for (i = 0; i < count; i ++) { \ -+ dprintf1(" %d", (unsigned)(arrayval.data[i])); \ -+ cups->header.name[i] = (unsigned)(arrayval.data[i]); \ -+ } \ - dprintf("...\n"); \ - } - -@@ -3243,23 +3249,31 @@ cups_put_params(gx_device *pdev, /* I - Device info */ - } - #endif /* CUPS_RASTER_SYNCv1 */ - -+ colorspace = cups->header.cupsColorSpace; -+ bitspercolor = cups->header.cupsBitsPerColor; -+ - /* - * Don't reallocate memory unless the device has been opened... - * Also reallocate only if the size has actually changed... - */ - -- if (pdev->is_open && (width != width_old || height != height_old)) -+ if (pdev->is_open && -+ (width != width_old || height != height_old || -+ colorspace != colorspace_old || bitspercolor != bitspercolor_old)) - { - - width_old = width; - height_old = height; -+ colorspace_old = colorspace; -+ bitspercolor_old = bitspercolor; - - /* - * Device is open and size has changed, so reallocate... - */ - -- dprintf4("DEBUG2: Reallocating memory, [%.0f %.0f] = %dx%d pixels...\n", -- pdev->MediaSize[0], pdev->MediaSize[1], width, height); -+ dprintf6("DEBUG2: Reallocating memory, [%.0f %.0f] = %dx%d pixels, color space: %d, bits per color: %d...\n", -+ pdev->MediaSize[0], pdev->MediaSize[1], width, height, -+ colorspace, bitspercolor); - - sp = ((gx_device_printer *)pdev)->space_params; - |