[mathgl] * Fix FTBFS in mathgl due to new libpng * Clean up old patch not used anymore

mycae mycae at fedoraproject.org
Sat Dec 10 18:11:26 UTC 2011


commit c3bc9e3d517f730beb2fee5602b80c2b3e573574
Author: D Haley <nospammycae at yahoo.com>
Date:   Sat Dec 10 00:39:38 2011 +0000

    * Fix FTBFS in mathgl due to new libpng
    * Clean up old patch not used anymore

 mathgl-1.11.2-zlib.patch   |   20 ++++++++++++++++++++
 mathgl-hdf4-datatype.patch |   18 ------------------
 mathgl.spec                |   15 +++++++++------
 3 files changed, 29 insertions(+), 24 deletions(-)
---
diff --git a/mathgl-1.11.2-zlib.patch b/mathgl-1.11.2-zlib.patch
new file mode 100644
index 0000000..25f059a
--- /dev/null
+++ b/mathgl-1.11.2-zlib.patch
@@ -0,0 +1,20 @@
+--- mgl/mgl_data_png.cpp
++++ mgl/mgl_data_png.cpp
+@@ -20,6 +20,7 @@
+ #include <stdlib.h>
+ #ifndef NO_PNG
+ #include <png.h>
++#include <zlib.h>
+ #endif
+ #include "mgl/mgl_data.h"
+ #include "mgl/mgl_c.h"
+--- mgl/mgl_export.cpp
++++ mgl/mgl_export.cpp
+@@ -25,6 +25,7 @@
+ #include <stdarg.h>
+ #ifndef NO_PNG
+ #include <png.h>
++#include <zlib.h>
+ #endif
+ #ifdef HAVE_JPEG
+ extern "C" {
diff --git a/mathgl.spec b/mathgl.spec
index 1bcdff2..5cdceb0 100644
--- a/mathgl.spec
+++ b/mathgl.spec
@@ -1,6 +1,6 @@
 Name: mathgl
 Version: 1.11.2
-Release: 5%{?dist}
+Release: 6%{?dist}
 Summary: Cross-platform library for making high-quality scientific graphics
 Summary(de): Plattformübergreifende Bibliothek für hochwertige wissenschaftliche Graphiken
 Summary(ru): MathGL - это библиотека для осуществления высококачественной визуализации данных
@@ -13,6 +13,9 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 Patch0: %{name}-info.patch
 #Fltk uses /usr/include/FL
 Patch1: %{name}-%{version}-fltk.patch
+#libpng 1.5 no longer include Z_BEST_COMPRESSION, and thus we need to
+# include zlib directly
+Patch2: %{name}-%{version}-zlib.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -78,7 +81,7 @@ done
 
 %patch0
 %patch1 -p1
-
+%patch2
 
 
 %build
@@ -92,10 +95,6 @@ export LDFLAGS="-L/usr/lib64/hdf/ -L/usr/lib/hdf"
 		--enable-shared \
 		--enable-all
 
-#Force strip rpath
-sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
-sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
-
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/widgets/.libs/:`pwd`/mgl/.libs
 
 make %{?_smp_mflags} 
@@ -173,6 +172,10 @@ rm -rf $RPM_BUILD_ROOT
 %doc texinfo/docs/*
 
 %changelog
+* Fri Dec 09 2011 <mycae(a!t)yahoo.com> - 1.11.2-6
+- Fix build fail due to libpng no longer including zlib
+- Remove no longer needed libtool hack
+
 * Tue Dec 06 2011 Adam Jackson <ajax at redhat.com> - 1.11.2-5
 - Rebuild for new libpng
 


More information about the scm-commits mailing list