From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFROk-0004MN-8V for guix-patches@gnu.org; Wed, 24 Oct 2018 18:13:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFROg-0007nn-Qk for guix-patches@gnu.org; Wed, 24 Oct 2018 18:13:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36693) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gFROf-0007n5-Mq for guix-patches@gnu.org; Wed, 24 Oct 2018 18:13:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gFROf-0005mj-HI for guix-patches@gnu.org; Wed, 24 Oct 2018 18:13:01 -0400 Subject: [bug#33059] [PATCH 08/10] gnu: Add fenics-dolfin. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <1539682284-6446-1-git-send-email-pgarlick@tourbillion-technology.com> <1539682284-6446-8-git-send-email-pgarlick@tourbillion-technology.com> Date: Thu, 25 Oct 2018 00:12:19 +0200 In-Reply-To: <1539682284-6446-8-git-send-email-pgarlick@tourbillion-technology.com> (Paul Garlick's message of "Tue, 16 Oct 2018 10:31:22 +0100") Message-ID: <87va5rvvss.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Paul Garlick Cc: 33059@debbugs.gnu.org Paul Garlick skribis: > * gnu/packages/simulation.scm (fenics-dolfin): New variable. [...] > + (add-before 'configure 'pre-configure > + (lambda _ > + (use-modules (ice-9 regex) > + (ice-9 rdelim) > + (guix build utils) > + (rnrs io ports)) Please use #:modules instead of an inner =E2=80=98use-modules=E2=80=99 form= (which may or may not work in future Guile versions.) > + ;; Add extra include directories required by the unit tests. > + (with-atomic-file-replacement "test/unit/cpp/CMakeLists.txt" > + (let ((rx (make-regexp "target_link_libraries"))) > + (lambda (in out) > + (let loop () > + (let ((line (read-line in 'concat))) > + (if (eof-object? line) > + #t > + (begin > + (display line out) > + (when (regexp-exec rx line) > + (display > + (string-append > + "target_include_directories(" > + "unittests PRIVATE " > + "${DOLFIN_SOURCE_DIR} " > + "${DOLFIN_SOURCE_DIR}/dolfin " > + "${DOLFIN_BINARY_DIR})\n") out)) > + (loop)))))))) Could this be achieved with a single =E2=80=98substitute*=E2=80=99? It loo= ks like that would be more compact. Also, perhaps this should be done in a =E2=80=98snippet=E2=80=99? > + ;; Add extra include directories required by the demo tests. > + (with-atomic-file-replacement "demo/CMakeLists.txt" > + (let ((rx (make-regexp "find_package"))) > + (lambda (in out) > + (let loop () > + (let ((line (read-line in 'concat))) > + (if (eof-object? line) > + #t > + (begin > + (display line out) > + (when (regexp-exec rx line) > + (display > + (string-append > + "include_directories(" > + "${DOLFIN_SOURCE_DIR} " > + "${DOLFIN_SOURCE_DIR}/dolfin " > + "${DOLFIN_BINARY_DIR})\n") out)) > + (loop)))))))))) Same question here. > + (call-with-output-file "CTestCustom.cmake" > + (lambda (port) > + (display > + (string-append > + "set(CTEST_CUSTOM_TESTS_IGNORE " > + "demo_bcs_serial " > + "demo_bcs_mpi " > + "demo_eigenvalue_serial " > + "demo_eigenvalue_mpi " > + "demo_navier-stokes_serial " Could we avoid listing all the files here? I=E2=80=99m thinking about some= thing like =E2=80=98scandir=E2=80=99 + =E2=80=98delete=E2=80=99. > + ;; The source code files for the DOLFIN C++ library are licensed und= er the > + ;; GNU Lesser General Public License, version 3 or later, with the > + ;; following exceptions: > + ;; > + ;; bsd-2: cmake/modules/FindAMD.cmake > + ;; cmake/modules/FindBLASHeader.cmake > + ;; cmake/modules/FindCHOLMOD.cmake > + ;; cmake/modules/FindEigen3.cmake > + ;; cmake/modules/FindMPFR.cmake > + ;; cmake/modules/FindNumPy.cmake > + ;; cmake/modules/FindPETSc.cmake > + ;; cmake/modules/FindPETSc4py.cmake > + ;; cmake/modules/FindParMETIS.cmake > + ;; cmake/modules/FindSCOTCH.cmake > + ;; cmake/modules/FindSLEPc.cmake > + ;; cmake/modules/FindSLEPc4py.cmake > + ;; cmake/modules/FindSphinx.cmake > + ;; cmake/modules/FindSUNDIALS.cmake > + ;; cmake/modules/FindUFC.cmake > + ;; > + ;; bsd-3: cmake/modules/FindBLAS.cmake > + ;; cmake/modules/FindLAPACK.cmake > + ;; cmake/modules/FindMPI.cmake > + ;; > + ;; public-domain: dolfin/geometry/predicates.cpp > + ;; dolfin/geometry/predicates.h > + ;; > + ;; zlib: dolfin/io/base64.cpp > + ;; dolfin/io/base64.h > + ;; > + ;; expat: dolfin/io/pugiconfig.hpp > + ;; dolfin/io/pugixml.cpp > + ;; dolfin/io/pugixml.hpp > + ;; > + ;; boost1.0: test/unit/cpp/catch/catch.hpp Thanks for the detailed licensing review! IMO we don=E2=80=99t need to list the license of the .cmake files, which are just build files (likewise, we usually ignore M4 files and shell scripts found in Autotools-based projects.) I wonder if we could use our =E2=80=98catch=E2=80=99 package and remove =E2= =80=98catch.hpp=E2=80=99. That=E2=80=99s it!