* Fix FTBFS in mathgl due to new libpng
* Clean up old patch not used anymore
This commit is contained in:
parent
08e3984539
commit
c3bc9e3d51
20
mathgl-1.11.2-zlib.patch
Normal file
20
mathgl-1.11.2-zlib.patch
Normal file
@ -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" {
|
@ -1,18 +0,0 @@
|
|||||||
--- mgl/mgl_data_io.cpp 2010-11-16 13:02:05.000000000 +0000
|
|
||||||
+++ mgl/mgl_data_io.cpp.new 2010-11-26 23:40:52.821155381 +0000
|
|
||||||
@@ -914,13 +914,13 @@
|
|
||||||
void mglData::ReadHDF4(const char *fname,const char *data)
|
|
||||||
{
|
|
||||||
#ifdef HAVE_HDF4
|
|
||||||
- int sd = SDstart(fname,DFACC_READ), nn, i;
|
|
||||||
+ int32 sd = SDstart(fname,DFACC_READ), nn, i;
|
|
||||||
if(sd==-1) return; // is not a HDF4 file
|
|
||||||
char name[64];
|
|
||||||
SDfileinfo(sd,&nn,&i);
|
|
||||||
for(i=0;i<nn;i++)
|
|
||||||
{
|
|
||||||
- int sds, rank, dims[32], type, attr, in[2]={0,0};
|
|
||||||
+ int32 sds, rank, dims[32], type, attr, in[2]={0,0};
|
|
||||||
sds = SDselect(sd,i);
|
|
||||||
SDgetinfo(sds,name,&rank,dims,&type,&attr);
|
|
||||||
if(!strcmp(name,data)) // as I understand there are possible many datas with the same name
|
|
15
mathgl.spec
15
mathgl.spec
@ -1,6 +1,6 @@
|
|||||||
Name: mathgl
|
Name: mathgl
|
||||||
Version: 1.11.2
|
Version: 1.11.2
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
Summary: Cross-platform library for making high-quality scientific graphics
|
Summary: Cross-platform library for making high-quality scientific graphics
|
||||||
Summary(de): Plattformübergreifende Bibliothek für hochwertige wissenschaftliche Graphiken
|
Summary(de): Plattformübergreifende Bibliothek für hochwertige wissenschaftliche Graphiken
|
||||||
Summary(ru): MathGL - это библиотека для осуществления высококачественной визуализации данных
|
Summary(ru): MathGL - это библиотека для осуществления высококачественной визуализации данных
|
||||||
@ -13,6 +13,9 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
|
|||||||
Patch0: %{name}-info.patch
|
Patch0: %{name}-info.patch
|
||||||
#Fltk uses /usr/include/FL
|
#Fltk uses /usr/include/FL
|
||||||
Patch1: %{name}-%{version}-fltk.patch
|
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)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
@ -78,7 +81,7 @@ done
|
|||||||
|
|
||||||
%patch0
|
%patch0
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -92,10 +95,6 @@ export LDFLAGS="-L/usr/lib64/hdf/ -L/usr/lib/hdf"
|
|||||||
--enable-shared \
|
--enable-shared \
|
||||||
--enable-all
|
--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
|
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`/widgets/.libs/:`pwd`/mgl/.libs
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
@ -173,6 +172,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%doc texinfo/docs/*
|
%doc texinfo/docs/*
|
||||||
|
|
||||||
%changelog
|
%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@redhat.com> - 1.11.2-5
|
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 1.11.2-5
|
||||||
- Rebuild for new libpng
|
- Rebuild for new libpng
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user