Compare commits

..

No commits in common. "rawhide" and "f30" have entirely different histories.
rawhide ... f30

9 changed files with 200 additions and 291 deletions

2
.gitignore vendored
View File

@ -11,5 +11,3 @@ mathgl-1.10.2.1.tgz
/mathgl-2.3.5.1.tar.gz
/mathgl-2.4.1.tar.gz
/mathgl-2.4.2.1.tar.gz
/mathgl-2.4.4.tar.gz
/mathgl-8.0.1.tar.gz

View File

@ -1,7 +1,7 @@
diff -up mathgl-8.0.1/lang/CMakeLists.txt.nooctaveinstall mathgl-8.0.1/lang/CMakeLists.txt
--- mathgl-8.0.1/lang/CMakeLists.txt.nooctaveinstall 2022-10-05 20:51:43.595636043 -0600
+++ mathgl-8.0.1/lang/CMakeLists.txt 2022-10-05 20:52:22.411935656 -0600
@@ -138,11 +138,6 @@ message(STATUS "${oct_prog} ${oct_host}
diff -urp mathgl-2.4.1/lang/CMakeLists.txt mathgl-2.4.1-nooctaveinstall/lang/CMakeLists.txt
--- mathgl-2.4.1/lang/CMakeLists.txt 2017-12-05 11:57:45.607214992 +0700
+++ mathgl-2.4.1-nooctaveinstall/lang/CMakeLists.txt 2017-12-05 11:59:48.869607674 +0700
@@ -84,11 +84,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})
@ -12,4 +12,4 @@ diff -up mathgl-8.0.1/lang/CMakeLists.txt.nooctaveinstall mathgl-8.0.1/lang/CMak
- 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}")

View File

@ -0,0 +1,34 @@
diff -ru mathgl-2.4.1/lang/python3/CMakeLists.txt mathgl-2.4.1_patched/lang/python3/CMakeLists.txt
--- mathgl-2.4.1/lang/python3/CMakeLists.txt 2018-07-04 14:53:42.165822142 +0200
+++ mathgl-2.4.1_patched/lang/python3/CMakeLists.txt 2018-07-04 14:53:26.941745985 +0200
@@ -12,10 +12,10 @@
SET_SOURCE_FILES_PROPERTIES(../mathgl.i ../numpy.i PROPERTIES CPLUSPLUS ON)
if(enable-python)
- set(Python_ADDITIONAL_VERSIONS 3.6)
+ set(Python_ADDITIONAL_VERSIONS 3.7)
unset(PYTHONINTERP_FOUND)
unset(PYTHON_EXECUTABLE CACHE)
- FIND_PACKAGE(PythonInterp 3.6 REQUIRED)
+ FIND_PACKAGE(PythonInterp 3.7 REQUIRED)
if(NOT PYTHONINTERP_FOUND)
message(SEND_ERROR "Couldn't find python interpreter.")
endif(NOT PYTHONINTERP_FOUND)
@@ -28,7 +28,7 @@
unset(PYTHONLIBS_VERSION_STRING CACHE)
unset(PYTHON_LIBRARY CACHE)
unset(PYTHON_INCLUDE_DIR CACHE)
- FIND_PACKAGE(PythonLibs 3.6)
+ FIND_PACKAGE(PythonLibs 3.7)
if(NOT PYTHONLIBS_FOUND)
message(SEND_ERROR "Couldn't find python development libraries.")
endif(NOT PYTHONLIBS_FOUND)
@@ -67,7 +67,7 @@
install(FILES ${MathGL2_BINARY_DIR}/lang/python3/mathgl.py DESTINATION ${MGL_PYTHON_SITE_PACKAGES})
# harcoded for now. another way is to make glob search on *pyc in __pycache__ dir
- install(FILES ${MathGL2_BINARY_DIR}/lang/python3/__pycache__/mathgl.cpython-36.pyc DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/__pycache__)
+ install(FILES ${MathGL2_BINARY_DIR}/lang/python3/__pycache__/mathgl.cpython-37.pyc DESTINATION ${MGL_PYTHON_SITE_PACKAGES}/__pycache__)
install (TARGETS _mathglp3 LIBRARY DESTINATION ${MGL_PYTHON_SITE_PACKAGES})
set(mgl_clean_files ${mgl_clean_files} mathgl.py)
endif(enable-python)

View File

@ -1,7 +1,60 @@
diff -up mathgl-8.0.1/lang/CMakeLists.txt.lang mathgl-8.0.1/lang/CMakeLists.txt
--- mathgl-8.0.1/lang/CMakeLists.txt.lang 2022-01-11 13:48:54.000000000 -0700
+++ mathgl-8.0.1/lang/CMakeLists.txt 2022-10-05 20:17:12.149704032 -0600
@@ -145,4 +145,8 @@ message(STATUS "${oct_prog} ${oct_host}
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})
-if(enable-python)
- set(Python_ADDITIONAL_VERSIONS 2.7)
- FIND_PACKAGE(PythonInterp)
- if(NOT PYTHONINTERP_FOUND)
- message(SEND_ERROR "Couldn't find python interpreter.")
- endif(NOT PYTHONINTERP_FOUND)
- FIND_PACKAGE(PythonLibs)
- if(NOT PYTHONLIBS_FOUND)
- message(SEND_ERROR "Couldn't find python development libraries.")
- endif(NOT PYTHONLIBS_FOUND)
- execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()"
- OUTPUT_VARIABLE NUMPY_INCLUDE_PATH
- RESULT_VARIABLE NUMPY_ERR
- OUTPUT_STRIP_TRAILING_WHITESPACE
- )
- if(NOT NUMPY_INCLUDE_PATH)
- message(SEND_ERROR "Couldn't find numpy.")
- endif(NOT NUMPY_INCLUDE_PATH)
-
- include_directories(${PYTHON_INCLUDE_DIR} ${NUMPY_INCLUDE_PATH})
- execute_process(
- COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}')"
- OUTPUT_VARIABLE MGL_PYTHON_SITE_PACKAGES
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- set(SWIG_MODULE_mathgl_EXTRA_DEPS numpy.i ${src_imp_dep})
- 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
- COMMAND ${PYTHON_EXECUTABLE}
- ARGS -c \"from py_compile import compile\; compile('mathgl.py') \"
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/lang
- DEPENDS _mathgl
- )
- add_custom_target(mgl_python_module ALL DEPENDS _mathgl mathgl.pyc)
-
- install(FILES ${MathGL2_BINARY_DIR}/lang/mathgl.py ${MathGL2_BINARY_DIR}/lang/mathgl.pyc DESTINATION ${MGL_PYTHON_SITE_PACKAGES})
- install (TARGETS _mathgl LIBRARY DESTINATION ${MGL_PYTHON_SITE_PACKAGES})
- set(mgl_clean_files ${mgl_clean_files} mathgl.py)
-endif(enable-python)
-
if(enable-lua)
INCLUDE(FindLua51)
if(NOT LUA51_FOUND)
@@ -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)
@ -10,9 +63,9 @@ diff -up mathgl-8.0.1/lang/CMakeLists.txt.lang mathgl-8.0.1/lang/CMakeLists.txt
+add_subdirectory( python3 )
+
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${mgl_clean_files}")
diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
--- mathgl-8.0.1/lang/numpy.i.lang 2022-01-11 13:48:54.000000000 -0700
+++ mathgl-8.0.1/lang/numpy.i 2022-10-05 20:22:27.909092484 -0600
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.
@ -22,7 +75,20 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
if (py_obj == NULL ) return "C NULL value";
if (py_obj == Py_None ) return "Python None" ;
if (PyCallable_Check(py_obj)) return "callable" ;
@@ -114,8 +114,8 @@
@@ -107,17 +107,18 @@
if (PyDict_Check( py_obj)) return "dict" ;
if (PyList_Check( py_obj)) return "list" ;
if (PyTuple_Check( py_obj)) return "tuple" ;
- if (PyFile_Check( py_obj)) return "file" ;
if (PyModule_Check( py_obj)) return "module" ;
+%#if PY_MAJOR_VERSION < 3
+ if (PyFile_Check( py_obj)) return "file" ;
if (PyInstance_Check(py_obj)) return "instance" ;
-
- return "unknow type";
+%#endif
+ return "unkown type";
}
/* Given a NumPy typecode, return a string describing the type.
*/
@ -33,7 +99,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
"short", "unsigned short", "int",
"unsigned int", "long", "unsigned long",
"long long", "unsigned long long",
@@ -157,8 +157,8 @@
@@ -159,8 +160,8 @@
}
else if is_array(input)
{
@ -44,7 +110,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
PyErr_Format(PyExc_TypeError,
"Array of type '%s' required. Array of type '%s' given",
desired_type, actual_type);
@@ -166,8 +166,8 @@
@@ -168,8 +169,8 @@
}
else
{
@ -55,7 +121,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
PyErr_Format(PyExc_TypeError,
"Array of type '%s' required. A '%s' was given",
desired_type, actual_type);
@@ -305,6 +305,95 @@
@@ -307,6 +308,95 @@
return ary1;
}
@ -151,7 +217,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
} /* end fragment */
@@ -599,7 +688,7 @@
@@ -601,7 +691,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[1] = { $1_dim0 };
@ -160,7 +226,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 1) ||
!require_size(array, size, 1)) SWIG_fail;
@@ -626,7 +715,7 @@
@@ -628,7 +718,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[1] = { -1 };
@ -169,7 +235,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 1) ||
!require_size(array, size, 1)) SWIG_fail;
@@ -654,7 +743,7 @@
@@ -656,7 +746,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[1] = {-1};
@ -178,7 +244,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 1) ||
!require_size(array, size, 1)) SWIG_fail;
@@ -682,7 +771,7 @@
@@ -684,7 +774,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[2] = { $1_dim0, $1_dim1 };
@ -187,7 +253,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 2) ||
!require_size(array, size, 2)) SWIG_fail;
@@ -709,7 +798,7 @@
@@ -711,7 +801,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[2] = { -1, -1 };
@ -196,7 +262,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 2) ||
!require_size(array, size, 2)) SWIG_fail;
@@ -738,7 +827,7 @@
@@ -740,7 +830,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[2] = { -1, -1 };
@ -205,7 +271,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 2) ||
!require_size(array, size, 2)) SWIG_fail;
@@ -767,7 +856,7 @@
@@ -769,7 +859,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[2] = { -1, -1 };
@ -214,7 +280,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 2) ||
!require_size(array, size, 2) || !require_fortran(array)) SWIG_fail;
@@ -796,7 +885,7 @@
@@ -798,7 +888,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[2] = { -1, -1 };
@ -223,7 +289,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 2) ||
!require_size(array, size, 2) || !require_fortran(array)) SWIG_fail;
@@ -825,7 +914,7 @@
@@ -827,7 +917,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[3] = { $1_dim0, $1_dim1, $1_dim2 };
@ -232,7 +298,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 3) ||
!require_size(array, size, 3)) SWIG_fail;
@@ -853,7 +942,7 @@
@@ -855,7 +945,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[3] = { -1, -1, -1 };
@ -241,7 +307,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 3) ||
!require_size(array, size, 3)) SWIG_fail;
@@ -884,7 +973,7 @@
@@ -886,7 +976,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[3] = { -1, -1, -1 };
@ -250,7 +316,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 3) ||
!require_size(array, size, 3)) SWIG_fail;
@@ -915,7 +1004,7 @@
@@ -917,7 +1007,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[3] = { -1, -1, -1 };
@ -259,7 +325,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 3) ||
!require_size(array, size, 3) | !require_fortran(array)) SWIG_fail;
@@ -946,7 +1035,7 @@
@@ -948,7 +1038,7 @@
(PyArrayObject* array=NULL, int is_new_object=0)
{
npy_intp size[3] = { -1, -1, -1 };
@ -268,7 +334,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
&is_new_object);
if (!array || !require_dimensions(array, 3) ||
!require_size(array, size, 3) || !require_fortran(array)) SWIG_fail;
@@ -1289,7 +1378,7 @@
@@ -1291,7 +1381,7 @@
npy_intp dims[1];
if (!PyInt_Check($input))
{
@ -277,7 +343,7 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
PyErr_Format(PyExc_TypeError,
"Int dimension expected. '%s' given.",
typestring);
@@ -1317,7 +1406,7 @@
@@ -1319,7 +1409,7 @@
npy_intp dims[1];
if (!PyInt_Check($input))
{
@ -286,9 +352,9 @@ diff -up mathgl-8.0.1/lang/numpy.i.lang mathgl-8.0.1/lang/numpy.i
PyErr_Format(PyExc_TypeError,
"Int dimension expected. '%s' given.",
typestring);
diff -up mathgl-8.0.1/lang/python3/CMakeLists.txt.lang mathgl-8.0.1/lang/python3/CMakeLists.txt
--- mathgl-8.0.1/lang/python3/CMakeLists.txt.lang 2022-10-05 20:17:12.061703367 -0600
+++ mathgl-8.0.1/lang/python3/CMakeLists.txt 2022-10-05 20:17:12.153704063 -0600
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

@ -1,11 +0,0 @@
diff -urp mathgl-2.4.2.1/CMakeLists.txt mathgl-2.4.2.1-norebuild_l10n/CMakeLists.txt
--- mathgl-2.4.2.1/CMakeLists.txt 2018-03-31 00:32:12.000000000 +0700
+++ mathgl-2.4.2.1-norebuild_l10n/CMakeLists.txt 2020-03-02 10:07:18.750912058 +0700
@@ -636,6 +636,7 @@ if(WIN32)
set(USE_GETTEXT 0)
set(MGL_USE_LIBINTL 0)
endif(WIN32)
+set(USE_GETTEXT 0)
if(enable-doc-info)
set(MGL_HAVE_DOC_INFO 1)

View File

@ -1,43 +0,0 @@
--- CMakeLists.txt~ 2019-09-26 14:18:04.000000000 -0500
+++ CMakeLists.txt 2019-09-26 14:18:34.476407791 -0500
@@ -581,9 +581,9 @@
message(SEND_ERROR "You have to enable OpenGL if you plan to use GLUT.")
endif(NOT MGL_HAVE_OPENGL)
include(FindGLUT)
- if(NOT GLUT_FOUND)
- message(SEND_ERROR "Couldn't find GLUT library.")
- endif(NOT GLUT_FOUND)
+# if(NOT GLUT_FOUND)
+# message(SEND_ERROR "Couldn't find GLUT library.")
+# endif(NOT GLUT_FOUND)
else(enable-glut)
set(MGL_HAVE_GLUT 0)
endif(enable-glut)
--- widgets/glut.cpp~ 2019-07-08 13:56:57.000000000 -0500
+++ widgets/glut.cpp 2019-09-26 14:24:21.070662407 -0500
@@ -30,7 +30,7 @@
#include "glut.h"
#else
#include <GL/gl.h>
- #include <GL/glut.h>
+ #include <GL/freeglut.h>
#endif
#endif
--- widgets/CMakeLists.txt~ 2019-07-08 13:56:57.000000000 -0500
+++ widgets/CMakeLists.txt 2019-09-26 14:28:13.770162047 -0500
@@ -14,10 +14,10 @@
if(MGL_HAVE_GLUT)
mgl_add_lib(glut glut.cpp ../include/mgl2/glut.h)
- target_include_directories(mgl-glut SYSTEM PUBLIC ${GLUT_INCLUDE_DIR})
- target_include_directories(mgl-glut-static SYSTEM PUBLIC ${GLUT_INCLUDE_DIR})
- target_link_libraries(mgl-glut mgl ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES})
- target_link_libraries(mgl-glut-static mgl-static ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES})
+ target_include_directories(mgl-glut SYSTEM PUBLIC ${FreeGLUT_INCLUDE_DIR})
+ target_include_directories(mgl-glut-static SYSTEM PUBLIC ${FreeGLUT_INCLUDE_DIR})
+ target_link_libraries(mgl-glut mgl ${FreeGLUT_LIBRARIES} ${OPENGL_LIBRARIES} -lglut)
+ target_link_libraries(mgl-glut-static mgl-static ${FreeGLUT_LIBRARIES} ${OPENGL_LIBRARIES} -lglut)
endif(MGL_HAVE_GLUT)
if(MGL_HAVE_WX)

View File

@ -1,25 +0,0 @@
diff -up mathgl-8.0.1/src/prc.cpp.libharu2.4 mathgl-8.0.1/src/prc.cpp
--- mathgl-8.0.1/src/prc.cpp.libharu2.4 2022-01-11 13:48:53.000000000 -0700
+++ mathgl-8.0.1/src/prc.cpp 2022-10-05 21:10:18.640050969 -0600
@@ -36,6 +36,7 @@
#include <hpdf.h>
#include <hpdf_u3d.h>
#include <hpdf_annotation.h>
+#include <hpdf_version.h>
#endif // MGL_HAVE_PDF
@@ -959,7 +960,12 @@ void MGL_EXPORT mgl_write_prc(HMGL gr, c
HPDF_U3D_SetDefault3DView(u3d, "DefaultView");
// Create annotation
- annot = HPDF_Page_Create3DAnnot (page, rect, u3d );
+ annot
+#if HPDF_VERSION_ID >= 20400
+ = HPDF_Page_Create3DAnnot (page, rect, HPDF_FALSE, HPDF_FALSE, u3d, NULL);
+#else
+ = HPDF_Page_Create3DAnnot (page, rect, u3d );
+#endif
// Enable toolbar
HPDF_Dict action = (HPDF_Dict)HPDF_Dict_GetItem (annot, "3DA", HPDF_OCLASS_DICT);

View File

@ -1,10 +1,4 @@
%if 0%{?fedora} >= 40
%ifarch %{ix86}
%global with_openmpi 0
%else
%global with_openmpi 1
%endif
%else
%ifnarch s390 s390x
%global with_openmpi 1
%endif
%global with_mpich2 1
@ -24,8 +18,8 @@
Name: mathgl
Version: 8.0.1
Release: 7%{?dist}
Version: 2.4.2.1
Release: 4%{?dist}
Summary: Cross-platform library for making high-quality scientific graphics
Summary(de): Plattformübergreifende Bibliothek für hochwertige wissenschaftliche Graphiken
Summary(ru): Библиотека для осуществления высококачественной визуализации данных
@ -43,13 +37,13 @@ Patch1: mathgl-2.4.1-fltk-skip-fluid.patch
Patch2: mathgl-2.4.1-no_hdf4-and-hdf5-simultaneously.patch
# Let macros to decide how to install octave module
Patch3: mathgl-nooctaveinstall.patch
Patch3: mathgl-2.4.1-nooctaveinstall.patch
# There is no easy way to disable ONLY octave. Have to cut it from CmakeList.txt
Patch4: mathgl-2.4.1-nooctave.patch
# Add python3 support
Patch5: mathgl-lang.patch
Patch5: mathgl-2.4.2-lang.patch
# Fix convertions
Patch6: mathgl-2.4.1-gcc7.patch
@ -57,21 +51,12 @@ Patch6: mathgl-2.4.1-gcc7.patch
# Disable uppdate-{destop,mine}-database during install process
Patch7: mathgl-2.4.1-no_updatedb.patch
Patch8: mathgl-freeglut.patch
# Disable rebuild of l10n files, rhbz #1808694
# .mo files built in compile time contain time stamp what make them different
# between different archs (or not if you are lucky. I'm not.)
Patch9: mathgl-2.4.2.1-norebuild_l10n.patch
# https://sourceforge.net/p/mathgl/bugs/48/
# Support for libharu 2.4
Patch10: mathgl-libharu2.4.patch
# Make mathgl use the 3.7 version of Python
Patch9: mathgl-2.4.1-python37.patch
Requires: %{name}-common = %{version}-%{release}
# mandatory packages
BuildRequires: make
BuildRequires: gsl-devel libpng-devel
BuildRequires: desktop-file-utils
BuildRequires: cmake3
@ -81,7 +66,8 @@ BuildRequires: perl(Storable)
BuildRequires: freeglut-devel hdf5-devel libjpeg-devel libtiff-devel
BuildRequires: fltk-devel
BuildRequires: qt5-qtbase-devel qt5-qtwebkit-devel
BuildRequires: wxGTK-devel giflib-devel libtool-ltdl-devel
BuildRequires: qt4-devel qt4-webkit-devel
BuildRequires: wxGTK3-devel giflib-devel libtool-ltdl-devel
BuildRequires: libharu-devel
BuildRequires: swig lua-devel
BuildRequires: libXmu-devel
@ -263,12 +249,24 @@ Requires: zlib-devel%{?_isa}
%{summary}.
%endif
%package qt4
Summary: Qt4 widgets of %{name} library
Requires: %{name} = %{version}-%{release}
%description qt4
%{summary}.
%package qt4-devel
Summary: Devel files for qt4 widgets of %{name} library
Requires: %{name}-devel = %{version}-%{release}
%description qt4-devel
%{summary}.
%package qt5
Summary: Qt5 widgets of %{name} library
Requires: %{name} = %{version}-%{release}
Obsoletes: %{name}-qt < 2.4
Provides: %{name}-qt = %{version}-%{release}
Obsoletes: %{name}-qt4 < 8.0
%description qt5
%{summary}.
@ -276,10 +274,7 @@ Obsoletes: %{name}-qt4 < 8.0
%package qt5-devel
Summary: Devel files for qt5 widgets of %{name} library
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-qt5 = %{version}-%{release}
Obsoletes: %{name}-qt-devel < 2.4
Provides: %{name}-qt-devel = %{version}-%{release}
Obsoletes: %{name}-qt4-devel < 8.0
Requires: qt5-qtbase-devel
%description qt5-devel
@ -296,7 +291,6 @@ Requires: fltk-fluid
%package fltk-devel
Summary: Devel files for fltk widgets of %{name} library
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-fltk = %{version}-%{release}
Requires: fltk-devel
%description fltk-devel
@ -312,8 +306,7 @@ Requires: %{name} = %{version}-%{release}
%package wx-devel
Summary: Devel files for wxWidgets widgets of %{name} library
Requires: %{name}-devel = %{version}-%{release}
Requires: %{name}-wx = %{version}-%{release}
Requires: wxGTK-devel
Requires: wxGTK3-devel
%description wx-devel
%{summary}.
@ -325,8 +318,8 @@ Requires: wxGTK-devel
rm -rf addons/getopt
# prep for both py2 and py3 build
#mkdir lang/python3
#touch lang/python3/CMakeLists.txt
mkdir lang/python3
touch lang/python3/CMakeLists.txt
#convert EOL encodings, maintaining timestames
for file in AUTHORS ChangeLog.txt README ; do
@ -335,25 +328,22 @@ for file in AUTHORS ChangeLog.txt README ; do
mv $file.new $file
done
%patch -P0 -p1 -b .examples
%patch -P1 -p1 -b .fluid
%patch -P2 -p1 -b .no-hdf4-and-hdf5-simultaneously
#patch -P5 -p1 -b .lang
%patch -P6 -p1 -b .gcc7
%patch -P7 -p1 -b .no_updatedb
%if 0%{?with_octave}
%patch -P3 -p1 -b .nooctaveinstall
%else
%patch -P4 -p1 -b .no_octave
%patch0 -p1 -b .examples
%patch1 -p1 -b .fluid
%patch2 -p1 -b .no-hdf4-and-hdf5-simultaneously
%patch5 -p1 -b .lang
%patch6 -p1 -b .gcc7
%patch7 -p1 -b .no_updatedb
# 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
%patch4 -p1 -b .no_octave
%endif
%patch -P8 -p0 -b .freeglut
%patch -P9 -p1 -b .norebuild_l10n
%patch -P10 -p1 -b .libharu2.4
# Fix hardcoded Python version
#sed -i -e 's,3\.[0-9],%{python3_version},g' \
# -e 's,cpython-3[0-9],cpython-%{python3_version_nodots},g' \
# lang/python3/CMakeLists.txt
# Fix hardcoded paths
sed -i s,/usr/local/share/doc/mathgl/,%{_docdir}/%{name}/, udav/udav_wnd.h
@ -363,7 +353,11 @@ sed -i s,/usr/local/share/mathgl/fonts/,%{_datadir}/%{name}/fonts/, udav/prop_dl
# Fix octave module version wether we need it or not
sed -i -e "s,Version:.*,Version: %{version}," lang/DESCRIPTION
%if 0%{?fedora}
%if 0%{?fedora} >= 21 && 0%{?fedora} < 26
%global mgl_octarch_dir %{_tmppath}/%{name}-%{version}-%{release}.%{_arch}
%global mgl_octarch_name %{octpkg}-%{version}.tar.gz
%endif
%if 0%{?fedora} >= 26
%global octave_tar_suffix %{octave_host}-%{octave_api}
%global mgl_octarch_dir %{_builddir}/%{buildsubdir}/build/
%global mgl_octarch_name %{octpkg}-%{version}-%{octave_tar_suffix}.tar.gz
@ -390,18 +384,19 @@ BUILD_MPI="-Denable-mpi=off \
# Disable SMP build
%define buildcommon() \
%cmake \\\
mkdir -p %{_target_platform}_$MPI_COMPILER_NAME; \
pushd %{_target_platform}_$MPI_COMPILER_NAME; \
%cmake3 \\\
-DMathGL_INSTALL_CMAKE_DIR=%{_libdir}/cmake/mathgl \\\
-DMathGL_INSTALL_LIB_DIR=%{_libdir} \\\
-Denable-all=on \\\
-Denable-qt5asqt=off \\\
$BUILD_MPI \\\
..; \
%{cmake_build}
popd; \
make -C %{_target_platform}_$MPI_COMPILER_NAME
# serial
%global _vpath_builddir %{_target_platform}_serial
%building_serial
MPI_COMPILER_NAME=serial %building_serial
# MPI vars
export CC=mpicc
@ -410,16 +405,14 @@ export CXX=mpicxx
%if 0%{?with_openmpi}
# OpenMPI
%{_openmpi_load}
%global _vpath_builddir %{_target_platform}_openmpi
%building
MPI_COMPILER_NAME=openmpi %building
%{_openmpi_unload}
%endif
%if 0%{?with_mpich2}
# MPICH2
%{_mpich_load}
%global _vpath_builddir %{_target_platform}_mpich
%building
MPI_COMPILER_NAME=mpich %building
%{_mpich_unload}
%endif
@ -436,10 +429,8 @@ rm -f %{buildroot}%{_libdir}/$MPI_COMPILER_NAME/lib/*.a; \
rm -r %{buildroot}%{_libdir}/$MPI_COMPILER_NAME/usr
# Serial
%global _vpath_builddir %{_target_platform}_serial
%{cmake_install}
make install DESTDIR=%{buildroot} -C %{_target_platform}_serial INSTALL="install -p"
%if 0%{?with_octave}
rm -f %{buildroot}%{_datadir}/%{name}/mathgl.tar.gz
mkdir -p %{mgl_octarch_dir}
cp %{_target_platform}_serial/lang/%{octpkg}.tar.gz %{mgl_octarch_dir}/%{mgl_octarch_name}
%octave_pkg_install
@ -450,11 +441,9 @@ rm -f %{mgl_octarch_dir}/%{mgl_octarch_name}/%{octpkg}.tar.gz
%find_lang %{name}
%find_lang udav --with-qt
# No that modern cmake_install macros for mpi install.
%if 0%{?with_openmpi}
# OpenMPI
%{_openmpi_load}
%global _vpath_builddir %{_target_platform}_openmpi
MPI_COMPILER_NAME=openmpi %installing
%{_openmpi_unload}
%endif
@ -462,13 +451,13 @@ MPI_COMPILER_NAME=openmpi %installing
%if 0%{?with_mpich2}
# MPICH
%{_mpich_load}
%global _vpath_builddir %{_target_platform}_mpich
MPI_COMPILER_NAME=mpich %installing
%{_mpich_unload}
%endif
#Remove symlink to .so file in python dir. Let python find libs normally
# not needed now?
#unlink %{buildroot}/%{python_sitelib}/_mathgl.so
#unlink %{buildroot}/%{python3_sitelib}/_mathgl.so
#Remove static libraries generated by cmake
@ -476,7 +465,7 @@ 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}/%{_prefix}/lib/cgi-bin/mgl.cgi
rm %{buildroot}/%{_datadir}/mathgl/mgl.cgi
%if 0%{?with_doc}
rm %{buildroot}/%{_mandir}/man1/mgl.cgi.1*
@ -496,6 +485,8 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/mgllab.desktop
%ldconfig_scriptlets
%ldconfig_scriptlets qt4
%ldconfig_scriptlets qt5
%ldconfig_scriptlets fltk
@ -517,7 +508,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/mgllab.desktop
%doc AUTHORS ChangeLog.txt README COPYING README_V2
%{_libdir}/libmgl.so.*
%{_bindir}/mglconv
%{_bindir}/mgltask
%exclude %{_bindir}/mgl_*example
%if 0%{?with_doc}
%{_mandir}/man1/mglconv.1.gz
@ -527,7 +517,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/mgllab.desktop
%{_libdir}/libmgl.so
%{_includedir}/mgl2/
%{_libdir}/cmake/mathgl/
%{_libdir}/cmake/mathgl2/
%files mgllab
%{_bindir}/mgllab
@ -539,13 +528,17 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/mgllab.desktop
%{_mandir}/man1/mglview.1.gz
%endif
%files qt4
%{_libdir}/libmgl-qt4.so.*
%files qt4-devel
%{_libdir}/libmgl-qt4.so
%files qt5
%{_libdir}/libmgl-qt.so.*
%{_libdir}/libmgl-qt5.so.*
%{_libdir}/libmgl-wnd.so.*
%files qt5-devel
%{_libdir}/libmgl-qt.so
%{_libdir}/libmgl-qt5.so
%{_libdir}/libmgl-wnd.so
@ -591,7 +584,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/mgllab.desktop
%endif
%files fonts
%{_datadir}/%{name}/fonts/
%{_datadir}/%{name}/
%files common
%{_datadir}/pixmaps/*.png
@ -625,109 +618,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/mgllab.desktop
%endif
%changelog
* Sun Oct 29 2023 Orion Poplawski <orion@nwra.com> - 8.0.1-7
- Rebuild for openmpi 5.0.0, drops i686 and C++ API
- Use newer patch syntax
- Cleanup old conditionals
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 8.0.1-5
- Rebuilt for Python 3.12
* Sat Apr 08 2023 Orion Poplawski <orion@nwra.com> - 8.0.1-4
- Rebuild with octave 8.1.0
* Sun Mar 05 2023 Dmitrij S. Kryzhevich <kryzhev@ispms.ru> - 8.0.1-3
- Fix -[wx,fltk,qt5]-devel dependencies.
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Oct 06 2022 Orion Poplawski <orion@nwra.com> - 8.0.1-1
- Update to 8.0.1
- Drop Qt4 support
* Tue Aug 23 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.4.4-18
- Rebuild for gsl-2.7.1
* Thu Aug 04 2022 Scott Talbert <swt@techie.net> - 2.4.4-17
- Rebuild with wxWidgets 3.2
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.4-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.4.4-15
- Rebuilt for Python 3.11
* Wed Jun 01 2022 Orion Poplawski <orion@nwra.com> - 2.4.4-14
- Rebuild for octave 7.1
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.4-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sun Nov 21 2021 Orion Poplawski <orion@nwra.com> - 2.4.4-12
- Rebuild for hdf5 1.12.1
* Wed Aug 11 2021 Orion Poplawski <orion@nwra.com> - 2.4.4-11
- Rebuild for hdf5 1.10.7/octave 6.3.0
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.4.4-9
- Rebuilt for Python 3.10
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Thu Jul 30 2020 Dmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.4.4-7
- Fix mpi build for that great cmake macro update.
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jun 25 2020 Orion Poplawski <orion@nwra.com> - 2.4.4-5
- Rebuild for hdf5 1.10.6
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.4.4-4
- Rebuilt for Python 3.9
* Mon Mar 02 2020 Dmitrij S. Kryzhevich <kryzhev@ispms.ru> - 2.4.4-3
- Remove octave tar.gz from -fonts subpackage.
- Disable rebuild of l10n. Fix rhbz #1808694.
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Oct 04 2019 Gwyn Ciesla <gwync@protonmail.com> - 2.4.4-1
- 2.4.4, Rebuilt for new freeglut
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2.1-12
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Wed Aug 21 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2.1-11
- Rebuilt for Python 3.8
* Tue Aug 20 2019 Susi Lehtola <jussilehtola@fedoraproject.org> - 2.4.2.1-10
- Rebuilt for GSL 2.6.
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.2.1-9
- Rebuilt for Python 3.8
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.2.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Jun 16 2019 Orion Poplawski <orion@nwra.com> - 2.4.2.1-7
- Rebuild for octave 5.1
* Wed Apr 24 2019 Björn Esser <besser82@fedoraproject.org> - 2.4.2.1-6
- Remove hardcoded gzip suffix from GNU info pages
* Tue Mar 12 2019 Orion Poplawski <orion@nwra.com> - 2.4.2.1-5
- Rebuild for hdf5 1.10.5
* Thu Feb 14 2019 Orion Poplawski <orion@nwra.com> - 2.4.2.1-4
- Rebuild for openmpi 3.1.3

View File

@ -1 +1 @@
SHA512 (mathgl-8.0.1.tar.gz) = 1ff3023f1bbd7bfd84202777a0166a8d4255a020a07f3650b9858929345bc8a2ceea4db155d2c93ba32b762d2304474276290a9edac99fda70fb4b5bc12982c2
SHA512 (mathgl-2.4.2.1.tar.gz) = bc8c38af0a2e0e09666a2488078c2ed3caee13437fc44e9edccfeecb6e486c55af9ad5069ddf53213bd3592ceea823942b6fb56ad47f68c7c0628f2d31316247