| @@ -1,40 +1,41 @@ | | | @@ -1,40 +1,41 @@ |
1 | $NetBSD: patch-ab,v 1.5 2011/04/05 11:04:40 wiz Exp $ | | 1 | $NetBSD: patch-ab,v 1.6 2011/08/05 00:34:41 wiz Exp $ |
2 | | | 2 | |
3 | Third chunk: fix build with png-1.5. | | 3 | Third chunk: fix build with png-1.5. |
| | | 4 | https://sourceforge.net/tracker/?func=detail&aid=3386433&group_id=66938&atid=516295 |
4 | | | 5 | |
5 | --- src/tuxpaint.c.orig 2007-07-01 01:38:03.000000000 +0000 | | 6 | --- src/tuxpaint.c.orig 2007-07-01 01:38:03.000000000 +0000 |
6 | +++ src/tuxpaint.c | | 7 | +++ src/tuxpaint.c |
7 | @@ -170,7 +170,7 @@ static scaleparams scaletable[] = { | | 8 | @@ -170,7 +170,7 @@ static scaleparams scaletable[] = { |
8 | likely available; if not using GNU, you can set HAVE_STRCASESTR to | | 9 | likely available; if not using GNU, you can set HAVE_STRCASESTR to |
9 | avoid trying to redefine it -bjk 2006.06.02 */ | | 10 | avoid trying to redefine it -bjk 2006.06.02 */ |
10 | | | 11 | |
11 | -#if !defined(__USE_GNU) && !defined(HAVE_STRCASESTR) | | 12 | -#if !defined(__USE_GNU) && !defined(HAVE_STRCASESTR) |
12 | +#if !defined(__USE_GNU) && !defined(HAVE_STRCASESTR) && !defined(__NetBSD__) | | 13 | +#if !defined(__USE_GNU) && !defined(HAVE_STRCASESTR) && !defined(__NetBSD__) |
13 | #warning "Attempting to define strcasestr(); if errors, build with -DHAVE_STRCASESTR" | | 14 | #warning "Attempting to define strcasestr(); if errors, build with -DHAVE_STRCASESTR" |
14 | | | 15 | |
15 | char *strcasestr(const char *haystack, const char *needle) | | 16 | char *strcasestr(const char *haystack, const char *needle) |
16 | @@ -363,8 +363,8 @@ extern WrapperData macosx; | | 17 | @@ -363,8 +363,8 @@ extern WrapperData macosx; |
17 | | | 18 | |
18 | #else | | 19 | #else |
19 | | | 20 | |
20 | -#include "rsvg.h" | | 21 | -#include "rsvg.h" |
21 | -#include "rsvg-cairo.h" | | 22 | -#include "rsvg-cairo.h" |
22 | +#include <librsvg/rsvg.h> | | 23 | +#include <librsvg/rsvg.h> |
23 | +#include <librsvg/rsvg-cairo.h> | | 24 | +#include <librsvg/rsvg-cairo.h> |
24 | #if !defined(RSVG_H) || !defined(RSVG_CAIRO_H) | | 25 | #if !defined(RSVG_H) || !defined(RSVG_CAIRO_H) |
25 | #error "---------------------------------------------------" | | 26 | #error "---------------------------------------------------" |
26 | #error "If you installed libRSVG from packages, be sure" | | 27 | #error "If you installed libRSVG from packages, be sure" |
27 | @@ -12528,12 +12528,7 @@ static int do_png_save(FILE * fi, const | | 28 | @@ -12528,12 +12528,7 @@ static int do_png_save(FILE * fi, const |
28 | { | | 29 | { |
29 | png_init_io(png_ptr, fi); | | 30 | png_init_io(png_ptr, fi); |
30 | | | 31 | |
31 | - info_ptr->width = surf->w; | | 32 | - info_ptr->width = surf->w; |
32 | - info_ptr->height = surf->h; | | 33 | - info_ptr->height = surf->h; |
33 | - info_ptr->bit_depth = 8; | | 34 | - info_ptr->bit_depth = 8; |
34 | - info_ptr->color_type = PNG_COLOR_TYPE_RGB; | | 35 | - info_ptr->color_type = PNG_COLOR_TYPE_RGB; |
35 | - info_ptr->interlace_type = 1; | | 36 | - info_ptr->interlace_type = 1; |
36 | - info_ptr->valid = 0; // will be updated by various png_set_FOO() functions | | 37 | - info_ptr->valid = 0; // will be updated by various png_set_FOO() functions |
37 | + png_set_IHDR(png_ptr, info_ptr, surf->w, surf->h, 8, PNG_COLOR_TYPE_RGB, 1, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); | | 38 | + png_set_IHDR(png_ptr, info_ptr, surf->w, surf->h, 8, PNG_COLOR_TYPE_RGB, 1, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); |
38 | | | 39 | |
39 | png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, | | 40 | png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, |
40 | PNG_sRGB_INTENT_PERCEPTUAL); | | 41 | PNG_sRGB_INTENT_PERCEPTUAL); |