From 0463772e1890913588bcf2f276513dcc6484a8da Mon Sep 17 00:00:00 2001 From: Dmitrij S. Kryzhevich Date: Feb 04 2014 05:15:30 +0000 Subject: Update for new 2.2.1 version --- diff --git a/mathgl-2.2-examples.patch b/mathgl-2.2-examples.patch deleted file mode 100644 index 850ac0e..0000000 --- a/mathgl-2.2-examples.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -urp mathgl-2.2/examples/CMakeLists.txt mathgl-2.2-examples/examples/CMakeLists.txt ---- mathgl-2.2/examples/CMakeLists.txt 2013-11-11 17:46:38.000000000 +0700 -+++ mathgl-2.2-examples/examples/CMakeLists.txt 2013-12-27 17:38:02.816195817 +0700 -@@ -4,22 +4,26 @@ endif(MGL_HAVE_GSL) - - add_executable(mgl_example wnd_samples.cpp full_test.cpp samples.cpp) - target_link_libraries(mgl_example mgl) -+SET(MGL_INSTALL_EXAMPLES_LIST mgl_example) - - if(MGL_HAVE_FLTK) - include_directories(${FLTK_INCLUDE_DIR}) - add_executable(mgl_fltk_example wnd_samples.cpp fltk_example.cpp) - target_link_libraries(mgl_fltk_example mgl-fltk) -+ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_fltk_example) - endif(MGL_HAVE_FLTK) - - if(MGL_HAVE_GLUT) - add_executable(mgl_glut_example wnd_samples.cpp glut_example.cpp) - target_link_libraries(mgl_glut_example mgl-glut) -+ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_glut_example) - endif(MGL_HAVE_GLUT) - - if(MGL_HAVE_WX) - include(${wxWidgets_USE_FILE}) - add_executable(mgl_wx_example wnd_samples.cpp wx_example.cpp) - target_link_libraries(mgl_wx_example mgl-wx) -+ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_wx_example) - endif(MGL_HAVE_WX) - - if(MGL_HAVE_QT) -@@ -27,4 +31,10 @@ if(MGL_HAVE_QT) - # qt_wrap_cpp(mgl_qt_example MGL_MOC_EX_FILES ../include/mgl2/qt.h) - add_executable(mgl_qt_example wnd_samples.cpp qt_example.cpp ${MGL_MOC_EX_FILES}) - target_link_libraries(mgl_qt_example mgl-qt) -+ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_qt_example) - endif(MGL_HAVE_QT) -+ -+install( -+ TARGETS ${MGL_INSTALL_EXAMPLES_LIST} -+ RUNTIME DESTINATION bin -+) diff --git a/mathgl-2.2.1-examples.patch b/mathgl-2.2.1-examples.patch new file mode 100644 index 0000000..3ec1fa8 --- /dev/null +++ b/mathgl-2.2.1-examples.patch @@ -0,0 +1,40 @@ +--- examples/CMakeLists.txt 2014-01-28 17:02:51.498837020 +0700 ++++ examples/CMakeLists.txt-examples 2014-01-28 17:04:52.118182901 +0700 +@@ -4,22 +4,26 @@ endif(MGL_HAVE_GSL) + + add_executable(mgl_example wnd_samples.cpp full_test.cpp samples.cpp) + target_link_libraries(mgl_example mgl) ++SET(MGL_INSTALL_EXAMPLES_LIST mgl_example) + + if(MGL_HAVE_FLTK) + include_directories(${FLTK_INCLUDE_DIR}) + add_executable(mgl_fltk_example wnd_samples.cpp fltk_example.cpp) + target_link_libraries(mgl_fltk_example mgl-fltk) ++ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_fltk_example) + endif(MGL_HAVE_FLTK) + + if(MGL_HAVE_GLUT) + add_executable(mgl_glut_example wnd_samples.cpp glut_example.cpp) + target_link_libraries(mgl_glut_example mgl-glut) ++ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_glut_example) + endif(MGL_HAVE_GLUT) + + if(MGL_HAVE_WX) + include(${wxWidgets_USE_FILE}) + add_executable(mgl_wx_example wnd_samples.cpp wx_example.cpp) + target_link_libraries(mgl_wx_example mgl-wx) ++ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_wx_example) + endif(MGL_HAVE_WX) + + if(enable-qt) +@@ -31,4 +35,10 @@ if(enable-qt) + include(../cmake-qt4.txt) + target_link_libraries(mgl_qt_example mgl-qt4) + endif(enable-qt5) ++ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_qt_example) + endif(enable-qt) ++ ++install( ++ TARGETS ${MGL_INSTALL_EXAMPLES_LIST} ++ RUNTIME DESTINATION bin ++) diff --git a/mathgl-2.2.1-segfaults.patch b/mathgl-2.2.1-segfaults.patch new file mode 100644 index 0000000..d0688ec --- /dev/null +++ b/mathgl-2.2.1-segfaults.patch @@ -0,0 +1,60 @@ +Index: src/pixel.cpp +=================================================================== +--- src/pixel.cpp (revision 908) ++++ src/pixel.cpp (revision 910) +@@ -171,6 +171,7 @@ + //----------------------------------------------------------------------------- + mglPoint mglCanvas::CalcXYZ(int xs, int ys, bool real) const + { ++ if(xs<0 || ys<0 || xs>=Width || ys>=Height) return mglPoint(NAN,NAN,NAN); + mglPoint p, ps(xs,Height-ys,NAN); + float zz = Z[3*(xs+Width*(Height-1-ys))]; + if(zz>-1e20f) { ps.z = zz; real=false; } +Index: src/base.cpp +=================================================================== +--- src/base.cpp (revision 908) ++++ src/base.cpp (revision 910) +@@ -236,7 +236,7 @@ + // scl&4 -- ??? + // scl&8 -- bypass palette for enabling alpha + if(mgl_isnan(c) || mgl_isnan(a)) return -1; +- bool norefr = mgl_isnan(n.x) && mgl_isnan(n.y); ++ bool norefr = mgl_isnan(n.x) && mgl_isnan(n.y) && !mgl_isnan(n.z); + if(scl>0) ScalePoint(mat,p,n,!(scl&2)); + if(mgl_isnan(p.x)) return -1; + a = (a>=0 && a<=1) ? a : AlphaDef; +Index: src/canvas.cpp +=================================================================== +--- src/canvas.cpp (revision 908) ++++ src/canvas.cpp (revision 910) +@@ -786,7 +786,7 @@ + x += B.x-iw/2+dx; y += B.y-ih/2+dy; + // draw it + long k1=0,k2=0,k3=0,k4=0; +- mglPoint p,q=mglPoint(NAN); ++ mglPoint p,q=mglPoint(NAN,NAN,NAN); + + for(i=0;ff[i] && ff[i]!=':';i++) if(strchr(MGL_COLORS,ff[i])) + { +@@ -937,7 +937,7 @@ + char col = mglGetStyle(stl,0,&align); align = align&3; + if(col==0) col = 'k'; + mreal y=inY+inH-h; +- mglPoint p(inX + inW*align/2.,y,3*Depth),q(NAN); ++ mglPoint p(inX + inW*align/2.,y,3*Depth),q(NAN,NAN,NAN); + mglMatrix M=B; M.norot=true; + if(title) text_plot(AddPnt(&M,p,-1,q,-1,0),title,stl,size); + if(box) // draw boungind box +Index: examples/full_test.cpp +=================================================================== +--- examples/full_test.cpp (revision 908) ++++ examples/full_test.cpp (revision 910) +@@ -71,7 +71,7 @@ + { + mglParse par; + setlocale(LC_CTYPE, ""); +- par.Execute(gr,"box\r\n\r\naxis"); ++ par.Execute(gr,"light on:addlegend 'r' 'r':legend"); + } + //----------------------------------------------------------------------------- + #if !defined(_MSC_VER) && !defined(__BORLANDC__) diff --git a/mathgl.spec b/mathgl.spec index 4d12b22..1848d71 100644 --- a/mathgl.spec +++ b/mathgl.spec @@ -1,6 +1,6 @@ Name: mathgl -Version: 2.2 -Release: 2%{?dist} +Version: 2.2.1 +Release: 1%{?dist} Summary: Cross-platform library for making high-quality scientific graphics Summary(de): Plattformübergreifende Bibliothek für hochwertige wissenschaftliche Graphiken Summary(ru): Библиотека для осуществления высококачественной визуализации данных @@ -21,11 +21,17 @@ Patch1: mathgl-2.2-fltk-skip-fluid.patch Patch2: mathgl-2.2-disable-lib-installdir.patch # Install binaries for generation examples of illustrations -Patch3: mathgl-2.2-examples.patch +Patch3: mathgl-2.2.1-examples.patch # There is no easy way to disable ONLY octave. Have to cut it from CmakeList.txt Patch4: mathgl-2.2-no_octave.patch +# No qt4 and qt5 simultaneously. There are some issues with Qt5, leave v.4 +Patch5: mathgl-2.2.1-no_qt4_qt5.patch + +# Fix bug with CalcXYZ() function and others. Upstream. +Patch50: mathgl-2.2.1-segfaults.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: %{name}-common = %{version}-%{release} @@ -177,11 +183,13 @@ for file in AUTHORS ChangeLog.txt README ; do mv $file.new $file done -%patch0 -%patch1 -%patch2 -%patch3 -p1 -%patch4 +%patch0 -b .no-hdf4-and-hdf5-simultaneously +%patch1 -b .fltk-skip-fluid +%patch2 -b .disable-lib-installdir +%patch3 -b .examples +%patch4 -b .no_octave +%patch5 -b .no_qt4_qt5 +%patch50 -b .segfaults # Fix hardcoded paths sed -i s,/usr/local/share/doc/mathgl/,%{_docdir}/%{name}/, mgllab/main.cpp @@ -204,6 +212,8 @@ pushd %{_target_platform}_$MPI_COMPILER_NAME; \ -DMGL_LIB_INSTALL_DIR=%{_libdir} \\\ -Denable-all=on \\\ -Denable-hdf4=off \\\ + -Denable-qt4=on \\\ + -Denable-qt5=off \\\ -Denable-octave=off \\\ -Denable-all-swig=on \\\ -Denable-all-widgets=on \\\ @@ -347,6 +357,9 @@ fi %{_includedir}/mpich-%{_arch}/mgl2/ %changelog +* Tue Feb 4 2014 Dmitrij S. Kryzhevich - 2.2.1-1 +- Update for new 2.2.1. + * Thu Jan 16 2014 Dmitrij S. Kryzhevich - 2.2-2 - Drop bogus ocatave support. For a time. diff --git a/sources b/sources index 9968b9a..026ae59 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0e55af7f73590104c7a1d5cbf1a3da84 mathgl-2.2.tar.gz +47eea09ab905789ad28a2ded1149e4c7 mathgl-2.1.2.tar.gz