From patchwork Thu Sep 8 15:24:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul A. Patience" X-Patchwork-Id: 42337 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BF50E27BBE9; Thu, 8 Sep 2022 16:25:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id ABF8827BBE9 for ; Thu, 8 Sep 2022 16:25:22 +0100 (BST) Received: from localhost ([::1]:34492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWJP7-0004C8-P3 for patchwork@mira.cbaines.net; Thu, 08 Sep 2022 11:25:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWJOo-0004AF-CV for guix-patches@gnu.org; Thu, 08 Sep 2022 11:25:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42960) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWJOo-0006dA-3n for guix-patches@gnu.org; Thu, 08 Sep 2022 11:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWJOn-0006CS-Uk for guix-patches@gnu.org; Thu, 08 Sep 2022 11:25:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57679] [RFC PATCH] gnu: Add paraview. Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Sep 2022 15:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57679 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57679@debbugs.gnu.org Cc: paul@apatience.com, maxim.cournoyer@gmail.com X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166265067023778 (code B ref -1); Thu, 08 Sep 2022 15:25:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Sep 2022 15:24:30 +0000 Received: from localhost ([127.0.0.1]:59892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWJOH-0006BR-6T for submit@debbugs.gnu.org; Thu, 08 Sep 2022 11:24:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:41868) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWJOE-0006BI-1R for submit@debbugs.gnu.org; Thu, 08 Sep 2022 11:24:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWJOD-0003lo-8z for guix-patches@gnu.org; Thu, 08 Sep 2022 11:24:25 -0400 Received: from mail-4323.proton.ch ([185.70.43.23]:56385) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWJO9-0006Wi-IK for guix-patches@gnu.org; Thu, 08 Sep 2022 11:24:24 -0400 Date: Thu, 08 Sep 2022 15:24:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail3; t=1662650653; x=1662909853; bh=cAWNxk+r3cikthxNePWxd6X/R7yx8O9qkfPK/wudKQs=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:Feedback-ID:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID; b=fU1riW3Ztw+ochUl/Rv2McKYDQ0UGl5A+SjJRCfm6CbR0DqEDznIE2MTggIZhfSoR DM46J67XeFfTtv2cT5hZ3YR+H5qOyl3eX15WULQxt6QaPE7S+biiUi8AF3OuJwEALT 744yM5n+Dj4ixThxKYI7HsD5PRAA1cHS9ccX+apr/X3IhMz5mXp4VOasjhmubKeK9r Khl2yOTh/GMDcIzDs67dncAQZmllvJEPYNY3IVi7+0cCyqyOwF9XtF2ow9f1oxVBfe RyX0wyketSE1F7N5mgcKSkNiYpZXonvViRYRA8yai4BhHJFDQEJfuZGY3f2a+TFjU8 mtyrI/IhdzYiQ== From: "Paul A. Patience" Message-ID: <20220908152355.42201-1-paul@apatience.com> Feedback-ID: 19227857:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.43.23; envelope-from=paul@apatience.com; helo=mail-4323.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: "Paul A. Patience" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/graphics.scm (paraview): New variable. --- Hi, ParaView builds with this patch, but doesn't display icons for any of its buttons, e.g., for open file, etc. I have no idea how to fix this. I started packaging ParaView last year but encountered this problem and gave up on trying to fix it. Yesterday I started updating (and cleaning up quite a bit) the package for the latest release (candidate) of ParaView, and it's basically done except for the missing icons. I'm hoping someone has some ideas for making the icons appear (Maxim, maybe?). Thanks, Paul gnu/packages/graphics.scm | 283 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 283 insertions(+) -- 2.37.3 diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index fe38e7d03f..7a962afb3d 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -63,12 +63,16 @@ (define-module (gnu packages graphics) #:use-module (gnu packages compression) #:use-module (gnu packages cpp) #:use-module (gnu packages crypto) + #:use-module (gnu packages curl) #:use-module (gnu packages datastructures) #:use-module (gnu packages documentation) #:use-module (gnu packages flex) #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) + #:use-module (gnu packages game-development) + #:use-module (gnu packages gcc) + #:use-module (gnu packages geo) #:use-module (gnu packages gettext) #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) @@ -92,6 +96,7 @@ (define-module (gnu packages graphics) #:use-module (gnu packages man) #:use-module (gnu packages maths) #:use-module (gnu packages mp3) + #:use-module (gnu packages mpi) #:use-module (gnu packages multiprecision) #:use-module (gnu packages ninja) #:use-module (gnu packages pciutils) @@ -101,18 +106,23 @@ (define-module (gnu packages graphics) #:use-module (gnu packages pkg-config) #:use-module (gnu packages plotutils) #:use-module (gnu packages pretty-print) + #:use-module (gnu packages protobuf) #:use-module (gnu packages pth) #:use-module (gnu packages pulseaudio) ; libsndfile, libsamplerate #:use-module (gnu packages python) #:use-module (gnu packages python-build) + #:use-module (gnu packages python-science) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages sdl) #:use-module (gnu packages serialization) + #:use-module (gnu packages sphinx) + #:use-module (gnu packages sqlite) #:use-module (gnu packages stb) #:use-module (gnu packages swig) #:use-module (gnu packages tbb) + #:use-module (gnu packages textutils) #:use-module (gnu packages toolkits) #:use-module (gnu packages upnp) #:use-module (gnu packages video) @@ -2392,3 +2402,276 @@ (define-public f3d glTF, STL, STEP, PLY, OBJ, FBX), and provides numerous rendering and texturing options.") (license license:bsd-3))) + +(define-public paraview + (package + (name "paraview") + (version "5.11.0-RC1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.kitware.com/paraview/paraview.git") + (commit (string-append "v" version)) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0yhsavi1c9xzk8va81pnl523i68br39ngidlvfjjnk8dhpm3dzbg")) + (modules '((guix build utils))) + (snippet + ;; TODO: Also remove unused bundled libraries and plugins? + #~(begin + ;; Remove bundled ParaView libraries which are available in Guix + ;; or undesired. + (for-each (lambda (dir) + (delete-file-recursively + (string-append "ThirdParty/" dir "/vtk" + (string-downcase dir)))) + '(;;"CosmoHaloFinder" + ;;"IceT" + "NvPipe" ; Don't want NvPipe support + ;;"QtTesting" + ;;"cinema" + ;;"cinemasci" + "protobuf")) + ;; Remove undesired ParaView plugins. + (delete-file-recursively "Plugins/pvNVIDIAIndeX") + ;; Remove bundled VTK libraries which are available in Guix. + (for-each (lambda (dir) + (delete-file-recursively + (string-append "VTK/ThirdParty/" dir "/vtk" dir))) + '(;;"cgns" + "cli11" + ;;"diy2" + "doubleconversion" + "eigen" + ;;"exodusII" + "expat" + ;;"exprtk" + ;;"fides" + "fmt" + "freetype" + "gl2ps" + "glew" + ;;"h5part" + "hdf5" + ;;"ioss" + "jpeg" + "jsoncpp" + ;;"kissfft" + ;;"libharu" ; Requires some PRs applied to 2.3.0 + "libproj" + "libxml2" + ;;"loguru" + "lz4" + "lzma" + "mpi4py" + "netcdf" + ;;"nlohmannjson" ; ParFlow build fails even with bundled + "ogg" + ;;"pegtl" + "png" + "pugixml" + "sqlite" + "theora" + "tiff" + "utf8" + ;;"verdict" + ;;"vpic" + ;;"vtkm" + ;;"xdmf2" + ;;"xdmf3" + ;;"zfp" + "zlib")))))) + (build-system cmake-build-system) + (arguments + (list #:build-type "Release" ; 542 MiB in release mode + #:tests? #f ; Downloads test data + #:configure-flags + #~(let ((doc (string-append #$output "/share/doc/" #$name "-" #$version))) + (list + (string-append "-DCMAKE_INSTALL_DOCDIR=" doc) ; For paraview.qch + + ;; ParaView build options + "-DPARAVIEW_BUILD_DEVELOPER_DOCUMENTATION=ON" + (string-append "-DPARAVIEW_GENERATED_DOCUMENTATION_OUTPUT_DIRECTORY=" doc) + + ;; ParaView capability options + ;;"-DPARAVIEW_USE_EXTERNAL_VTK=ON" ; Unsupported by ParaView + "-DPARAVIEW_USE_MPI=ON" + "-DPARAVIEW_USE_PYTHON=ON" + "-DPARAVIEW_USE_QTWEBENGINE=ON" + + ;; ParaView features + ;; + ;; Enable those that are disabled by default. + ;; Commented means the dependencies are missing from Guix + ;; (or are otherwise described). + ;;"-DPARAVIEW_ENABLE_ADIOS2=ON" + ;;"-DPARAVIEW_ENABLE_COSMOTOOLS=ON" + ;;"-DPARAVIEW_ENABLE_CATALYST=ON" + "-DPARAVIEW_ENABLE_FFMPEG=ON" + ;;"-DPARAVIEW_ENABLE_FIDES=ON" + "-DPARAVIEW_ENABLE_GDAL=ON" + ;;"-DPARAVIEW_ENABLE_LAS=ON" + ;;"-DPARAVIEW_ENABLE_LOOKINGGLASS=ON" ; Downloads dependency + ;;"-DPARAVIEW_ENABLE_MOMENTINVARIANTS=ON" ; Downloads dependency + "-DPARAVIEW_ENABLE_MOTIONFX=ON" + ;;"-DPARAVIEW_ENABLE_OPENTURNS=ON" + ;;"-DPARAVIEW_ENABLE_OPENVDB=ON" ; Dependency not found + ;;"-DPARAVIEW_ENABLE_PDAL=ON" + ;;"-DPARAVIEW_ENABLE_RAYTRACING=ON" + "-DPARAVIEW_ENABLE_VISITBRIDGE=ON" + "-DPARAVIEW_ENABLE_XDMF3=ON" + + ;; ParaView miscellaneous options + ;; + ;; Without -DPARAVIEW_DATA_EXCLUDE_FROM_ALL=OFF, test data is + ;; downloaded even with tests disabled. + "-DPARAVIEW_VERSIONED_INSTALL=OFF" + "-DPARAVIEW_DATA_EXCLUDE_FROM_ALL=OFF" + + ;; ParaView plugins + ;; + ;; Enable those that are disabled by default. + ;; Commented means the dependencies are missing from Guix + ;; (or are otherwise described). + ;;"-DPARAVIEW_PLUGIN_ENABLE_AdiosReaderPixie=ON" + ;;"-DPARAVIEW_PLUGIN_ENABLE_AdiosReaderStaging=ON" + "-DPARAVIEW_PLUGIN_ENABLE_CAVEInteraction=ON" + ;;"-DPARAVIEW_PLUGIN_ENABLE_CDIReader=ON" + "-DPARAVIEW_PLUGIN_ENABLE_GeographicalMap=ON" + "-DPARAVIEW_PLUGIN_ENABLE_GmshIO=ON" + "-DPARAVIEW_PLUGIN_ENABLE_InSituExodus=ON" + ;;"-DPARAVIEW_PLUGIN_ENABLE_LookingGlass=ON" + "-DPARAVIEW_PLUGIN_ENABLE_NetCDFTimeAnnotationPlugin=ON" + ;;"-DPARAVIEW_PLUGIN_ENABLE_ParFlow=ON" ; Build fails + ;;"-DPARAVIEW_PLUGIN_ENABLE_PythonQtPlugin=ON" + "-DPARAVIEW_PLUGIN_ENABLE_SpaceMouseInteractor=ON" + ;;"-DPARAVIEW_PLUGIN_ENABLE_VDFReaderPlugin=ON" + ;;"-DPARAVIEW_PLUGIN_ENABLE_XRInterface=ON" ; Build fails + ;;"-DPARAVIEW_PLUGIN_ENABLE_zSpace=ON" + + ;; VTK options + "-DVTK_SMP_IMPLEMENTATION_TYPE=TBB" + "-DVTKm_ENABLE_MPI=ON" + + ;; External libraries for ParaView and VTK + "-DVTK_MODULE_USE_EXTERNAL_ParaView_protobuf=ON" + "-DVTK_MODULE_USE_EXTERNAL_VTK_cli11=ON" + "-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_fmt=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_lzma=ON" + "-DVTK_MODULE_USE_EXTERNAL_VTK_mpi4py=ON" + "-DVTK_MODULE_USE_EXTERNAL_VTK_netcdf=ON" + ;;"-DVTK_MODULE_USE_EXTERNAL_VTK_nlohmannjson=ON" + "-DVTK_MODULE_USE_EXTERNAL_VTK_ogg=ON" + ;;"-DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=ON" + "-DVTK_MODULE_USE_EXTERNAL_VTK_png=ON" + "-DVTK_MODULE_USE_EXTERNAL_VTK_pugixml=ON" + "-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_utf8=ON" + "-DVTK_MODULE_USE_EXTERNAL_VTK_zlib=ON")) + #:phases + #~(modify-phases %standard-phases + (add-after 'set-paths 'hide-gfortran + (lambda _ + (setenv + "CPLUS_INCLUDE_PATH" + (string-join + (delete (string-append #$(this-package-native-input + "gfortran") + "/include/c++") + (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) + ":")))) + (replace 'install-license-files + (lambda _ + (let ((src (string-append #$output "/share/licenses/ParaView")) + (dst (string-append #$output "/share/doc/" + #$name "-" #$version "/licenses"))) + (copy-recursively src dst) + (delete-file-recursively (dirname src)))))))) + (native-inputs + (list gfortran + ;; For the documentation + doxygen + graphviz + perl + python-sphinx)) + (inputs + (list boost + cli11 + curl + double-conversion + eigen + expat + ffmpeg + fmt + freetype + gdal + gl2ps + glew + glu ; Propagated from glew, not strictly necessary + gmsh + hdf5 + ;;json-modern-cxx ; For ParFlow; build fails + jsoncpp + libjpeg-turbo + libogg + libpng + libtheora + libtiff + libx11 ; Propagated from libxt, not strictly necessary + libxcursor + libxml2 + libxt + lz4 + lzip + mesa + netcdf + openmpi + ;;openvdb ; For OpenVDB; dependency not found + ;;openvr ; For XRInterface; build fails + ;;pegtl ; For VTK; build fails + proj + protobuf + pugixml + python-cftime + python-matplotlib + python-mpi4py + python-numpy + python-wrapper + qtbase-5 + qtdeclarative-5 + qtmultimedia-5 + qtsvg-5 + qttools-5 + qtwebchannel-5 + qtwebengine-5 + qtx11extras + qtxmlpatterns + sdl2 + sqlite + tbb + utfcpp + xorgproto ; Propagated from libx11, not strictly necessary + zlib)) + (home-page "https://www.paraview.org/") + (synopsis "VTK-based, parallel data analyzer and visualizer") + (description "ParaView is a VTK-based, parallel data analyzer and +visualizer which allows exploring data interactively in 3D or +programmatically.") + (license license:bsd-3)))