From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IDrAJkk13WKZ0QAAbAwnHQ (envelope-from ) for ; Sun, 24 Jul 2022 14:04:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uMHOJUk13WIugwAAG6o9tA (envelope-from ) for ; Sun, 24 Jul 2022 14:04:25 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1DB561FAEA for ; Sun, 24 Jul 2022 14:04:25 +0200 (CEST) Received: from localhost ([::1]:39052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFaLO-0003if-SL for larch@yhetil.org; Sun, 24 Jul 2022 08:04:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFaL5-0003gq-4f for guix-patches@gnu.org; Sun, 24 Jul 2022 08:04:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57259) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFaL4-0005Hy-Ou for guix-patches@gnu.org; Sun, 24 Jul 2022 08:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFaL4-0002dN-K4 for guix-patches@gnu.org; Sun, 24 Jul 2022 08:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56638] [PATCH v2 2/2] gnu: Add asli. Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 Jul 2022 12:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56638 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56638@debbugs.gnu.org Cc: "Paul A. Patience" Received: via spool by 56638-submit@debbugs.gnu.org id=B56638.165866419310048 (code B ref 56638); Sun, 24 Jul 2022 12:04:02 +0000 Received: (at 56638) by debbugs.gnu.org; 24 Jul 2022 12:03:13 +0000 Received: from localhost ([127.0.0.1]:47007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFaKG-0002bz-TU for submit@debbugs.gnu.org; Sun, 24 Jul 2022 08:03:13 -0400 Received: from mail-4323.proton.ch ([185.70.43.23]:51729) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFaKB-0002bC-FS for 56638@debbugs.gnu.org; Sun, 24 Jul 2022 08:03:10 -0400 Date: Sun, 24 Jul 2022 12:02:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail2; t=1658664181; x=1658923381; bh=AcoXyhmSL5zC/q/fSGH7hy+rdQDJr7QHVnEMpwIF5oo=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=Rxl5H0O/kWEivgsFFkG3RjIwlxk+s3LYV9JZ0cUgMnw3T2kgFYXjsQfZCDZ0c2dk/ T5Qd/TToijEJbSZ5DmRkumCug0ITMmauzd4WgYi7MpYwByrFhrE0WW2VdW2trQsQXU rk4MrQPnh5/OaY2b1ipRDN4RFSAu//q3vL6fOt2BqBKNYnOprIB7toIIY6k7SKZqI4 KTkD2KhslBn8kBnbbj/SDQ5v6ahmMALLpP/uZGmsHeDhaeqILLDHSkaOAHLUinx0Ep eJ0pdLpPjLIR8kMQb2/DORg7llikXzU3/Z4iebRrsz3lt0AMCIY+mNtlWR51uQEEUA kxNnBgy7ep1EQ== From: "Paul A. Patience" Message-ID: <20220724120228.54052-3-paul@apatience.com> In-Reply-To: <20220724120228.54052-1-paul@apatience.com> References: <20220724120228.54052-1-paul@apatience.com> Feedback-ID: 19227857:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658664265; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=AcoXyhmSL5zC/q/fSGH7hy+rdQDJr7QHVnEMpwIF5oo=; b=MMyHwxxhaTuUdYmh+kvD8SPXTS7I872jPjLrfspQO9XhLcDY4rZVBh4YCzAmSawFOI7VYw tA2//a0sTYp9b4B4bTw4CyqIyw+B+ehhpVS8y4J5mb2bwNqr1Lfei4rBHJY3QXA9oYc5Gt 0S/L59VvJ1uSWRrToR3Cr0nLvMknchw5vOwksHC/0P/RalFWfl74jY20wP+JGJbEbypNL5 YcFgsm4k0owxzPhblqrQ/5RkyzjqbwWHTcmUuLFZfb9T6AAVFcVW8hK4FDb1TOYoBPD02q dhBZEtckJ3PTRs03orNvxt0SMRAy1JPUZpmzvwAqV5hK/OxGUBjL1VwUui5PuA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658664265; a=rsa-sha256; cv=none; b=b/oav6ghDSeffHHHVrBEC/dUNvnenJXEkvx39/jT863WGae9R/ZyOEiogUwj9bEIGNY8Pj OrtX+pssNmE+1hzkFZI/x+RRv1zCaj9REtOiPdJHdaYyBR75p7xFXvSshsYYCIUdJKbUmI nLJaJA19uQl+0CXniBKExvhIM386st8esh+kmwk2wB2Un4Gt58Dgp1pXN9cJTTo2Dl+Ugk UjpuJDVNywSWJB/YTTWvEQnR3YMK+vUk8CzR6J/16NUS+esCLPgL7UgV4r1UTdfAeAKzLv foo5coBWOM9kzwS5uYIvhxdABODDArZdHKULg3lOrdO8C5MVDUG3M2PS90SDDg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=apatience.com header.s=protonmail2 header.b="Rxl5H0O/"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.57 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=apatience.com header.s=protonmail2 header.b="Rxl5H0O/"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1DB561FAEA X-Spam-Score: 1.57 X-Migadu-Scanner: scn0.migadu.com X-TUID: JtXwgyl7gPwq * gnu/packages/graphics.scm (asli): New variable. * gnu/packages/patches/asli-use-system-libs.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. --- gnu/local.mk | 1 + gnu/packages/graphics.scm | 74 +++++++++++++++++++ .../patches/asli-use-system-libs.patch | 70 ++++++++++++++++++ 3 files changed, 145 insertions(+) create mode 100644 gnu/packages/patches/asli-use-system-libs.patch diff --git a/gnu/local.mk b/gnu/local.mk index 412d512775..75ca3e6a29 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -858,6 +858,7 @@ dist_patch_DATA =3D=09=09=09=09=09=09\ %D%/packages/patches/antlr3-3_3-fix-java8-compilation.patch=09\ %D%/packages/patches/apr-skip-getservbyname-test.patch=09\ %D%/packages/patches/ark-skip-xar-test.patch=09=09=09\ + %D%/packages/patches/asli-use-system-libs.patch=09=09\ %D%/packages/patches/aspell-default-dict-dir.patch=09=09\ %D%/packages/patches/ath9k-htc-firmware-binutils.patch=09\ %D%/packages/patches/ath9k-htc-firmware-gcc.patch=09=09\ diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 7417fbe690..d3a11824b4 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -2224,3 +2224,77 @@ (define-public mmg @code{mmg3d} libraries. @end itemize") (license license:lgpl3+))) + +(define-public asli + (package + (name "asli") + (version "0.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tpms-lattice/ASLI") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "02hwdavpsy3vmivd6prp03jn004ykrl11lbkvksy5i2zm38zbknr")) + (patches (search-patches "asli-use-system-libs.patch")) + (modules '((guix build utils))) + (snippet + ;; Remove bundled libraries except (the ones missing from Guix and= ) + ;; KU Leuven's mTT, which is an obscure (i.e., unfindable by searc= hing + ;; online for =E2=80=9CmTT KU Leuven=E2=80=9D), BSD-3 licensed, he= ader-only library. + #~(begin + ;;(delete-file-recursively "libs/AdaptTools") ; Missing from G= uix + (delete-file-recursively "libs/CGAL") + ;;(delete-file-recursively "libs/alglib") ; Missing from Guix + (delete-file-recursively "libs/eigen") + (delete-file-recursively "libs/mmg") + ;;(delete-file-recursively "libs/tetgen") ; Missing from Guix + (delete-file-recursively "libs/yaml"))))) + (build-system cmake-build-system) + (inputs + (list boost + cgal + eigen + gmp + `(,mmg "lib") + mpfr + tbb-2020 + yaml-cpp)) + (arguments + (list #:tests? #f ; No tests + #:configure-flags + #~(list "-DCGAL_ACTIVATE_CONCURRENT_MESH_3=3DON" + (string-append "-DEIGEN3_INCLUDE_DIR=3D" + #$(this-package-input "eigen") + "/include/eigen3") + (string-append "-DMMG_INCLUDE_DIR=3D" + (ungexp (this-package-input "mmg") "lib"= ) + "/include") + (string-append "-DMMG_LIBRARY_DIR=3D" + (ungexp (this-package-input "mmg") "lib"= ) + "/lib")) + #:phases + #~(modify-phases %standard-phases + (replace 'install ; No install phase + (lambda _ + (with-directory-excursion "../source/bin" + (install-file "ASLI" (string-append #$output "/bin")) + ;; The manual is included in the repository. + ;; Building it requires -DASLI_DOC=3DON, but this is = marked + ;; as unsupported (presumably for users). + ;; Besides, some of the LaTeX packages it uses are + ;; missing from Guix, for example emptypage, fvextra = and + ;; menukeys. + (install-file "docs/ASLI [User Manual].pdf" + (string-append #$output "/share/doc/" + #$name "-" #$version))))= )))) + (home-page "http://www.biomech.ulg.ac.be/ASLI/") + (synopsis "Create lattice infills with varying unit cell type, size an= d feature") + (description "ASLI (A Simple Lattice Infiller) is a command-line tool = that +allows users to fill any 3D geometry with a functionally graded lattice. = The +lattice infill is constructed out of unit cells, described by implicit +functions, whose type, size and feature can be varied locally to obtain th= e +desired local properties.") + (license license:agpl3+))) diff --git a/gnu/packages/patches/asli-use-system-libs.patch b/gnu/packages= /patches/asli-use-system-libs.patch new file mode 100644 index 0000000000..d8234fd608 --- /dev/null +++ b/gnu/packages/patches/asli-use-system-libs.patch @@ -0,0 +1,70 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b11c5ba..702423e 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -122,28 +122,8 @@ if(MMG_MESH) + add_definitions(-DMMG_MESH) + + # MMG +- set(MMG_PREFIX mmg3d) +- set(MMG_PREFIX_DIR ${CMAKE_CURRENT_BINARY_DIR}/${MMG_PREFIX}) +- set(MMG_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/${MMG_PREFIX}) +- ExternalProject_Add(${MMG_PREFIX} +- PREFIX ${MMG_PREFIX_DIR} +- SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/mmg +- +- BUILD_ALWAYS OFF +- INSTALL_DIR ${MMG_INSTALL_DIR} +- +- CMAKE_ARGS(-DCMAKE_BUILD_TYPE=3DRelease -DBUILD=3DMMG3D -DLIBMMG3D_ST= ATIC=3DON +- -DLIBMMG3D_SHARED=3DOFF -DCMAKE_INSTALL_PREFIX=3D) +- +- BUILD_COMMAND make +- INSTALL_COMMAND make install +- ) +- set(MMG3D_INCLUDE_DIRS "${MMG_INSTALL_DIR}/include") +- set(MMG3D_LIBRARIES "${MMG_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}/${CMAKE= _STATIC_LIBRARY_PREFIX}${MMG_PREFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") +- +- include_directories(${MMG3D_INCLUDE_DIRS}) +- #add_library(MMG3D STATIC IMPORTED) +- #set_target_properties(MMG3D PROPERTIES IMPORTED_LOCATION "${MMG3D_LIBR= ARIES}") ++ include_directories(${MMG_INCLUDE_DIR}) ++ set(MMG3D_LIBRARIES ${MMG_LIBRARY_DIR}/libmmg3d.so) + + # MshMet + set(MSHMET_PREFIX mshmet) +@@ -192,14 +172,8 @@ target_include_directories(tet PUBLIC ${CMAKE_CURRENT= _SOURCE_DIR}/libs/tetgen) + target_compile_definitions(tet PUBLIC TETLIBRARY) # -DTETLIBRARY: flag to= compile tetgen as a library + + # yaml +-file(GLOB yaml_SRC CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libs/yam= l/src/*.cpp) # Using file GLOB is not recomended! +-add_library(yaml STATIC) +-target_include_directories(yaml +- PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/libs/yaml/include +- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/libs/yaml/src +-) +-target_sources(yaml PRIVATE ${yaml_SRC}) +-set_target_properties(yaml PROPERTIES CXX_STANDARD 11) ++find_package(yaml-cpp REQUIRED) ++include_directories(${YAML_CPP_INCLUDE_DIRS}) + + # Compile options for debuging + if(CMAKE_BUILD_TYPE MATCHES Debug) +@@ -259,7 +233,7 @@ if(MARCH_NATIVE) + endif() + + # Create entries for C++ files in "ASLI" routine +-target_link_libraries(ASLI PUBLIC alg tet yaml) ++target_link_libraries(ASLI PUBLIC alg tet ${YAML_CPP_LIBRARIES}) + if(NOT MSVC) + target_link_libraries(ASLI PUBLIC stdc++fs) + endif() +@@ -272,7 +246,7 @@ if(CGAL_MESH) + endif() + + if(MMG_MESH) +- add_dependencies(ASLI ${MMG_PREFIX} ${MSHMET_PREFIX}) ++ add_dependencies(ASLI ${MSHMET_PREFIX}) + target_link_libraries(ASLI PUBLIC ${MMG3D_LIBRARIES} ${MSHMET_LIBRARIES= }) + if(SCOTCH_FOUND) + target_link_libraries(ASLI PUBLIC ${SCOTCH_LIBRARIES} scotch) -- 2.37.0