On Sat, 2017-01-21 at 16:13 +0100, Ludovic Courtès wrote: > Marius Bakke <mba...@fastmail.com> skribis: > > > > > Paul Garlick <pgarl...@tourbillion-technology.com> writes: > [...] > > > > > Libtool and file should likely be native-inputs, not sure about the > > others. Could you check whether they are required and send an > > updated > > patch? > ‘file’ is already an implicit input, so I’m not why it needs to be > added > (perhaps OpenCascade depends on libmagic?). > > As for Libtool, I wonder why it is needed at all, especially given > that > OpenCascade is built with CMake. > > Ludo’. Hi Marius and Ludo, Thank you for your comments. I have checked the dependencies and here are the results: ftgl: not needed qt: not needed libtool: not needed file: not needed tcl: required by the DRAW test harness tk: required by the DRAW test harness I have amended the patch to remove the extra dependencies. The public domain licence information is now included. Also, there is an extra configuration flag required to successfully build the DRAW libraries and executable. The '-UCMAKE_INSTALL_RPATH' flag is required for the validate-runpath stage to succeed. This is to do with the way the global variable is initialized. There is a distinction in CMake between lists and strings, which was new to me so I will document it here. Essentially, if a variable is initialized as a single string it cannot subsequently be overriden by a list of strings. The cmake instructions in OpenCascade (in adm/cmake/BuildToolKit.cmake) attempt to do this at the install stage. The DRAW harness needs a RUNPATH including both .../lib and .../lib/oce-0.17. With the standard definition of CMAKE_INSTALL_RPATH (from cmake-build-system.scm) the substitution of the INSTALL_RPATH property only includes the first string. Consequently, the validate-runpath phase fails (error: library ... not in RUNPATH ...). The configuration flag -UCMAKE_INSTALL_RPATH unsets the global variable and allows the opencascade cmake rules to do the work instead, setting the RUNPATH correctly for each target. On the subject of the 0.18 version, perhaps this could be the subject of a separate patch. There could be an argument to just update in the normal way (instead of having two packages at once). The issue is related to the hardware requirements of recent versions of OpenGL. It is useful to start with 0.17 as this imposes the least restriction on older graphics card. I can do some testing on the new version, later on, to determine how important this is. The amended patch is attached. Best, Paul.
From a5f64ac9b488249027fc92c46d737d4572e57d02 Mon Sep 17 00:00:00 2001 From: Paul Garlick <pgarl...@tourbillion-technology.com> Date: Wed, 18 Jan 2017 10:01:36 +0000 Subject: [PATCH] gnu: Add opencascade-oce
* gnu/packages/maths.scm: Add opencascade-oce --- gnu/packages/maths.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 313f6ac..c8e280f 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2016 Ludovic Courtès <l...@gnu.org> ;;; Copyright © 2016 Leo Famulari <l...@famulari.name> ;;; Copyright © 2016 Thomas Danckaert <p...@thomasdanckaert.be> +;;; Copyright © 2017 Paul Garlick <pgarl...@tourbillion-technology.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -956,6 +957,53 @@ Work may be performed both at the interactive command-line as well as via script files.") (license license:gpl3+))) +(define-public opencascade-oce + (package + (name "opencascade-oce") + (version "0.17.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/tpaviot/oce/archive/OCE-" + version + ".tar.gz")) + (sha256 + (base32 + "0vpmnb0k5y2f7lpmwx9pg9yfq24zjvnsak5alzacncfm1hv9b6cd")))) + (build-system cmake-build-system) + (arguments + '(#:configure-flags + (list "-DOCE_TESTING:BOOL=ON" + "-DOCE_USE_TCL_TEST_FRAMEWORK:BOOL=ON" + "-DOCE_DRAW:BOOL=ON" + (string-append "-DOCE_INSTALL_PREFIX:PATH=" + (assoc-ref %outputs "out")) + "-UCMAKE_INSTALL_RPATH"))) + (inputs + `(("freetype" ,freetype) + ("glu" ,glu) + ("libxmu" ,libxmu) + ("mesa" ,mesa) + ("tcl" ,tcl) + ("tk" ,tk))) + (native-inputs + `(("python" ,python-wrapper))) + (home-page "https://github.com/tpaviot/oce") + (synopsis + "Libraries for 3D modeling and numerical simulation") + (description "OCE stands for Open CASCADE Community Edition. The project +gathers patches/improvements/experiments contributed by users over the official +Open CASCADE library.") + (license (list license:lgpl2.1; OCE libraries, with an exception for the + ; use of header files; see + ; OCCT_LGPL_EXCEPTION.txt + license:public-domain; files + ; src/Standard/Standard_StdAllocator.hxx and + ; src/NCollection/NCollection_StdAllocator.hxx + license:expat; file src/OpenGl/OpenGl_glext.h + license:bsd-3)))); test framework gtest + (define-public gmsh (package (name "gmsh") -- 2.7.4