[wesnoth] Fix up for changes in libpng 1.5

Bruno Wolff III bruno at fedoraproject.org
Sun Nov 6 21:02:11 UTC 2011


commit 843b89c56859381adb74562a9382f3be4935ba17
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Sun Nov 6 15:01:34 2011 -0600

    Fix up for changes in libpng 1.5

 wesnoth-libpng15.patch |   21 +++++++++++++++++++++
 wesnoth.spec           |    5 ++++-
 2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/wesnoth-libpng15.patch b/wesnoth-libpng15.patch
new file mode 100644
index 0000000..40212d7
--- /dev/null
+++ b/wesnoth-libpng15.patch
@@ -0,0 +1,21 @@
+--- src/tools/exploder_utils.cpp.libpng	2011-11-06 14:44:26.618711420 -0600
++++ src/tools/exploder_utils.cpp	2011-11-06 14:57:12.150006511 -0600
+@@ -15,6 +15,7 @@
+ #include "exploder_utils.hpp"
+ #include "game_config.hpp"
+ #include "serialization/string_utils.hpp"
++#include <zlib.h>
+ #include <png.h>
+ 
+ exploder_point::exploder_point(const std::string &s)
+@@ -174,8 +175,8 @@
+ 	//TODO: review whether providing NULL error handlers is something
+ 	//sensible
+ 	png_struct* png_ptr = png_create_write_struct
+-		(PNG_LIBPNG_VER_STRING, reinterpret_cast<png_voidp>(png_voidp_NULL),
+-		 png_error_ptr_NULL, png_error_ptr_NULL);
++		(PNG_LIBPNG_VER_STRING, reinterpret_cast<png_voidp>(NULL),
++		 NULL, NULL);
+ 	if(!png_ptr)
+ 		throw exploder_failure("Unable to initialize the png write structure");
+ 
diff --git a/wesnoth.spec b/wesnoth.spec
index b719929..f587457 100644
--- a/wesnoth.spec
+++ b/wesnoth.spec
@@ -15,6 +15,7 @@ Patch1:         wesnoth-1.5.11-remove-ogg-test.patch
 #Patch3:         wesnoth-1.8.3-boost-iostreams.patch
 Patch4:		wesnoth-1.8.5-cstddef.patch
 Patch5:		wesnoth-1.8.6-boost-foreach.patch
+Patch6:		wesnoth-libpng15.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Requires:       wesnoth-data = %{version}
@@ -95,6 +96,7 @@ This package contains the data files for Wesnoth.
 #%patch3 -p1 -b .boost-iostreams
 %patch4 -p0 -b .cstddef
 %patch5 -p1 -b .boost-foreach
+%patch6 -p0 -b .libpng
 autoreconf -i
 
 
@@ -261,7 +263,8 @@ fi
 
 %changelog
 * Sun Nov 06 2011 Bruno Wolff III <bruno at wolff.to> - 1.8.6-4
-- Rebuild for libpng 1.5 (used by wesnoth-tools)
+- Include zlib.h since libpng 1.5 no longer does
+- Replace some macros for null values with NULL no longer defined by png.h
 
 * Thu Jul 21 2011 Jon Ciesla <limb at jcomserv.net> - 1.8.6-3
 - Rebuild for new boost.


More information about the scm-commits mailing list