1 |
grozin 09/08/31 16:18:51 |
2 |
|
3 |
Added: mathgl-1.9.0.1-gcc43.patch |
4 |
mathgl-1.9.0.1-hdf5.patch |
5 |
Log: |
6 |
Version bump, bug #282821, many thanks to Kacper Kowalik <xarthisius.kk@×××××.com> |
7 |
(Portage version: 2.2_rc40/cvs/Linux i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sci-libs/mathgl/files/mathgl-1.9.0.1-gcc43.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/mathgl/files/mathgl-1.9.0.1-gcc43.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/mathgl/files/mathgl-1.9.0.1-gcc43.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: mathgl-1.9.0.1-gcc43.patch |
16 |
=================================================================== |
17 |
--- utils/mgl2gif.cpp.ORIG 2009-03-04 14:22:12.000000000 +0100 |
18 |
+++ utils/mgl2gif.cpp 2009-04-22 10:15:02.000000000 +0200 |
19 |
@@ -19,6 +19,7 @@ |
20 |
***************************************************************************/ |
21 |
#include <stdio.h> |
22 |
#include <string.h> |
23 |
+#include <cstdlib> |
24 |
#include <locale.h> |
25 |
#include <wchar.h> |
26 |
#include "mgl/mgl_zb.h" |
27 |
|
28 |
|
29 |
|
30 |
1.1 sci-libs/mathgl/files/mathgl-1.9.0.1-hdf5.patch |
31 |
|
32 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/mathgl/files/mathgl-1.9.0.1-hdf5.patch?rev=1.1&view=markup |
33 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/mathgl/files/mathgl-1.9.0.1-hdf5.patch?rev=1.1&content-type=text/plain |
34 |
|
35 |
Index: mathgl-1.9.0.1-hdf5.patch |
36 |
=================================================================== |
37 |
--- mathgl-1.9.0.1.orig/configure.ac 2009-07-08 11:29:13.000000000 +0200 |
38 |
+++ mathgl-1.9.0.1/configure.ac 2009-08-26 11:09:55.123551155 +0200 |
39 |
@@ -153,6 +153,7 @@ |
40 |
|
41 |
AC_CHECK_LIB([hdf5], [main], [(test x$all = xtrue || test x$hdf5 = xtrue) && HDF5_LIBS=-lhdf5 AC_SUBST(HDF5_LIBS)], |
42 |
[(test x$all = xtrue || test x$hdf5 = xtrue) && echo "Please install hdf5 library" && exit]) |
43 |
+AC_CHECK_LIB([hdf5], [H5Literate], [(test x$all = xtrue || test x$hdf5 = xtrue) && HDF5_FLAGS="-DHAVE_HDF5 -DHAVE_HDF5_18" AC_SUBST(HDF5_FLAGS)], []) |
44 |
AM_CONDITIONAL(USE_HDF5, (test x$all = xtrue || test x$hdf5 = xtrue)) |
45 |
|
46 |
AC_ARG_ENABLE(gif, |
47 |
--- mathgl-1.9.0.1.orig/mgl/mgl_data_io.cpp 2009-07-08 11:28:45.000000000 +0200 |
48 |
+++ mathgl-1.9.0.1/mgl/mgl_data_io.cpp 2009-08-26 11:29:45.067804785 +0200 |
49 |
@@ -919,7 +919,11 @@ |
50 |
hid_t hf,hd,hs; |
51 |
hsize_t dims[3]; |
52 |
long rank = 3, res; |
53 |
+#ifdef HAVE_HDF5_18 |
54 |
+ H5Eset_auto(H5E_DEFAULT,0,0); |
55 |
+#else |
56 |
H5Eset_auto(0,0); |
57 |
+#endif |
58 |
res=H5Fis_hdf5(fname); |
59 |
if(res>0 && !rewrite) hf = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT); |
60 |
else hf = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); |
61 |
@@ -929,10 +933,18 @@ |
62 |
else { rank = 3; dims[0] = nz; dims[1] = ny; dims[2] = nx; } |
63 |
hs = H5Screate_simple(rank, dims, 0); |
64 |
#if(MGL_USE_DOUBLE==1) |
65 |
+#ifdef HAVE_HDF5_18 |
66 |
+ hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); |
67 |
+#else /* ! HAVE_HDF5_18 */ |
68 |
hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT); |
69 |
+#endif /* HAVE_HDF5_18 */ |
70 |
H5Dwrite(hd, H5T_NATIVE_DOUBLE, hs, hs, H5P_DEFAULT, a); |
71 |
#else |
72 |
+#ifdef HAVE_HDF5_18 |
73 |
+ hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); |
74 |
+#else /* ! HAVE_HDF5_18 */ |
75 |
hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT); |
76 |
+#endif /* HAVE_HDF5_18 */ |
77 |
H5Dwrite(hd, H5T_NATIVE_FLOAT, hs, hs, H5P_DEFAULT, a); |
78 |
#endif |
79 |
H5Dclose(hd); H5Sclose(hs); H5Fclose(hf); |
80 |
@@ -944,7 +956,11 @@ |
81 |
hsize_t dims[3]; |
82 |
long rank; |
83 |
hf = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT); |
84 |
+#ifdef HAVE_HDF5_18 |
85 |
+ hd = H5Dopen(hf,data,H5P_DEFAULT); |
86 |
+#else |
87 |
hd = H5Dopen(hf,data); |
88 |
+#endif |
89 |
hs = H5Dget_space(hd); |
90 |
rank = H5Sget_simple_extent_ndims(hs); |
91 |
if(rank>0 && rank<=3) |