Update to new 2.3.3 version

This commit is contained in:
Dmitrij S. Kryzhevich 2015-11-24 12:44:57 +06:00
parent f60b59552a
commit 2c8a1bf180
9 changed files with 91 additions and 35 deletions

View File

@ -1,10 +0,0 @@
diff -wrupN mathgl-2.3/json/Backend.hpp mathgl-2.3-new/json/Backend.hpp
--- mathgl-2.3/json/Backend.hpp 2014-08-07 14:12:37.000000000 +0200
+++ mathgl-2.3-new/json/Backend.hpp 2015-07-26 22:48:50.750733852 +0200
@@ -1,5 +1,6 @@
#pragma once
+#include <QObject>
#include <QStringList>
class Backend : public QObject

View File

@ -1,5 +1,5 @@
--- examples/CMakeLists.txt 2014-01-28 17:02:51.498837020 +0700
+++ examples/CMakeLists.txt-examples 2014-01-28 17:04:52.118182901 +0700
--- examples/CMakeLists.txt 2015-11-24 12:19:29.605547590 +0600
+++ examples/CMakeLists.txt 2015-11-24 12:24:58.377140217 +0600
@@ -4,22 +4,26 @@ endif(MGL_HAVE_GSL)
add_executable(mgl_example wnd_samples.cpp full_test.cpp samples.cpp)
@ -27,13 +27,18 @@
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)
@@ -41,6 +45,7 @@ if(enable-qt)
target_link_libraries(mgl_qgl_example mgl)
target_link_libraries(mgl_qgl_example ${QT_LIBRARIES})
endif(enable-qt5)
+ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_qt_example)
endif(enable-qt)
+
@@ -50,3 +55,7 @@ if(MGL_HAVE_LTDL)
target_link_libraries(mgl_module mgl) # for compatibility with win32
endif(MGL_HAVE_LTDL)
+install(
+ TARGETS ${MGL_INSTALL_EXAMPLES_LIST}
+ RUNTIME DESTINATION bin

View File

@ -1,6 +1,6 @@
--- CMakeLists.txt.initial 2014-10-09 17:52:44.289738669 +0700
+++ CMakeLists.txt 2014-10-09 17:52:59.011544253 +0700
@@ -381,6 +381,7 @@ endif(enable-glut)
--- CMakeLists.txt 2015-11-24 12:29:02.177681649 +0600
+++ CMakeLists.txt 2015-11-24 12:30:50.909910702 +0600
@@ -406,6 +406,7 @@ endif(enable-glut)
if(enable-fltk)
set(MGL_HAVE_FLTK 1)

48
mathgl-2.3.3-gsl2.patch Normal file
View File

@ -0,0 +1,48 @@
diff -urp mathgl-2.3.3/CMakeLists.txt mathgl-2.3.3-gsl2/CMakeLists.txt
--- CMakeLists.txt 2015-06-01 13:29:26.000000000 +0600
+++ CMakeLists.txt 2015-11-24 12:10:43.580786919 +0600
@@ -259,6 +259,13 @@ endif(enable-pthread)
if(enable-gsl)
set(MGL_HAVE_GSL 1)
+ FIND_PACKAGE(PkgConfig)
+ pkg_check_modules(GSL2 REQUIRED gsl)
+ if ( GSL2_FOUND )
+ if ( NOT ${GSL2_VERSION} LESS 2.0 )
+ SET(ISGSL2 1)
+ endif ( NOT ${GSL_VERSION} LESS 2.0 )
+ endif ( GSL2_FOUND )
find_library(GSL_LIB gsl)
find_library(GSL_CBLAS_LIB gslcblas)
find_path(GSL_INCLUDE_DIR gsl/gsl_fft_complex.h)
diff -urp mathgl-2.3.3/src/CMakeLists.txt mathgl-2.3.3-gsl2/src/CMakeLists.txt
--- mathgl-2.3.3/src/CMakeLists.txt 2015-06-01 13:29:02.000000000 +0600
+++ mathgl-2.3.3-gsl2/src/CMakeLists.txt 2015-11-24 12:11:14.494707480 +0600
@@ -23,6 +23,9 @@ ${MathGL_BINARY_DIR}/include/mgl2/dllexp
)
add_definitions(-DMGL_SRC)
+if(DEFINED ISGSL2)
+add_definitions(-DHAVE_GSL_2)
+endif(DEFINED ISGSL2)
if(MGL_HAVE_PNG)
set(prc_src prc/PRCbitStream.cc prc/PRCdouble.cc prc/oPRCFile.cc prc/writePRC.cc prc.cpp )
diff -urp mathgl-2.3.3/src/fit.cpp mathgl-2.3.3-gsl2/src/fit.cpp
--- mathgl-2.3.3/src/fit.cpp 2015-06-01 13:29:02.000000000 +0600
+++ mathgl-2.3.3-gsl2/src/fit.cpp 2015-11-24 12:13:39.912670946 +0600
@@ -193,7 +193,14 @@ mreal MGL_NO_EXPORT mgl_fit_base(mglFitD
}
while ( status == GSL_CONTINUE && iter < 500 );
gsl_matrix *covar = gsl_matrix_alloc(m, m);
+#ifdef HAVE_GSL_2
+ gsl_matrix *J = gsl_matrix_alloc(s->fdf->n, s->fdf->p);
+ gsl_multifit_fdfsolver_jac(s, J);
+ gsl_multifit_covar (J, 0.0, covar);
+ gsl_matrix_free (J);
+#else
gsl_multifit_covar (s->J, 0.0, covar );
+#endif
mglFitCovar.Set(covar);
mreal res = gsl_blas_dnrm2(s->f);
for(i=0;i<m;i++) ini[i] = gsl_vector_get(s->x, i);

