[ClanLib06] Fix building with new libpng

Hans de Goede jwrdegoede at fedoraproject.org
Sun Dec 11 11:13:44 UTC 2011


commit 79ecfb29fb3fc14be95ba4413bb1339d17179152
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Sun Dec 11 12:14:33 2011 +0100

    Fix building with new libpng

 ClanLib-0.6.5-libpng15.patch |   12 ++++++++++++
 ClanLib06.spec               |   18 +++++++-----------
 2 files changed, 19 insertions(+), 11 deletions(-)
---
diff --git a/ClanLib-0.6.5-libpng15.patch b/ClanLib-0.6.5-libpng15.patch
new file mode 100644
index 0000000..2f9953f
--- /dev/null
+++ b/ClanLib-0.6.5-libpng15.patch
@@ -0,0 +1,12 @@
+diff -up ClanLib-0.6.5/Sources/PNG/provider_png.cpp~ ClanLib-0.6.5/Sources/PNG/provider_png.cpp
+--- ClanLib-0.6.5/Sources/PNG/provider_png.cpp~	2011-12-11 11:51:50.000000000 +0100
++++ ClanLib-0.6.5/Sources/PNG/provider_png.cpp	2011-12-11 12:03:31.622865327 +0100
+@@ -544,7 +544,7 @@ void CL_PNGProvider::perform_lock()
+ 					(png_infopp)NULL);
+ 		cl_assert(false);
+ 	}   
+-	if (setjmp(png_ptr->jmpbuf))
++	if (setjmp(png_jmpbuf(png_ptr)))
+ 	{
+ 		png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+ 		cl_assert(false);
diff --git a/ClanLib06.spec b/ClanLib06.spec
index 72988e4..e70416b 100644
--- a/ClanLib06.spec
+++ b/ClanLib06.spec
@@ -1,7 +1,7 @@
 Summary:        Version 0.6 of this Cross platform C++ game library
 Name:           ClanLib06
 Version:        0.6.5
-Release:        20%{?dist}
+Release:        21%{?dist}
 Group:          System Environment/Libraries
 License:        LGPLv2
 URL:            http://www.clanlib.org/
@@ -22,7 +22,7 @@ Patch8:         ClanLib-0.6.5-xev-keycodes.patch
 Patch9:         ClanLib-0.6.5-iterator-abuse.patch
 Patch10:        ClanLib-0.6.5-gcc4.6.patch
 Patch11:        ClanLib-0.6.5-gzopen-flags.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch12:        ClanLib-0.6.5-libpng15.patch
 BuildRequires:  libX11-devel libXext-devel libXt-devel libGLU-devel
 BuildRequires:  libICE-devel libXxf86vm-devel xorg-x11-proto-devel
 BuildRequires:  libvorbis-devel libpng-devel libjpeg-devel mikmod-devel
@@ -38,7 +38,7 @@ by many games.
 %package devel
 Summary:        Development Libraries and Headers for ClanLib 0.6
 Group:          Development/Libraries
-Requires:       %{name} = %{version}-%{release}
+Requires:       %{name}%{?_isa} = %{version}-%{release}
 Requires:       libGLU-devel Hermes-devel mikmod-devel lua-devel libpng-devel
 Provides:       clanlib06-devel = %{version}-%{release}
 
@@ -60,6 +60,7 @@ ClanLib 0.6 development headers and libraries
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
 # mark asm files as NOT needing execstack
 for i in `find Sources -name '*.s'`; do
   echo '.section .note.GNU-stack,"", at progbits' >> $i
@@ -79,28 +80,20 @@ make
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
 make install DESTDIR=$RPM_BUILD_ROOT
 rm $RPM_BUILD_ROOT%{_libdir}/*.a
 chmod -x $RPM_BUILD_ROOT%{_mandir}/man1/clanlib-config.1*
 
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %post -p /sbin/ldconfig
-
 %postun -p /sbin/ldconfig
 
 
 %files
-%defattr(-,root,root,-)
 %doc COPYING CREDITS NEWS ascii-logo
 %{_libdir}/*.so.*
 
 %files devel
-%defattr(-,root,root,-)
 %doc README README.gui README.upgrade Documentation/html
 %{_bindir}/clanlib-config
 %{_libdir}/*.so
@@ -109,6 +102,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Sun Dec 11 2011 Hans de Goede <hdegoede at redhat.com> - 0.6.5-21
+- Fix building with new libpng
+
 * Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 0.6.5-20
 - Rebuild for new libpng
 


More information about the scm-commits mailing list