[nx] Fix build with libpng 1.5 (patch from Gentoo).

Ville Skyttä scop at fedoraproject.org
Sat Nov 5 19:29:18 UTC 2011


commit 8278f5e08f15c6d9c96a45e934207c5aeb97ce81
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Nov 5 21:29:10 2011 +0200

    Fix build with libpng 1.5 (patch from Gentoo).

 nx-3.5.0-libpng15.patch |   30 ++++++++++++++++++++++++++++++
 nx.spec                 |    7 ++++++-
 2 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/nx-3.5.0-libpng15.patch b/nx-3.5.0-libpng15.patch
new file mode 100644
index 0000000..c8f2a95
--- /dev/null
+++ b/nx-3.5.0-libpng15.patch
@@ -0,0 +1,30 @@
+diff -ur nxcomp.orig/Pgn.cpp nxcomp/Pgn.cpp
+--- nxcomp.orig/Pgn.cpp	2010-03-01 19:18:59.000000000 +0200
++++ nxcomp/Pgn.cpp	2011-09-13 16:35:12.000000000 +0300
+@@ -414,7 +414,7 @@
+ 
+   png_read_info(pngPtr, infoPtr);
+ 
+-  if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE)
++  if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE)
+   {
+     png_set_expand(pngPtr);
+   }
+@@ -565,7 +565,7 @@
+ 
+   png_read_info( pngPtr, infoPtr ) ;
+ 
+-  if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE)
++  if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE)
+   {
+     png_set_expand(pngPtr);
+   }
+@@ -709,7 +709,7 @@
+   png_read_info(pngPtr, infoPtr) ;
+ 
+ 
+-  if (infoPtr -> color_type == PNG_COLOR_TYPE_PALETTE)
++  if (png_get_color_type(pngPtr, infoPtr) == PNG_COLOR_TYPE_PALETTE)
+   {
+     png_set_expand(pngPtr);
+   }
diff --git a/nx.spec b/nx.spec
index cad358f..d305e19 100644
--- a/nx.spec
+++ b/nx.spec
@@ -5,7 +5,7 @@
 Summary: Proxy system for X11
 Name: nx
 Version: 3.5.0
-Release: 6%{?dist}
+Release: 7%{?dist}
 # MIT on the X11 bits
 License: GPLv2 and MIT
 Group: Applications/Internet
@@ -28,6 +28,7 @@ Source8: http://64.34.161.181/download/%{version}/sources/nxscripts-%{version}-1
 Source10: docs.tar.bz2
 Patch0: nx-3.5.0-optflags.patch
 Patch1: nx-3.5.0-syslibs.patch
+Patch2: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-misc/nx/files/nx-3.5.0-libpng15.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
@@ -50,6 +51,7 @@ NX provides a proxy system for the X Window System.
 %setup -q -c %{name}-%{version} -T -a0 -a1 -a2 -a3 -a4 -a5 -a6 -a7 -a8
 %patch0 -p1
 %patch1 -p1
+%patch2 -p0
 cat <<EOF >>nx-X11/config/cf/host.def
 #define UseRpath YES
 #define UsrLibDir %{_pkglibdir}
@@ -149,6 +151,9 @@ rm -rf %{buildroot}
 %{_pkglibexecdir}
 
 %changelog
+* Sat Nov  5 2011 Ville Skyttä <ville.skytta at iki.fi> - 3.5.0-7
+- Fix build with libpng 1.5 (patch from Gentoo).
+
 * Mon Oct 24 2011 Ville Skyttä <ville.skytta at iki.fi> - 3.5.0-6
 - Update nxagent to 3.5.0-7.
 


More information about the scm-commits mailing list