mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: asli: Update to 0.1-1.4f4ba14.
* gnu/packages/graphics.scm (asli): Update to the commit 4f4ba142ea7db6eecfdb546538c88a38680a83c5 to allow build with CGAL v5.6. * gnu/packages/patches/asli-use-system-libs.patch: Update. Change-Id: I623099a34d96180fe6aa4c161cfa895597a45304
This commit is contained in:
parent
7aecfa9462
commit
455da8f458
2 changed files with 102 additions and 91 deletions
|
@ -2852,78 +2852,80 @@ a game.")
|
||||||
(license license:zlib))))
|
(license license:zlib))))
|
||||||
|
|
||||||
(define-public asli
|
(define-public asli
|
||||||
(package
|
;; Use the newer version of ASLI that allows build with CGAL v5.6.
|
||||||
(name "asli")
|
(let ((commit "4f4ba142ea7db6eecfdb546538c88a38680a83c5")
|
||||||
(version "0.1")
|
(revision "1"))
|
||||||
(source
|
(package
|
||||||
(origin
|
(name "asli")
|
||||||
(method git-fetch)
|
(version (git-version "0.1" revision commit))
|
||||||
(uri (git-reference
|
(source
|
||||||
(url "https://github.com/tpms-lattice/ASLI")
|
(origin
|
||||||
(commit (string-append "v" version))))
|
(method git-fetch)
|
||||||
(file-name (git-file-name name version))
|
(uri (git-reference
|
||||||
(sha256
|
(url "https://github.com/tpms-lattice/ASLI")
|
||||||
(base32 "02hwdavpsy3vmivd6prp03jn004ykrl11lbkvksy5i2zm38zbknr"))
|
(commit commit)))
|
||||||
(patches (search-patches "asli-use-system-libs.patch"))
|
(file-name (git-file-name name version))
|
||||||
(modules '((guix build utils)))
|
(sha256
|
||||||
(snippet
|
(base32 "122xxnj3dckmg6mh07x490564b2z9gd38cd0wc5zz3p4nshcq7wy"))
|
||||||
;; Remove bundled libraries except (the ones missing from Guix and)
|
(patches (search-patches "asli-use-system-libs.patch"))
|
||||||
;; KU Leuven's mTT, which is an obscure (i.e., unfindable by searching
|
(modules '((guix build utils)))
|
||||||
;; online for “mTT KU Leuven”), BSD-3 licensed, header-only library.
|
(snippet
|
||||||
#~(begin
|
;; Remove bundled libraries except (the ones missing from Guix and)
|
||||||
;;(delete-file-recursively "libs/AdaptTools") ; Missing from Guix
|
;; KU Leuven's mTT, which is an obscure (i.e., unfindable by searching
|
||||||
(delete-file-recursively "libs/CGAL")
|
;; online for “mTT KU Leuven”), BSD-3 licensed, header-only library.
|
||||||
;;(delete-file-recursively "libs/alglib") ; Missing from Guix
|
#~(begin
|
||||||
(delete-file-recursively "libs/eigen")
|
;;(delete-file-recursively "libs/AdaptTools") ; Missing from Guix
|
||||||
(delete-file-recursively "libs/mmg")
|
(delete-file-recursively "libs/CGAL")
|
||||||
;;(delete-file-recursively "libs/tetgen") ; Missing from Guix
|
;;(delete-file-recursively "libs/alglib") ; Missing from Guix
|
||||||
(delete-file-recursively "libs/yaml")))))
|
(delete-file-recursively "libs/eigen")
|
||||||
(build-system cmake-build-system)
|
(delete-file-recursively "libs/mmg")
|
||||||
(inputs
|
(delete-file-recursively "libs/yaml")))))
|
||||||
(list boost
|
(build-system cmake-build-system)
|
||||||
cgal
|
(inputs
|
||||||
eigen
|
(list boost
|
||||||
gmp
|
cgal
|
||||||
`(,mmg "lib")
|
eigen
|
||||||
mpfr
|
gmp
|
||||||
tbb-2020
|
`(,mmg "lib")
|
||||||
yaml-cpp))
|
mpfr
|
||||||
(arguments
|
tbb-2020
|
||||||
(list #:tests? #f ; No tests
|
yaml-cpp))
|
||||||
#:configure-flags
|
(arguments
|
||||||
#~(list "-DCGAL_ACTIVATE_CONCURRENT_MESH_3=ON"
|
(list #:tests? #f ; No tests
|
||||||
(string-append "-DEIGEN3_INCLUDE_DIR="
|
#:configure-flags
|
||||||
#$(this-package-input "eigen")
|
#~(list "-DCGAL_ACTIVATE_CONCURRENT_MESH_3=ON"
|
||||||
"/include/eigen3")
|
(string-append "-DEIGEN3_INCLUDE_DIR="
|
||||||
(string-append "-DMMG_INCLUDE_DIR="
|
#$(this-package-input "eigen")
|
||||||
(ungexp (this-package-input "mmg") "lib")
|
"/include/eigen3")
|
||||||
"/include")
|
(string-append "-DMMG_INCLUDE_DIR="
|
||||||
(string-append "-DMMG_LIBRARY_DIR="
|
(ungexp (this-package-input "mmg") "lib")
|
||||||
(ungexp (this-package-input "mmg") "lib")
|
"/include")
|
||||||
"/lib"))
|
(string-append "-DMMG_LIBRARY_DIR="
|
||||||
#:phases
|
(ungexp (this-package-input "mmg") "lib")
|
||||||
#~(modify-phases %standard-phases
|
"/lib"))
|
||||||
(replace 'install ; No install phase
|
#:phases
|
||||||
(lambda _
|
#~(modify-phases %standard-phases
|
||||||
(with-directory-excursion "../source/bin"
|
(replace 'install ; No install phase
|
||||||
(install-file "ASLI" (string-append #$output "/bin"))
|
(lambda _
|
||||||
;; The manual is included in the repository.
|
(with-directory-excursion "../source/bin"
|
||||||
;; Building it requires -DASLI_DOC=ON, but this is marked
|
(install-file "ASLI" (string-append #$output "/bin"))
|
||||||
;; as unsupported (presumably for users).
|
;; The manual is included in the repository.
|
||||||
;; Besides, some of the LaTeX packages it uses are
|
;; Building it requires -DASLI_DOC=ON, but this is marked
|
||||||
;; missing from Guix, for example emptypage, fvextra and
|
;; as unsupported (presumably for users).
|
||||||
;; menukeys.
|
;; Besides, some of the LaTeX packages it uses are
|
||||||
(install-file "docs/ASLI [User Manual].pdf"
|
;; missing from Guix, for example emptypage, fvextra and
|
||||||
(string-append #$output "/share/doc/"
|
;; menukeys.
|
||||||
#$name "-" #$version))))))))
|
(install-file "docs/ASLI [User Manual].pdf"
|
||||||
(home-page "http://www.biomech.ulg.ac.be/ASLI/")
|
(string-append #$output "/share/doc/"
|
||||||
(synopsis "Create lattice infills with varying unit cell type, size and feature")
|
#$name "-" #$version))))))))
|
||||||
(description "ASLI (A Simple Lattice Infiller) is a command-line tool that
|
(home-page "http://www.biomech.ulg.ac.be/ASLI/")
|
||||||
|
(synopsis "Create lattice infills with varying unit cell type, size and 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
|
allows users to fill any 3D geometry with a functionally graded lattice. The
|
||||||
lattice infill is constructed out of unit cells, described by implicit
|
lattice infill is constructed out of unit cells, described by implicit
|
||||||
functions, whose type, size and feature can be varied locally to obtain the
|
functions, whose type, size and feature can be varied locally to obtain the
|
||||||
desired local properties.")
|
desired local properties.")
|
||||||
(license license:agpl3+)))
|
(license license:agpl3+))))
|
||||||
|
|
||||||
(define-public f3d
|
(define-public f3d
|
||||||
(package
|
(package
|
||||||
|
|
|
@ -1,12 +1,20 @@
|
||||||
Adjust CMakeLists.txt to use system-provided mmg and yaml-cpp libraries.
|
From edfff0027c3cdacbbc0f288078366058f598544d Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
|
||||||
|
Date: Wed, 14 Aug 2024 07:57:20 +0300
|
||||||
|
Subject: [PATCH] CMakeLists.txt: Adjust to use system libraries.
|
||||||
|
|
||||||
|
* CMakeLists.txt: Adjust to use system-provided mmg and yaml-cpp libraries.
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 38 ++++++--------------------------------
|
||||||
|
1 file changed, 6 insertions(+), 32 deletions(-)
|
||||||
|
|
||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index b11c5ba..702423e 100755
|
index ca2a01f9..c6eff22f 100755
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -122,28 +122,8 @@ if(MMG_MESH)
|
@@ -113,28 +113,8 @@ endif()
|
||||||
add_definitions(-DMMG_MESH)
|
|
||||||
|
|
||||||
|
# Mmg and its components
|
||||||
# MMG
|
# MMG
|
||||||
- set(MMG_PREFIX mmg3d)
|
- set(MMG_PREFIX mmg3d)
|
||||||
- set(MMG_PREFIX_DIR ${CMAKE_CURRENT_BINARY_DIR}/${MMG_PREFIX})
|
- set(MMG_PREFIX_DIR ${CMAKE_CURRENT_BINARY_DIR}/${MMG_PREFIX})
|
||||||
|
@ -19,7 +27,7 @@ index b11c5ba..702423e 100755
|
||||||
- INSTALL_DIR ${MMG_INSTALL_DIR}
|
- INSTALL_DIR ${MMG_INSTALL_DIR}
|
||||||
-
|
-
|
||||||
- CMAKE_ARGS(-DCMAKE_BUILD_TYPE=Release -DBUILD=MMG3D -DLIBMMG3D_STATIC=ON
|
- CMAKE_ARGS(-DCMAKE_BUILD_TYPE=Release -DBUILD=MMG3D -DLIBMMG3D_STATIC=ON
|
||||||
- -DLIBMMG3D_SHARED=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>)
|
- -DLIBMMG3D_SHARED=OFF -DUSE_ELAS=OFF -DUSE_VTK=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>)
|
||||||
-
|
-
|
||||||
- BUILD_COMMAND make
|
- BUILD_COMMAND make
|
||||||
- INSTALL_COMMAND make install
|
- INSTALL_COMMAND make install
|
||||||
|
@ -35,8 +43,8 @@ index b11c5ba..702423e 100755
|
||||||
|
|
||||||
# MshMet
|
# MshMet
|
||||||
set(MSHMET_PREFIX mshmet)
|
set(MSHMET_PREFIX mshmet)
|
||||||
@@ -192,14 +172,8 @@ target_include_directories(tet PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/libs/tetgen)
|
@@ -174,14 +154,8 @@ target_include_directories(alg PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/libs/alglib/sr
|
||||||
target_compile_definitions(tet PUBLIC TETLIBRARY) # -DTETLIBRARY: flag to compile tetgen as a library
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libs/mTT/include)
|
||||||
|
|
||||||
# yaml
|
# yaml
|
||||||
-file(GLOB yaml_SRC CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libs/yaml/src/*.cpp) # Using file GLOB is not recomended!
|
-file(GLOB yaml_SRC CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libs/yaml/src/*.cpp) # Using file GLOB is not recomended!
|
||||||
|
@ -52,21 +60,22 @@ index b11c5ba..702423e 100755
|
||||||
|
|
||||||
# Compile options for debuging
|
# Compile options for debuging
|
||||||
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
if(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||||
@@ -259,7 +233,7 @@ if(MARCH_NATIVE)
|
@@ -218,7 +192,7 @@ endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
# Create entries for C++ files in "ASLI" routine
|
# Create entries for C++ files in "ASLI" routine
|
||||||
-target_link_libraries(ASLI PUBLIC alg tet yaml)
|
add_dependencies(ASLI ${MMG_PREFIX} ${MSHMET_PREFIX})
|
||||||
+target_link_libraries(ASLI PUBLIC alg tet ${YAML_CPP_LIBRARIES})
|
-target_link_libraries(ASLI PUBLIC alg yaml
|
||||||
if(NOT MSVC)
|
+target_link_libraries(ASLI PUBLIC alg ${YAML_CPP_LIBRARIES}
|
||||||
target_link_libraries(ASLI PUBLIC stdc++fs)
|
CGAL::CGAL CGAL::Eigen_support
|
||||||
endif()
|
${MMG3D_LIBRARIES} ${MSHMET_LIBRARIES}
|
||||||
@@ -272,7 +246,7 @@ if(CGAL_MESH)
|
)
|
||||||
endif()
|
@@ -301,4 +275,4 @@ if(MSYS AND ASLI_DLL)
|
||||||
|
$<TARGET_FILE_DIR:ASLI>
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
-endif()
|
||||||
|
\ No newline at end of file
|
||||||
|
+endif()
|
||||||
|
--
|
||||||
|
2.45.2
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue