[3Depict] * Fix FTBFS due to libpng 1.4.0 on f17

mycae mycae at fedoraproject.org
Sun Dec 18 18:26:37 UTC 2011


commit f23102134dfef918a0869845ec0b41cc8f3074b5
Author: D Haley <nospammycae at yahoo.com>
Date:   Sun Dec 18 18:26:13 2011 +0000

    * Fix FTBFS due to libpng 1.4.0 on f17

 3Depict-0.0.9-png-gray.patch |   15 +++++++++++++++
 3Depict.spec                 |    5 ++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/3Depict-0.0.9-png-gray.patch b/3Depict-0.0.9-png-gray.patch
new file mode 100644
index 0000000..5c0e793
--- /dev/null
+++ b/3Depict-0.0.9-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 64ffbf7..fac06d3 100644
--- a/3Depict.spec
+++ b/3Depict.spec
@@ -36,7 +36,9 @@ BuildRequires: qhull-devel
 Patch0: %{name}-0.0.9-manual-pdf-loc.patch
 #Fedora specific font dir
 Patch1: %{name}-0.0.9-font-path.patch
-
+#Patch for libpng 1.4.0 removing png_set_gray_1_2_4_to_8
+#libpng.sourceforge.net/ANNOUNCE-1.4.0.txt
+Patch2: %{name}-0.0.9-png-gray.patch
 %description
 This program 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 +51,7 @@ useful for general scalar valued point data purposes.
 
 %patch0
 %patch1
+%patch2
 
 #Fix permissions erorrs in tarball
 chmod a-x src/*.cpp src/*.h


More information about the scm-commits mailing list