Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit 18d3eb92 authored by Maurice Bremond's avatar Maurice Bremond
Browse files

[repository] to github/siconos

parent 9b9e05c4
From 00e84cfcc5a0812503b431238fc26c349b0d714f Mon Sep 17 00:00:00 2001
From: David Gobbi <david.gobbi@gmail.com>
Date: Tue, 20 Aug 2019 17:02:24 -0600
Subject: [PATCH] Compatibility for Python 3.8
The PyTypeObject struct was modified in Python 3.8, this change is
required to avoid compile errors.
---
Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h | 6 ++++++
Wrapping/PythonCore/PyVTKMethodDescriptor.cxx | 2 +-
Wrapping/PythonCore/PyVTKNamespace.cxx | 2 +-
Wrapping/PythonCore/PyVTKReference.cxx | 8 ++++----
Wrapping/PythonCore/PyVTKTemplate.cxx | 2 +-
Wrapping/PythonCore/vtkPythonCompatibility.h | 8 +++++++-
Wrapping/Tools/vtkWrapPythonClass.c | 2 +-
Wrapping/Tools/vtkWrapPythonEnum.c | 2 +-
Wrapping/Tools/vtkWrapPythonType.c | 2 +-
9 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h b/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h
index b1c12c8..14ccfbe 100644
--- a/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h
+++ b/Utilities/PythonInterpreter/vtkPythonStdStreamCaptureHelper.h
@@ -140,6 +140,12 @@ static PyTypeObject vtkPythonStdStreamCaptureHelperType = {
#if PY_VERSION_HEX >= 0x03040000
0, // tp_finalize
#endif
+#if PY_VERSION_HEX >= 0x03080000
+ 0, // tp_vectorcall
+#if PY_VERSION_HEX < 0x03090000
+ 0, // tp_print
+#endif
+#endif
};
static PyObject* vtkWrite(PyObject* self, PyObject* args)
diff --git a/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx b/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx
index 2b0d443..3840038 100644
--- a/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx
+++ b/Wrapping/PythonCore/PyVTKMethodDescriptor.cxx
@@ -186,7 +186,7 @@ PyTypeObject PyVTKMethodDescriptor_Type = {
sizeof(PyMethodDescrObject), // tp_basicsize
0, // tp_itemsize
PyVTKMethodDescriptor_Delete, // tp_dealloc
- nullptr, // tp_print
+ 0, // tp_vectorcall_offset
nullptr, // tp_getattr
nullptr, // tp_setattr
nullptr, // tp_compare
diff --git a/Wrapping/PythonCore/PyVTKNamespace.cxx b/Wrapping/PythonCore/PyVTKNamespace.cxx
index 71ee2a3..5cf5bfb 100644
--- a/Wrapping/PythonCore/PyVTKNamespace.cxx
+++ b/Wrapping/PythonCore/PyVTKNamespace.cxx
@@ -49,7 +49,7 @@ PyTypeObject PyVTKNamespace_Type = {
0, // tp_basicsize
0, // tp_itemsize
PyVTKNamespace_Delete, // tp_dealloc
- nullptr, // tp_print
+ 0, // tp_vectorcall_offset
nullptr, // tp_getattr
nullptr, // tp_setattr
nullptr, // tp_compare
diff --git a/Wrapping/PythonCore/PyVTKReference.cxx b/Wrapping/PythonCore/PyVTKReference.cxx
index 943ac71..b710409 100644
--- a/Wrapping/PythonCore/PyVTKReference.cxx
+++ b/Wrapping/PythonCore/PyVTKReference.cxx
@@ -1010,7 +1010,7 @@ PyTypeObject PyVTKReference_Type = {
sizeof(PyVTKReference), // tp_basicsize
0, // tp_itemsize
PyVTKReference_Delete, // tp_dealloc
- nullptr, // tp_print
+ 0, // tp_vectorcall_offset
nullptr, // tp_getattr
nullptr, // tp_setattr
nullptr, // tp_compare
@@ -1067,7 +1067,7 @@ PyTypeObject PyVTKNumberReference_Type = {
sizeof(PyVTKReference), // tp_basicsize
0, // tp_itemsize
PyVTKReference_Delete, // tp_dealloc
- nullptr, // tp_print
+ 0, // tp_vectorcall_offset
nullptr, // tp_getattr
nullptr, // tp_setattr
nullptr, // tp_compare
@@ -1124,7 +1124,7 @@ PyTypeObject PyVTKStringReference_Type = {
sizeof(PyVTKReference), // tp_basicsize
0, // tp_itemsize
PyVTKReference_Delete, // tp_dealloc
- nullptr, // tp_print
+ 0, // tp_vectorcall_offset
nullptr, // tp_getattr
nullptr, // tp_setattr
nullptr, // tp_compare
@@ -1181,7 +1181,7 @@ PyTypeObject PyVTKTupleReference_Type = {
sizeof(PyVTKReference), // tp_basicsize
0, // tp_itemsize
PyVTKReference_Delete, // tp_dealloc
- nullptr, // tp_print
+ 0, // tp_vectorcall_offset
nullptr, // tp_getattr
nullptr, // tp_setattr
nullptr, // tp_compare
diff --git a/Wrapping/PythonCore/PyVTKTemplate.cxx b/Wrapping/PythonCore/PyVTKTemplate.cxx
index be20098..340fe79 100644
--- a/Wrapping/PythonCore/PyVTKTemplate.cxx
+++ b/Wrapping/PythonCore/PyVTKTemplate.cxx
@@ -268,7 +268,7 @@ PyTypeObject PyVTKTemplate_Type = {
0, // tp_basicsize
0, // tp_itemsize
nullptr, // tp_dealloc
- nullptr, // tp_print
+ 0, // tp_vectorcall_offset
nullptr, // tp_getattr
nullptr, // tp_setattr
nullptr, // tp_compare
diff --git a/Wrapping/PythonCore/vtkPythonCompatibility.h b/Wrapping/PythonCore/vtkPythonCompatibility.h
index 4a76784..be208fa 100644
--- a/Wrapping/PythonCore/vtkPythonCompatibility.h
+++ b/Wrapping/PythonCore/vtkPythonCompatibility.h
@@ -64,7 +64,13 @@
#endif
// PyTypeObject compatibility
-#if PY_VERSION_HEX >= 0x03040000
+#if PY_VERSION_HEX >= 0x03090000
+#define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \
+ 0, 0, 0, 0,
+#elif PY_VERSION_HEX >= 0x03080000
+#define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \
+ 0, 0, 0, 0, 0,
+#elif PY_VERSION_HEX >= 0x03040000
#define VTK_WRAP_PYTHON_SUPPRESS_UNINITIALIZED \
0, 0, 0,
#else
diff --git a/Wrapping/Tools/vtkWrapPythonClass.c b/Wrapping/Tools/vtkWrapPythonClass.c
index b1e45f8..4d558ea 100644
--- a/Wrapping/Tools/vtkWrapPythonClass.c
+++ b/Wrapping/Tools/vtkWrapPythonClass.c
@@ -521,7 +521,7 @@ void vtkWrapPython_GenerateObjectType(
" sizeof(PyVTKObject), // tp_basicsize\n"
" 0, // tp_itemsize\n"
" PyVTKObject_Delete, // tp_dealloc\n"
- " nullptr, // tp_print\n"
+ " 0, // tp_vectorcall_offset\n"
" nullptr, // tp_getattr\n"
" nullptr, // tp_setattr\n"
" nullptr, // tp_compare\n"
diff --git a/Wrapping/Tools/vtkWrapPythonEnum.c b/Wrapping/Tools/vtkWrapPythonEnum.c
index b933702..1249362 100644
--- a/Wrapping/Tools/vtkWrapPythonEnum.c
+++ b/Wrapping/Tools/vtkWrapPythonEnum.c
@@ -145,7 +145,7 @@ void vtkWrapPython_GenerateEnumType(
" sizeof(PyIntObject), // tp_basicsize\n"
" 0, // tp_itemsize\n"
" nullptr, // tp_dealloc\n"
- " nullptr, // tp_print\n"
+ " 0, // tp_vectorcall_offset\n"
" nullptr, // tp_getattr\n"
" nullptr, // tp_setattr\n"
" nullptr, // tp_compare\n"
diff --git a/Wrapping/Tools/vtkWrapPythonType.c b/Wrapping/Tools/vtkWrapPythonType.c
index 744cb1b..0a1375e 100644
--- a/Wrapping/Tools/vtkWrapPythonType.c
+++ b/Wrapping/Tools/vtkWrapPythonType.c
@@ -709,7 +709,7 @@ void vtkWrapPython_GenerateSpecialType(
" sizeof(PyVTKSpecialObject), // tp_basicsize\n"
" 0, // tp_itemsize\n"
" Py%s_Delete, // tp_dealloc\n"
- " nullptr, // tp_print\n"
+ " 0, // tp_vectorcall_offset\n"
" nullptr, // tp_getattr\n"
" nullptr, // tp_setattr\n"
" nullptr, // tp_compare\n"
--
2.10.1 (Apple Git-78)
This is a [[https://guix.gnu.org/][Guix]] channel for [[https://nonsmooth.gricad-pages.univ-grenoble-alpes.fr/siconos/index][Siconos]].
This project has been moved to https://github.com/siconos/guix-siconos
See [[https://guix.gnu.org/manual/en/html_node/Channels.html][Guix channels]] for more informations.
* Usage
Specification without constraints:
#+begin_src scheme :eval no :tangle siconos-now.scm
(cons
(channel (name 'guix-siconos)
(url "https://gitlab.inria.fr/bremond/guix-siconos"))
%default-channels)
#+end_src
Example with constraints on Siconos channel and Guix channel:
#+begin_src scheme :eval no :tangle siconos-2021-05-03.scm
(list (channel
(name 'guix-siconos)
(url "https://gitlab.inria.fr/bremond/guix-siconos")
(commit
"be544bc07cd256f8e14566e0bfb3d59828ea4f0e"))
(channel
(name 'guix)
(url "https://git.savannah.gnu.org/git/guix.git")
(commit
"f0eb053dac8273416ab24541b85617d79dbae134")))
#+end_src
* Specifications download
Specifications are available in the channel branch of this repository.
They are named with this convention:
- without constraints, the channels file is named =siconos-now.scm=
- with constraints on commits with the same date for Siconos channel
and Guix channel: =siconos-<iso 8601 date of commits>.scm=
With git access to gitlab.inria.fr, the specification without
constraint may be downloaded with this command:
#+begin_src sh :dir /tmp :results raw :compile
git archive --remote=ssh://git@gitlab.inria.fr/bremond/guix-siconos.git channels siconos-now.scm | tar -x
#+end_src
Without git access, one can rely on gitlab convention for repositories and use wget:
#+begin_src sh :dir /tmp :results raw :compile
wget -q -N https://gitlab.inria.fr/bremond/guix-siconos/raw/channels/siconos-now.scm
#+end_src
** How to form a reproductible specification:
#+name: fix-channels-with-git
#+begin_src sh :dir /tmp :results raw :compile :results output silent
git archive --remote=ssh://git@gitlab.inria.fr/bremond/guix-siconos.git channels siconos-now.scm | tar -x && \
guix time-machine -C siconos-now.scm -- describe -f channels 2>/dev/null > siconos-$(date --iso-8601).scm
#+end_src
Or
#+name: fix-channels-with-wget
#+begin_src sh :dir /tmp :results raw :compile :results output silent
wget -q -N https://gitlab.inria.fr/bremond/guix-siconos/raw/channels/siconos-now.scm && \
guix time-machine -C siconos-now.scm -- describe -f channels 2>/dev/null > siconos-$(date --iso-8601).scm
#+end_src
* Examples
** The reproductible Bouncing ball with reference check
#+name: bouncing-ball-computation
#+begin_src sh :dir /tmp :compile :file bouncing-ball-computation :results output silent
wget -N https://gitlab.inria.fr/bremond/guix-siconos/raw/channels/siconos-2021-05-05.scm && \
guix time-machine -C siconos-2021-05-05.scm -- \
environment \
--pure --ad-hoc gcc-toolchain cmake make coreutils grep dash \
siconos@4.3 siconos-tutorials -- \
dash -c '
cp ${GUIX_ENVIRONMENT}/share/siconos/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.ref .
siconos ${GUIX_ENVIRONMENT}/share/siconos/siconos-tutorials/examples/mechanics/BouncingBall/BouncingBallTS.cpp'
#+end_src
** A reproductible experiment of a cube falling on the ground
*** Computation
#+name: cube-computation
#+begin_src sh :dir /tmp :compile :results output silent
wget -N https://gitlab.inria.fr/bremond/guix-siconos/raw/channels/siconos-2021-05-05.scm && \
guix time-machine -C siconos-2021-05-05.scm -- \
environment --pure --ad-hoc siconos siconos-tutorials dash -- \
dash -c 'siconos ${GUIX_ENVIRONMENT}/share/siconos/siconos-tutorials/examples/mechanics/GeometricPrimitives/cube.py'
#+end_src
*** Visualization
#+name: cube-visualization
#+begin_src sh :dir /tmp :compile :results output silent
wget -N https://gitlab.inria.fr/bremond/guix-siconos/raw/channels/siconos-2021-05-05.scm && \
guix time-machine -C siconos-2021-05-05.scm -- \
environment --pure --ad-hoc python-vtk@8.2.0 siconos -- \
siconos_vview cube.hdf5
#+end_src
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -127,8 +127,16 @@ endif(DEFINED OCE_INCLUDE_PATH)
# Installation directory #
# by default, installed to site-packages/OCC #
##############################################
-execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from __future__ import print_function; from distutils.sysconfig import get_python_lib; import os;print(get_python_lib())" OUTPUT_VARIABLE python_lib OUTPUT_STRIP_TRAILING_WHITESPACE )
-set(PYTHONOCC_INSTALL_DIRECTORY ${python_lib}/OCC CACHE PATH "pythonOCC install directory" )
+set(GET_SITE_PACKAGE
+ "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}'))")
+execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
+ "${GET_SITE_PACKAGE}" OUTPUT_VARIABLE PY_INSTALL_DIR)
+string(STRIP ${PY_INSTALL_DIR} PY_INSTALL_DIR)
+set(PYTHONOCC_INSTALL_DIRECTORY ${PY_INSTALL_DIR}/OCC CACHE PATH "pythonOCC install directory")
+
+ # List of OCE shared libraries to link with
+ # TODO: this should be build from the module list
+
# List of OCE shared libraries to link with
# TODO: this should be build from the module list
--- a/numerics/src/tools/internal/numerics_verbose.h
+++ b/numerics/src/tools/internal/numerics_verbose.h
@@ -85,7 +85,7 @@ extern "C"
do \
{ \
int error_code = EXPR; \
- MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN); \
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN); \
if (error_code != MPI_SUCCESS) { \
char error_string[1024]; \
int length_of_error_string, error_class; \
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 John Darrington <jmd@gnu.org>
;;; Copyright © 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2014, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
;;; Copyright © 2018 Lprndn <guix@lprndn.info>
;;; Copyright © 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2021 Oleh Malyi <astroclubzp@gmail.com>
;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2021 Andy Tai <atai@atai.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
;; python support for vtk (9 & 8)
(define-module (siconos image-processing)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system qt)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
#:use-module (gnu packages flex)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages geo)
#:use-module (gnu packages ghostscript)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages graphics)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages gtk)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages maths)
#:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
#:use-module (gnu packages photo)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages tbb)
#:use-module (gnu packages tls)
#:use-module (gnu packages version-control)
#:use-module (gnu packages video)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1))
; modified vtk version with python support
(define-public python-vtk
(package
(name "python-vtk")
(version "9.0.1")
(source (origin
(method url-fetch)
(uri (string-append "https://vtk.org/files/release/"
(version-major+minor version)
"/VTK-" version ".tar.gz"))
(sha256
(base32
"1ir2lq9i45ls374lcmjzw0nrm5l5hnm1w47lg8g8d0n2j7hsaf8v"))
(patches
(search-patches "vtk-fix-freetypetools-build-failure.patch"))
(modules '((guix build utils)))
(snippet
'(begin
(for-each
(lambda (dir)
(delete-file-recursively
(string-append "ThirdParty/" dir "/vtk" dir)))
;; pugixml depended upon unconditionally
'("doubleconversion" "eigen" "expat" "freetype" "gl2ps"
"glew" "hdf5" "jpeg" "jsoncpp" "libproj" "libxml2" "lz4"
"netcdf" "ogg" "png" "sqlite" "theora" "tiff" "zlib"))
#t))))
(properties `((release-monitoring-url . "https://vtk.org/download/")))
(build-system cmake-build-system)
(arguments
'(#:build-type "Release" ;Build without '-g' to save space.
#:configure-flags '(;"-DBUILD_TESTING:BOOL=TRUE"
; ; not honored
"-DVTK_USE_EXTERNAL=OFF" ;; default
"-DVTK_MODULE_USE_EXTERNAL_VTK_doubleconversion=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_eigen=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_expat=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_freetype=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_glew=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_hdf5=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_jpeg=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_jsoncpp=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_libproj=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_libxml2=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_lz4=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_netcdf=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_ogg=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_png=ON"
;"-DVTK_MODULE_USE_EXTERNAL_VTK_pugixml=ON" ; breaks IO/CityGML
"-DVTK_MODULE_USE_EXTERNAL_VTK_sqlite=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_theora=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_tiff=ON"
"-DVTK_MODULE_USE_EXTERNAL_VTK_zlib=ON"
"-DVTK_WRAP_PYTHON=ON"
"-DVTK_PYTHON_VERSION:STRING=3"
"-DPython_ADDITIONAL_VERSIONS=3.8.2"
)
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-sources
(lambda _
(substitute* "Common/Core/vtkFloatingPointExceptions.cxx"
(("<fenv.h>") "<cfenv>"))
(substitute* "Common/Core/CMakeLists.txt"
(("fenv.h") "cfenv")))))
#:tests? #f)) ;XXX: test data not included
(inputs
`(("double-conversion" ,double-conversion)
("eigen" ,eigen)
("expat" ,expat)
("freetype" ,freetype)
("gl2ps" ,gl2ps)
("glew" ,glew)
("glu" ,glu)
("hdf5" ,hdf5)
("jpeg" ,libjpeg-turbo)
("jsoncpp" ,jsoncpp)
("libtheora" ,libtheora)
("libX11" ,libx11)
("libxml2" ,libxml2)
("libXt" ,libxt)
("lz4" ,lz4)
("mesa" ,mesa)
("netcdf" ,netcdf)
("png" ,libpng)
("python" ,python)
("proj" ,proj.4)
;("pugixml" ,pugixml)
("sqlite" ,sqlite)
("tiff" ,libtiff)
("xorgproto" ,xorgproto)
("zlib" ,zlib)))
(propagated-inputs
;; VTK's 'VTK-vtk-module-find-packages.cmake' calls
;; 'find_package(THEORA)', which in turns looks for libogg.
`(("libogg" ,libogg)))
(home-page "https://vtk.org/")
(synopsis "Libraries for 3D computer graphics")
(description
"The Visualization Toolkit (VTK) is a C++ library for 3D computer graphics,
image processing and visualization. It supports a wide variety of
visualization algorithms including: scalar, vector, tensor, texture, and
volumetric methods; and advanced modeling techniques such as: implicit
modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay
triangulation. VTK has an extensive information visualization framework, has
a suite of 3D interaction widgets, supports parallel processing, and
integrates with various databases on GUI toolkits such as Qt and Tk.")
(license license:bsd-3)))
; vtk with python support
(define-public python-vtk-8-2.0
(package
(name "python-vtk")
(version "8.2.0")
(source (origin
(method url-fetch)
(uri (string-append "https://vtk.org/files/release/"
(version-major+minor version)
"/VTK-" version ".tar.gz"))
(sha256
(base32
"1fspgp8k0myr6p2a6wkc21ldcswb4bvmb484m12mxgk1a9vxrhrl"))
(patches
(search-patches "vtk-8.2.0-fix-freetypetools-build-failure.patch"
"0001-Compatibility-for-Python-3.8.patch"))))
(build-system cmake-build-system)
(arguments
'(#:build-type "Release" ;Build without '-g' to save space.
;; -DVTK_USE_SYSTEM_NETCDF:BOOL=TRUE requires netcdf_cxx
#:configure-flags '("-DVTK_USE_SYSTEM_EXPAT:BOOL=TRUE"
"-DVTK_USE_SYSTEM_FREETYPE:BOOL=TRUE"
"-DVTK_USE_SYSTEM_HDF5:BOOL=TRUE"
"-DVTK_USE_SYSTEM_JPEG:BOOL=TRUE"
"-DVTK_USE_SYSTEM_JSONCPP:BOOL=TRUE"
"-DVTK_USE_SYSTEM_LIBXML2:BOOL=TRUE"
"-DVTK_USE_SYSTEM_OGGTHEORA:BOOL=TRUE"
"-DVTK_USE_SYSTEM_PNG:BOOL=TRUE"
"-DVTK_USE_SYSTEM_TIFF:BOOL=TRUE"
"-DVTK_USE_SYSTEM_ZLIB:BOOL=TRUE"
"-DVTK_WRAP_PYTHON=ON"
"-DVTK_PYTHON_VERSION:STRING=3"
"-DPython_ADDITIONAL_VERSIONS=3.8")
#:tests? #f)) ;XXX: no "test" target
(inputs
`(("libXt" ,libxt)
("xorgproto" ,xorgproto)
("libX11" ,libx11)
("libxml2" ,libxml2)
("mesa" ,mesa)
("glu" ,glu)
("expat" ,expat)
("freetype" ,freetype)
("hdf5" ,hdf5)
("jpeg" ,libjpeg-turbo)
("jsoncpp" ,jsoncpp)
("libogg" ,libogg)
("libtheora" ,libtheora)
("png" ,libpng)
("python" ,python)
("tiff" ,libtiff)
("zlib" ,zlib)))
(home-page "https://vtk.org/")
(synopsis "Libraries for 3D computer graphics")
(description
"The Visualization Toolkit (VTK) is a C++ library for 3D computer graphics,
image processing and visualization. It supports a wide variety of
visualization algorithms including: scalar, vector, tensor, texture, and
volumetric methods; and advanced modeling techniques such as: implicit
modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay
triangulation. VTK has an extensive information visualization framework, has
a suite of 3D interaction widgets, supports parallel processing, and
integrates with various databases on GUI toolkits such as Qt and Tk.")
(license license:bsd-3)))
; too many modules, to be cleaned
(define-module (siconos siconos)
#:use-module (srfi srfi-1)
#:use-module (ice-9 popen)
#:use-module (ice-9 rdelim)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix hg-download)
#:use-module (guix build-system python)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build rpath)
#:use-module (gnu packages)
#:use-module (gnu packages check)
#:use-module (gnu packages gawk)
#:use-module (gnu packages bash)
#:use-module (gnu packages tls)
#:use-module (gnu packages linux)
#:use-module (gnu packages compression)
#:use-module (gnu packages backup)
#:use-module (gnu packages nettle)
#:use-module (gnu packages perl)
#:use-module (gnu packages m4)
#:use-module (gnu packages gl)
#:use-module (gnu packages elf)
#:use-module (gnu packages autogen)
#:use-module (gnu packages package-management)
#:use-module (gnu packages autotools)
#:use-module (gnu packages version-control)
#:use-module (gnu packages swig)
#:use-module (gnu packages boost)
#:use-module (gnu packages swig)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages python)