summaryrefslogtreecommitdiff
path: root/graphics/tuxpaint/patches/patch-ab
blob: 765d900f38cf75df83266a4dd221ec59023b25a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$NetBSD: patch-ab,v 1.5 2011/04/05 11:04:40 wiz Exp $

Third chunk: fix build with png-1.5.

--- src/tuxpaint.c.orig	2007-07-01 01:38:03.000000000 +0000
+++ src/tuxpaint.c
@@ -170,7 +170,7 @@ static scaleparams scaletable[] = {
    likely available; if not using GNU, you can set HAVE_STRCASESTR to
    avoid trying to redefine it -bjk 2006.06.02 */
 
-#if !defined(__USE_GNU) && !defined(HAVE_STRCASESTR)
+#if !defined(__USE_GNU) && !defined(HAVE_STRCASESTR) && !defined(__NetBSD__)
 #warning "Attempting to define strcasestr(); if errors, build with -DHAVE_STRCASESTR"
 
 char *strcasestr(const char *haystack, const char *needle)
@@ -363,8 +363,8 @@ extern WrapperData macosx;
 
 #else
 
-#include "rsvg.h"
-#include "rsvg-cairo.h"
+#include <librsvg/rsvg.h>
+#include <librsvg/rsvg-cairo.h>
 #if !defined(RSVG_H) || !defined(RSVG_CAIRO_H)
 #error "---------------------------------------------------"
 #error "If you installed libRSVG from packages, be sure"
@@ -12528,12 +12528,7 @@ static int do_png_save(FILE * fi, const 
       {
 	png_init_io(png_ptr, fi);
 
-	info_ptr->width = surf->w;
-	info_ptr->height = surf->h;
-	info_ptr->bit_depth = 8;
-	info_ptr->color_type = PNG_COLOR_TYPE_RGB;
-	info_ptr->interlace_type = 1;
-	info_ptr->valid = 0;	// will be updated by various png_set_FOO() functions
+	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);
 
 	png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr,
 				   PNG_sRGB_INTENT_PERCEPTUAL);