Index: head/math/Makefile =================================================================== --- head/math/Makefile +++ head/math/Makefile @@ -301,6 +301,7 @@ SUBDIR += lybniz SUBDIR += mate-calc SUBDIR += math77 + SUBDIR += mathgl SUBDIR += mathmod SUBDIR += mathomatic SUBDIR += matio Index: head/math/mathgl/Makefile =================================================================== --- head/math/mathgl/Makefile +++ head/math/mathgl/Makefile @@ -0,0 +1,73 @@ +# $FreeBSD$ + +PORTNAME= mathgl +DISTVERSION= 2.4.1 +CATEGORIES= math graphics +MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}%20${PORTVERSION} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Library for high-quality scientific data visualization + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING + +LIB_DEPENDS= libgif.so:graphics/giflib \ + libgsl.so:math/gsl \ + libhdf5.so:science/hdf5 \ + libhpdf.so:print/libharu \ + libltdl.so:devel/libltdl \ + libpng16.so:graphics/png \ + libsz.so:science/szip + +USES= cmake:outsource jpeg gettext-runtime python:2.7 +USE_GL= gl glu glut +USE_XORG= xi xmu +USE_LDCONFIG= yes + +.for v in double gif glut gsl hdf5 jpeg ltdl mgl2 opengl pdf png zlib +CMAKE_ARGS+= -Denable-${v}=ON +.endfor + +.for v in doc-info doc-html lgpl mgltex +CMAKE_ARGS+= -Denable-${v}=OFF +.endfor + +OPTIONS_DEFINE= PYTHON MPI +OPTIONS_GROUP= GRAPHICS +OPTIONS_GROUP_GRAPHICS= QT5 FLTK WXGTK +OPTIONS_RADIO= THREADS +OPTIONS_RADIO_THREADS= PTHREADS OPENMP +OPTIONS_DEFAULT= QT5 +OPTIONS_SUB= yes +GRAPHICS_DESC= Graphics support +PTHREADS_DESC= Enable POSIX threads support (broken, fix pending release) +OPENMP_DESC= Parallel processing support via OpenMP (broken, cmake bug) +FLTK_DESC= Enable fltk widget +PLIST_SUB= SHLIB_VER=7.5.0 + +PYTHON_CMAKE_BOOL= enable-python +PYTHON_BUILD_DEPENDS= swig3.0:devel/swig30 \ + ${PYNUMPY} +PYTHON_RUN_DEPENDS= ${PYNUMPY} +MPI_CMAKE_BOOL= enable-mpi +MPI_LIB_DEPENDS= libmpi.so:net/openmpi + +QT5_CMAKE_BOOL= enable-qt5 +QT5_USE= QT5=core,gui,opengl,printsupport,widgets,buildtools_build,qmake_build +QT5_USES= desktop-file-utils shared-mime-info +FLTK_CMAKE_BOOL= enable-fltk +FLTK_LIB_DEPENDS= libfltk.so:x11-toolkits/fltk +FLTK_USE= XORG=ice,sm,x11,xext +WXGTK_CMAKE_BOOL= wx +WXGTK_USE= WX=3.0+ + +PTHREADS_CMAKE_BOOL= enable-pthread +OPENMP_CMAKE_BOOL= enable-openmp + +post-patch-FLTK-on: + @${REINPLACE_CMD} -e 's|#include Index: head/math/mathgl/distinfo =================================================================== --- head/math/mathgl/distinfo +++ head/math/mathgl/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1505889476 +SHA256 (mathgl-2.4.1.tar.gz) = 751488bb9454c057d6e2828867dd56e00507c84a47efa1b8546da55a3455a588 +SIZE (mathgl-2.4.1.tar.gz) = 22665490 Index: head/math/mathgl/files/patch-CMakeLists.txt =================================================================== --- head/math/mathgl/files/patch-CMakeLists.txt +++ head/math/mathgl/files/patch-CMakeLists.txt @@ -0,0 +1,59 @@ +--- CMakeLists.txt.orig 2017-07-20 06:27:40 UTC ++++ CMakeLists.txt +@@ -59,13 +59,13 @@ function(mgl_add_lib mgl_tmp_lib) + set(mgl_src_lst ${ARGV}) + list(REMOVE_AT mgl_src_lst 0) + add_library(${mgllib} SHARED ${mgl_src_lst}) +- add_library(${mgllib}-static STATIC ${mgl_src_lst}) ++ #add_library(${mgllib}-static STATIC ${mgl_src_lst}) + set_target_properties(${mgllib} PROPERTIES SOVERSION ${MathGL_SOVERSION}) + set_target_properties(${mgllib} PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS") + set_target_properties(${mgllib} PROPERTIES C_VISIBILITY_PRESET hidden) + set_target_properties(${mgllib} PROPERTIES CXX_VISIBILITY_PRESET hidden) + set_target_properties(${mgllib} PROPERTIES VISIBILITY_INLINES_HIDDEN 1) +- target_compile_definitions(${mgllib}-static PUBLIC MGL_STATIC_DEFINE) ++ #target_compile_definitions(${mgllib}-static PUBLIC MGL_STATIC_DEFINE) + if(MSVC) + set(mgl_lib_static "-static") + if(CMAKE_BUILD_TYPE STREQUAL "Debug") +@@ -76,18 +76,18 @@ function(mgl_add_lib mgl_tmp_lib) + elseif(MSVC) + set(mgl_lib_static) + set_target_properties(${mgllib} PROPERTIES CLEAN_DIRECT_OUTPUT 1) +- set_target_properties(${mgllib}-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) ++ #set_target_properties(${mgllib}-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) + endif(MSVC) + if(enable-mgl2) + set_target_properties(${mgllib} PROPERTIES OUTPUT_NAME "${mgllib2}${mgl_lib_end}") +- set_target_properties(${mgllib}-static PROPERTIES OUTPUT_NAME "${mgllib2}${mgl_lib_static}${mgl_lib_end}") ++ #set_target_properties(${mgllib}-static PROPERTIES OUTPUT_NAME "${mgllib2}${mgl_lib_static}${mgl_lib_end}") + else(enable-mgl2) + set_target_properties(${mgllib} PROPERTIES OUTPUT_NAME "${mgllib}${mgl_lib_end}") +- set_target_properties(${mgllib}-static PROPERTIES OUTPUT_NAME "${mgllib}${mgl_lib_static}${mgl_lib_end}") ++ #set_target_properties(${mgllib}-static PROPERTIES OUTPUT_NAME "${mgllib}${mgl_lib_static}${mgl_lib_end}") + endif(enable-mgl2) + + install( +- TARGETS ${mgllib} ${mgllib}-static ++ TARGETS ${mgllib} + EXPORT MathGLTargets + RUNTIME DESTINATION ${MathGL_INSTALL_BIN_DIR} + ARCHIVE DESTINATION ${MathGL_INSTALL_LIB_DIR} +@@ -446,7 +446,7 @@ if(enable-hdf5) + set(MGL_HAVE_HDF5 1) + find_package(HDF5) + if(NOT HDF5_FOUND) +- find_package(HDF5 NAMES hdf5 COMPONENTS C shared static) ++ find_package(HDF5 NAMES hdf5 COMPONENTS C shared) + if(NOT HDF5_FOUND) + message(SEND_ERROR "Couldn't find HDF5 library.") + endif(NOT HDF5_FOUND) +@@ -715,7 +715,7 @@ if(NOT enable-lgpl) + add_subdirectory( lang ) + endif(enable-python OR enable-lua OR enable-octave) + add_subdirectory( utils ) +-add_subdirectory( examples ) ++#add_subdirectory( examples ) + if(NOT WIN32) + add_subdirectory( fonts ) + endif(NOT WIN32) Index: head/math/mathgl/files/patch-examples_CMakeLists.txt =================================================================== --- head/math/mathgl/files/patch-examples_CMakeLists.txt +++ head/math/mathgl/files/patch-examples_CMakeLists.txt @@ -0,0 +1,11 @@ +--- examples/CMakeLists.txt.orig 2017-07-20 06:27:54 UTC ++++ examples/CMakeLists.txt +@@ -1,7 +1,7 @@ + file(COPY ${CMAKE_SOURCE_DIR}/examples/iris.dat DESTINATION ${CMAKE_BINARY_DIR}/examples) + file(COPY ${CMAKE_SOURCE_DIR}/examples/Equirectangular-projection.jpg 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}) ++#target_link_libraries(mgl_example mgl-static ${getopt_lib-static}) + + if(MGL_HAVE_FLTK) + include_directories(${FLTK_INCLUDE_DIR}) Index: head/math/mathgl/files/patch-src_CMakeLists.txt =================================================================== --- head/math/mathgl/files/patch-src_CMakeLists.txt +++ head/math/mathgl/files/patch-src_CMakeLists.txt @@ -0,0 +1,19 @@ +--- src/CMakeLists.txt.orig 2017-07-20 06:27:15 UTC ++++ src/CMakeLists.txt +@@ -47,14 +47,14 @@ mgl_add_lib(mgl ${mgl_src} ${mgl_hdr}) + generate_export_header(mgl EXPORT_FILE_NAME ../include/mgl2/dllexport.h) + + target_link_libraries(mgl ${MGL_DEP_LIBS}) +-target_link_libraries(mgl-static ${MGL_DEP_LIBS}) ++#target_link_libraries(mgl-static ${MGL_DEP_LIBS}) + + mgl_po_src(${mgl_src} ${mgl_hdr}) + + if(MGL_HAVE_MPI) + mgl_add_lib(mpi mpi.cpp ../include/mgl2/mpi.h) + target_link_libraries(mgl-mpi ${MPI_LIBRARIES} ) +- target_link_libraries(mgl-mpi-static ${MPI_LIBRARIES} ) ++ #target_link_libraries(mgl-mpi-static ${MPI_LIBRARIES} ) + target_include_directories(mgl-mpi SYSTEM PUBLIC ${MPI_CXX_INCLUDE_PATH}) + endif(MGL_HAVE_MPI) + Index: head/math/mathgl/files/patch-widgets_CMakeLists.txt =================================================================== --- head/math/mathgl/files/patch-widgets_CMakeLists.txt +++ head/math/mathgl/files/patch-widgets_CMakeLists.txt @@ -0,0 +1,32 @@ +--- widgets/CMakeLists.txt.orig 2017-07-20 06:27:56 UTC ++++ widgets/CMakeLists.txt +@@ -3,24 +3,24 @@ include(GenerateExportHeader) + if(MGL_HAVE_FLTK) + mgl_add_lib(fltk fltk.cpp image.cpp image.h ../include/mgl2/fltk.h ../include/mgl2/Fl_MathGL.h) + target_include_directories(mgl-fltk SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) +- target_include_directories(mgl-fltk-static SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) ++ #target_include_directories(mgl-fltk-static SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) + target_link_libraries(mgl-fltk mgl ${FLTK_LIBRARIES}) +- target_link_libraries(mgl-fltk-static mgl-static ${FLTK_LIBRARIES}) ++ #target_link_libraries(mgl-fltk-static mgl-static ${FLTK_LIBRARIES}) + endif(MGL_HAVE_FLTK) + + 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_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_link_libraries(mgl-glut-static mgl-static ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES}) + endif(MGL_HAVE_GLUT) + + if(MGL_HAVE_WX) + mgl_add_lib(wx wx.cpp ../include/mgl2/wx.h) + include(${wxWidgets_USE_FILE}) + target_link_libraries(mgl-wx mgl ${wxWidgets_LIBRARIES}) +- target_link_libraries(mgl-wx-static mgl-static ${wxWidgets_LIBRARIES}) ++ #target_link_libraries(mgl-wx-static mgl-static ${wxWidgets_LIBRARIES}) + endif(MGL_HAVE_WX) + + add_subdirectory( qt4 ) Index: head/math/mathgl/files/patch-widgets_qt4_CMakeLists.txt =================================================================== --- head/math/mathgl/files/patch-widgets_qt4_CMakeLists.txt +++ head/math/mathgl/files/patch-widgets_qt4_CMakeLists.txt @@ -0,0 +1,25 @@ +--- widgets/qt4/CMakeLists.txt.orig 2017-07-20 06:27:56 UTC ++++ widgets/qt4/CMakeLists.txt +@@ -5,18 +5,18 @@ if(enable-qt4) + set(MGL_QT4_FILES ../qt.cpp ../../include/mgl2/qt.h ../../include/mgl2/qmathgl.h) + mgl_add_lib(qt4 ${MGL_QT4_FILES}) + target_link_libraries(mgl-qt4 mgl ${MGL_QT4_LIBS}) +- target_link_libraries(mgl-qt4-static mgl-static ${MGL_QT4_LIBS}) ++ #target_link_libraries(mgl-qt4-static mgl-static ${MGL_QT4_LIBS}) + if(enable-qt4asqt) + mgl_add_lib(qt ${MGL_QT4_FILES}) + target_link_libraries(mgl-qt mgl ${MGL_QT4_LIBS}) +- target_link_libraries(mgl-qt-static mgl-static ${MGL_QT4_LIBS}) ++ #target_link_libraries(mgl-qt-static mgl-static ${MGL_QT4_LIBS}) + endif(enable-qt4asqt) + + if(MGL_HAVE_FLTK AND NOT enable-qt5) + mgl_add_lib(wnd ${MGL_QT4_FILES} ../fltk.cpp ../../include/mgl2/fltk.h ../image.cpp ../image.h) + target_include_directories(mgl-wnd SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) +- target_include_directories(mgl-wnd-static SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) ++ #target_include_directories(mgl-wnd-static SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) + target_link_libraries(mgl-wnd mgl ${FLTK_LIBRARIES} ${MGL_QT4_LIBS}) +- target_link_libraries(mgl-wnd-static mgl-static ${FLTK_LIBRARIES} ${MGL_QT4_LIBS}) ++ #target_link_libraries(mgl-wnd-static mgl-static ${FLTK_LIBRARIES} ${MGL_QT4_LIBS}) + endif(MGL_HAVE_FLTK AND NOT enable-qt5) + endif(enable-qt4) Index: head/math/mathgl/files/patch-widgets_qt5_CMakeLists.txt =================================================================== --- head/math/mathgl/files/patch-widgets_qt5_CMakeLists.txt +++ head/math/mathgl/files/patch-widgets_qt5_CMakeLists.txt @@ -0,0 +1,24 @@ +--- widgets/qt5/CMakeLists.txt.orig 2017-07-20 06:27:56 UTC ++++ widgets/qt5/CMakeLists.txt +@@ -5,17 +5,17 @@ if(enable-qt5) + set(MGL_QT5_FILES ../qt.cpp ../../include/mgl2/qt.h ../../include/mgl2/qmathgl.h) + mgl_add_lib(qt5 ${MGL_QT5_FILES}) + target_link_libraries(mgl-qt5 mgl ${MGL_QT5_LIBS}) +- target_link_libraries(mgl-qt5-static mgl-static ${MGL_QT5_LIBS}) ++ #target_link_libraries(mgl-qt5-static mgl-static ${MGL_QT5_LIBS}) + if(enable-qt5asqt) + mgl_add_lib(qt ${MGL_QT5_FILES}) + target_link_libraries(mgl-qt mgl ${MGL_QT5_LIBS}) +- target_link_libraries(mgl-qt-static mgl-static ${MGL_QT5_LIBS}) ++ #target_link_libraries(mgl-qt-static mgl-static ${MGL_QT5_LIBS}) + endif(enable-qt5asqt) + if(MGL_HAVE_FLTK) + mgl_add_lib(wnd ${MGL_QT5_FILES} ../fltk.cpp ../../include/mgl2/fltk.h ../image.cpp ../image.h) + target_include_directories(mgl-wnd SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) +- target_include_directories(mgl-wnd-static SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) ++ #target_include_directories(mgl-wnd-static SYSTEM PUBLIC ${FLTK_INCLUDE_DIR}) + target_link_libraries(mgl-wnd mgl ${FLTK_LIBRARIES} ${MGL_QT5_LIBS}) +- target_link_libraries(mgl-wnd-static mgl-static ${FLTK_LIBRARIES} ${MGL_QT5_LIBS}) ++ #target_link_libraries(mgl-wnd-static mgl-static ${FLTK_LIBRARIES} ${MGL_QT5_LIBS}) + endif(MGL_HAVE_FLTK) + endif(enable-qt5) Index: head/math/mathgl/pkg-descr =================================================================== --- head/math/mathgl/pkg-descr +++ head/math/mathgl/pkg-descr @@ -0,0 +1,6 @@ +Mathgl is a cross-platform library for making high-quality scientific graphics. +It provides fast data plotting and handling of large data arrays, as well as +window and console modes and for easy embedding into other programs. Mathgl +integrates into fltk, qt and opengl applications. + +WWW: http://mathgl.sourceforge.net Index: head/math/mathgl/pkg-plist =================================================================== --- head/math/mathgl/pkg-plist +++ head/math/mathgl/pkg-plist @@ -0,0 +1,84 @@ +%%QT5%%bin/mglconv +%%QT5%%bin/mglview +%%QT5%%bin/udav +%%FLTK%%bin/mgllab +include/mgl2/Fl_MathGL.h +include/mgl2/abstract.h +include/mgl2/addon.h +include/mgl2/base.h +include/mgl2/base_cf.h +include/mgl2/canvas.h +include/mgl2/canvas_cf.h +include/mgl2/canvas_wnd.h +include/mgl2/config.h +include/mgl2/cont.h +include/mgl2/data.h +include/mgl2/data_cf.h +include/mgl2/datac.h +include/mgl2/datac_cf.h +include/mgl2/define.h +include/mgl2/dllexport.h +include/mgl2/eval.h +include/mgl2/evalc.h +include/mgl2/fit.h +include/mgl2/font.h +include/mgl2/glut.h +include/mgl2/gsl.fs +include/mgl2/mathgl.fs +include/mgl2/mgl.fs +include/mgl2/mgl.h +include/mgl2/mgl_cf.h +include/mgl2/mgl_pas.pas +include/mgl2/mglplot.fs +include/mgl2/mpi.h +include/mgl2/opengl.h +include/mgl2/other.h +include/mgl2/parser.h +include/mgl2/pde.h +include/mgl2/plot.h +include/mgl2/prim.h +%%QT5%%include/mgl2/qmathgl.h +%%QT5%%include/mgl2/qt.h +%%FLTK%%include/mgl2/fltk.h +include/mgl2/surf.h +include/mgl2/thread.h +include/mgl2/type.h +include/mgl2/vect.h +include/mgl2/vectors.fs +include/mgl2/volume.h +include/mgl2/wnd.h +lib/cmake/mathgl2/mathgl2-config.cmake +lib/libmgl2-glut.so +lib/libmgl2-glut.so.%%SHLIB_VER%% +%%QT5%%lib/libmgl2-qt.so +%%QT5%%lib/libmgl2-qt.so.%%SHLIB_VER%% +%%QT5%%lib/libmgl2-qt5.so +%%QT5%%lib/libmgl2-qt5.so.%%SHLIB_VER%% +%%FLTK%%lib/libmgl2-fltk.so +%%FLTK%%lib/libmgl2-fltk.so.%%SHLIB_VER%% +%%MPI%%lib/libmgl2-mpi.so +%%MPI%%lib/libmgl2-mpi.so.%%SHLIB_VER%% +%%FLTK%%lib/libmgl2-wnd.so +%%FLTK%%lib/libmgl2-wnd.so.%%SHLIB_VER%% +lib/libmgl2.so +lib/libmgl2.so.%%SHLIB_VER%% +%%PYTHON%%%%PYTHON_SITELIBDIR%%/_mathgl.so +%%PYTHON%%%%PYTHON_SITELIBDIR%%/mathgl.py +%%PYTHON%%%%PYTHON_SITELIBDIR%%/mathgl.pyc +%%QT5%%share/applications/udav.desktop +%%FLTK%%share/applications/mgllab.desktop +share/locale/es/LC_MESSAGES/mathgl.mo +share/locale/ru/LC_MESSAGES/mathgl.mo +%%DATADIR%%/fonts/STIX.vfmb +%%DATADIR%%/fonts/adventor.vfmb +%%DATADIR%%/fonts/bonum.vfmb +%%DATADIR%%/fonts/cursor.vfmb +%%DATADIR%%/fonts/heros.vfmb +%%DATADIR%%/fonts/heroscn.vfmb +%%DATADIR%%/fonts/pagella.vfmb +%%DATADIR%%/fonts/schola.vfmb +%%DATADIR%%/fonts/termes.vfmb +%%DATADIR%%/mgl.cgi +%%QT5%%share/mime/packages/mgl.xml +%%QT5%%share/pixmaps/udav.png +%%QT5%%share/udav/udav_ru.qm