[SILLY] Fix building with libpng-1.5
Hans de Goede
jwrdegoede at fedoraproject.org
Tue Dec 6 13:46:13 UTC 2011
commit 96c99ae7914eef887292eaf4bbdec7eb7e45ebbe
Author: Hans de Goede <hdegoede at redhat.com>
Date: Tue Dec 6 14:46:49 2011 +0100
Fix building with libpng-1.5
SILLY-0.1.0-libpng15.patch | 15 +++++++++++++++
SILLY.spec | 20 ++++++++------------
2 files changed, 23 insertions(+), 12 deletions(-)
---
diff --git a/SILLY-0.1.0-libpng15.patch b/SILLY-0.1.0-libpng15.patch
new file mode 100644
index 0000000..4ca1142
--- /dev/null
+++ b/SILLY-0.1.0-libpng15.patch
@@ -0,0 +1,15 @@
+diff -up SILLY-0.1.0/src/loaders/SILLYPNGImageLoader.cpp~ SILLY-0.1.0/src/loaders/SILLYPNGImageLoader.cpp
+--- SILLY-0.1.0/src/loaders/SILLYPNGImageLoader.cpp~ 2006-06-19 00:42:12.000000000 +0200
++++ SILLY-0.1.0/src/loaders/SILLYPNGImageLoader.cpp 2011-12-06 14:38:31.738251526 +0100
+@@ -64,10 +64,7 @@ void PNG_error_function(png_structp png_
+ png_const_charp error)
+ {
+ // printf("PNG Error: %s\n", error);
+- // copied from libpng's pngerror.cpp
+- jmp_buf buf;
+- memcpy(buf, png_ptr->jmpbuf, sizeof(jmp_buf));
+- longjmp(buf, 1);
++ png_longjmp(png_ptr, 1);
+ }
+
+
diff --git a/SILLY.spec b/SILLY.spec
index 5d0d05f..8da02d7 100644
--- a/SILLY.spec
+++ b/SILLY.spec
@@ -1,17 +1,15 @@
Name: SILLY
Version: 0.1.0
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: Simple and easy to use library for image loading
-Group: System Environment/Libraries
License: MIT
URL: http://www.cegui.org.uk
Source0: http://downloads.sourceforge.net/crayzedsgui/%{name}-%{version}.tar.gz
Source1: http://downloads.sourceforge.net/crayzedsgui/%{name}-DOCS-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: SILLY-0.1.0-libpng15.patch
BuildRequires: doxygen
BuildRequires: libpng-devel
BuildRequires: libjpeg-devel
-BuildRequires: pkgconfig >= 0.9.0
%description
The Simple Image Loading LibrarY is a companion library of the CEGUI project.
@@ -25,9 +23,7 @@ PNG (Portable Network Graphics)
%package devel
Summary: Development files for SILLY
-Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
-Requires: pkgconfig
+Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files for SILLY
@@ -35,6 +31,8 @@ Development files for SILLY
%prep
%setup -q -a1
+%patch0 -p1
+
# Don't use full path, otherwise it shows buildroot as part of the path
sed -i 's|\(FULL_PATH_NAMES[ \t][ \t]*= \)YES|\1NO|' Doxyfile
@@ -62,7 +60,6 @@ doxygen
%install
-rm -rf %{buildroot}
make install DESTDIR=%{buildroot} INSTALL="install -p"
#Install man pages
@@ -77,10 +74,6 @@ chmod 0755 %{buildroot}%{_libdir}/*.so.*
%postun -p /sbin/ldconfig
-%clean
-rm -rf %{buildroot}
-
-
%files
%defattr(-,root,root,-)
%{_libdir}/*.so.*
@@ -98,6 +91,9 @@ rm -rf %{buildroot}
%changelog
+* Tue Dec 06 2011 Hans de Goede <hdegoede at redhat.com> - 0.1.0-10
+- Fix building with libpng-1.5
+
* Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 0.1.0-9
- Rebuild for new libpng
More information about the scm-commits
mailing list