[3Depict] * Add png compat patch

mycae mycae at fedoraproject.org
Fri Jul 20 02:05:00 UTC 2012


commit 0a625c5ba91a209c9c6347ae92bf9b1767070821
Author: mycae <mycae at yahoo>
Date:   Fri Jul 20 03:04:28 2012 +0100

    * Add png compat patch

 3Depict-0.0.11-png-gray.patch |   15 +++++++++++++++
 3Depict.spec                  |    4 +++-
 2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/3Depict-0.0.11-png-gray.patch b/3Depict-0.0.11-png-gray.patch
new file mode 100644
index 0000000..5c0e793
--- /dev/null
+++ b/3Depict-0.0.11-png-gray.patch
@@ -0,0 +1,15 @@
+diff -r src/pngread.c src/pngread.c
+--- src/pngread.c
++++ src/pngread.c
+@@ -132,11 +132,7 @@ int read_png(FILE *fp, unsigned int sig_read, png_bytep **row_pointers,
+    /* Expand grayscale images to the full 8 bits from 1, 2, or 4 bits/pixel */
+    if (color_type == PNG_COLOR_TYPE_GRAY && bit_depth < 8)
+    {
+-#if defined(__APPLE__) || defined(__WIN32) || defined(__WIN64)
+ 	   png_set_expand_gray_1_2_4_to_8(png_ptr);
+-#else
+-      png_set_gray_1_2_4_to_8(png_ptr);
+-#endif
+ 	}
+ 	
+    /* Expand paletted or RGB images with transparency to full alpha for RGBA */
diff --git a/3Depict.spec b/3Depict.spec
index a061a1c..e9c5245 100644
--- a/3Depict.spec
+++ b/3Depict.spec
@@ -36,7 +36,8 @@ BuildRequires: qhull-devel
 Patch0: %{name}-%{version}-manual-pdf-loc.patch
 #Fedora specific font dir
 Patch1: %{name}-%{version}-font-path.patch
-
+#PNG API change patch
+Patch2: %{name}-%{version}-png-gray.patch
 %description
 This software is designed to help users visualize and analyze 3D point clouds
 with an associated real value, in a fast and flexible fashion. It is 
@@ -49,6 +50,7 @@ useful for general scalar valued point data purposes.
 
 %patch0
 %patch1
+%patch2
 
 %build
 %configure --disable-debug-checks --enable-openmp-parallel


More information about the scm-commits mailing list