From db70b5fb482b426c19c54795b0d292493ab64205 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Mar 22 2012 13:57:09 +0000 Subject: fix compile against libpng15 --- diff --git a/tuxpaint-0.9.21-png15.patch b/tuxpaint-0.9.21-png15.patch new file mode 100644 index 0000000..00e72ce --- /dev/null +++ b/tuxpaint-0.9.21-png15.patch @@ -0,0 +1,20 @@ +diff -up tuxpaint-0.9.21/src/tuxpaint.c.png15 tuxpaint-0.9.21/src/tuxpaint.c +--- tuxpaint-0.9.21/src/tuxpaint.c.png15 2012-03-22 09:32:19.347356715 -0400 ++++ tuxpaint-0.9.21/src/tuxpaint.c 2012-03-22 09:45:06.547102782 -0400 +@@ -12898,12 +12898,16 @@ static int do_png_save(FILE * fi, const + { + png_init_io(png_ptr, fi); + ++#if (PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4) ++ png_set_IHDR(png_ptr, info_ptr, surf->w, surf->h, 8, PNG_COLOR_TYPE_RGB, 1, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); ++#else + 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 */ ++#endif + + png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, + PNG_sRGB_INTENT_PERCEPTUAL); diff --git a/tuxpaint.spec b/tuxpaint.spec index c49134b..ccee5e9 100644 --- a/tuxpaint.spec +++ b/tuxpaint.spec @@ -1,6 +1,6 @@ Name: tuxpaint Version: 0.9.21 -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 1 Summary: Drawing program designed for young children @@ -14,7 +14,7 @@ Patch1: tuxpaint-0.9.21-fix-desktop-file.patch Patch2: tuxpaint-0.9.21-link.patch Patch3: tuxpaint-0.9.21-makej.patch Patch4: tuxpaint-0.9.21-memset.patch - +Patch5: tuxpaint-0.9.21-png15.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -56,6 +56,7 @@ Development files for tuxpaint extensions/plugins %patch2 -p1 -b .link %patch3 -p1 -b .makej %patch4 -p1 -b .memset +%patch5 -p1 -b .png15 sed -i -e '/\/gnome\/apps\/Graphics/d' Makefile find docs -type f -exec perl -pi -e 's/\r\n/\n/' {} \; @@ -113,6 +114,9 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/tuxpaint/ %changelog +* Thu Mar 22 2012 Tom Callaway - 1:0.9.21-8 +- fix compile against libpng15 + * Sat Jan 14 2012 Fedora Release Engineering - 1:0.9.21-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild