Compare commits
168 Commits
mathgl-1_1
...
rawhide
Author | SHA1 | Date | |
---|---|---|---|
|
23e53f7622 | ||
|
6bd6c49a3d | ||
|
209bb4b576 | ||
|
6705c9fc03 | ||
|
c1e8f80bf3 | ||
|
0a063715e3 | ||
|
cc28cd133f | ||
|
6c54689497 | ||
|
1cbcdb6253 | ||
|
2c0af01542 | ||
|
d333a26084 | ||
|
36fbfc4ac0 | ||
|
9f566bbb64 | ||
|
13afb2ae6f | ||
|
b1b6d918d9 | ||
|
45e45451cf | ||
|
e87d4db28b | ||
|
2356829724 | ||
|
0f527bb799 | ||
|
149ebf7aae | ||
|
7705ffac66 | ||
|
6c6e932735 | ||
|
b7a0ac12fd | ||
|
822f9f6950 | ||
|
44443919ca | ||
|
889ec31627 | ||
|
8c048f3b40 | ||
|
e08a8ca0f7 | ||
|
ca69e9e201 | ||
|
27cc50b4a4 | ||
|
5abf628d08 | ||
|
ca879dea07 | ||
|
11cb479135 | ||
|
73fbd28a85 | ||
|
9fa53a68b2 | ||
|
f77e6e468c | ||
|
d88cdcd5ea | ||
|
49000c67f4 | ||
|
5a06b01b39 | ||
|
0fa50d4998 | ||
|
c35f70ba7f | ||
|
62eff8cf24 | ||
|
d2b9b2590e | ||
|
8c5ddaf747 | ||
|
27ba391861 | ||
|
f38c043186 | ||
|
00455aeb4a | ||
|
94c3488a60 | ||
|
50e60e4989 | ||
|
8502ab82d8 | ||
|
0f6c4cabc8 | ||
|
09bdd5ea52 | ||
|
4fc1cbbd0b | ||
|
9ae8268e75 | ||
|
cd26ff0d9f | ||
|
4d76246a8d | ||
|
62f0c74f8f | ||
|
2dc12f4d56 | ||
|
5b50f46fa0 | ||
|
79a4b5005b | ||
|
5748d3de69 | ||
|
77811651f3 | ||
|
23bf7489e1 | ||
|
79424f8411 | ||
|
db3b47a5ab | ||
|
1012c667b2 | ||
|
ce1f856f17 | ||
|
1a12a6bde1 | ||
|
005385c8c4 | ||
|
6b308cbc81 | ||
|
987f6cda30 | ||
|
1c9b1da854 | ||
|
71147855b6 | ||
|
d0c5c2d719 | ||
|
4bd48a67fe | ||
|
f06fc42204 | ||
|
acf2c98997 | ||
|
74956cd2be | ||
|
2575ff2531 | ||
|
af4c414c17 | ||
|
acf09c76f0 | ||
|
af9f4d025b | ||
|
41df04d438 | ||
|
1322f5b5d8 | ||
|
152a496cfe | ||
|
55894b45d2 | ||
|
6c2ce48c91 | ||
|
65491e598f | ||
|
1aefcc8ff7 | ||
|
2c8a1bf180 | ||
|
f60b59552a | ||
|
14258ab0df | ||
|
a48dbb0648 | ||
|
b2e677b859 | ||
|
0daea8c0d2 | ||
|
0823966c8f | ||
|
7d33fc1ac5 | ||
|
14e72b0a2a | ||
|
3740ae5465 | ||
|
da6055e81d | ||
|
9fd7846890 | ||
|
bd259c89b2 | ||
|
be994959cc | ||
|
5ce4115a0c | ||
|
6c65129671 | ||
|
13b9fcc935 | ||
|
958976e450 | ||
|
bfd58002f8 | ||
|
bded599e74 | ||
|
ed28a485eb | ||
|
0463772e18 | ||
|
0eeb189c1d | ||
|
a1ee592f38 | ||
|
b8434f6847 | ||
|
6cb47c9b83 | ||
|
e9402f61bc | ||
|
26a860c022 | ||
|
6c8c26edc8 | ||
|
2fc8359baf | ||
|
06ab450749 | ||
|
6b07609865 | ||
|
8d5a4631e9 | ||
|
aff82bdb33 | ||
|
6731669726 | ||
|
b35340c1eb | ||
|
fefea002b6 | ||
|
7a91c293dc | ||
|
a779762ff7 | ||
|
37a75ce4e7 | ||
|
a67b05593f | ||
|
fc7be90f14 | ||
|
f138b8a871 | ||
|
e6b80d2198 | ||
|
409110a484 | ||
|
d43abf432f | ||
|
a24724a92f | ||
|
bb1e50e87f | ||
|
1562ead908 | ||
|
2f436426e1 | ||
|
f69c1f8628 | ||
|
257104723c | ||
|
51499f4af9 | ||
|
82670a5135 | ||
|
7578bf3511 | ||
|
329d1ccda2 | ||
|
a1c28aa475 | ||
|
e134ad2565 | ||
|
34086633a8 | ||
|
b783e78697 | ||
|
f774830791 | ||
|
152ad15120 | ||
|
c0ca5b214b | ||
|
c3bc9e3d51 | ||
|
08e3984539 | ||
|
336e63d9ff | ||
|
7ceadf87d1 | ||
|
71c1e14e49 | ||
|
d7d7688b83 | ||
|
3c3761f583 | ||
|
84f1386c16 | ||
|
4cb2271a96 | ||
|
76fb802748 | ||
|
39f9fd1eb1 | ||
|
d2eb92c5f7 | ||
|
b8b8f21401 | ||
|
e62dcee558 | ||
|
ed8f03b6e7 | ||
|
2d76349675 |
@ -1 +0,0 @@
|
|||||||
mathgl-1.10.2.1.tgz
|
|
15
.gitignore
vendored
Normal file
15
.gitignore
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
mathgl-1.10.2.1.tgz
|
||||||
|
/mathgl-1.11.0.1.tgz
|
||||||
|
/mathgl-1.11.2.tar.gz
|
||||||
|
/mathgl-1.11.3.tar.gz
|
||||||
|
/mathgl-2.1.2.tar.gz
|
||||||
|
/mathgl-2.2.tar.gz
|
||||||
|
/mathgl-2.2.1.tar.gz
|
||||||
|
/mathgl-2.3.tar.gz
|
||||||
|
/mathgl-2.3.3.tar.gz
|
||||||
|
/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
|
||||||
|
/mathgl-2.4.4.tar.gz
|
||||||
|
/mathgl-8.0.1.tar.gz
|
21
Makefile
21
Makefile
@ -1,21 +0,0 @@
|
|||||||
# Makefile for source rpm: mathgl
|
|
||||||
# $Id: Makefile,v 1.1 2009/09/14 05:04:20 kevin Exp $
|
|
||||||
NAME := mathgl
|
|
||||||
SPECFILE = $(firstword $(wildcard *.spec))
|
|
||||||
|
|
||||||
define find-makefile-common
|
|
||||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
|
||||||
|
|
||||||
ifeq ($(MAKEFILE_COMMON),)
|
|
||||||
# attept a checkout
|
|
||||||
define checkout-makefile-common
|
|
||||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(MAKEFILE_COMMON)
|
|
@ -1 +0,0 @@
|
|||||||
mathgl-1_9-6_fc10:HEAD:mathgl-1.9-6.fc10.src.rpm:1252925836
|
|
11
mathgl-2.4.1-fltk-skip-fluid.patch
Normal file
11
mathgl-2.4.1-fltk-skip-fluid.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -urp mathgl-2.4.1/CMakeLists.txt mathgl-2.4.1-fluid/CMakeLists.txt
|
||||||
|
--- mathgl-2.4.1/CMakeLists.txt 2017-12-05 11:49:15.767073586 +0700
|
||||||
|
+++ mathgl-2.4.1-fluid/CMakeLists.txt 2017-12-05 11:53:07.085161409 +0700
|
||||||
|
@@ -556,6 +556,7 @@ endif(enable-glut)
|
||||||
|
|
||||||
|
if(enable-fltk)
|
||||||
|
set(MGL_HAVE_FLTK 1)
|
||||||
|
+ set(FLTK_SKIP_FLUID 1)
|
||||||
|
FIND_PACKAGE(FLTK)
|
||||||
|
if(NOT FLTK_FOUND)
|
||||||
|
message(SEND_ERROR "Couldn't find FLTK library.")
|
23
mathgl-2.4.1-gcc7.patch
Normal file
23
mathgl-2.4.1-gcc7.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
diff -urp mathgl-2.4.1/examples/wx_example.cpp mathgl-2.4.1-gcc7/examples/wx_example.cpp
|
||||||
|
--- mathgl-2.4.1/examples/wx_example.cpp 2017-12-05 12:02:01.771791180 +0700
|
||||||
|
+++ mathgl-2.4.1-gcc7/examples/wx_example.cpp 2017-12-05 15:41:42.622938431 +0700
|
||||||
|
@@ -53,7 +53,7 @@ IMPLEMENT_APP(testApp)
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
bool testApp::OnInit()
|
||||||
|
{
|
||||||
|
- testFrame* frame = new testFrame(0L, _("MathGL + wxWidgets sample"));
|
||||||
|
+ testFrame* frame = new testFrame(0L, wxString(_("MathGL + wxWidgets sample")));
|
||||||
|
frame->Show();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@@ -68,8 +68,8 @@ testFrame::testFrame(wxFrame *frame, con
|
||||||
|
// create a menu bar
|
||||||
|
wxMenuBar* mbar = new wxMenuBar();
|
||||||
|
wxMenu* fileMenu = new wxMenu(_T(""));
|
||||||
|
- fileMenu->Append(idMenuQuit, _("&Quit\tAlt-F4"), _("Quit the application"));
|
||||||
|
- mbar->Append(fileMenu, _("&File"));
|
||||||
|
+ fileMenu->Append(idMenuQuit, wxString(_("&Quit\tAlt-F4")), wxString(_("Quit the application")));
|
||||||
|
+ mbar->Append(fileMenu, wxString(_("&File")));
|
||||||
|
SetMenuBar(mbar);
|
||||||
|
SetSize(800,620);
|
||||||
|
|
13
mathgl-2.4.1-no_hdf4-and-hdf5-simultaneously.patch
Normal file
13
mathgl-2.4.1-no_hdf4-and-hdf5-simultaneously.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff -urp mathgl-2.4.1/CMakeLists.txt mathgl-2.4.1-no_hdf4-and-hdf5-simultaneously/CMakeLists.txt
|
||||||
|
--- mathgl-2.4.1/CMakeLists.txt 2017-12-05 11:55:05.173632219 +0700
|
||||||
|
+++ mathgl-2.4.1-no_hdf4-and-hdf5-simultaneously/CMakeLists.txt 2017-12-05 11:56:38.303638637 +0700
|
||||||
|
@@ -179,7 +179,8 @@ CMAKE_DEPENDENT_OPTION(enable-zlib "Enab
|
||||||
|
CMAKE_DEPENDENT_OPTION(enable-png "Enable png support" ON "NOT enable-all" ON)
|
||||||
|
CMAKE_DEPENDENT_OPTION(enable-jpeg "Enable jpeg support" OFF "NOT enable-all" ON)
|
||||||
|
MGL_DEPENDENT_OPTION(enable-gsl "Enable gsl support" OFF "NOT enable-lgpl" ON "NOT enable-all" ON)
|
||||||
|
-MGL_DEPENDENT_OPTION(enable-hdf4 "Enable hdf4 support" OFF "NOT enable-lgpl" ON "NOT enable-all" ON)
|
||||||
|
+#MGL_DEPENDENT_OPTION(enable-hdf4 "Enable hdf4 support" OFF "NOT enable-lgpl" ON "NOT enable-all" ON)
|
||||||
|
+SET(enable-hdf4 OFF)
|
||||||
|
MGL_DEPENDENT_OPTION(enable-hdf5 "Enable hdf5 support" OFF "NOT enable-lgpl" ON "NOT enable-all" ON)
|
||||||
|
CMAKE_DEPENDENT_OPTION(enable-pdf "Enable pdf support" OFF "NOT enable-all" ON)
|
||||||
|
CMAKE_DEPENDENT_OPTION(enable-gif "Enable gif support" OFF "NOT enable-all" ON)
|
29
mathgl-2.4.1-no_updatedb.patch
Normal file
29
mathgl-2.4.1-no_updatedb.patch
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
diff -urp mathgl-2.4.1/mgllab/CMakeLists.txt mathgl-2.4.1-no_udaveupdatedb/mgllab/CMakeLists.txt
|
||||||
|
--- mathgl-2.4.1/mgllab/CMakeLists.txt 2017-12-05 12:02:01.765791309 +0700
|
||||||
|
+++ mathgl-2.4.1-no_udaveupdatedb/mgllab/CMakeLists.txt 2017-12-06 08:58:18.269129131 +0700
|
||||||
|
@@ -51,7 +51,7 @@ if(MGL_HAVE_FLTK)
|
||||||
|
find_program(findupmdb update-mime-database)
|
||||||
|
if(findupmdb)
|
||||||
|
install(FILES ${CMAKE_BINARY_DIR}/mgllab/mgl.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/mime/packages/)
|
||||||
|
- install(CODE "execute_process(COMMAND \"${findupmdb}\" \"${CMAKE_INSTALL_PREFIX}/share/mime\")")
|
||||||
|
+# install(CODE "execute_process(COMMAND \"${findupmdb}\" \"${CMAKE_INSTALL_PREFIX}/share/mime\")")
|
||||||
|
endif(findupmdb)
|
||||||
|
|
||||||
|
mgl_po_src(${mgllab_src} ${mgllab_hdr})
|
||||||
|
diff -urp mathgl-2.4.1/udav/CMakeLists.txt mathgl-2.4.1-no_udaveupdatedb/udav/CMakeLists.txt
|
||||||
|
--- mathgl-2.4.1/udav/CMakeLists.txt 2017-12-05 12:02:01.762791373 +0700
|
||||||
|
+++ mathgl-2.4.1-no_udaveupdatedb/udav/CMakeLists.txt 2017-12-05 17:58:07.349289539 +0700
|
||||||
|
@@ -49,11 +49,11 @@ install(FILES udav_ru.qm DESTINATION ${C
|
||||||
|
find_program(findupddb update-desktop-database)
|
||||||
|
if(findupddb)
|
||||||
|
install(FILES udav.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/)
|
||||||
|
- install(CODE "execute_process(COMMAND \"${findupddb}\" \"${CMAKE_INSTALL_PREFIX}/share/applications\")")
|
||||||
|
+# install(CODE "execute_process(COMMAND \"${findupddb}\" \"${CMAKE_INSTALL_PREFIX}/share/applications\")")
|
||||||
|
endif(findupddb)
|
||||||
|
find_program(findupmdb update-mime-database)
|
||||||
|
if(findupmdb)
|
||||||
|
install(FILES ${CMAKE_BINARY_DIR}/udav/mgl.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/mime/packages/)
|
||||||
|
- install(CODE "execute_process(COMMAND \"${findupmdb}\" \"${CMAKE_INSTALL_PREFIX}/share/mime\")")
|
||||||
|
+# install(CODE "execute_process(COMMAND \"${findupmdb}\" \"${CMAKE_INSTALL_PREFIX}/share/mime\")")
|
||||||
|
endif(findupmdb)
|
||||||
|
endif(QT_ENABLED)
|
13
mathgl-2.4.1-nooctave.patch
Normal file
13
mathgl-2.4.1-nooctave.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff -urp mathgl-2.4.1/CMakeLists.txt mathgl-2.4.1-nooctave/CMakeLists.txt
|
||||||
|
--- mathgl-2.4.1/CMakeLists.txt 2017-12-05 11:59:25.413103840 +0700
|
||||||
|
+++ mathgl-2.4.1-nooctave/CMakeLists.txt 2017-12-05 12:01:15.317779072 +0700
|
||||||
|
@@ -233,7 +233,8 @@ CMAKE_DEPENDENT_OPTION(enable-json-sampl
|
||||||
|
CMAKE_DEPENDENT_OPTION(enable-json-sample-we "Enable JSON sample (WebEngine variant)." OFF "enable-json-sample" 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)
|
||||||
|
+#MGL_DEPENDENT_OPTION(enable-octave "Enable octave interface" OFF "NOT enable-lgpl" ON "NOT enable-all-swig" ON)
|
||||||
|
+SET(enable-octave OFF)
|
||||||
|
MGL_DEPENDENT_OPTION(enable-octave-install "Octave interface will install for all users" ON "NOT enable-lgpl" ON "NOT enable-all-swig" ON)
|
||||||
|
|
||||||
|
include_directories( ${MathGL2_SOURCE_DIR}/include ${MathGL2_BINARY_DIR}/include)
|
51
mathgl-2.4.2-examples.patch
Normal file
51
mathgl-2.4.2-examples.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
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(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)
|
||||||
|
+ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_fltk_example)
|
||||||
|
endif(MGL_HAVE_FLTK)
|
||||||
|
|
||||||
|
if(MGL_HAVE_GLUT)
|
||||||
|
add_executable(mgl_glut_example wnd_samples.cpp glut_example.cpp)
|
||||||
|
target_link_libraries(mgl_glut_example mgl-glut)
|
||||||
|
+ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_glut_example)
|
||||||
|
endif(MGL_HAVE_GLUT)
|
||||||
|
|
||||||
|
if(MGL_HAVE_WX)
|
||||||
|
include(${wxWidgets_USE_FILE})
|
||||||
|
add_executable(mgl_wx_example wnd_samples.cpp wx_example.cpp)
|
||||||
|
target_link_libraries(mgl_wx_example mgl-wx)
|
||||||
|
+ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_wx_example)
|
||||||
|
endif(MGL_HAVE_WX)
|
||||||
|
|
||||||
|
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)
|
||||||
|
+ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_qgl_example)
|
||||||
|
endif(MGL_HAVE_OPENGL)
|
||||||
|
+ SET(MGL_INSTALL_EXAMPLES_LIST ${MGL_INSTALL_EXAMPLES_LIST} mgl_qt_example)
|
||||||
|
endif(QT_ENABLED)
|
||||||
|
|
||||||
|
if(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
|
||||||
|
+)
|
11
mathgl-2.4.2.1-norebuild_l10n.patch
Normal file
11
mathgl-2.4.2.1-norebuild_l10n.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
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)
|
@ -1,34 +0,0 @@
|
|||||||
--- examples/Makefile.am.org 2010-04-14 22:11:30.868130523 +0100
|
|
||||||
+++ examples/Makefile.am 2010-04-14 22:20:08.230133173 +0100
|
|
||||||
@@ -8,19 +8,19 @@
|
|
||||||
if USE_FLTK
|
|
||||||
bin_PROGRAMS += mgl_fltk_example
|
|
||||||
mgl_fltk_example_SOURCES = wnd_samples.cpp fltk_example.cpp
|
|
||||||
-mgl_fltk_example_LDADD = $(FLTK_LIBS) $(top_builddir)/widgets/libmgl-fltk.la
|
|
||||||
+mgl_fltk_example_LDADD = $(FLTK_LIBS) $(top_builddir)/widgets/libmgl-fltk.la $(top_builddir)/mgl/libmgl.la
|
|
||||||
mgl_fltk_example_CXXFLAGS = $(FLTK_FLAGS) $(AM_CXXFLAGS)
|
|
||||||
|
|
||||||
check_PROGRAMS += test
|
|
||||||
test_SOURCES = wnd_samples.cpp main.cpp
|
|
||||||
-test_LDADD = $(FLTK_LIBS) $(top_builddir)/widgets/libmgl-fltk.la
|
|
||||||
+test_LDADD = $(FLTK_LIBS) $(top_builddir)/widgets/libmgl-fltk.la $(top_builddir)/mgl/libmgl.la
|
|
||||||
test_CXXFLAGS = $(FLTK_FLAGS) $(AM_CXXFLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_GLUT
|
|
||||||
bin_PROGRAMS += mgl_glut_example
|
|
||||||
mgl_glut_example_SOURCES = wnd_samples.cpp glut_example.cpp
|
|
||||||
-mgl_glut_example_LDADD = $(top_builddir)/widgets/libmgl-glut.la
|
|
||||||
+mgl_glut_example_LDADD = $(top_builddir)/widgets/libmgl-glut.la $(top_builddir)/mgl/libmgl.la
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_WX
|
|
||||||
@@ -36,7 +36,7 @@
|
|
||||||
|
|
||||||
bin_PROGRAMS += mgl_qt_example
|
|
||||||
mgl_qt_example_SOURCES = wnd_samples.cpp $(top_builddir)/include/mgl/mgl_qt.moc.cpp $(top_srcdir)/include/mgl/mgl_qt.h qt_example.cpp
|
|
||||||
-mgl_qt_example_LDADD = $(QT_LIBS) $(top_builddir)/widgets/libmgl-qt.la
|
|
||||||
+mgl_qt_example_LDADD = $(QT_LIBS) $(top_builddir)/widgets/libmgl-qt.la $(top_builddir)/mgl/libmgl.la
|
|
||||||
mgl_qt_example_LDFLAGS = $(QT_LDFLAGS)
|
|
||||||
mgl_qt_example_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS)
|
|
||||||
mgl_qt_example_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS)
|
|
43
mathgl-freeglut.patch
Normal file
43
mathgl-freeglut.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
--- 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)
|
@ -1,20 +0,0 @@
|
|||||||
Index: mathgl/texinfo/mathgl.texi
|
|
||||||
===================================================================
|
|
||||||
--- texinfo/mathgl_en.texi 2009-03-04 13:22:15.000000000 +0000
|
|
||||||
+++ texinfo/mathgl_en.texi 2009-05-27 17:39:59.000000000 +0100
|
|
||||||
@@ -25,10 +25,10 @@
|
|
||||||
@end quotation
|
|
||||||
@end copying
|
|
||||||
|
|
||||||
-@c @dircategory MathGL documentation system
|
|
||||||
-@c @direntry
|
|
||||||
-@c * MathGL: (mathgl). The library for scientific graphics.
|
|
||||||
-@c @end direntry
|
|
||||||
+@dircategory MathGL documentation system
|
|
||||||
+@direntry
|
|
||||||
+* MathGL: (mathgl). The library for scientific graphics.
|
|
||||||
+@end direntry
|
|
||||||
|
|
||||||
@titlepage
|
|
||||||
@title MathGL
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
--- mgl/mgl_data_io.cpp 2009-07-02 01:49:42.000000000 +1000
|
|
||||||
+++ mgl/mgl_data_io.cpp.new 2009-07-25 12:16:55.000000000 +1000
|
|
||||||
@@ -918,7 +918,7 @@
|
|
||||||
hid_t hf,hd,hs;
|
|
||||||
hsize_t dims[3];
|
|
||||||
long rank = 3, res;
|
|
||||||
- H5Eset_auto(0,0);
|
|
||||||
+ H5Eset_auto2(0,0,0);
|
|
||||||
res=H5Fis_hdf5(fname);
|
|
||||||
if(res>0 && !rewrite) hf = H5Fopen(fname, H5F_ACC_RDWR, H5P_DEFAULT);
|
|
||||||
else hf = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
|
||||||
@@ -928,10 +928,10 @@
|
|
||||||
else { rank = 3; dims[0] = nz; dims[1] = ny; dims[2] = nx; }
|
|
||||||
hs = H5Screate_simple(rank, dims, 0);
|
|
||||||
#if(MGL_USE_DOUBLE==1)
|
|
||||||
- hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT);
|
|
||||||
+ hd = H5Dcreate(hf, data, H5T_NATIVE_DOUBLE, hs, H5P_DEFAULT,H5P_DEFAULT);
|
|
||||||
H5Dwrite(hd, H5T_NATIVE_DOUBLE, hs, hs, H5P_DEFAULT, a);
|
|
||||||
#else
|
|
||||||
- hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT);
|
|
||||||
+ hd = H5Dcreate(hf, data, H5T_NATIVE_FLOAT, hs, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
|
|
||||||
H5Dwrite(hd, H5T_NATIVE_FLOAT, hs, hs, H5P_DEFAULT, a);
|
|
||||||
#endif
|
|
||||||
H5Dclose(hd); H5Sclose(hs); H5Fclose(hf);
|
|
||||||
@@ -943,7 +943,7 @@
|
|
||||||
hsize_t dims[3];
|
|
||||||
long rank;
|
|
||||||
hf = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT);
|
|
||||||
- hd = H5Dopen(hf,data);
|
|
||||||
+ hd = H5Dopen(hf,data,H5P_DEFAULT);
|
|
||||||
hs = H5Dget_space(hd);
|
|
||||||
rank = H5Sget_simple_extent_ndims(hs);
|
|
||||||
if(rank>0 && rank<=3)
|
|
367
mathgl-lang.patch
Normal file
367
mathgl-lang.patch
Normal file
@ -0,0 +1,367 @@
|
|||||||
|
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}
|
||||||
|
endif(enable-octave-install)
|
||||||
|
set(mgl_clean_files ${mgl_clean_files} mathgl)
|
||||||
|
endif(enable-octave)
|
||||||
|
+
|
||||||
|
+#add_subdirectory( python2 )
|
||||||
|
+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
|
||||||
|
@@ -97,7 +97,7 @@
|
||||||
|
{
|
||||||
|
/* Given a PyObject, return a string describing its type.
|
||||||
|
*/
|
||||||
|
- char* pytype_string(PyObject* py_obj) {
|
||||||
|
+ const char* pytype_string(PyObject* py_obj) {
|
||||||
|
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 @@
|
||||||
|
|
||||||
|
/* Given a NumPy typecode, return a string describing the type.
|
||||||
|
*/
|
||||||
|
- char* typecode_string(int typecode) {
|
||||||
|
- static char* type_names[25] = {"bool", "byte", "unsigned byte",
|
||||||
|
+ const char* typecode_string(int typecode) {
|
||||||
|
+ static const char* type_names[25] = {"bool", "byte", "unsigned byte",
|
||||||
|
"short", "unsigned short", "int",
|
||||||
|
"unsigned int", "long", "unsigned long",
|
||||||
|
"long long", "unsigned long long",
|
||||||
|
@@ -157,8 +157,8 @@
|
||||||
|
}
|
||||||
|
else if is_array(input)
|
||||||
|
{
|
||||||
|
- char* desired_type = typecode_string(typecode);
|
||||||
|
- char* actual_type = typecode_string(array_type(input));
|
||||||
|
+ const char* desired_type = typecode_string(typecode);
|
||||||
|
+ const char* actual_type = typecode_string(array_type(input));
|
||||||
|
PyErr_Format(PyExc_TypeError,
|
||||||
|
"Array of type '%s' required. Array of type '%s' given",
|
||||||
|
desired_type, actual_type);
|
||||||
|
@@ -166,8 +166,8 @@
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- char * desired_type = typecode_string(typecode);
|
||||||
|
- char * actual_type = pytype_string(input);
|
||||||
|
+ const char * desired_type = typecode_string(typecode);
|
||||||
|
+ const char * actual_type = pytype_string(input);
|
||||||
|
PyErr_Format(PyExc_TypeError,
|
||||||
|
"Array of type '%s' required. A '%s' was given",
|
||||||
|
desired_type, actual_type);
|
||||||
|
@@ -305,6 +305,95 @@
|
||||||
|
return ary1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* The following code was added by Ilmar M. Wilbers for forcing a copy of the
|
||||||
|
+ * object even when it is a NumPy array. This is meant for use with the
|
||||||
|
+ * IN_ARRAY typemaps, and allows the user to perform changes on an array
|
||||||
|
+ * without these chenges being reflected in the calling code.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+ /* Convert the given PyObject to a NumPy array with the given
|
||||||
|
+ * typecode as a copy. On success, return a valid PyArrayObject* with the
|
||||||
|
+ * correct type. On failure, the python error string will be set and
|
||||||
|
+ * the routine returns NULL.
|
||||||
|
+ */
|
||||||
|
+ PyArrayObject* obj_to_array_force_conversion(PyObject* input, int typecode,
|
||||||
|
+ int* is_new_object)
|
||||||
|
+ {
|
||||||
|
+ PyArrayObject* ary = NULL;
|
||||||
|
+ PyObject* py_obj;
|
||||||
|
+ if (is_array(input) && (typecode == NPY_NOTYPE ||
|
||||||
|
+ PyArray_EquivTypenums(array_type(input),typecode)))
|
||||||
|
+ {
|
||||||
|
+ py_obj = PyArray_Copy((PyArrayObject*) input);
|
||||||
|
+ ary = (PyArrayObject*) py_obj;
|
||||||
|
+ *is_new_object = 1;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_DEFAULT);
|
||||||
|
+ /* If NULL, PyArray_FromObject will have set python error value.*/
|
||||||
|
+ ary = (PyArrayObject*) py_obj;
|
||||||
|
+ *is_new_object = 1;
|
||||||
|
+ }
|
||||||
|
+ return ary;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Convert a given PyObject to a contiguous PyArrayObject of the
|
||||||
|
+ * specified type. If the input object is not a contiguous
|
||||||
|
+ * PyArrayObject, a new one will be created and the new object flag
|
||||||
|
+ * will be set.
|
||||||
|
+ */
|
||||||
|
+ PyArrayObject* obj_to_array_contiguous_force_conversion(PyObject* input,
|
||||||
|
+ int typecode,
|
||||||
|
+ int* is_new_object)
|
||||||
|
+ {
|
||||||
|
+ int is_new1 = 0;
|
||||||
|
+ int is_new2 = 0;
|
||||||
|
+ PyArrayObject* ary2;
|
||||||
|
+ PyArrayObject* ary1 = obj_to_array_force_conversion(input, typecode,
|
||||||
|
+ &is_new1);
|
||||||
|
+ if (ary1)
|
||||||
|
+ {
|
||||||
|
+ ary2 = make_contiguous(ary1, &is_new2, 0, 0);
|
||||||
|
+ if ( is_new1 && is_new2)
|
||||||
|
+ {
|
||||||
|
+ Py_DECREF(ary1);
|
||||||
|
+ }
|
||||||
|
+ ary1 = ary2;
|
||||||
|
+ }
|
||||||
|
+ *is_new_object = is_new1 || is_new2;
|
||||||
|
+ return ary1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Convert a given PyObject to a Fortran-ordered PyArrayObject of the
|
||||||
|
+ * specified type. If the input object is not a Fortran-ordered
|
||||||
|
+ * PyArrayObject, a new one will be created and the new object flag
|
||||||
|
+ * will be set.
|
||||||
|
+ */
|
||||||
|
+ PyArrayObject* obj_to_array_fortran_force_conversion(PyObject* input,
|
||||||
|
+ int typecode,
|
||||||
|
+ int* is_new_object)
|
||||||
|
+ {
|
||||||
|
+ int is_new1 = 0;
|
||||||
|
+ int is_new2 = 0;
|
||||||
|
+ PyArrayObject* ary2;
|
||||||
|
+ PyArrayObject* ary1 = obj_to_array_force_conversion(input, typecode,
|
||||||
|
+ &is_new1);
|
||||||
|
+ if (ary1)
|
||||||
|
+ {
|
||||||
|
+ ary2 = make_fortran(ary1, &is_new2, 0, 0);
|
||||||
|
+ if (is_new1 && is_new2)
|
||||||
|
+ {
|
||||||
|
+ Py_DECREF(ary1);
|
||||||
|
+ }
|
||||||
|
+ ary1 = ary2;
|
||||||
|
+ }
|
||||||
|
+ *is_new_object = is_new1 || is_new2;
|
||||||
|
+ return ary1;
|
||||||
|
+ }
|
||||||
|
+ /* End modifications by Ilmar M. Wilbers
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
} /* end fragment */
|
||||||
|
|
||||||
|
|
||||||
|
@@ -599,7 +688,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[1] = { $1_dim0 };
|
||||||
|
- array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_contiguous_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 1) ||
|
||||||
|
!require_size(array, size, 1)) SWIG_fail;
|
||||||
|
@@ -626,7 +715,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[1] = { -1 };
|
||||||
|
- array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_contiguous_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 1) ||
|
||||||
|
!require_size(array, size, 1)) SWIG_fail;
|
||||||
|
@@ -654,7 +743,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[1] = {-1};
|
||||||
|
- array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_contiguous_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 1) ||
|
||||||
|
!require_size(array, size, 1)) SWIG_fail;
|
||||||
|
@@ -682,7 +771,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[2] = { $1_dim0, $1_dim1 };
|
||||||
|
- array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_contiguous_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 2) ||
|
||||||
|
!require_size(array, size, 2)) SWIG_fail;
|
||||||
|
@@ -709,7 +798,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[2] = { -1, -1 };
|
||||||
|
- array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_contiguous_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 2) ||
|
||||||
|
!require_size(array, size, 2)) SWIG_fail;
|
||||||
|
@@ -738,7 +827,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[2] = { -1, -1 };
|
||||||
|
- array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_contiguous_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 2) ||
|
||||||
|
!require_size(array, size, 2)) SWIG_fail;
|
||||||
|
@@ -767,7 +856,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[2] = { -1, -1 };
|
||||||
|
- array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_fortran_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 2) ||
|
||||||
|
!require_size(array, size, 2) || !require_fortran(array)) SWIG_fail;
|
||||||
|
@@ -796,7 +885,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[2] = { -1, -1 };
|
||||||
|
- array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_contiguous_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 2) ||
|
||||||
|
!require_size(array, size, 2) || !require_fortran(array)) SWIG_fail;
|
||||||
|
@@ -825,7 +914,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[3] = { $1_dim0, $1_dim1, $1_dim2 };
|
||||||
|
- array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_contiguous_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 3) ||
|
||||||
|
!require_size(array, size, 3)) SWIG_fail;
|
||||||
|
@@ -853,7 +942,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[3] = { -1, -1, -1 };
|
||||||
|
- array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_contiguous_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 3) ||
|
||||||
|
!require_size(array, size, 3)) SWIG_fail;
|
||||||
|
@@ -884,7 +973,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[3] = { -1, -1, -1 };
|
||||||
|
- array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_contiguous_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 3) ||
|
||||||
|
!require_size(array, size, 3)) SWIG_fail;
|
||||||
|
@@ -915,7 +1004,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[3] = { -1, -1, -1 };
|
||||||
|
- array = obj_to_array_fortran_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_fortran_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 3) ||
|
||||||
|
!require_size(array, size, 3) | !require_fortran(array)) SWIG_fail;
|
||||||
|
@@ -946,7 +1035,7 @@
|
||||||
|
(PyArrayObject* array=NULL, int is_new_object=0)
|
||||||
|
{
|
||||||
|
npy_intp size[3] = { -1, -1, -1 };
|
||||||
|
- array = obj_to_array_contiguous_allow_conversion($input, DATA_TYPECODE,
|
||||||
|
+ array = obj_to_array_contiguous_force_conversion($input, DATA_TYPECODE,
|
||||||
|
&is_new_object);
|
||||||
|
if (!array || !require_dimensions(array, 3) ||
|
||||||
|
!require_size(array, size, 3) || !require_fortran(array)) SWIG_fail;
|
||||||
|
@@ -1289,7 +1378,7 @@
|
||||||
|
npy_intp dims[1];
|
||||||
|
if (!PyInt_Check($input))
|
||||||
|
{
|
||||||
|
- char* typestring = pytype_string($input);
|
||||||
|
+ const char* typestring = pytype_string($input);
|
||||||
|
PyErr_Format(PyExc_TypeError,
|
||||||
|
"Int dimension expected. '%s' given.",
|
||||||
|
typestring);
|
||||||
|
@@ -1317,7 +1406,7 @@
|
||||||
|
npy_intp dims[1];
|
||||||
|
if (!PyInt_Check($input))
|
||||||
|
{
|
||||||
|
- char* typestring = pytype_string($input);
|
||||||
|
+ const char* typestring = pytype_string($input);
|
||||||
|
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
|
||||||
|
@@ -0,0 +1,75 @@
|
||||||
|
+set(src_imp_dep
|
||||||
|
+../../include/mgl2/type.h
|
||||||
|
+../../include/mgl2/data.h
|
||||||
|
+../../include/mgl2/mgl.h
|
||||||
|
+../mgl.i
|
||||||
|
+../data.i
|
||||||
|
+../type.i
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
+set(mgl_clean_files "")
|
||||||
|
+
|
||||||
|
+SET_SOURCE_FILES_PROPERTIES(../mathgl.i ../numpy.i PROPERTIES CPLUSPLUS ON)
|
||||||
|
+
|
||||||
|
+if(enable-python)
|
||||||
|
+ set(Python_ADDITIONAL_VERSIONS 3.6)
|
||||||
|
+ unset(PYTHONINTERP_FOUND)
|
||||||
|
+ unset(PYTHON_EXECUTABLE CACHE)
|
||||||
|
+ FIND_PACKAGE(PythonInterp 3.6 REQUIRED)
|
||||||
|
+ if(NOT PYTHONINTERP_FOUND)
|
||||||
|
+ message(SEND_ERROR "Couldn't find python interpreter.")
|
||||||
|
+ endif(NOT PYTHONINTERP_FOUND)
|
||||||
|
+
|
||||||
|
+ unset(PYTHONLIBS_FOUND)
|
||||||
|
+ unset(PYTHON_LIBRARIES CACHE)
|
||||||
|
+ unset(PYTHON_INCLUDE_PATH CACHE)
|
||||||
|
+ unset(PYTHON_INCLUDE_DIRS CACHE)
|
||||||
|
+ unset(PYTHON_DEBUG_LIBRARIES CACHE)
|
||||||
|
+ unset(PYTHONLIBS_VERSION_STRING CACHE)
|
||||||
|
+ unset(PYTHON_LIBRARY CACHE)
|
||||||
|
+ unset(PYTHON_INCLUDE_DIR CACHE)
|
||||||
|
+ FIND_PACKAGE(PythonLibs 3.6)
|
||||||
|
+ 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_mathglp3_EXTRA_DEPS ../numpy.i ${src_imp_dep})
|
||||||
|
+ SWIG_ADD_MODULE(mathglp3 python ../mathgl.i)
|
||||||
|
+ SWIG_LINK_LIBRARIES(mathglp3 mgl ${PYTHON_LIBRARIES})
|
||||||
|
+ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('SO'))"
|
||||||
|
+ OUTPUT_VARIABLE MGL_PYTHON_LIB_SUFFIX
|
||||||
|
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
+ set_target_properties(_mathglp3 PROPERTIES
|
||||||
|
+ BUILD_WITH_INSTALL_RPATH ON
|
||||||
|
+ OUTPUT_NAME _mathgl
|
||||||
|
+ SUFFIX ${MGL_PYTHON_LIB_SUFFIX})
|
||||||
|
+ 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/python3
|
||||||
|
+ DEPENDS _mathglp3
|
||||||
|
+ )
|
||||||
|
+ add_custom_target(mgl_python_modulep3 ALL DEPENDS _mathglp3 mathgl.pyc)
|
||||||
|
+
|
||||||
|
+ 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 (TARGETS _mathglp3 LIBRARY DESTINATION ${MGL_PYTHON_SITE_PACKAGES})
|
||||||
|
+ set(mgl_clean_files ${mgl_clean_files} mathgl.py)
|
||||||
|
+endif(enable-python)
|
||||||
|
+
|
||||||
|
+set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${mgl_clean_files}")
|
25
mathgl-libharu2.4.patch
Normal file
25
mathgl-libharu2.4.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
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);
|
@ -1,14 +0,0 @@
|
|||||||
--- utils/Makefile.am.orig 2010-04-14 22:08:19.024131927 +0100
|
|
||||||
+++ utils/Makefile.am 2010-04-14 22:08:40.576140435 +0100
|
|
||||||
@@ -21,9 +21,10 @@
|
|
||||||
mgl2svg_SOURCES = mgl2svg.cpp
|
|
||||||
mgl2svg_LDADD = $(top_builddir)/mgl/libmgl.la
|
|
||||||
|
|
||||||
+
|
|
||||||
if USE_FLTK
|
|
||||||
mglview_SOURCES = mglview.cpp
|
|
||||||
-mglview_LDADD = $(top_builddir)/widgets/libmgl-fltk.la
|
|
||||||
+mglview_LDADD = $(top_builddir)/widgets/libmgl-fltk.la $(top_builddir)/mgl/libmgl.la
|
|
||||||
mglview_CXXFLAGS = $(FLTK_FLAGS) $(AM_CXXFLAGS)
|
|
||||||
endif
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
--- examples/Makefile.am 2010-01-02 10:56:23.000000000 +1100
|
|
||||||
+++ examples/Makefile.am.new 2010-01-02 10:57:38.000000000 +1100
|
|
||||||
@@ -24,10 +24,10 @@
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_WX
|
|
||||||
-bin_PROGRAMS += mgl_wx_example
|
|
||||||
-mgl_wx_example_LDADD = $(WX_LIBS) $(top_builddir)/widgets/libmgl-wx.la
|
|
||||||
-mgl_wx_example_CXXFLAGS = $(WX_FLAGS) $(AM_CXXFLAGS)
|
|
||||||
-mgl_wx_example_SOURCES = wnd_samples.cpp wx_example.cpp
|
|
||||||
+#bin_PROGRAMS += mgl_wx_example
|
|
||||||
+#mgl_wx_example_LDADD = $(WX_LIBS) $(top_builddir)/widgets/libmgl-wx.la
|
|
||||||
+#mgl_wx_example_CXXFLAGS = $(WX_FLAGS) $(AM_CXXFLAGS)
|
|
||||||
+#mgl_wx_example_SOURCES = wnd_samples.cpp wx_example.cpp
|
|
||||||
endif
|
|
||||||
|
|
||||||
if USE_QT
|
|
15
mathgl-nooctaveinstall.patch
Normal file
15
mathgl-nooctaveinstall.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
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}
|
||||||
|
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}")
|
@ -1,11 +0,0 @@
|
|||||||
--- Makefile.am.orig 2010-04-14 22:34:02.671143647 +0100
|
|
||||||
+++ Makefile.am 2010-04-14 22:34:07.963146109 +0100
|
|
||||||
@@ -13,7 +13,7 @@
|
|
||||||
|
|
||||||
install-data-local: $(doctargets)
|
|
||||||
mkdir -p $(mgldest)
|
|
||||||
- cp -r $(top_srcdir)/fonts/*.vfm $(mgldest)
|
|
||||||
+# cp -r $(top_srcdir)/fonts/*.vfm $(mgldest)
|
|
||||||
|
|
||||||
uninstall-local:
|
|
||||||
rm -rf $(mgldest)
|
|
@ -1,11 +0,0 @@
|
|||||||
--- texinfo/png/Makefile.am 2009-07-02 01:50:09.000000000 +1000
|
|
||||||
+++ texinfo/png/Makefile.am.new 2009-07-25 12:36:15.000000000 +1000
|
|
||||||
@@ -18,7 +18,7 @@
|
|
||||||
type2.png vect3.png vectc3.png vectc.png vect.png
|
|
||||||
|
|
||||||
pngdir = $(docdir)/png
|
|
||||||
-png_DATA = all.png $(png_images)
|
|
||||||
+png_DATA = all.png
|
|
||||||
CLEANFILES = all.png $(png_images)
|
|
||||||
all.png: hotdogs.pts
|
|
||||||
$(top_builddir)/examples/mgl_example
|
|
1111
mathgl.spec
1111
mathgl.spec
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user