Update to 2.4.2.1

Rebuild for octave 4.4
This commit is contained in:
Orion Poplawski 2018-11-13 09:10:38 -07:00
parent d2b9b2590e
commit 62eff8cf24
6 changed files with 55 additions and 60 deletions

1
.gitignore vendored
View File

@ -10,3 +10,4 @@ mathgl-1.10.2.1.tgz
/mathgl-2.3.4.tar.gz
/mathgl-2.3.5.1.tar.gz
/mathgl-2.4.1.tar.gz
/mathgl-2.4.2.1.tar.gz

View File

@ -1,12 +0,0 @@
diff -r b759fc50f42e src/pixel.cpp
--- a/src/pixel.cpp Fri Feb 16 00:41:32 2018 +0000
+++ b/src/pixel.cpp Fri Feb 16 00:42:35 2018 +0000
@@ -274,7 +274,7 @@
// if(!r) return r; // NOTE r must be provided!
if(p.a<=0) { memset(r,0,4); return r; }
float b0=0,b1=0,b2=0, ar,ag,ab,dif;
- const size_t nl = p.sub>=0?p.sub:1-p.sub;
+ const size_t nl = p.sub>=0?p.sub:-1-p.sub;
const bool glob = !get(MGL_LOCAL_LIGHT);
ar = ag = ab = glob?AmbBr:Sub[nl].AmbBr;
dif = glob?DifBr:Sub[nl].DifBr;

View File

