Update to new 2.3
This commit is contained in:
parent
5ce4115a0c
commit
be994959cc
@ -1,11 +0,0 @@
|
||||
--- CMakeLists.txt 2013-12-27 17:31:25.416802089 +0700
|
||||
+++ CMakeLists.txt-disable-lib-installdir 2013-12-27 17:33:39.149918844 +0700
|
||||
@@ -56,7 +56,7 @@
|
||||
ENDMACRO(MGL_DEPENDENT_OPTION)
|
||||
include(CMakeDependentOption)
|
||||
|
||||
-set(MGL_LIB_INSTALL_DIR "lib" CACHE STRING "Set library install directory")
|
||||
+#set(MGL_LIB_INSTALL_DIR "lib" CACHE STRING "Set library install directory")
|
||||
|
||||
option(enable-double "Enable double precision in MathGL library" ON)
|
||||
option(enable-simple "Slightly increase drawing speed but disable mglDataA class")
|
@ -1,10 +0,0 @@
|
||||
--- CMakeLists.txt 2013-12-27 17:25:13.937026671 +0700
|
||||
+++ CMakeLists.txt-fltk-skip-fluid 2013-12-27 17:31:25.416802089 +0700
|
||||
@@ -327,6 +327,7 @@ endif(enable-glut)
|
||||
|
||||
if(enable-fltk)
|
||||
set(MGL_HAVE_FLTK 1)
|
||||
+ set(FLTK_SKIP_FLUID 1)
|
||||
include(FindFLTK)
|
||||
if(NOT FLTK_FOUND)
|
||||
message(SEND_ERROR "Couldn't find FLTK library.")
|
@ -1,15 +0,0 @@
|
||||
--- CMakeLists.txt 2014-01-29 18:05:26.026498915 +0700
|
||||
+++ CMakeLists.txt-no_qt4_qt5 2014-01-30 09:34:49.314786594 +0700
|
||||
@@ -93,8 +93,10 @@ MGL_DEPENDENT_OPTION(enable-glut "Enable
|
||||
MGL_DEPENDENT_OPTION(enable-fltk "Enable fltk widget" OFF "NOT enable-lgpl" ON "NOT enable-all-widgets" ON)
|
||||
CMAKE_DEPENDENT_OPTION(enable-wx "Enable wxWidget widget" OFF "NOT enable-lgpl" OFF)
|
||||
MGL_DEPENDENT_OPTION(enable-qt4 "Enable Qt4 widget" OFF "NOT enable-lgpl" ON "NOT enable-all-widgets" ON)
|
||||
-MGL_DEPENDENT_OPTION(enable-qt5 "Enable Qt5 widget" OFF "NOT enable-lgpl" ON "NOT enable-all-widgets" ON)
|
||||
-CMAKE_DEPENDENT_OPTION(enable-qt5asqt "Set Qt5 as default libmgl-qt" ON "enable-qt5" OFF)
|
||||
+#MGL_DEPENDENT_OPTION(enable-qt5 "Enable Qt5 widget" OFF "NOT enable-lgpl" ON "NOT enable-all-widgets" ON)
|
||||
+set(enable-qt5 OFF)
|
||||
+#CMAKE_DEPENDENT_OPTION(enable-qt5asqt "Set Qt5 as default libmgl-qt" ON "enable-qt5" OFF)
|
||||
+set(enable-qt5asqt OFF)
|
||||
MGL_DEPENDENT_OPTION(enable-python "Enable python interface" OFF "NOT enable-lgpl" ON "NOT enable-all-swig" ON)
|
||||
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)
|
@ -1,60 +0,0 @@
|
||||
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__)
|
10
mathgl-2.3-fltk-skip-fluid.patch
Normal file
10
mathgl-2.3-fltk-skip-fluid.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- 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)
|
||||
|
||||
if(enable-fltk)
|
||||
set(MGL_HAVE_FLTK 1)
|
||||
+ set(FLTK_SKIP_FLUID 1)
|
||||
include(FindFLTK)
|
||||
if(NOT FLTK_FOUND)
|
||||
message(SEND_ERROR "Couldn't find FLTK library.")
|
@ -1,6 +1,6 @@
|
||||
--- CMakeLists.txt 2013-12-27 17:24:33.553596153 +0700
|
||||
+++ CMakeLists.txt-no-hdf4-and-hdf5-simultaneously 2013-12-27 17:25:13.937026671 +0700
|
||||
@@ -215,7 +215,7 @@ endif(enable-gsl)
|
||||
--- 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)
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
set(MGL_HAVE_HDF4 1)
|
||||
find_library(HDF4_LIB df)
|
||||
find_library(HDF4MF_LIB mfhdf)
|
||||
@@ -226,9 +226,9 @@ if(enable-hdf4)
|
||||
@@ -276,9 +276,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)
|
@ -1,6 +1,6 @@
|
||||
--- CMakeLists.txt 2014-01-17 10:01:10.480156120 +0700
|
||||
+++ CMakeLists.txt-no_octave 2014-01-17 10:01:55.460539280 +0700
|
||||
@@ -97,6 +97,8 @@ MGL_DEPENDENT_OPTION(enable-python "Enab
|
||||
--- 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
|
||||
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)
|
12
mathgl-2.3-no_qt4.patch
Normal file
12
mathgl-2.3-no_qt4.patch
Normal file
@ -0,0 +1,12 @@
|
||||
--- 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
|
||||
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)
|
||||
-CMAKE_DEPENDENT_OPTION(enable-qt4 "Enable Qt4 widget" OFF "NOT enable-all-widgets" ON)
|
||||
+#CMAKE_DEPENDENT_OPTION(enable-qt4 "Enable Qt4 widget" OFF "NOT enable-all-widgets" ON)
|
||||
+set(enable-qt4 OFF)
|
||||
CMAKE_DEPENDENT_OPTION(enable-qt5 "Enable Qt5 widget" OFF "NOT enable-all-widgets" ON)
|
||||
CMAKE_DEPENDENT_OPTION(enable-qt5asqt "Set Qt5 as default libmgl-qt" ON "enable-qt5" OFF)
|
||||
|
48
mathgl.spec
48
mathgl.spec
@ -1,10 +1,11 @@
|
||||
%ifnarch s390 s390x
|
||||
%global with_openmpi 1
|
||||
%endif
|
||||
%global with_mpich2 1
|
||||
|
||||
Name: mathgl
|
||||
Version: 2.2.1
|
||||
Release: 6%{?dist}
|
||||
Version: 2.3
|
||||
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): Библиотека для осуществления высококачественной визуализации данных
|
||||
@ -14,27 +15,19 @@ 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.2-no-hdf4-and-hdf5-simultaneously.patch
|
||||
|
||||
#CMake looks for "FLUID" - the fltk UI designer.
|
||||
#This is not needed - instruct cmake to skip it at build time
|
||||
Patch1: mathgl-2.2-fltk-skip-fluid.patch
|
||||
|
||||
#Mathgl hardcodes the libdir as lib, then puts it in a var.
|
||||
# we will simply pass it as an arg to cmake.
|
||||
Patch2: mathgl-2.2-disable-lib-installdir.patch
|
||||
Patch0: mathgl-2.3-no-hdf4-and-hdf5-simultaneously.patch
|
||||
|
||||
# Install binaries for generation examples of illustrations
|
||||
Patch3: mathgl-2.2.1-examples.patch
|
||||
Patch1: 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
|
||||
Patch2: mathgl-2.3-no_octave.patch
|
||||
|
||||
# Skip FLUID binary test
|
||||
Patch3: mathgl-2.3-fltk-skip-fluid.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
|
||||
Patch4: mathgl-2.3-no_qt4.patch
|
||||
|
||||
Requires: %{name}-common = %{version}-%{release}
|
||||
|
||||
@ -45,7 +38,7 @@ BuildRequires: cmake
|
||||
|
||||
# optional packages
|
||||
BuildRequires: freeglut-devel hdf5-devel libjpeg-devel libtiff-devel
|
||||
BuildRequires: fltk-devel qt4-devel qtwebkit-devel
|
||||
BuildRequires: fltk-devel qt5-qtbase-devel qt5-qtwebkit-devel
|
||||
BuildRequires: wxGTK-devel giflib-devel
|
||||
BuildRequires: libharu-devel
|
||||
BuildRequires: swig lua-devel
|
||||
@ -188,19 +181,17 @@ for file in AUTHORS ChangeLog.txt README ; do
|
||||
done
|
||||
|
||||
%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
|
||||
%patch1 -b .examples
|
||||
%patch2 -b .no_octave
|
||||
%patch3 -b .fluid
|
||||
%patch4 -b .no_qt4_qt5
|
||||
|
||||
# Fix hardcoded paths
|
||||
sed -i s,/usr/local/share/doc/mathgl/,%{_docdir}/%{name}/, mgllab/main.cpp
|
||||
sed -i s,/usr/local/share/doc/mathgl/,%{_docdir}/%{name}/, udav/udav_wnd.h
|
||||
sed -i s,/usr/local/share/udav/,%{_datadir}/udav/, udav/udav_wnd.cpp
|
||||
sed -i s,/usr/local/share/mathgl/fonts/,%{_datadir}/%{name}/fonts/, udav/prop_dlg.cpp
|
||||
|
||||
|
||||
%build
|
||||
|
||||
OMP_NUM_THREADS=1
|
||||
@ -243,10 +234,12 @@ MPI_COMPILER_NAME=openmpi %building
|
||||
%{_openmpi_unload}
|
||||
%endif
|
||||
|
||||
%if 0%{?with_mpich2}
|
||||
# MPICH2
|
||||
%{_mpich_load}
|
||||
MPI_COMPILER_NAME=mpich %building
|
||||
%{_mpich_unload}
|
||||
%endif
|
||||
|
||||
%install
|
||||
|
||||
@ -270,10 +263,12 @@ MPI_COMPILER_NAME=openmpi %installing
|
||||
%{_openmpi_unload}
|
||||
%endif
|
||||
|
||||
%if 0%{?with_mpich2}
|
||||
# MPICH
|
||||
%{_mpich_load}
|
||||
MPI_COMPILER_NAME=mpich %installing
|
||||
%{_mpich_unload}
|
||||
%endif
|
||||
|
||||
#Remove symlink to .so file in python dir. Let python find libs normally
|
||||
unlink %{buildroot}/%{python_sitelib}/_mathgl.so
|
||||
@ -369,6 +364,9 @@ fi
|
||||
%{_includedir}/mpich-%{_arch}/mgl2/
|
||||
|
||||
%changelog
|
||||
* Tue Oct 07 2014 Dmitrij S. Kryzhevich <krege@land.ru> - 2.3-1
|
||||
- Update for new 2.3 version.
|
||||
|
||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user