View File

@ -0,0 +1,9 @@
--- json/Backend.hpp 2015-11-24 12:34:41.587916006 +0600
+++ json/Backend.hpp 2015-11-24 12:37:37.116832634 +0600
@@ -1,5 +1,6 @@
#pragma once
+#include <QObject>
#include <QStringList>
class Backend : public QObject

View File

@ -1,15 +1,15 @@
--- CMakeLists.txt.initial 2014-10-07 17:16:53.271970273 +0700
+++ CMakeLists.txt 2014-10-07 17:17:01.168867231 +0700
@@ -265,7 +265,7 @@ endif(enable-gsl)
# set(MGL_HAVE_LTDL 0)
#endif(enable-all OR enable-ltdl)
--- CMakeLists.txt 2015-11-24 12:15:35.787678739 +0600
+++ CMakeLists.txt 2015-11-24 12:20:24.562634222 +0600
@@ -292,7 +292,7 @@ else(enable-all OR enable-ltdl)
set(MGL_HAVE_LTDL 0)
endif(enable-all OR enable-ltdl)
-if(enable-hdf4)
+if(enable-hdf4 AND (NOT enable-hdf5))
set(MGL_HAVE_HDF4 1)
find_library(HDF4_LIB df)
find_library(HDF4MF_LIB mfhdf)
@@ -276,9 +276,9 @@ if(enable-hdf4)
@@ -303,9 +303,9 @@ if(enable-hdf4)
message(SEND_ERROR "${HDF4_INCLUDE_DIR}")
message(SEND_ERROR "Couldn't find HDF4 libraries.")
endif(NOT HDF4_LIB OR NOT HDF4MF_LIB OR NOT HDF4_INCLUDE_DIR)

View File

@ -1,6 +1,6 @@
--- CMakeLists.txt.orig 2014-10-07 17:17:01.168867231 +0700
+++ CMakeLists.txt 2014-10-07 17:17:47.528262312 +0700
@@ -111,6 +111,8 @@ MGL_DEPENDENT_OPTION(enable-python "Enab
--- CMakeLists.txt 2015-11-24 12:23:06.821006701 +0600
+++ CMakeLists.txt 2015-11-24 12:29:02.177681649 +0600
@@ -121,6 +121,8 @@ MGL_DEPENDENT_OPTION(enable-python "Enab
MGL_DEPENDENT_OPTION(enable-lua "Enable Lua (v.5.1) interface" OFF "NOT enable-lgpl" ON "NOT enable-all-swig" ON)
MGL_DEPENDENT_OPTION(enable-octave "Enable octave interface" OFF "NOT enable-lgpl" ON "NOT enable-all-swig" ON)
MGL_DEPENDENT_OPTION(enable-octave-install "Octave interface will install for all users" ON "NOT enable-lgpl" ON "NOT enable-all-swig" ON)

View File

@ -1,6 +1,6 @@
--- CMakeLists.txt.initial 2014-10-10 09:31:36.918128974 +0700
+++ CMakeLists.txt 2014-10-10 09:31:59.853828521 +0700
@@ -92,7 +92,8 @@ CMAKE_DEPENDENT_OPTION(enable-gif "Enabl
--- CMakeLists.txt 2015-11-24 12:30:50.909910702 +0600
+++ CMakeLists.txt 2015-11-24 12:33:38.836090820 +0600
@@ -102,7 +102,8 @@ CMAKE_DEPENDENT_OPTION(enable-gif "Enabl
CMAKE_DEPENDENT_OPTION(enable-glut "Enable glut support" OFF "NOT enable-all-widgets" ON)
CMAKE_DEPENDENT_OPTION(enable-fltk "Enable fltk widget" OFF "NOT enable-all-widgets" ON)
CMAKE_DEPENDENT_OPTION(enable-wx "Enable wxWidget widget" OFF "NOT enable-all-widgets" ON)

View File

@ -1,6 +1,6 @@
--- udav/CMakeLists.txt.orig 2015-03-21 14:42:01.325397847 +0600
+++ udav/CMakeLists.txt 2015-03-21 14:42:15.145923191 +0600
@@ -38,7 +38,7 @@ endif(enable-qt5)
--- udav/CMakeLists.txt 2015-11-24 12:33:30.016396488 +0600
+++ udav/CMakeLists.txt 2015-11-24 12:35:44.813724765 +0600
@@ -40,10 +40,10 @@ endif(enable-qt5)
add_executable(udav ${udav_src} ${udav_moc_src} ${udav_rc_src})
#set_target_properties(udav PROPERTIES COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
if(enable-qt5)
@ -8,4 +8,8 @@
+ target_link_libraries(udav mgl-qt5 X11)
qt5_use_modules(udav Core Widgets Gui PrintSupport)
else(enable-qt5)
target_link_libraries(udav mgl-qt4)
- target_link_libraries(udav mgl-qt4)
+ target_link_libraries(udav mgl-qt4 X11)
target_link_libraries(udav ${QT_LIBRARIES})
endif(enable-qt5)