@ -1,13 +1,15 @@
diff -urp mathgl-2.4.1/examples/CMakeLists.txt mathgl-2.4.1-examples/examples/CMakeLists.txt
--- mathgl-2.4.1/examples/CMakeLists.txt 2017-12-05 11:48:37.416881961 +0700
+++ mathgl-2.4.1-examples/examples/CMakeLists.txt 2017-12-05 11:51:35.612120557 +0700
@@ -2,22 +2,26 @@ file(COPY ${CMAKE_SOURCE_DIR}/examples/i
file(COPY ${CMAKE_SOURCE_DIR}/examples/Equirectangular-projection.jpg DESTINATION ${CMAKE_BINARY_DIR}/examples)
diff -up mathgl-2.4.2/examples/CMakeLists.txt.examples mathgl-2.4.2/examples/CMakeLists.txt
--- mathgl-2.4.2/examples/CMakeLists.txt.examples 2018-03-21 10:48:20.000000000 -0600
+++ mathgl-2.4.2/examples/CMakeLists.txt 2018-11-07 21:44:54.705927586 -0700
@@ -4,6 +4,7 @@ file(COPY ${CMAKE_SOURCE_DIR}/examples/s
file(COPY ${CMAKE_SOURCE_DIR}/examples/wnd_samples.cpp DESTINATION ${CMAKE_BINARY_DIR}/examples)
add_executable(mgl_example wnd_samples.cpp full_test.cpp samples.cpp)
target_link_libraries(mgl_example mgl-static ${getopt_lib-static})
+SET(MGL_INSTALL_EXAMPLES_LIST mgl_example)
if(MGL_HAVE_FLTK)
if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND CMAKE_COMPILER_IS_GNUCXX AND enable-lcov)
setup_target_for_coverage(
NAME mgl_coverage
@@ -16,17 +17,20 @@ 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)
@ -28,7 +30,7 @@ diff -urp mathgl-2.4.1/examples/CMakeLists.txt mathgl-2.4.1-examples/examples/CM
endif(MGL_HAVE_WX)
if(QT_ENABLED)
@@ -37,7 +41,9 @@ if(QT_ENABLED)
@@ -46,7 +50,9 @@ if(QT_ENABLED)
else(enable-qt5)
target_link_libraries(mgl_qgl_example mgl ${MGL_QT4_LIBS})
endif(enable-qt5)
@ -38,10 +40,11 @@ diff -urp mathgl-2.4.1/examples/CMakeLists.txt mathgl-2.4.1-examples/examples/CM
endif(QT_ENABLED)
if(MGL_HAVE_LTDL)
@@ -45,3 +51,7 @@ if(MGL_HAVE_LTDL)
target_link_libraries(mgl_module mgl) # for compatibility with win32
endif(MGL_HAVE_LTDL)
@@ -59,3 +65,8 @@ if(MGL_HAVE_MPI)
target_link_libraries(mgl_mpi_example mgl-mpi mgl ${MPI_LIBRARIES})
target_include_directories(mgl_mpi_example SYSTEM PUBLIC ${MPI_CXX_INCLUDE_PATH})
endif(MGL_HAVE_MPI)
+
+install(
+ TARGETS ${MGL_INSTALL_EXAMPLES_LIST}
+ RUNTIME DESTINATION bin

View File

@ -1,7 +1,7 @@
diff -urp mathgl-2.4.1/lang/CMakeLists.txt mathgl-2.4.1-lang/lang/CMakeLists.txt
--- mathgl-2.4.1/lang/CMakeLists.txt 2017-12-05 12:02:01.776791073 +0700
+++ mathgl-2.4.1-lang/lang/CMakeLists.txt 2017-12-06 12:19:53.510447509 +0700
@@ -17,48 +17,6 @@ if(NOT SWIG_FOUND)
diff -up mathgl-2.4.2/lang/CMakeLists.txt.lang mathgl-2.4.2/lang/CMakeLists.txt
--- mathgl-2.4.2/lang/CMakeLists.txt.lang 2018-03-21 10:48:17.000000000 -0600
+++ mathgl-2.4.2/lang/CMakeLists.txt 2018-11-07 21:47:46.663647687 -0700
@@ -17,52 +17,6 @@ if(NOT SWIG_FOUND)
endif(NOT SWIG_FOUND)
INCLUDE(${SWIG_USE_FILE})
@ -31,7 +31,11 @@ diff -urp mathgl-2.4.1/lang/CMakeLists.txt mathgl-2.4.1-lang/lang/CMakeLists.txt
- OUTPUT_VARIABLE MGL_PYTHON_SITE_PACKAGES
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- set(SWIG_MODULE_mathgl_EXTRA_DEPS numpy.i ${src_imp_dep})
- SWIG_ADD_MODULE(mathgl python mathgl.i)
- if(${CMAKE_VERSION} VERSION_LESS "3.8.0")
- SWIG_ADD_MODULE(mathgl python mathgl.i)
- else(${CMAKE_VERSION} VERSION_LESS "3.8.0")
- SWIG_ADD_LIBRARY(mathgl LANGUAGE python SOURCES mathgl.i)
- endif(${CMAKE_VERSION} VERSION_LESS "3.8.0")
- SWIG_LINK_LIBRARIES(mathgl mgl ${PYTHON_LIBRARIES})
- set_target_properties(_mathgl PROPERTIES BUILD_WITH_INSTALL_RPATH ON)
- add_custom_command(OUTPUT mathgl.pyc
@ -50,7 +54,7 @@ diff -urp mathgl-2.4.1/lang/CMakeLists.txt mathgl-2.4.1-lang/lang/CMakeLists.txt
if(enable-lua)
INCLUDE(FindLua51)
if(NOT LUA51_FOUND)
@@ -133,4 +91,8 @@ message(STATUS "${oct_prog} ${oct_host}
@@ -145,4 +99,8 @@ message(STATUS "${oct_prog} ${oct_host}
endif(enable-octave-install)
set(mgl_clean_files ${mgl_clean_files} mathgl)
endif(enable-octave)
@ -59,9 +63,9 @@ diff -urp mathgl-2.4.1/lang/CMakeLists.txt mathgl-2.4.1-lang/lang/CMakeLists.txt
+add_subdirectory( python3 )
+
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${mgl_clean_files}")
diff -urp mathgl-2.4.1/lang/numpy.i mathgl-2.4.1-lang/lang/numpy.i
--- mathgl-2.4.1/lang/numpy.i 2017-12-05 12:02:01.776791073 +0700
+++ mathgl-2.4.1-lang/lang/numpy.i 2017-12-05 12:02:18.766427285 +0700
diff -up mathgl-2.4.2/lang/numpy.i.lang mathgl-2.4.2/lang/numpy.i
--- mathgl-2.4.2/lang/numpy.i.lang 2018-03-21 10:48:17.000000000 -0600
+++ mathgl-2.4.2/lang/numpy.i 2018-11-07 21:45:40.490389470 -0700
@@ -97,7 +97,7 @@
{
/* Given a PyObject, return a string describing its type.
@ -348,9 +352,9 @@ diff -urp mathgl-2.4.1/lang/numpy.i mathgl-2.4.1-lang/lang/numpy.i
PyErr_Format(PyExc_TypeError,
"Int dimension expected. '%s' given.",
typestring);
diff -urp mathgl-2.4.1/lang/python3/CMakeLists.txt mathgl-2.4.1-lang/lang/python3/CMakeLists.txt
--- mathgl-2.4.1/lang/python3/CMakeLists.txt 2017-12-06 12:23:26.756865569 +0700
+++ mathgl-2.4.1-lang/lang/python3/CMakeLists.txt 2017-12-06 18:34:43.280894028 +0700
diff -up mathgl-2.4.2/lang/python3/CMakeLists.txt.lang mathgl-2.4.2/lang/python3/CMakeLists.txt
--- mathgl-2.4.2/lang/python3/CMakeLists.txt.lang 2018-11-07 21:45:40.441388976 -0700
+++ mathgl-2.4.2/lang/python3/CMakeLists.txt 2018-11-07 21:45:40.503389601 -0700
@@ -0,0 +1,75 @@
+set(src_imp_dep
+../../include/mgl2/type.h

View File

@ -4,7 +4,7 @@
%global with_mpich2 1
%global with_doc 1
%if 0%{?fedora} >= 21
%if 0%{?fedora}
%global with_octave 1
%global octpkg mathgl
%endif
@ -18,8 +18,8 @@
Name: mathgl
Version: 2.4.1
Release: 10%{?dist}
Version: 2.4.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): Библиотека для осуществления высококачественной визуализации данных
@ -29,7 +29,7 @@ Url: http://mathgl.sourceforge.net
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
# Install binaries for generation examples of illustrations
Patch0: mathgl-2.4.1-examples.patch
Patch0: mathgl-2.4.2-examples.patch
# Skip FLUID binary test
Patch1: mathgl-2.4.1-fltk-skip-fluid.patch
@ -44,7 +44,7 @@ Patch3: mathgl-2.4.1-nooctaveinstall.patch
Patch4: mathgl-2.4.1-nooctave.patch
# Add python3 support
Patch5: mathgl-2.4.1-lang.patch
Patch5: mathgl-2.4.2-lang.patch
# Fix convertions
Patch6: mathgl-2.4.1-gcc7.patch
@ -52,9 +52,6 @@ Patch6: mathgl-2.4.1-gcc7.patch
# Disable uppdate-{destop,mine}-database during install process
Patch7: mathgl-2.4.1-no_updatedb.patch
# Fix overflow (mathgl mailing list, 14/2/18. Fixed upstream
Patch8: mathgl-2.4.1-fix_overflow.patch
# Make mathgl use the 3.7 version of Python
Patch9: mathgl-2.4.1-python37.patch
@ -63,7 +60,7 @@ Requires: %{name}-common = %{version}-%{release}
# mandatory packages
BuildRequires: gsl-devel libpng-devel
BuildRequires: desktop-file-utils
BuildRequires: cmake
BuildRequires: cmake3
BuildRequires: perl(Storable)
# optional packages
@ -75,7 +72,7 @@ BuildRequires: wxGTK3-devel giflib-devel libtool-ltdl-devel
BuildRequires: libharu-devel
BuildRequires: swig lua-devel
BuildRequires: libXmu-devel
BuildRequires: python3-devel python3-numpy
BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}-numpy
%description
Mathgl is a cross-platform library for making high-quality scientific
@ -168,13 +165,13 @@ 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 python3-mathgl
%{?python_provide:%python_provide python3-mathgl}
%package -n python%{python3_pkgversion}-mathgl
%{?python_provide:%python_provide python%{python3_pkgversion}-mathgl}
Summary: Python3 module for MathGL
Group: Applications/Engineering
Requires: %{name} = %{version}-%{release}
%description -n python3-mathgl
%description -n python%{python3_pkgversion}-mathgl
%{Summary}.
%package lua
@ -361,8 +358,10 @@ done
%patch5 -p1 -b .lang
%patch6 -p1 -b .gcc7
%patch7 -p1 -b .no_updatedb
%patch8 -p1 -b .fix_overflow
%patch9 -p1 -b .fix_py37
# Python 3.7 in Fedora 29+
%if 0%{?fedora} >= 29
%patch9 -p1 -b .fix_py37}
%endif
%if 0%{?with_octave}
%patch3 -p1 -b .nooctaveinstall
%else
@ -411,7 +410,8 @@ BUILD_MPI="-Denable-mpi=off \
%define buildcommon() \
mkdir -p %{_target_platform}_$MPI_COMPILER_NAME; \
pushd %{_target_platform}_$MPI_COMPILER_NAME; \
%{cmake} \\\
%cmake3 \\\
-DMathGL_INSTALL_CMAKE_DIR=%{_libdir}/cmake/mathgl \\\
-DMathGL_INSTALL_LIB_DIR=%{_libdir} \\\
-Denable-all=on \\\
$BUILD_MPI \\\
@ -502,11 +502,6 @@ mv %{buildroot}%{_docdir}/mathgl _tmp_docdir
%endif
# 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
%check
desktop-file-validate %{buildroot}%{_datadir}/applications/udav.desktop
desktop-file-validate %{buildroot}%{_datadir}/applications/mgllab.desktop
@ -574,7 +569,7 @@ fi
%files devel
%{_libdir}/libmgl.so
%{_includedir}/mgl2/
%{_datadir}/cmake/Modules/FindMathGL2.cmake
%{_libdir}/cmake/mathgl/
%files mgllab
%{_bindir}/mgllab
@ -622,7 +617,7 @@ fi
%{_datadir}/applications/udav.desktop
%dir %{_datadir}/udav/
%files -n python3-mathgl
%files -n python%{python3_pkgversion}-mathgl
%{python3_sitelib}/*
%files lua
@ -676,6 +671,10 @@ fi
%endif
%changelog
* Tue Nov 13 2018 Orion Poplawski <orion@cora.nwra.com> - 2.4.2.1-1
- Update to 2.4.2.1
- Rebuild for octave 4.4
* Tue Sep 18 2018 Dmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.4.1-10
- Remove Python2 subpackage. Patch updated.

View File

@ -1 +1 @@
SHA512 (mathgl-2.4.1.tar.gz) = 10fd016662ca60b9507942691f85b4d9151104319627732f4add0175475f7e8dff16e3645bb858c283b747f34e58f410d0532e94dc64cf8cf472938d3966402d
SHA512 (mathgl-2.4.2.1.tar.gz) = bc8c38af0a2e0e09666a2488078c2ed3caee13437fc44e9edccfeecb6e486c55af9ad5069ddf53213bd3592ceea823942b6fb56ad47f68c7c0628f2d31316247