Batch change to (semi)sync with rawhide

This commit is contained in:
Dmitrij S. Kryzhevich 2015-11-26 17:36:56 +06:00
parent 6eb01adcd9
commit 43c660563f
12 changed files with 195 additions and 36 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ mathgl-1.10.2.1.tgz
/mathgl-2.2.tar.gz
/mathgl-2.2.1.tar.gz
/mathgl-2.3.tar.gz
/mathgl-2.3.3.tar.gz

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
--- mathgl-2.3.3/CMakeLists.txt 2015-06-01 13:29:26.000000000 +0600
+++ mathgl-2.3.3-gsl2/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 ${GSL2_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

@ -0,0 +1,50 @@
diff -urp mathgl-2.3.3/examples/full_test.cpp mathgl-2.3.3-signed_char/examples/full_test.cpp
--- mathgl-2.3.3/examples/full_test.cpp 2015-11-24 12:36:50.209458320 +0600
+++ mathgl-2.3.3-signed_char/examples/full_test.cpp 2015-11-26 11:45:03.816885186 +0600
@@ -392,7 +392,7 @@ int main(int argc,char **argv)
mgl_suppress_warn(true);
const char *suf = "";
char name[256]="", *tmp;
- int ch;
+ signed int ch;
time_t st,en; time(&st);
mglGraph *gr = NULL;
mglSample *s=samp;
diff -urp mathgl-2.3.3/utils/make_bin.cpp mathgl-2.3.3-signed_char/utils/make_bin.cpp
--- mathgl-2.3.3/utils/make_bin.cpp 2015-11-24 12:36:50.209458320 +0600
+++ mathgl-2.3.3-signed_char/utils/make_bin.cpp 2015-11-26 11:44:23.629270158 +0600
@@ -24,7 +24,7 @@ int main(int argc, char *argv[])
{
mglFont fnt;
std::string path, base, fname;
- char ch;
+ signed char ch;
while(1)
{
diff -urp mathgl-2.3.3/utils/mglconv.cpp mathgl-2.3.3-signed_char/utils/mglconv.cpp
--- mathgl-2.3.3/utils/mglconv.cpp 2015-11-24 12:36:50.209458320 +0600
+++ mathgl-2.3.3-signed_char/utils/mglconv.cpp 2015-11-26 11:47:02.414797998 +0600
@@ -28,7 +28,8 @@ int main(int argc, char *argv[])
mgl_suppress_warn(true);
mglGraph gr;
mglParse p(true);
- char ch, buf[2048], iname[256]="", oname[256]="";
+ signed char ch;
+ char buf[2048], iname[256]="", oname[256]="";
std::vector<std::wstring> var;
std::wstring str;
bool none=false;
diff -urp mathgl-2.3.3/utils/mglview.cpp mathgl-2.3.3-signed_char/utils/mglview.cpp
--- mathgl-2.3.3/utils/mglview.cpp 2015-11-24 12:36:50.209458320 +0600
+++ mathgl-2.3.3-signed_char/utils/mglview.cpp 2015-11-26 11:46:16.959364509 +0600
@@ -39,7 +39,8 @@ int show(mglGraph *gr)
//-----------------------------------------------------------------------------
int main(int argc, char **argv)
{
- char ch, iname[256]="";
+ signed char ch;
+ char iname[256]="";
mgl_suppress_warn(true);
while(1)
{

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)

View File

@ -4,7 +4,7 @@
%global with_mpich2 1
Name: mathgl
Version: 2.3
Version: 2.3.3
Release: 4%{?dist}
Summary: Cross-platform library for making high-quality scientific graphics
Summary(de): Plattformübergreifende Bibliothek für hochwertige wissenschaftliche Graphiken
@ -15,19 +15,31 @@ Url: http://mathgl.sourceforge.net
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
#Mathgl's enable all tries to use hdf4 and 5 at the same time
Patch0: mathgl-2.3-no-hdf4-and-hdf5-simultaneously.patch
Patch0: mathgl-2.3.3-no-hdf4-and-hdf5-simultaneously.patch
# Install binaries for generation examples of illustrations
Patch1: mathgl-2.2.1-examples.patch
Patch1: mathgl-2.3.3-examples.patch
# There is no easy way to disable ONLY octave. Have to cut it from CmakeList.txt
Patch2: mathgl-2.3-no_octave.patch
Patch2: mathgl-2.3.3-no_octave.patch
# Skip FLUID binary test
Patch3: mathgl-2.3-fltk-skip-fluid.patch
Patch3: mathgl-2.3.3-fltk-skip-fluid.patch
# No qt4 and qt5 simultaneously. There are some issues with Qt5, leave v.4
Patch4: mathgl-2.3-no_qt4.patch
# No qt4 and qt5 simultaneously.
Patch4: mathgl-2.3.3-no_qt4.patch
# Fix linking with libX11
Patch5: mathgl-2.3.3-x11.patch
# Add missing includes
Patch6: mathgl-2.3.3-includes.patch
# Add support for GSL v.2 and above. Sent to upstream
Patch50: mathgl-2.3.3-gsl2.patch
# On ARM "char" must be explicitly "signed char" for getopt(). Sent to upstream
Patch51: mathgl-2.3.3-signed_char.patch
# Fix linking with libX11
Patch5: mathgl-2.3-x11.patch
@ -38,11 +50,12 @@ Requires: %{name}-common = %{version}-%{release}
BuildRequires: gsl-devel libpng-devel
BuildRequires: desktop-file-utils
BuildRequires: cmake
BuildRequires: perl(Storable)
# optional packages
BuildRequires: freeglut-devel hdf5-devel libjpeg-devel libtiff-devel
BuildRequires: fltk-devel qt5-qtbase-devel qt5-qtwebkit-devel
BuildRequires: wxGTK-devel giflib-devel
BuildRequires: wxGTK-devel giflib-devel libtool-ltdl-devel
BuildRequires: libharu-devel
BuildRequires: swig lua-devel
#Stop for a while. No new SWIG for 3.8 octave
@ -135,7 +148,7 @@ prepared by %{name}.
Summary: OpenMPI version of %{name} library
Group: Applications/Engineering
BuildRequires: openmpi-devel
Requires: openmpi
BuildRequires: hdf5-openmpi-devel
Requires: %{name}-common = %{version}-%{release}
%description openmpi
@ -154,7 +167,7 @@ Requires: %{name}-openmpi%{_isa} = %{version}-%{release}
Summary: MPICH version of %{name} library
Group: Applications/Engineering
BuildRequires: mpich-devel
Requires: mpich
BuildRequires: hdf5-mpich-devel
Requires: %{name}-common = %{version}-%{release}
Provides: %{name}-mpich2 = %{version}-%{release}
Obsoletes: %{name}-mpich2 < 2.1.2-9
@ -183,12 +196,15 @@ for file in AUTHORS ChangeLog.txt README ; do
mv $file.new $file
done
%patch50 -p1 -b .gsl2
%patch51 -p1 -b .signed_char
%patch0 -b .no-hdf4-and-hdf5-simultaneously
%patch1 -b .examples
%patch2 -b .no_octave
%patch3 -b .fluid
%patch4 -b .no_qt4
%patch5 -b .qt5
%patch6 -b .includes
# Fix hardcoded paths
sed -i s,/usr/local/share/doc/mathgl/,%{_docdir}/%{name}/, udav/udav_wnd.h
@ -305,6 +321,11 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/udav.desktop
# Maintain l18n for udav
%find_lang udav --with-qt
# mathgl cmake file is placed into strange location. Move it to proper one with proper name
mkdir -p %{buildroot}%{_datadir}/cmake/Modules
mv %{buildroot}/%{_libdir}/cmake/mathgl2/mathgl2-config.cmake %{buildroot}%{_datadir}/cmake/Modules/FindMathGL2.cmake
rm -r %{buildroot}/%{_libdir}/cmake
%post -p /sbin/ldconfig
%post common
@ -317,6 +338,12 @@ fi
%postun -p /sbin/ldconfig
%post -n udav
/usr/bin/update-desktop-database &> /dev/null || :
%postun -n udav
/usr/bin/update-desktop-database &> /dev/null || :
%files
%doc AUTHORS ChangeLog.txt README COPYING README_V2
%{_libdir}/*.so.*
@ -330,11 +357,13 @@ fi
%{_libdir}/*.so
%exclude %{_libdir}/mgl-lua.so
%{_includedir}/mgl2/
%{_datadir}/cmake/Modules/FindMathGL2.cmake
%files -n udav -f udav.lang
%{_bindir}/udav
%{_mandir}/man1/udav.1.gz
%{_datadir}/applications/udav.desktop
%{_datadir}/mime/packages/mgl.xml
%dir %{_datadir}/udav/
%{_datadir}/pixmaps/*.png
@ -370,6 +399,19 @@ fi
%{_includedir}/mpich-%{_arch}/mgl2/
%changelog
* Thu Nov 26 2015 Dsmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.3.3-4
- Fix building on arm (see mathgl-2.3.3-signed_char.patch).
* Tue Nov 24 2015 Dsmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.3.3-3
- Fix files section: cmake script and mime xml.
* Tue Nov 24 2015 Dsmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.3.3-2
- Add libtool-ltdl-devel to BR.
* Tue Nov 24 2015 Dsmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.3.3-1
- Update to new 2.3.3 version.
- Fix gsl-2 support.
* Sun May 3 2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.3-4
- Rebuild for changed mpich.
- Fix linking with libX11.

View File

@ -1 +1 @@
06ce798a1dc82bacc154ff9f63b8f359 mathgl-2.3.tar.gz
c37d6f42d4897675bf89fae635aa6868 mathgl-2.3.3.tar.gz