diff options
author | adam <adam@pkgsrc.org> | 2012-02-04 21:10:43 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2012-02-04 21:10:43 +0000 |
commit | 52e5b9b7a94ef138fb78980609ee8b9b50b6a0a2 (patch) | |
tree | 557a1102a8366bdb0fb48ad03eaaf44b545f497f /graphics | |
parent | 23b21ea1e73405146d0ff65086ab7529741ffa84 (diff) | |
download | pkgsrc-52e5b9b7a94ef138fb78980609ee8b9b50b6a0a2.tar.gz |
Changes 2.6.12:
Bug fixes:
* GIMP 2.6.10 segfaults when CTRL-left click on a layer mask
* GIMP fails to import a path from SVG
* Crash or Gtk-CRITICAL on File->Open
* [abrt] gimp-2:2.6.11-1.fc14: py-slice.py:172:slice:TypeError: integer argument
expected, got float
* gimp(1) manpage fixes
* Sample Colorize does not function non-interactively
* file-pdf-load: Don't use deprecated API
* file-psp: fix for bogus input data
* Fixes for some buffer overflow problems
* Guard against crash due to quitting while DND is processed
* fails to build with -Werror=format-security
* script-fu: make server IPv6 aware
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/gimp/Makefile | 5 | ||||
-rw-r--r-- | graphics/gimp/PLIST | 19 | ||||
-rw-r--r-- | graphics/gimp/distinfo | 20 | ||||
-rw-r--r-- | graphics/gimp/patches/patch-aa | 4 | ||||
-rw-r--r-- | graphics/gimp/patches/patch-ab | 8 | ||||
-rw-r--r-- | graphics/gimp/patches/patch-ae | 134 | ||||
-rw-r--r-- | graphics/gimp/patches/patch-af | 365 | ||||
-rw-r--r-- | graphics/gimp/patches/patch-ag | 53 | ||||
-rw-r--r-- | graphics/gimp/patches/patch-ba | 60 | ||||
-rw-r--r-- | graphics/gimp/patches/patch-bb | 32 | ||||
-rw-r--r-- | graphics/gimp/patches/patch-bc | 35 | ||||
-rw-r--r-- | graphics/gimp/patches/patch-bd | 17 | ||||
-rw-r--r-- | graphics/gimp/patches/patch-plug-ins_script-fu_script-fu-server.c | 18 |
13 files changed, 43 insertions, 727 deletions
diff --git a/graphics/gimp/Makefile b/graphics/gimp/Makefile index e6d8b4e16eb..e7b6e9007b5 100644 --- a/graphics/gimp/Makefile +++ b/graphics/gimp/Makefile @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.208 2011/11/07 17:59:47 drochner Exp $ +# $NetBSD: Makefile,v 1.209 2012/02/04 21:10:43 adam Exp $ -DISTNAME= gimp-2.6.11 -PKGREVISION= 9 +DISTNAME= gimp-2.6.12 CATEGORIES= graphics MASTER_SITES= ftp://ftp.gimp.org/pub/gimp/v2.6/ \ ${MASTER_SITE_GNU:=gimp/v2.6/} \ diff --git a/graphics/gimp/PLIST b/graphics/gimp/PLIST index abb83123928..a56e0644180 100644 --- a/graphics/gimp/PLIST +++ b/graphics/gimp/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.47 2010/11/11 11:40:54 adam Exp $ +@comment $NetBSD: PLIST,v 1.48 2012/02/04 21:10:43 adam Exp $ bin/gimp bin/gimp-2.6 bin/gimp-console @@ -1076,7 +1076,6 @@ share/gtk-doc/html/libgimp/libgimp-index-new-in-2-4.html share/gtk-doc/html/libgimp/libgimp-index-new-in-2-6.html share/gtk-doc/html/libgimp/libgimp-index.html share/gtk-doc/html/libgimp/libgimp-selectors.html -share/gtk-doc/html/libgimp/libgimp.devhelp share/gtk-doc/html/libgimp/libgimp.devhelp2 share/gtk-doc/html/libgimp/libgimp.html share/gtk-doc/html/libgimp/libgimpui-hierarchy.html @@ -1109,7 +1108,6 @@ share/gtk-doc/html/libgimpbase/libgimpbase-index-new-in-2-2.html share/gtk-doc/html/libgimpbase/libgimpbase-index-new-in-2-4.html share/gtk-doc/html/libgimpbase/libgimpbase-index-new-in-2-6.html share/gtk-doc/html/libgimpbase/libgimpbase-index.html -share/gtk-doc/html/libgimpbase/libgimpbase.devhelp share/gtk-doc/html/libgimpbase/libgimpbase.devhelp2 share/gtk-doc/html/libgimpbase/libgimpbase.html share/gtk-doc/html/libgimpbase/right.png @@ -1131,7 +1129,6 @@ share/gtk-doc/html/libgimpcolor/libgimpcolor-index-new-in-2-2.html share/gtk-doc/html/libgimpcolor/libgimpcolor-index-new-in-2-4.html share/gtk-doc/html/libgimpcolor/libgimpcolor-index-new-in-2-6.html share/gtk-doc/html/libgimpcolor/libgimpcolor-index.html -share/gtk-doc/html/libgimpcolor/libgimpcolor.devhelp share/gtk-doc/html/libgimpcolor/libgimpcolor.devhelp2 share/gtk-doc/html/libgimpcolor/libgimpcolor.html share/gtk-doc/html/libgimpcolor/right.png @@ -1156,7 +1153,6 @@ share/gtk-doc/html/libgimpconfig/libgimpconfig-index-deprecated.html share/gtk-doc/html/libgimpconfig/libgimpconfig-index-new-in-2-4.html share/gtk-doc/html/libgimpconfig/libgimpconfig-index-new-in-2-6.html share/gtk-doc/html/libgimpconfig/libgimpconfig-index.html -share/gtk-doc/html/libgimpconfig/libgimpconfig.devhelp share/gtk-doc/html/libgimpconfig/libgimpconfig.devhelp2 share/gtk-doc/html/libgimpconfig/libgimpconfig.html share/gtk-doc/html/libgimpconfig/right.png @@ -1175,7 +1171,6 @@ share/gtk-doc/html/libgimpmath/libgimpmath-index-new-in-2-2.html share/gtk-doc/html/libgimpmath/libgimpmath-index-new-in-2-4.html share/gtk-doc/html/libgimpmath/libgimpmath-index-new-in-2-6.html share/gtk-doc/html/libgimpmath/libgimpmath-index.html -share/gtk-doc/html/libgimpmath/libgimpmath.devhelp share/gtk-doc/html/libgimpmath/libgimpmath.devhelp2 share/gtk-doc/html/libgimpmath/libgimpmath.html share/gtk-doc/html/libgimpmath/right.png @@ -1192,7 +1187,6 @@ share/gtk-doc/html/libgimpmodule/libgimpmodule-index-new-in-2-2.html share/gtk-doc/html/libgimpmodule/libgimpmodule-index-new-in-2-4.html share/gtk-doc/html/libgimpmodule/libgimpmodule-index-new-in-2-6.html share/gtk-doc/html/libgimpmodule/libgimpmodule-index.html -share/gtk-doc/html/libgimpmodule/libgimpmodule.devhelp share/gtk-doc/html/libgimpmodule/libgimpmodule.devhelp2 share/gtk-doc/html/libgimpmodule/libgimpmodule.html share/gtk-doc/html/libgimpmodule/right.png @@ -1211,7 +1205,6 @@ share/gtk-doc/html/libgimpthumb/libgimpthumb-index-new-in-2-2.html share/gtk-doc/html/libgimpthumb/libgimpthumb-index-new-in-2-4.html share/gtk-doc/html/libgimpthumb/libgimpthumb-index-new-in-2-6.html share/gtk-doc/html/libgimpthumb/libgimpthumb-index.html -share/gtk-doc/html/libgimpthumb/libgimpthumb.devhelp share/gtk-doc/html/libgimpthumb/libgimpthumb.devhelp2 share/gtk-doc/html/libgimpthumb/libgimpthumb.html share/gtk-doc/html/libgimpthumb/right.png @@ -1311,7 +1304,6 @@ share/gtk-doc/html/libgimpwidgets/libgimpwidgets-index-new-in-2-6.html share/gtk-doc/html/libgimpwidgets/libgimpwidgets-index.html share/gtk-doc/html/libgimpwidgets/libgimpwidgets-utils.html share/gtk-doc/html/libgimpwidgets/libgimpwidgets-widgets.html -share/gtk-doc/html/libgimpwidgets/libgimpwidgets.devhelp share/gtk-doc/html/libgimpwidgets/libgimpwidgets.devhelp2 share/gtk-doc/html/libgimpwidgets/right.png share/gtk-doc/html/libgimpwidgets/stock-anchor-16.png @@ -1706,6 +1698,7 @@ share/locale/el/LC_MESSAGES/gimp20-libgimp.mo share/locale/el/LC_MESSAGES/gimp20-python.mo share/locale/el/LC_MESSAGES/gimp20-script-fu.mo share/locale/el/LC_MESSAGES/gimp20-std-plug-ins.mo +share/locale/el/LC_MESSAGES/gimp20-tips.mo share/locale/el/LC_MESSAGES/gimp20.mo share/locale/en_CA/LC_MESSAGES/gimp20-libgimp.mo share/locale/en_CA/LC_MESSAGES/gimp20-python.mo @@ -1722,6 +1715,7 @@ share/locale/en_GB/LC_MESSAGES/gimp20.mo share/locale/eo/LC_MESSAGES/gimp20-libgimp.mo share/locale/eo/LC_MESSAGES/gimp20-python.mo share/locale/eo/LC_MESSAGES/gimp20-script-fu.mo +share/locale/eo/LC_MESSAGES/gimp20-std-plug-ins.mo share/locale/eo/LC_MESSAGES/gimp20-tips.mo share/locale/eo/LC_MESSAGES/gimp20.mo share/locale/es/LC_MESSAGES/gimp20-libgimp.mo @@ -1818,6 +1812,8 @@ share/locale/ja/LC_MESSAGES/gimp20-std-plug-ins.mo share/locale/ja/LC_MESSAGES/gimp20-tips.mo share/locale/ja/LC_MESSAGES/gimp20.mo share/locale/ka/LC_MESSAGES/gimp20.mo +share/locale/kk/LC_MESSAGES/gimp20-libgimp.mo +share/locale/kk/LC_MESSAGES/gimp20.mo share/locale/km/LC_MESSAGES/gimp20-libgimp.mo share/locale/km/LC_MESSAGES/gimp20-python.mo share/locale/km/LC_MESSAGES/gimp20-script-fu.mo @@ -1839,6 +1835,10 @@ share/locale/lt/LC_MESSAGES/gimp20-std-plug-ins.mo share/locale/lt/LC_MESSAGES/gimp20-tips.mo share/locale/lt/LC_MESSAGES/gimp20.mo share/locale/lv/LC_MESSAGES/gimp20-libgimp.mo +share/locale/lv/LC_MESSAGES/gimp20-python.mo +share/locale/lv/LC_MESSAGES/gimp20-script-fu.mo +share/locale/lv/LC_MESSAGES/gimp20-std-plug-ins.mo +share/locale/lv/LC_MESSAGES/gimp20-tips.mo share/locale/lv/LC_MESSAGES/gimp20.mo share/locale/mk/LC_MESSAGES/gimp20-libgimp.mo share/locale/mk/LC_MESSAGES/gimp20-python.mo @@ -1977,6 +1977,7 @@ share/locale/tr/LC_MESSAGES/gimp20-libgimp.mo share/locale/tr/LC_MESSAGES/gimp20-python.mo share/locale/tr/LC_MESSAGES/gimp20-script-fu.mo share/locale/tr/LC_MESSAGES/gimp20-std-plug-ins.mo +share/locale/tr/LC_MESSAGES/gimp20-tips.mo share/locale/tr/LC_MESSAGES/gimp20.mo share/locale/tt/LC_MESSAGES/gimp20.mo share/locale/uk/LC_MESSAGES/gimp20-libgimp.mo diff --git a/graphics/gimp/distinfo b/graphics/gimp/distinfo index 600e79a6190..27a6fb6b197 100644 --- a/graphics/gimp/distinfo +++ b/graphics/gimp/distinfo @@ -1,16 +1,10 @@ -$NetBSD: distinfo,v 1.64 2011/11/07 17:59:47 drochner Exp $ +$NetBSD: distinfo,v 1.65 2012/02/04 21:10:43 adam Exp $ -SHA1 (gimp-2.6.11.tar.bz2) = 2f9d596e727bdbf304fa78257c1731d9faf3934c -RMD160 (gimp-2.6.11.tar.bz2) = a116377499e58dc2bfe231ab3c057d0be94091ff -Size (gimp-2.6.11.tar.bz2) = 16473561 bytes -SHA1 (patch-aa) = 0775c8037748bfc27eb610f3667ddaa92d710681 -SHA1 (patch-ab) = 80e7235178e53e873efa0b16098b74fa0b981f76 +SHA1 (gimp-2.6.12.tar.bz2) = 82964e3d4eb003239f3443a1bccac53f5d780e15 +RMD160 (gimp-2.6.12.tar.bz2) = 3c7ae863474dea670eaeb914e333ba6bf50c7fcc +Size (gimp-2.6.12.tar.bz2) = 16745411 bytes +SHA1 (patch-aa) = 91b8f1aa493ab9991ec619268143db748bb6bb9d +SHA1 (patch-ab) = 99a09ad2b0513d28d321b6a698bba3dc6614f2bc SHA1 (patch-ac) = 42f44b45640bdde305c1e52b95ee633360ebccb8 SHA1 (patch-ad) = 4e2ce2f7d8729fb760eac1bad89cfe09fef499b0 -SHA1 (patch-ae) = 5c39e6ff972c09f0c9005f2b7130e098e1368767 -SHA1 (patch-af) = 2926b5be1012295e9338940b5ff1d3b2c5d7619a -SHA1 (patch-ag) = 2dee8374516d57f353f5dd3fd6b4228ad0df4978 -SHA1 (patch-ba) = 5efdceebadab408f2d4465eb1f7ef014c1cc064e -SHA1 (patch-bb) = c1ac683a55764c63f131a1d8c88f773638c7c66e -SHA1 (patch-bc) = afc862d6c79770f85a3c37353f6b77aae6726a43 -SHA1 (patch-bd) = b9fec1ed753adadf5b30c31329266978fe2e302e +SHA1 (patch-plug-ins_script-fu_script-fu-server.c) = 88c99c5dc97a8a5a8708eed8cbb1d4bb6be1abe0 diff --git a/graphics/gimp/patches/patch-aa b/graphics/gimp/patches/patch-aa index 6fe733d13a8..ebbc22091a9 100644 --- a/graphics/gimp/patches/patch-aa +++ b/graphics/gimp/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.26 2010/07/04 05:36:49 adam Exp $ +$NetBSD: patch-aa,v 1.27 2012/02/04 21:10:44 adam Exp $ --- etc/Makefile.in.orig 2010-06-21 20:00:58.000000000 +0000 +++ etc/Makefile.in -@@ -342,7 +342,7 @@ gimpdatadir = @gimpdatadir@ +@@ -344,7 +344,7 @@ gimpdatadir = @gimpdatadir@ gimpdir = @gimpdir@ gimplocaledir = @gimplocaledir@ gimpplugindir = @gimpplugindir@ diff --git a/graphics/gimp/patches/patch-ab b/graphics/gimp/patches/patch-ab index 4ad4347f957..eeca6fabebb 100644 --- a/graphics/gimp/patches/patch-ab +++ b/graphics/gimp/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.32 2010/07/04 05:36:49 adam Exp $ +$NetBSD: patch-ab,v 1.33 2012/02/04 21:10:44 adam Exp $ ---- configure.orig 2010-06-21 20:01:08.000000000 +0000 +--- configure.orig 2012-01-31 14:25:33.000000000 +0000 +++ configure -@@ -17706,13 +17706,13 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>& +@@ -18549,13 +18549,13 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>& gimp_ok=yes fi rm -f conftest* @@ -17,7 +17,7 @@ $NetBSD: patch-ab,v 1.32 2010/07/04 05:36:49 adam Exp $ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gimp_ok" >&5 $as_echo "$gimp_ok" >&6; } if test "x$gimp_ok" = xno; then -@@ -21381,7 +21381,7 @@ fi +@@ -22231,7 +22231,7 @@ fi gimpdatadir="$datadir/$PACKAGE/2.0" gimpplugindir="$libdir/$PACKAGE/2.0" diff --git a/graphics/gimp/patches/patch-ae b/graphics/gimp/patches/patch-ae deleted file mode 100644 index 7a3a3e98f33..00000000000 --- a/graphics/gimp/patches/patch-ae +++ /dev/null @@ -1,134 +0,0 @@ -$NetBSD: patch-ae,v 1.13 2011/04/19 10:28:31 wiz Exp $ - -Fix build with png-1.5. -https://bugzilla.gnome.org/show_bug.cgi?id=640409 - ---- plug-ins/common/file-mng.c.orig 2010-07-02 22:51:56.000000000 +0000 -+++ plug-ins/common/file-mng.c -@@ -799,6 +799,13 @@ mng_save_image (const gchar *filename, - png_infop png_info_ptr; - FILE *infile, *outfile; - int num_passes; -+ int color_type; -+ png_colorp palette; -+ int num_palette; -+ int bit_depth; -+ png_bytep trans_alpha; -+ int num_trans; -+ png_color_16p trans_color; - int tile_height; - guchar **layer_pixels, *layer_pixel; - int pass, j, k, begin, end, num; -@@ -969,7 +976,7 @@ mng_save_image (const gchar *filename, - goto err3; - } - -- if (setjmp (png_ptr->jmpbuf) != 0) -+ if (setjmp (png_jmpbuf(png_ptr)) != 0) - { - g_warning ("HRM saving PNG in mng_save_image()"); - png_destroy_write_struct (&png_ptr, &png_info_ptr); -@@ -981,37 +988,31 @@ mng_save_image (const gchar *filename, - png_init_io (png_ptr, outfile); - png_set_compression_level (png_ptr, mng_data.compression_level); - -- png_info_ptr->width = layer_cols; -- png_info_ptr->height = layer_rows; -- png_info_ptr->interlace_type = (mng_data.interlaced == 0 ? 0 : 1); -- png_info_ptr->bit_depth = 8; -- -+ bit_depth = 8; - switch (layer_drawable_type) - { - case GIMP_RGB_IMAGE: -- png_info_ptr->color_type = PNG_COLOR_TYPE_RGB; -+ color_type = PNG_COLOR_TYPE_RGB; - break; - case GIMP_RGBA_IMAGE: -- png_info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA; -+ color_type = PNG_COLOR_TYPE_RGB_ALPHA; - break; - case GIMP_GRAY_IMAGE: -- png_info_ptr->color_type = PNG_COLOR_TYPE_GRAY; -+ color_type = PNG_COLOR_TYPE_GRAY; - break; - case GIMP_GRAYA_IMAGE: -- png_info_ptr->color_type = PNG_COLOR_TYPE_GRAY_ALPHA; -+ color_type = PNG_COLOR_TYPE_GRAY_ALPHA; - break; - case GIMP_INDEXED_IMAGE: -- png_info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; -- png_info_ptr->valid |= PNG_INFO_PLTE; -- png_info_ptr->palette = -- (png_colorp) gimp_image_get_colormap (image_id, &num_colors); -- png_info_ptr->num_palette = num_colors; -- break; - case GIMP_INDEXEDA_IMAGE: -- png_info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; -- layer_has_unique_palette = -- respin_cmap (png_ptr, png_info_ptr, layer_remap, -- image_id, layer_drawable); -+ color_type = PNG_COLOR_TYPE_PALETTE; -+ gimp_image_get_colormap (image_id, &num_colors); -+ if (num_palette <= 2) -+ bit_depth = 1; -+ else if (num_palette <= 4) -+ bit_depth = 2; -+ else if (num_palette <= 16) -+ bit_depth = 4; - break; - default: - g_warning ("This can't be!\n"); -@@ -1021,16 +1022,14 @@ mng_save_image (const gchar *filename, - goto err3; - } - -- if ((png_info_ptr->valid & PNG_INFO_PLTE) == PNG_INFO_PLTE) -- { -- if (png_info_ptr->num_palette <= 2) -- png_info_ptr->bit_depth = 1; -- else if (png_info_ptr->num_palette <= 4) -- png_info_ptr->bit_depth = 2; -- else if (png_info_ptr->num_palette <= 16) -- png_info_ptr->bit_depth = 4; -- } -+ png_set_IHDR(png_ptr, png_info_ptr, layer_cols, layer_rows, bit_depth, color_type, (mng_data.interlaced == 0 ? PNG_INTERLACE_NONE : PNG_INTERLACE_ADAM7), PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); - -+ if (layer_drawable_type == GIMP_INDEXED_IMAGE) -+ png_set_PLTE(png_ptr, png_info_ptr, (png_colorp) gimp_image_get_colormap (image_id, &num_colors), num_colors); -+ else if (layer_drawable_type == GIMP_INDEXEDA_IMAGE) -+ layer_has_unique_palette = -+ respin_cmap (png_ptr, png_info_ptr, layer_remap, -+ image_id, layer_drawable); - png_write_info (png_ptr, png_info_ptr); - - if (mng_data.interlaced != 0) -@@ -1038,8 +1037,8 @@ mng_save_image (const gchar *filename, - else - num_passes = 1; - -- if ((png_info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) && -- (png_info_ptr->bit_depth < 8)) -+ if ((png_get_color_type(png_ptr, png_info_ptr) == PNG_COLOR_TYPE_PALETTE) && -+ (png_get_bit_depth(png_ptr, png_info_ptr) < 8)) - png_set_packing (png_ptr); - - tile_height = gimp_tile_height (); -@@ -1065,7 +1064,7 @@ mng_save_image (const gchar *filename, - gimp_pixel_rgn_get_rect (&layer_pixel_rgn, layer_pixel, 0, - begin, layer_cols, num); - -- if ((png_info_ptr->valid & PNG_INFO_tRNS) == PNG_INFO_tRNS) -+ if (png_get_tRNS(png_ptr, png_info_ptr, &trans_alpha, &num_trans, &trans_color) != 0) - { - for (j = 0; j < num; j++) - { -@@ -1077,7 +1076,7 @@ mng_save_image (const gchar *filename, - } - } - else -- if (((png_info_ptr->valid & PNG_INFO_PLTE) == PNG_INFO_PLTE) -+ if ((png_get_PLTE(png_ptr, png_info_ptr, &palette, &num_palette) != 0) - && (layer_bpp == 2)) - { - for (j = 0; j < num; j++) diff --git a/graphics/gimp/patches/patch-af b/graphics/gimp/patches/patch-af deleted file mode 100644 index 10e0dabfb34..00000000000 --- a/graphics/gimp/patches/patch-af +++ /dev/null @@ -1,365 +0,0 @@ -$NetBSD: patch-af,v 1.8 2011/04/19 10:28:31 wiz Exp $ - -Fix build with png-1.5. -https://bugzilla.gnome.org/show_bug.cgi?id=640409 - ---- plug-ins/common/file-png.c.orig 2010-07-13 20:22:27.000000000 +0000 -+++ plug-ins/common/file-png.c -@@ -653,7 +653,11 @@ on_read_error (png_structp png_ptr, png_ - error_data->drawable->width, num); - } - -+#if (PNG_LIBPNG_VER < 10500) - longjmp (png_ptr->jmpbuf, 1); -+#else -+ png_longjmp (png_ptr, 1); -+#endif - } - - /* -@@ -697,7 +701,7 @@ load_image (const gchar *filename, - pp = png_create_read_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - info = png_create_info_struct (pp); - -- if (setjmp (pp->jmpbuf)) -+ if (setjmp (png_jmpbuf(pp))) - { - g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED, - _("Error while reading '%s'. File corrupted?"), -@@ -738,17 +742,17 @@ load_image (const gchar *filename, - * Latest attempt, this should be my best yet :) - */ - -- if (info->bit_depth == 16) -+ if (png_get_bit_depth(pp, info) == 16) - { - png_set_strip_16 (pp); - } - -- if (info->color_type == PNG_COLOR_TYPE_GRAY && info->bit_depth < 8) -+ if (png_get_color_type(pp, info) == PNG_COLOR_TYPE_GRAY && png_get_bit_depth(pp, info) < 8) - { - png_set_expand (pp); - } - -- if (info->color_type == PNG_COLOR_TYPE_PALETTE && info->bit_depth < 8) -+ if (png_get_color_type(pp, info) == PNG_COLOR_TYPE_PALETTE && png_get_bit_depth(pp, info) < 8) - { - png_set_packing (pp); - } -@@ -757,8 +761,8 @@ load_image (const gchar *filename, - * Expand G+tRNS to GA, RGB+tRNS to RGBA - */ - -- if (info->color_type != PNG_COLOR_TYPE_PALETTE && -- (info->valid & PNG_INFO_tRNS)) -+ if (png_get_color_type(pp, info) != PNG_COLOR_TYPE_PALETTE && -+ png_get_valid(pp, info, PNG_INFO_tRNS) != 0) - { - png_set_expand (pp); - } -@@ -775,7 +779,7 @@ load_image (const gchar *filename, - */ - - if (png_get_valid (pp, info, PNG_INFO_tRNS) && -- info->color_type == PNG_COLOR_TYPE_PALETTE) -+ png_get_color_type(pp, info) == PNG_COLOR_TYPE_PALETTE) - { - png_get_tRNS (pp, info, &alpha_ptr, &num, NULL); - /* Copy the existing alpha values from the tRNS chunk */ -@@ -797,7 +801,7 @@ load_image (const gchar *filename, - - png_read_update_info (pp, info); - -- switch (info->color_type) -+ switch (png_get_color_type(pp, info)) - { - case PNG_COLOR_TYPE_RGB: /* RGB */ - bpp = 3; -@@ -836,7 +840,7 @@ load_image (const gchar *filename, - return -1; - } - -- image = gimp_image_new (info->width, info->height, image_type); -+ image = gimp_image_new (png_get_image_width(pp, info), png_get_image_height(pp, info), image_type); - if (image == -1) - { - g_set_error (error, 0, 0, -@@ -849,7 +853,7 @@ load_image (const gchar *filename, - * Create the "background" layer to hold the image... - */ - -- layer = gimp_layer_new (image, _("Background"), info->width, info->height, -+ layer = gimp_layer_new (image, _("Background"), png_get_image_width(pp, info), png_get_image_height(pp, info), - layer_type, 100, GIMP_NORMAL_MODE); - gimp_image_add_layer (image, layer, 0); - -@@ -883,7 +887,7 @@ load_image (const gchar *filename, - - gimp_layer_set_offsets (layer, offset_x, offset_y); - -- if ((abs (offset_x) > info->width) || (abs (offset_y) > info->height)) -+ if ((abs (offset_x) > png_get_image_width(pp, info)) || (abs (offset_y) > png_get_image_height(pp, info))) - { - if (interactive) - g_message (_("The PNG file specifies an offset that caused " -@@ -938,23 +942,27 @@ load_image (const gchar *filename, - - empty = 0; /* by default assume no full transparent palette entries */ - -- if (info->color_type & PNG_COLOR_MASK_PALETTE) -+ if (png_get_color_type(pp, info) & PNG_COLOR_MASK_PALETTE) - { -+ png_colorp palette; -+ int num_palette; -+ png_get_PLTE(pp, info, &palette, &num_palette); -+ - if (png_get_valid (pp, info, PNG_INFO_tRNS)) - { - for (empty = 0; empty < 256 && alpha[empty] == 0; ++empty) - /* Calculates number of fully transparent "empty" entries */; - - /* keep at least one entry */ -- empty = MIN (empty, info->num_palette - 1); -+ empty = MIN (empty, num_palette - 1); - -- gimp_image_set_colormap (image, (guchar *) (info->palette + empty), -- info->num_palette - empty); -+ gimp_image_set_colormap (image, (guchar *) (palette + empty), -+ num_palette - empty); - } - else - { -- gimp_image_set_colormap (image, (guchar *) info->palette, -- info->num_palette); -+ gimp_image_set_colormap (image, (guchar *) palette, -+ num_palette); - } - } - -@@ -972,18 +980,18 @@ load_image (const gchar *filename, - */ - - tile_height = gimp_tile_height (); -- pixel = g_new0 (guchar, tile_height * info->width * bpp); -+ pixel = g_new0 (guchar, tile_height * png_get_image_width(pp, info) * bpp); - pixels = g_new (guchar *, tile_height); - - for (i = 0; i < tile_height; i++) -- pixels[i] = pixel + info->width * info->channels * i; -+ pixels[i] = pixel + png_get_image_width(pp, info) * png_get_channels(pp, info) * i; - - /* Install our own error handler to handle incomplete PNG files better */ - error_data.drawable = drawable; - error_data.pixel = pixel; - error_data.tile_height = tile_height; -- error_data.width = info->width; -- error_data.height = info->height; -+ error_data.width = png_get_image_width(pp, info); -+ error_data.height = png_get_image_height(pp, info); - error_data.bpp = bpp; - error_data.pixel_rgn = &pixel_rgn; - -@@ -996,10 +1004,10 @@ load_image (const gchar *filename, - */ - - for (begin = 0, end = tile_height; -- begin < info->height; begin += tile_height, end += tile_height) -+ begin < png_get_image_height(pp, info); begin += tile_height, end += tile_height) - { -- if (end > info->height) -- end = info->height; -+ if (end > png_get_image_height(pp, info)) -+ end = png_get_image_height(pp, info); - - num = end - begin; - -@@ -1016,10 +1024,10 @@ load_image (const gchar *filename, - gimp_pixel_rgn_set_rect (&pixel_rgn, pixel, 0, begin, - drawable->width, num); - -- memset (pixel, 0, tile_height * info->width * bpp); -+ memset (pixel, 0, tile_height * png_get_image_width(pp, info) * bpp); - - gimp_progress_update (((gdouble) pass + -- (gdouble) end / (gdouble) info->height) / -+ (gdouble) end / (gdouble) png_get_image_height(pp, info)) / - (gdouble) num_passes); - } - } -@@ -1072,7 +1080,8 @@ load_image (const gchar *filename, - - { - png_uint_32 proflen; -- png_charp profname, profile; -+ png_charp profname; -+ png_bytep profile; - int profcomp; - - if (png_get_iCCP (pp, info, &profname, &profcomp, &profile, &proflen)) -@@ -1200,6 +1209,8 @@ save_image (const gchar *filename, - guchar red, green, blue; /* Used for palette background */ - time_t cutime; /* Time since epoch */ - struct tm *gmt; /* GMT broken down */ -+ int color_type; /* type of colors in image */ -+ int bit_depth; /* width of colors in bit */ - - guchar remap[256]; /* Re-mapping for the palette */ - -@@ -1208,7 +1219,9 @@ save_image (const gchar *filename, - if (pngvals.comment) - { - GimpParasite *parasite; -+#ifndef PNG_iTXt_SUPPORTED - gsize text_length = 0; -+#endif - - parasite = gimp_image_parasite_find (orig_image_ID, "gimp-comment"); - if (parasite) -@@ -1249,7 +1262,7 @@ save_image (const gchar *filename, - pp = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - info = png_create_info_struct (pp); - -- if (setjmp (pp->jmpbuf)) -+ if (setjmp (png_jmpbuf(pp))) - { - g_set_error (error, 0, 0, - _("Error while saving '%s'. Could not save image."), -@@ -1291,11 +1304,6 @@ save_image (const gchar *filename, - - png_set_compression_level (pp, pngvals.compression_level); - -- info->width = drawable->width; -- info->height = drawable->height; -- info->bit_depth = 8; -- info->interlace_type = pngvals.interlaced; -- - /* - * Initialise remap[] - */ -@@ -1304,44 +1312,48 @@ save_image (const gchar *filename, - - /* - * Set color type and remember bytes per pixel count -+ * Also fix bit depths for (possibly) smaller colormap images - */ - -+ bit_depth = 8; -+ - switch (type) - { - case GIMP_RGB_IMAGE: -- info->color_type = PNG_COLOR_TYPE_RGB; -+ color_type = PNG_COLOR_TYPE_RGB; - bpp = 3; - break; - - case GIMP_RGBA_IMAGE: -- info->color_type = PNG_COLOR_TYPE_RGB_ALPHA; -+ color_type = PNG_COLOR_TYPE_RGB_ALPHA; - bpp = 4; - break; - - case GIMP_GRAY_IMAGE: -- info->color_type = PNG_COLOR_TYPE_GRAY; -+ color_type = PNG_COLOR_TYPE_GRAY; - bpp = 1; - break; - - case GIMP_GRAYA_IMAGE: -- info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA; -+ color_type = PNG_COLOR_TYPE_GRAY_ALPHA; - bpp = 2; - break; - - case GIMP_INDEXED_IMAGE: -+ case GIMP_INDEXEDA_IMAGE: - bpp = 1; -- info->color_type = PNG_COLOR_TYPE_PALETTE; -- info->valid |= PNG_INFO_PLTE; -- info->palette = -- (png_colorp) gimp_image_get_colormap (image_ID, &num_colors); -- info->num_palette = num_colors; -- break; -+ if (type == GIMP_INDEXEDA_IMAGE) -+ bpp = 2; - -- case GIMP_INDEXEDA_IMAGE: -- bpp = 2; -- info->color_type = PNG_COLOR_TYPE_PALETTE; -- /* fix up transparency */ -- respin_cmap (pp, info, remap, image_ID, drawable); -+ color_type = PNG_COLOR_TYPE_PALETTE; -+ gimp_image_get_colormap (image_ID, &num_colors); -+ if (num_colors <= 2) -+ bit_depth = 1; -+ else if (num_colors <= 4) -+ bit_depth = 2; -+ else if (num_colors <= 16) -+ bit_depth = 4; -+ /* otherwise the default is fine */ - break; - - default: -@@ -1349,19 +1361,14 @@ save_image (const gchar *filename, - return FALSE; - } - -- /* -- * Fix bit depths for (possibly) smaller colormap images -- */ -+ png_set_IHDR(pp, info, drawable->width, drawable->height, bit_depth, color_type, pngvals.interlaced ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - -- if (info->valid & PNG_INFO_PLTE) -+ if (type == GIMP_INDEXED_IMAGE) -+ png_set_PLTE(pp, info, (png_colorp) gimp_image_get_colormap (image_ID, &num_colors), num_colors); -+ else if (type == GIMP_INDEXEDA_IMAGE) - { -- if (info->num_palette <= 2) -- info->bit_depth = 1; -- else if (info->num_palette <= 4) -- info->bit_depth = 2; -- else if (info->num_palette <= 16) -- info->bit_depth = 4; -- /* otherwise the default is fine */ -+ /* fix up transparency */ -+ respin_cmap (pp, info, remap, image_ID, drawable); - } - - /* All this stuff is optional extras, if the user is aiming for smallest -@@ -1477,7 +1484,7 @@ save_image (const gchar *filename, - * Convert unpacked pixels to packed if necessary - */ - -- if (info->color_type == PNG_COLOR_TYPE_PALETTE && info->bit_depth < 8) -+ if (png_get_color_type(pp, info) == PNG_COLOR_TYPE_PALETTE && png_get_bit_depth(pp, info) < 8) - png_set_packing (pp); - - /* -@@ -1529,7 +1536,7 @@ save_image (const gchar *filename, - - /* If we're dealing with a paletted image with - * transparency set, write out the remapped palette */ -- if (info->valid & PNG_INFO_tRNS) -+ if (png_get_valid(pp, info, PNG_INFO_tRNS)) - { - guchar inverse_remap[256]; - -@@ -1549,7 +1556,7 @@ save_image (const gchar *filename, - } - /* Otherwise if we have a paletted image and transparency - * couldn't be set, we ignore the alpha channel */ -- else if (info->valid & PNG_INFO_PLTE && bpp == 2) -+ else if (png_get_valid(pp, info, PNG_INFO_PLTE) && bpp == 2) - { - for (i = 0; i < num; ++i) - { -@@ -1564,7 +1571,7 @@ save_image (const gchar *filename, - png_write_rows (pp, pixels, num); - - gimp_progress_update (((double) pass + (double) end / -- (double) info->height) / -+ (double) png_get_image_height(pp, info)) / - (double) num_passes); - } - } diff --git a/graphics/gimp/patches/patch-ag b/graphics/gimp/patches/patch-ag deleted file mode 100644 index e4dd9d04962..00000000000 --- a/graphics/gimp/patches/patch-ag +++ /dev/null @@ -1,53 +0,0 @@ -$NetBSD: patch-ag,v 1.5 2011/11/07 17:59:47 drochner Exp $ - -CVE-2011-2896 - ---- plug-ins/common/file-gif-load.c.orig 2010-07-02 22:51:56.000000000 +0000 -+++ plug-ins/common/file-gif-load.c -@@ -697,7 +697,8 @@ LZWReadByte (FILE *fd, - static gint firstcode, oldcode; - static gint clear_code, end_code; - static gint table[2][(1 << MAX_LZW_BITS)]; -- static gint stack[(1 << (MAX_LZW_BITS)) * 2], *sp; -+#define STACK_SIZE ((1 << (MAX_LZW_BITS)) * 2) -+ static gint stack[STACK_SIZE], *sp; - gint i; - - if (just_reset_LZW) -@@ -772,7 +773,7 @@ LZWReadByte (FILE *fd, - - return firstcode; - } -- else if (code == end_code) -+ else if (code == end_code || code > max_code) - { - gint count; - guchar buf[260]; -@@ -791,13 +792,14 @@ LZWReadByte (FILE *fd, - - incode = code; - -- if (code >= max_code) -+ if (code == max_code) - { -- *sp++ = firstcode; -+ if (sp < &(stack[STACK_SIZE])) -+ *sp++ = firstcode; - code = oldcode; - } - -- while (code >= clear_code) -+ while (code >= clear_code && sp < &(stack[STACK_SIZE])) - { - *sp++ = table[1][code]; - if (code == table[0][code]) -@@ -808,7 +810,8 @@ LZWReadByte (FILE *fd, - code = table[0][code]; - } - -- *sp++ = firstcode = table[1][code]; -+ if (sp < &(stack[STACK_SIZE])) -+ *sp++ = firstcode = table[1][code]; - - if ((code = max_code) < (1 << MAX_LZW_BITS)) - { diff --git a/graphics/gimp/patches/patch-ba b/graphics/gimp/patches/patch-ba deleted file mode 100644 index 2d5524a8df8..00000000000 --- a/graphics/gimp/patches/patch-ba +++ /dev/null @@ -1,60 +0,0 @@ -$NetBSD: patch-ba,v 1.1 2011/04/15 16:39:09 drochner Exp $ - -CVE-2010-4540 - ---- plug-ins/lighting/lighting-ui.c.orig 2010-07-02 22:51:59.000000000 +0000 -+++ plug-ins/lighting/lighting-ui.c -@@ -1342,6 +1342,7 @@ load_preset_response (GtkFileChooser *ch - gchar buffer3[G_ASCII_DTOSTR_BUF_SIZE]; - gchar type_label[21]; - gchar *endptr; -+ gchar fmt_str[32]; - - if (response_id == GTK_RESPONSE_OK) - { -@@ -1381,23 +1382,41 @@ load_preset_response (GtkFileChooser *ch - return; - } - -- fscanf (fp, " Position: %s %s %s", buffer1, buffer2, buffer3); -+ snprintf (fmt_str, sizeof (fmt_str), -+ " Position: %%%lds %%%lds %%%lds", -+ sizeof (buffer1) - 1, -+ sizeof (buffer2) - 1, -+ sizeof (buffer3) - 1); -+ fscanf (fp, fmt_str, buffer1, buffer2, buffer3); - source->position.x = g_ascii_strtod (buffer1, &endptr); - source->position.y = g_ascii_strtod (buffer2, &endptr); - source->position.z = g_ascii_strtod (buffer3, &endptr); - -- fscanf (fp, " Direction: %s %s %s", buffer1, buffer2, buffer3); -+ snprintf (fmt_str, sizeof (fmt_str), -+ " Direction: %%%lds %%%lds %%%lds", -+ sizeof (buffer1) - 1, -+ sizeof (buffer2) - 1, -+ sizeof (buffer3) - 1); -+ fscanf (fp, fmt_str, buffer1, buffer2, buffer3); - source->direction.x = g_ascii_strtod (buffer1, &endptr); - source->direction.y = g_ascii_strtod (buffer2, &endptr); - source->direction.z = g_ascii_strtod (buffer3, &endptr); - -- fscanf (fp, " Color: %s %s %s", buffer1, buffer2, buffer3); -+ snprintf (fmt_str, sizeof (fmt_str), -+ " Color: %%%lds %%%lds %%%lds", -+ sizeof (buffer1) - 1, -+ sizeof (buffer2) - 1, -+ sizeof (buffer3) - 1); -+ fscanf (fp, fmt_str, buffer1, buffer2, buffer3); - source->color.r = g_ascii_strtod (buffer1, &endptr); - source->color.g = g_ascii_strtod (buffer2, &endptr); - source->color.b = g_ascii_strtod (buffer3, &endptr); - source->color.a = 1.0; - -- fscanf (fp, " Intensity: %s", buffer1); -+ snprintf (fmt_str, sizeof (fmt_str), -+ " Intensity: %%%lds", -+ sizeof (buffer1) - 1); -+ fscanf (fp, fmt_str, buffer1); - source->intensity = g_ascii_strtod (buffer1, &endptr); - - } diff --git a/graphics/gimp/patches/patch-bb b/graphics/gimp/patches/patch-bb deleted file mode 100644 index ec6bef8b544..00000000000 --- a/graphics/gimp/patches/patch-bb +++ /dev/null @@ -1,32 +0,0 @@ -$NetBSD: patch-bb,v 1.1 2011/04/15 16:39:09 drochner Exp $ - -CVE-2010-4541 - ---- plug-ins/common/sphere-designer.c.orig 2010-07-02 22:51:56.000000000 +0000 -+++ plug-ins/common/sphere-designer.c -@@ -1992,6 +1992,7 @@ loadit (const gchar * fn) - gchar endbuf[21 * (G_ASCII_DTOSTR_BUF_SIZE + 1)]; - gchar *end = endbuf; - gchar line[1024]; -+ gchar fmt_str[16]; - gint i; - texture *t; - gint majtype, type; -@@ -2016,6 +2017,8 @@ loadit (const gchar * fn) - - s.com.numtexture = 0; - -+ snprintf (fmt_str, sizeof (fmt_str), "%%d %%d %%%lds", sizeof (endbuf) - 1); -+ - while (!feof (f)) - { - -@@ -2026,7 +2029,7 @@ loadit (const gchar * fn) - t = &s.com.texture[i]; - setdefaults (t); - -- if (sscanf (line, "%d %d %s", &t->majtype, &t->type, end) != 3) -+ if (sscanf (line, fmt_str, &t->majtype, &t->type, end) != 3) - t->color1.x = g_ascii_strtod (end, &end); - if (end && errno != ERANGE) - t->color1.y = g_ascii_strtod (end, &end); diff --git a/graphics/gimp/patches/patch-bc b/graphics/gimp/patches/patch-bc deleted file mode 100644 index 37f2742ac93..00000000000 --- a/graphics/gimp/patches/patch-bc +++ /dev/null @@ -1,35 +0,0 @@ -$NetBSD: patch-bc,v 1.1 2011/04/15 16:39:10 drochner Exp $ - -CVE-2010-4542 - ---- plug-ins/gfig/gfig-style.c.orig 2010-07-02 22:51:59.000000000 +0000 -+++ plug-ins/gfig/gfig-style.c -@@ -165,6 +165,7 @@ gfig_read_parameter_gimp_rgb (gchar - gchar *ptr; - gchar *tmpstr; - gchar *endptr; -+ gchar fmt_str[32]; - gchar colorstr_r[G_ASCII_DTOSTR_BUF_SIZE]; - gchar colorstr_g[G_ASCII_DTOSTR_BUF_SIZE]; - gchar colorstr_b[G_ASCII_DTOSTR_BUF_SIZE]; -@@ -172,6 +173,10 @@ gfig_read_parameter_gimp_rgb (gchar - - style_entry->r = style_entry->g = style_entry->b = style_entry->a = 0.; - -+ snprintf (fmt_str, sizeof (fmt_str), "%%%lds %%%lds %%%lds %%%lds", -+ sizeof (colorstr_r) - 1, sizeof (colorstr_g) - 1, -+ sizeof (colorstr_b) - 1, sizeof (colorstr_a) - 1); -+ - while (n < nitems) - { - ptr = strchr (text[n], ':'); -@@ -181,7 +186,8 @@ gfig_read_parameter_gimp_rgb (gchar - ptr++; - if (!strcmp (tmpstr, name)) - { -- sscanf (ptr, "%s %s %s %s", colorstr_r, colorstr_g, colorstr_b, colorstr_a); -+ sscanf (ptr, fmt_str, -+ colorstr_r, colorstr_g, colorstr_b, colorstr_a); - style_entry->r = g_ascii_strtod (colorstr_r, &endptr); - style_entry->g = g_ascii_strtod (colorstr_g, &endptr); - style_entry->b = g_ascii_strtod (colorstr_b, &endptr); diff --git a/graphics/gimp/patches/patch-bd b/graphics/gimp/patches/patch-bd deleted file mode 100644 index 29bcb3c1c52..00000000000 --- a/graphics/gimp/patches/patch-bd +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-bd,v 1.1 2011/04/15 16:39:10 drochner Exp $ - -CVE-2010-4543 - ---- plug-ins/common/file-psp.c.orig 2010-07-02 22:51:56.000000000 +0000 -+++ plug-ins/common/file-psp.c -@@ -1244,6 +1244,10 @@ read_channel_data (FILE *f, - } - else - fread (buf, runcount, 1, f); -+ -+ /* prevent buffer overflow for bogus data */ -+ runcount = MIN (runcount, endq - q); -+ - if (bytespp == 1) - { - memmove (q, buf, runcount); diff --git a/graphics/gimp/patches/patch-plug-ins_script-fu_script-fu-server.c b/graphics/gimp/patches/patch-plug-ins_script-fu_script-fu-server.c new file mode 100644 index 00000000000..ff3ad1c8105 --- /dev/null +++ b/graphics/gimp/patches/patch-plug-ins_script-fu_script-fu-server.c @@ -0,0 +1,18 @@ +$NetBSD: patch-plug-ins_script-fu_script-fu-server.c,v 1.1 2012/02/04 21:10:45 adam Exp $ + +AI_ADDRCONFIG is not defined on some platforms. + +--- plug-ins/script-fu/script-fu-server.c.orig 2012-02-04 18:42:45.000000000 +0000 ++++ plug-ins/script-fu/script-fu-server.c +@@ -446,7 +446,11 @@ server_start (gint port, + const gchar *progress; + + memset (&hints, 0, sizeof (hints)); ++#ifdef AI_ADDRCONFIG + hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG; ++#else ++ hints.ai_flags = AI_PASSIVE; ++#endif + hints.ai_socktype = SOCK_STREAM; + + port_s = g_strdup_printf ("%d", port); |