Compare commits

...

7 Commits
rawhide ... f22

Author SHA1 Message Date
Dmitrij S. Kryzhevich d561be0ba1 Fix RHBZ #1294072 2016-01-04 16:01:33 +06:00
Dmitrij S. Kryzhevich ba9f073671 Rebuild. 2016-01-03 14:56:54 +06:00
Dmitrij S. Kryzhevich f0903b6c61 Split out widgets, reenable octave 2015-12-09 20:04:06 +06:00
Dmitrij S. Kryzhevich f0193d2e9f Clean spec after sync 2015-11-26 17:45:12 +06:00
Dmitrij S. Kryzhevich 43c660563f Batch change to (semi)sync with rawhide 2015-11-26 17:36:56 +06:00
Zbigniew Jędrzejewski-Szmek 6eb01adcd9 Fix linking with libX11 2015-05-03 14:58:29 -04:00
Zbigniew Jędrzejewski-Szmek 3e360c2160 Rebuild for changed mpich 2015-05-03 14:37:27 -04:00
13 changed files with 502 additions and 62 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)

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

@ -0,0 +1,54 @@
diff -urp mathgl-2.3.3/CMakeLists.txt mathgl-2.3.3-gsl2/CMakeLists.txt
--- mathgl-2.3.3/CMakeLists.txt 2015-12-08 21:39:12.774499940 +0600
+++ mathgl-2.3.3-gsl2/CMakeLists.txt 2015-12-08 21:39:50.534220640 +0600
@@ -259,6 +259,16 @@ 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 )
+ if ( ${GSL2_VERSION} LESS 1.16 )
+ SET(ISOLDGSL 1)
+ endif ( ${GSL2_VERSION} LESS 1.16 )
+ 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-12-08 21:40:21.154183235 +0600
@@ -23,6 +23,12 @@ ${MathGL_BINARY_DIR}/include/mgl2/dllexp
)
add_definitions(-DMGL_SRC)
+if(DEFINED ISGSL2)
+add_definitions(-DHAVE_GSL_2)
+endif(DEFINED ISGSL2)
+if(DEFINED ISOLDGSL)
+add_definitions(-DGSL_DISABLE_DEPRECATED)
+endif(DEFINED ISOLDGSL)
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-12-08 21:41:24.987020578 +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,24 @@
--- lang/CMakeLists.txt 2015-11-24 12:36:50.203458528 +0600
+++ lang/CMakeLists.txt.octave 2015-12-05 11:55:39.729209345 +0600
@@ -125,12 +125,6 @@ message(STATUS "${oct_prog} ${oct_host}
)
add_custom_target(mgl_octave_module ALL DEPENDS mathgl.tar.gz)
- install(FILES ${CMAKE_BINARY_DIR}/lang/mathgl.tar.gz DESTINATION ${MGL_DATA_PATH})
- if(enable-octave-install)
- install(CODE "execute_process(
- COMMAND ${oct_exec} -q --eval \"pkg install mathgl.tar.gz\"
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/lang )")
- endif(enable-octave-install)
set(mgl_clean_files ${mgl_clean_files} mathgl)
endif(enable-octave)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${mgl_clean_files}")
--- lang/DESCRIPTION 2015-11-24 12:36:50.203458528 +0600
+++ lang/DESCRIPTION.newversion 2015-12-05 21:52:16.228784984 +0600
@@ -1,5 +1,5 @@
Name: mathgl
-Version: 2.0
+Version: 2.3.3
Date: 2011-08-23
Author: Alexey Balakin
Maintainer: Dmitry Kulagin

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)
{

15
mathgl-2.3.3-x11.patch Normal file
View File

@ -0,0 +1,15 @@
--- 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)
- target_link_libraries(udav mgl-qt5)
+ 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 X11)
target_link_libraries(udav ${QT_LIBRARIES})
endif(enable-qt5)

View File

@ -2,10 +2,24 @@
%global with_openmpi 1
%endif
%global with_mpich2 1
%global with_doc 1
%if 0%{?fedora} >= 21
%global with_octave 1
%global octpkg mathgl
%endif
%if 0%{?with_doc}
%global docs on
%else
%global docs off
%endif
Name: mathgl
Version: 2.3
Release: 3%{?dist}
Version: 2.3.3
Release: 7%{?dist}
Summary: Cross-platform library for making high-quality scientific graphics
Summary(de): Plattformübergreifende Bibliothek für hochwertige wissenschaftliche Graphiken
Summary(ru): Библиотека для осуществления высококачественной визуализации данных
@ -15,19 +29,34 @@ 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
# Let macros to decide how to install octave module
Patch7: mathgl-2.3.3-nooctaveinstall.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
Requires: %{name}-common = %{version}-%{release}
@ -35,24 +64,17 @@ 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
%if 0%{?fedora} < 21
BuildRequires: octave-devel
%endif
BuildRequires: libXmu-devel
BuildRequires: python2-devel numpy
Requires(post): info
Requires(preun): info
%description
Mathgl is a cross-platform library for making high-quality scientific
graphics. It provides fast data plotting and handling of large data
@ -73,6 +95,7 @@ Summary(ru): Библиотеки и файлы заголовков для %{
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: gsl-devel
Requires: zlib-devel
%description devel
The %{name}-devel package contains libraries and header files for
@ -82,6 +105,15 @@ developing applications that use serial version of %{name}.
Пакет %{name}-devel содержит библиотеки и файлы заголовков, необходимые
для разработки приложений с использованием однопоточной версии %{name}.
%package fonts
Group: Development/Libraries
Requires: %{name}-common = %{version}-%{release}
Summary: Compiled fonts for the %{name}
%description fonts
%{summary}.
%if 0%{?with_doc}
%package doc
Group: Documentation
Summary: HTML documentation and tutorial for the %{name} applications
@ -91,6 +123,7 @@ BuildRequires: texi2html texinfo-tex
%description doc
This package contains the documentation in the HTML and PDF format of the %{name}
package.
%endif
%package -n udav
Summary: Viewer and editor for mathgl graphs
@ -109,11 +142,45 @@ UDAV - это кроссплатформенное приложение для
данных с применением библиотеки MathGL. UDAV, как GUI для MathGL, может быть
использован для формирования различного вида научных иллюстраций.
%package mglview
Summary: Execute MathGL scripts and show in an window
Group: Applications/Engineering
Requires: %{name}-qt = %{version}-%{release}
%description mglview
mglview reads MGL scripts from scriptfile to produce plots of specified
functions or data. The program will create a GUI window showing the script result.
%package -n python-mathgl
Summary: Python module for MathGL
Group: Applications/Engineering
Requires: %{name} = %{version}-%{release}
%description -n python-mathgl
%{Summary}.
%if 0%{?with_octave}
%package -n octave-mathgl
Summary: Octave module for MathGL
Group: Applications/Engineering
Requires: %{name} = %{version}-%{release}
Requires: octave >= 2.9.12
BuildRequires: octave-devel
%description -n octave-mathgl
%{Summary}.
%endif
%package common
Summary: Common files for %{name}
Group: Applications/Engineering
BuildArch: noarch
Requires: %{name} = %{version}-%{release}
Requires: %{name}-fonts = %{version}-%{release}
%if 0%{?with_doc}
Requires(post): info
Requires(preun): info
%endif
%description common
%{summary}.
@ -132,7 +199,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
@ -142,16 +209,19 @@ Requires: %{name}-common = %{version}-%{release}
Summary: Devel files for OpenMPI version of %{name} library
Group: Applications/Engineering
Requires: %{name}-openmpi%{_isa} = %{version}-%{release}
Requires: gsl-devel
Requires: zlib-devel
%description openmpi-devel
%{summary}.
%endif
%if 0%{?with_mpich2}
%package mpich
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
@ -165,9 +235,64 @@ Group: Applications/Engineering
Requires: %{name}-mpich%{_isa} = %{version}-%{release}
Provides: %{name}-mpich2-devel = %{version}-%{release}
Obsoletes: %{name}-mpich2-devel < 2.1.2-9
Requires: gsl-devel
Requires: zlib-devel
%description mpich-devel
%{summary}.
%endif
%package qt
Summary: Qt widgets of %{name} library
Group: Applications/Engineering
Requires: %{name} = %{version}-%{release}
%description qt
%{summary}.
%package qt-devel
Summary: Devel files for qt widgets of %{name} library
Group: Applications/Engineering
Requires: %{name}-devel = %{version}-%{release}
Requires: qt5-qtbase-devel
%description qt-devel
%{summary}.
%package fltk
Summary: Fltk widgets of %{name} library
Group: Applications/Engineering
Requires: %{name} = %{version}-%{release}
Requires: fltk-fluid
%description fltk
%{summary}.
%package fltk-devel
Summary: Devel files for fltk widgets of %{name} library
Group: Applications/Engineering
Requires: %{name}-devel = %{version}-%{release}
Requires: fltk-devel
%description fltk-devel
%{summary}.
%package wx
Summary: wxWidgets widgets of %{name} library
Group: Applications/Engineering
Requires: %{name} = %{version}-%{release}
%description wx
%{summary}.
%package wx-devel
Summary: Devel files for wxWidgets widgets of %{name} library
Group: Applications/Engineering
Requires: %{name}-devel = %{version}-%{release}
Requires: wxGTK-devel
%description wx-devel
%{summary}.
%prep
%setup -q
@ -180,17 +305,30 @@ 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
%if 0%{?with_octave}
%patch7 -b .nooctaveinstall
%else
%patch2 -b .no_octave
%endif
%patch3 -b .fluid
%patch4 -b .no_qt4_qt5
%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
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
%if 0%{?with_octave}
# Fix octave module version
sed -i -e "s,Version:.*,Version: %{version}," lang/DESCRIPTION
%endif
%build
@ -201,7 +339,14 @@ export OMP_NUM_THREADS
BUILD_MPI="-Denable-mpi=on -Denable-all-docs=off" %buildcommon
%define building_serial() \
BUILD_MPI="-Denable-mpi=off -Denable-all-docs=on" %buildcommon
BUILD_MPI="-Denable-mpi=off \
-Denable-all-docs=%{docs} \
-Denable-qt4=off \
-Denable-qt5=on \
-Denable-all-swig=on \
-Denable-all-widgets=on \
-Denable-hdf4=off \
" %buildcommon
%define buildcommon() \
mkdir -p %{_target_platform}_$MPI_COMPILER_NAME; \
@ -209,12 +354,6 @@ pushd %{_target_platform}_$MPI_COMPILER_NAME; \
%{cmake} \\\
-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 \\\
$BUILD_MPI \\\
..; \
popd; \
@ -257,6 +396,13 @@ rm -r %{buildroot}%{_libdir}/$MPI_COMPILER_NAME/usr
# Serial
make install DESTDIR=%{buildroot} -C %{_target_platform}_serial INSTALL="install -p"
%if 0%{?with_octave}
pushd lang
mkdir -p %{_tmppath}/%{name}-%{version}-%{release}.%{_arch}
cp ../%{_target_platform}_serial/lang/%{octpkg}.tar.gz %{_tmppath}/%{name}-%{version}-%{release}.%{_arch}/%{octpkg}-%{version}.tar.gz
%octave_pkg_install
popd
%endif
%if 0%{?with_openmpi}
# OpenMPI
@ -281,19 +427,16 @@ rm %{buildroot}/%{_libdir}/*.a
# Remove the binary mgl.cgi. Im not convinced about it (eg mem leak in main), and that its really needed
# The same with man file for it
rm %{buildroot}/%{_datadir}/mathgl/mgl.cgi
%if 0%{?with_doc}
rm %{buildroot}/%{_mandir}/man1/mgl.cgi.1*
# Remove bad octave archive
%if 0%{?fedora} < 21
#rm %{buildroot}%{_datadir}/mathgl/mathgl.tar.gz
%endif
# Prepare for documentation
if [ -d _tmp_docdir ]
then
rm -r _tmp_docdir
fi
mv %{buildroot}%{_docdir}/mathgl _tmp_docdir
%endif
# Check .desktop file
desktop-file-validate %{buildroot}%{_datadir}/applications/udav.desktop
@ -301,8 +444,28 @@ 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
%postun -p /sbin/ldconfig
%post qt -p /sbin/ldconfig
%postun qt -p /sbin/ldconfig
%post fltk -p /sbin/ldconfig
%postun fltk -p /sbin/ldconfig
%post wx -p /sbin/ldconfig
%postun wx -p /sbin/ldconfig
%if 0%{?with_doc}
%post common
/sbin/install-info %{_infodir}/%{name}_en.info %{_infodir}/dir || :
@ -310,39 +473,103 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/udav.desktop
if [ $1 = 0 ] ; then
/sbin/install-info --delete %{_infodir}/%{name}_en.info %{_infodir}/dir || :
fi
%endif
%postun -p /sbin/ldconfig
%post -n udav
/usr/bin/update-desktop-database &> /dev/null || :
%postun -n udav
/usr/bin/update-desktop-database &> /dev/null || :
%if 0%{?with_octave}
%post -n octave-mathgl
%octave_cmd pkg rebuild
%preun -n octave-mathgl
%octave_pkg_preun
%postun -n octave-mathgl
%octave_cmd pkg rebuild
%endif
%files
%doc AUTHORS ChangeLog.txt README COPYING README_V2
%{_libdir}/*.so.*
%{_libdir}/libmgl.so.*
%{_libdir}/mgl-lua.so
%{_bindir}/mgl*
%{_bindir}/mglconv
%exclude %{_bindir}/mgl_*example
%if 0%{?with_doc}
%{_mandir}/man1/mglconv.1.gz
%{_mandir}/man1/mglview.1.gz
%endif
%files devel
%{_libdir}/*.so
%{_libdir}/libmgl.so
%exclude %{_libdir}/mgl-lua.so
%{_includedir}/mgl2/
%{_datadir}/cmake/Modules/FindMathGL2.cmake
%files mglview
%{_bindir}/mglview
%if 0%{?with_doc}
%{_mandir}/man1/mglview.1.gz
%endif
%files qt
%{_libdir}/libmgl-qt*.so.*
%{_libdir}/libmgl-wnd.so.*
%files qt-devel
%{_libdir}/libmgl-qt*.so
%{_libdir}/libmgl-wnd.so
%files wx
%{_libdir}/libmgl-wx.so.*
%files wx-devel
%{_libdir}/libmgl-wx.so
%files fltk
%{_libdir}/libmgl-fltk.so.*
%{_libdir}/libmgl-glut.so.*
%files fltk-devel
%{_libdir}/libmgl-fltk.so
%{_libdir}/libmgl-glut.so
%files -n udav -f udav.lang
%{_bindir}/udav
%if 0%{?with_doc}
%{_mandir}/man1/udav.1.gz
%endif
%{_datadir}/applications/udav.desktop
%{_datadir}/mime/packages/mgl.xml
%dir %{_datadir}/udav/
%{_datadir}/pixmaps/*.png
%files -n python-mathgl
%{python_sitelib}/*
%if 0%{?with_octave}
%files -n octave-mathgl
%{octpkglibdir}
%dir %{octpkgdir}
%{octpkgdir}/packinfo
%endif
%if 0%{?with_doc}
%files doc
%doc AUTHORS COPYING
%doc _tmp_docdir/*
%endif
%files fonts
%{_datadir}/%{name}/
%files common
%{python_sitelib}/*
%{_datadir}/%{name}/
%{_infodir}/%{name}*.gz
%if 0%{?with_doc}
%{_mandir}/man5/mgl.5.gz
%{_infodir}/%{name}*.gz
%endif
%files examples
%{_bindir}/mgl_*example
@ -357,6 +584,7 @@ fi
%{_includedir}/openmpi-%{_arch}/mgl2/
%endif
%if 0%{?with_mpich2}
%files mpich
%doc COPYING
%{_libdir}/mpich/lib/*.so.*
@ -364,8 +592,62 @@ fi
%files mpich-devel
%{_libdir}/mpich/lib/*.so
%{_includedir}/mpich-%{_arch}/mgl2/
%endif
%changelog
* Mon Jan 04 2016 Dmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.3.3-7
- Split out python module and fonts.
- Make fonts subpackage arch depenedent, fix for RHBZ #1294072.
- Fix typos in name in changelog.
* Fri Dec 11 2015 Dmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.3.3-6
- Unconditionalize libharu. It is in epel now.
* Wed Dec 09 2015 Dmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.3.3-5
- Reenable octave module.
- Conditionalize doc and mpich subpackages.
- Conditionalize libharu and octave: only for Fedora.
- Move -qt, -wx and -fltk widgets into seperate subpackages.
- Update gsl patch: manage old version (in epel).
* Thu Nov 26 2015 Dmitrij 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 Dmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.3.3-3
- Fix files section: cmake script and mime xml.
* Tue Nov 24 2015 Dmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.3.3-2
- Add libtool-ltdl-devel to BR.
* Tue Nov 24 2015 Dmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.3.3-1
- Update to new 2.3.3 version.
- Fix gsl-2 support.
* Wed Sep 16 2015 Orion Poplawski <orion@cora.nwra.com> - 2.3-11
- Rebuild for openmpi 1.10.0
* Sun Jul 26 2015 Sandro Mani <manisandro@gmail.com> - 2.3-10
- Rebuild for RPM MPI Requires Provides Change
- Fix FTBFS
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun May 17 2015 Orion Poplawski <orion@cora.nwra.com> - 2.3-8
- Rebuild for hdf5 1.8.15
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2.3-7
- Rebuilt for GCC 5 C++11 ABI change
* Sat Mar 21 2015 Dmitrij S. Kryzhevich <krege@land.ru> - 2.3-6
- Fix linking with libX11.
* Tue Mar 17 2015 Dmitrij S. Kryzhevich <krege@land.ru> - 2.3-5
- Rebuild for new mpich.
* Thu Feb 19 2015 Rex Dieter <rdieter@fedoraproject.org> 2.3-4
- rebuild (fltk)
* Wed Jan 07 2015 Orion Poplawski <orion@cora.nwra.com> - 2.3-3
- Rebuild for hdf5 1.8.14

View File

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