* [bug#56638] [PATCH] gnu: Add asli.
@ 2022-07-19 7:59 Paul A. Patience
2022-07-19 8:10 ` Paul A. Patience
` (4 more replies)
0 siblings, 5 replies; 18+ messages in thread
From: Paul A. Patience @ 2022-07-19 7:59 UTC (permalink / raw)
To: 56638; +Cc: Paul A. Patience
* gnu/packages/graphics.scm (asli): New variable.
---
gnu/packages/graphics.scm | 67 +++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index c193be1efb..bae1ba1f99 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -31,6 +31,7 @@
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2022 Tobias Kortkamp <tobias.kortkamp@gmail.com>
+;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2120,3 +2121,69 @@ (define-public azpainter
@end itemize
")
(license license:gpl3+)))
+
+(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"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Remove bundled libraries except ALGLIB, TetGen and yaml-cpp, which
+ ;; are statically linked, and KU Leuven's mTT, which is an obscure
+ ;; (i.e., unfindable by searching online for “mTT KU Leuven”), BSD-3
+ ;; licensed, header-only library.
+ ;;
+ ;; AdaptTools and mmg are missing from Guix, but anyway they are
+ ;; unused because mmg support is disabled (-DMMG_MESH=OFF).
+ #~(begin
+ (delete-file-recursively "libs/AdaptTools")
+ (delete-file-recursively "libs/CGAL")
+ (delete-file-recursively "libs/eigen")
+ (delete-file-recursively "libs/mmg")))))
+ (build-system cmake-build-system)
+ (native-inputs
+ ;; Header-only library
+ (list cgal))
+ (inputs
+ (list boost
+ eigen
+ gmp
+ mpfr
+ tbb-2020))
+ (arguments
+ (list #:tests? #f ; No tests
+ #:configure-flags
+ #~(list "-DCGAL_ACTIVATE_CONCURRENT_MESH_3=ON"
+ "-DMMG_MESH=OFF" ; Build fails when enabled (the default)
+ (string-append "-DEIGEN3_INCLUDE_DIR="
+ #$(this-package-input "eigen")
+ "/include/eigen3"))
+ #: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=ON, but this is marked
+ ;; as unsupported (presumably for users).
+ (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 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
+lattice infill is constructed out of unit cells, described by implicit
+functions, whose type, size and feature can be varied locally to obtain the
+desired local properties.")
+ (license license:agpl3+)))
--
2.37.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH] gnu: Add asli.
2022-07-19 7:59 [bug#56638] [PATCH] gnu: Add asli Paul A. Patience
@ 2022-07-19 8:10 ` Paul A. Patience
2022-07-19 14:21 ` Ludovic Courtès
2022-07-19 14:32 ` Maxime Devos
` (3 subsequent siblings)
4 siblings, 1 reply; 18+ messages in thread
From: Paul A. Patience @ 2022-07-19 8:10 UTC (permalink / raw)
To: 56638
Hi Ludovic,
ASLI optionally depends on mmg, which I discovered a Guix package for in
the Guix HPC project [1], and for which you seem to be the point of
contact.
I'd like to add mmg to Guix, first to eventually be able to drop ASLI's
bundled version (although I can't get ASLI to build with mmg yet) and
second because I have looked into mmg recently and may want to use it
myself.
Is it just a question of moving the package over to Guix verbatim?
I tried that and it compiled correctly.
Thanks,
Paul
[1]: https://gitlab.inria.fr/guix-hpc/guix-hpc/-/blob/master/inria/mmg.scm
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH] gnu: Add asli.
2022-07-19 8:10 ` Paul A. Patience
@ 2022-07-19 14:21 ` Ludovic Courtès
0 siblings, 0 replies; 18+ messages in thread
From: Ludovic Courtès @ 2022-07-19 14:21 UTC (permalink / raw)
To: Paul A. Patience; +Cc: 56638
Hello,
"Paul A. Patience" <paul@apatience.com> skribis:
> ASLI optionally depends on mmg, which I discovered a Guix package for in
> the Guix HPC project [1], and for which you seem to be the point of
> contact.
Right!
> I'd like to add mmg to Guix, first to eventually be able to drop ASLI's
> bundled version (although I can't get ASLI to build with mmg yet) and
> second because I have looked into mmg recently and may want to use it
> myself.
Makes sense to me.
> Is it just a question of moving the package over to Guix verbatim?
> I tried that and it compiled correctly.
Sure, I guess you can copy it verbatim, tweaking the description
(removing “open source”, fixing the first sentence.)
TIA!
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH] gnu: Add asli.
2022-07-19 7:59 [bug#56638] [PATCH] gnu: Add asli Paul A. Patience
2022-07-19 8:10 ` Paul A. Patience
@ 2022-07-19 14:32 ` Maxime Devos
2022-07-19 14:34 ` Maxime Devos
` (2 subsequent siblings)
4 siblings, 0 replies; 18+ messages in thread
From: Maxime Devos @ 2022-07-19 14:32 UTC (permalink / raw)
To: Paul A. Patience, 56638
Paul A. Patience schreef op di 19-07-2022 om 07:59 [+0000]:
> + (native-inputs
> + ;; Header-only library
> + (list cgal))
Being header-only makes no difference w.r.t. cross-compilation (and
hence, inputs/native-inputs). For examples, headers can potentially
contain architecture-specific code (generated at the compile time of
the cgal library). As such, this may need to be in 'inputs' instead of
'native-inputs'.
Another reason: this should be in 'inputs', otherwise when cross-
compiling it will end in in (IIUC) C_INCLUDE_PATH instead of
CROSS_C_INLUDE_PATH, whereas the cross-compiler will look in
CROSS_C_INCLUDE_PATH and not C_INCLUDE_PATH.
Greetings,
Maxime.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH] gnu: Add asli.
2022-07-19 7:59 [bug#56638] [PATCH] gnu: Add asli Paul A. Patience
2022-07-19 8:10 ` Paul A. Patience
2022-07-19 14:32 ` Maxime Devos
@ 2022-07-19 14:34 ` Maxime Devos
2022-07-24 12:02 ` [bug#56638] [PATCH v2 0/2] " Paul A. Patience
2022-09-02 20:34 ` [bug#56638] [PATCH v3] " Paul A. Patience
4 siblings, 0 replies; 18+ messages in thread
From: Maxime Devos @ 2022-07-19 14:34 UTC (permalink / raw)
To: Paul A. Patience, 56638
Paul A. Patience schreef op di 19-07-2022 om 07:59 [+0000]:
> + ;; Remove bundled libraries except ALGLIB, TetGen and yaml-
> cpp, which
> + ;; are statically linked,
What does it matter that they are statically linked w.r.t. bundling?
Those seem orthogonal concerns to me. We can easily define a static
variant of alglib etc, or alternatively (probably more difficult but
feasible) tweak the build process of asli to look for shared libraries
instead of static libraries.
Greetings,
Maxime.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH v2 0/2] gnu: Add asli.
2022-07-19 7:59 [bug#56638] [PATCH] gnu: Add asli Paul A. Patience
` (2 preceding siblings ...)
2022-07-19 14:34 ` Maxime Devos
@ 2022-07-24 12:02 ` Paul A. Patience
2022-07-24 12:02 ` [bug#56638] [PATCH v2 1/2] gnu: Add mmg Paul A. Patience
2022-07-24 12:02 ` [bug#56638] [PATCH v2 2/2] " Paul A. Patience
2022-09-02 20:34 ` [bug#56638] [PATCH v3] " Paul A. Patience
4 siblings, 2 replies; 18+ messages in thread
From: Paul A. Patience @ 2022-07-24 12:02 UTC (permalink / raw)
To: 56638; +Cc: Paul A. Patience
I've fixed the issues raised by Maxime Devos and also added the mmg package
(and fixed the build of ASLI with mmg).
The mmg package originally began as Guix HPC's mmg package [1], but I ended up
completely rewriting it (well, except for the source section).
[1]: https://gitlab.inria.fr/guix-hpc/guix-hpc/-/blob/master/inria/mmg.scm
Paul A. Patience (2):
gnu: Add mmg.
gnu: Add asli.
gnu/local.mk | 1 +
gnu/packages/graphics.scm | 178 ++++++++++++++++++
.../patches/asli-use-system-libs.patch | 70 +++++++
3 files changed, 249 insertions(+)
create mode 100644 gnu/packages/patches/asli-use-system-libs.patch
--
2.37.0
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH v2 1/2] gnu: Add mmg.
2022-07-24 12:02 ` [bug#56638] [PATCH v2 0/2] " Paul A. Patience
@ 2022-07-24 12:02 ` Paul A. Patience
2022-08-29 21:21 ` [bug#56638] [PATCH] gnu: Add asli Ludovic Courtès
2022-07-24 12:02 ` [bug#56638] [PATCH v2 2/2] " Paul A. Patience
1 sibling, 1 reply; 18+ messages in thread
From: Paul A. Patience @ 2022-07-24 12:02 UTC (permalink / raw)
To: 56638; +Cc: Paul A. Patience
* gnu/packages/graphics.scm (mmg): New variable.
---
gnu/packages/graphics.scm | 104 ++++++++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index c193be1efb..7417fbe690 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -31,6 +31,7 @@
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
;;; Copyright © 2022 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2022 Tobias Kortkamp <tobias.kortkamp@gmail.com>
+;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2120,3 +2121,106 @@ (define-public azpainter
@end itemize
")
(license license:gpl3+)))
+
+(define-public mmg
+ (package
+ (name "mmg")
+ (version "5.6.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/MmgTools/mmg")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "173biz5skbwg27i5w6layg7mydjzv3rmi1ywhra4rx9rjf5c0cc5"))))
+ (build-system cmake-build-system)
+ (outputs '("out" "lib" "doc"))
+ (arguments
+ (list #:configure-flags
+ #~(list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output:lib)
+ (string-append "-DCMAKE_INSTALL_RPATH=" #$output:lib "/lib")
+ ;; The build doesn't honor -DCMAKE_INSTALL_BINDIR, hence
+ ;; the adjust-bindir phase.
+ ;;(string-append "-DCMAKE_INSTALL_BINDIR=" #$output "/bin")
+ "-DBUILD_SHARED_LIBS=ON"
+ "-DBUILD_TESTING=ON"
+ ;; The longer tests are for continuous integration and
+ ;; depend on input data which must be downloaded.
+ "-DONLY_VERY_SHORT_TESTS=ON"
+ ;; TODO: Add Elas (from
+ ;; https://github.com/ISCDtoolbox/LinearElasticity).
+ "-DUSE_ELAS=OFF"
+ ;; TODO: Figure out how to add VTK to inputs without
+ ;; causing linking errors in ASLI of the form:
+ ;;
+ ;; ld: /gnu/store/…-vtk-9.0.1/lib/libvtkWrappingPythonCore-9.0.so.1:
+ ;; undefined reference to `PyUnicode_InternFromString'
+ ;;
+ ;; Also, adding VTK to inputs requires adding these as well:
+ ;;
+ ;; double-conversion eigen expat freetype gl2ps glew hdf5
+ ;; jsoncpp libjpeg-turbo libpng libtheora libtiff libx11
+ ;; libxml2 lz4 netcdf proj python sqlite zlib
+ "-DUSE_VTK=OFF")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'build 'build-doc
+ (lambda _
+ ;; Fontconfig wants to write to a cache directory.
+ (setenv "HOME" "/tmp")
+ (invoke "make" "doc")))
+ (add-after 'install 'install-doc
+ (lambda _
+ (copy-recursively
+ "../source/doc/man" (string-append #$output
+ "/share/man/man1"))
+ (copy-recursively
+ "doc" (string-append #$output:doc "/share/doc/"
+ #$name "-" #$version))))
+ (add-after 'install 'adjust-bindir
+ (lambda _
+ (let ((src (string-append #$output:lib "/bin"))
+ (dst (string-append #$output "/bin")))
+ (copy-recursively src dst)
+ (delete-file-recursively src))))
+ ;; Suffixing program names with build information, i.e.,
+ ;; optimization flags and whether debug symbols were generated,
+ ;; is unusual and fragilizes scripts calling these programs.
+ (add-after 'adjust-bindir 'fix-program-names
+ (lambda _
+ (with-directory-excursion (string-append #$output "/bin")
+ (rename-file "mmg2d_O3d" "mmg2d")
+ (rename-file "mmg3d_O3d" "mmg3d")
+ (rename-file "mmgs_O3d" "mmgs")))))))
+ (native-inputs
+ ;; For the documentation
+ (list doxygen graphviz
+ ;; TODO: Fix failing LaTeX invocation (which results in equations
+ ;; being inserted literally into PNGs rather than being typeset).
+ ;;texlive-tiny
+ ))
+ (inputs
+ (list scotch))
+ (home-page "http://www.mmgtools.org/")
+ (synopsis "Surface and volume remeshers")
+ (description "Mmg is a collection of applications and libraries for
+bidimensional and tridimensional surface and volume remeshing. It consists
+of:
+
+@itemize
+@item the @code{mmg2d} application and library: mesh generation from a set of
+edges, adaptation and optimization of a bidimensional triangulation and
+isovalue discretization;
+
+@item the @code{mmgs} application and library: adaptation and optimization of
+a surface triangulation and isovalue discretization;
+
+@item the @code{mmg3d} application and library: adaptation and optimization of
+a tetrahedral mesh, isovalue discretization and Lagrangian movement;
+
+@item the @code{mmg} library gathering the @code{mmg2d}, @code{mmgs} and
+@code{mmg3d} libraries.
+@end itemize")
+ (license license:lgpl3+)))
--
2.37.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH v2 2/2] gnu: Add asli.
2022-07-24 12:02 ` [bug#56638] [PATCH v2 0/2] " Paul A. Patience
2022-07-24 12:02 ` [bug#56638] [PATCH v2 1/2] gnu: Add mmg Paul A. Patience
@ 2022-07-24 12:02 ` Paul A. Patience
2022-08-04 21:40 ` [bug#56638] [PATCH] " Ludovic Courtès
1 sibling, 1 reply; 18+ messages in thread
From: Paul A. Patience @ 2022-07-24 12:02 UTC (permalink / raw)
To: 56638; +Cc: Paul A. Patience
* 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 = \
%D%/packages/patches/antlr3-3_3-fix-java8-compilation.patch \
%D%/packages/patches/apr-skip-getservbyname-test.patch \
%D%/packages/patches/ark-skip-xar-test.patch \
+ %D%/packages/patches/asli-use-system-libs.patch \
%D%/packages/patches/aspell-default-dict-dir.patch \
%D%/packages/patches/ath9k-htc-firmware-binutils.patch \
%D%/packages/patches/ath9k-htc-firmware-gcc.patch \
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 searching
+ ;; online for “mTT KU Leuven”), BSD-3 licensed, header-only library.
+ #~(begin
+ ;;(delete-file-recursively "libs/AdaptTools") ; Missing from Guix
+ (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=ON"
+ (string-append "-DEIGEN3_INCLUDE_DIR="
+ #$(this-package-input "eigen")
+ "/include/eigen3")
+ (string-append "-DMMG_INCLUDE_DIR="
+ (ungexp (this-package-input "mmg") "lib")
+ "/include")
+ (string-append "-DMMG_LIBRARY_DIR="
+ (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=ON, 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 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
+lattice infill is constructed out of unit cells, described by implicit
+functions, whose type, size and feature can be varied locally to obtain the
+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=Release -DBUILD=MMG3D -DLIBMMG3D_STATIC=ON
+- -DLIBMMG3D_SHARED=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>)
+-
+- 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_LIBRARIES}")
++ 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/yaml/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
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH] gnu: Add asli.
2022-07-24 12:02 ` [bug#56638] [PATCH v2 2/2] " Paul A. Patience
@ 2022-08-04 21:40 ` Ludovic Courtès
2022-08-29 21:21 ` Ludovic Courtès
0 siblings, 1 reply; 18+ messages in thread
From: Ludovic Courtès @ 2022-08-04 21:40 UTC (permalink / raw)
To: Paul A. Patience; +Cc: 56638
Hi Paul,
"Paul A. Patience" <paul@apatience.com> skribis:
> * 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.
The source derivation fails to build for me:
--8<---------------cut here---------------start------------->8---
File CMakeLists.txt is read-only; trying to patch anyway
patching file CMakeLists.txt
Hunk #2 FAILED at 172.
Hunk #3 succeeded at 240 (offset 1 line).
Hunk #4 succeeded at 253 (offset 1 line).
1 out of 4 hunks FAILED -- saving rejects to file CMakeLists.txt.rej
--8<---------------cut here---------------end--------------->8---
> 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
Also, as suggested by ‘guix lint’, please add a comment at the top
stating what this does and what the upstream status is (if it’s been
submitted), at least something like:
Tweak build system to use system dependencies instead of those that
are bundled.
Could you please send an updated patch?
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH] gnu: Add asli.
2022-07-24 12:02 ` [bug#56638] [PATCH v2 1/2] gnu: Add mmg Paul A. Patience
@ 2022-08-29 21:21 ` Ludovic Courtès
0 siblings, 0 replies; 18+ messages in thread
From: Ludovic Courtès @ 2022-08-29 21:21 UTC (permalink / raw)
To: Paul A. Patience; +Cc: 56638
Hi,
"Paul A. Patience" <paul@apatience.com> skribis:
> * gnu/packages/graphics.scm (mmg): New variable.
Applied this one for now.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH] gnu: Add asli.
2022-08-04 21:40 ` [bug#56638] [PATCH] " Ludovic Courtès
@ 2022-08-29 21:21 ` Ludovic Courtès
2022-08-30 12:01 ` Paul A. Patience
0 siblings, 1 reply; 18+ messages in thread
From: Ludovic Courtès @ 2022-08-29 21:21 UTC (permalink / raw)
To: Paul A. Patience; +Cc: 56638
Hi Paul,
Did you have a chance to look into this?
Thanks in advance,
Ludo’.
Ludovic Courtès <ludo@gnu.org> skribis:
> Hi Paul,
>
> "Paul A. Patience" <paul@apatience.com> skribis:
>
>> * 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.
>
> The source derivation fails to build for me:
>
> File CMakeLists.txt is read-only; trying to patch anyway
> patching file CMakeLists.txt
> Hunk #2 FAILED at 172.
> Hunk #3 succeeded at 240 (offset 1 line).
> Hunk #4 succeeded at 253 (offset 1 line).
> 1 out of 4 hunks FAILED -- saving rejects to file CMakeLists.txt.rej
>
>> 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
>
> Also, as suggested by ‘guix lint’, please add a comment at the top
> stating what this does and what the upstream status is (if it’s been
> submitted), at least something like:
>
> Tweak build system to use system dependencies instead of those that
> are bundled.
>
> Could you please send an updated patch?
>
> Thanks!
>
> Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH] gnu: Add asli.
2022-08-29 21:21 ` Ludovic Courtès
@ 2022-08-30 12:01 ` Paul A. Patience
0 siblings, 0 replies; 18+ messages in thread
From: Paul A. Patience @ 2022-08-30 12:01 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 56638
On 2022-08-29 17:21:43-04:00, Ludovic Courtès wrote:
> Hi Paul,
>
> Did you have a chance to look into this?
>
> Thanks in advance,
> Ludo’.
I've been busy with other things, but I should be able to take a look
this week.
Best regards,
Paul
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH v3] gnu: Add asli.
2022-07-19 7:59 [bug#56638] [PATCH] gnu: Add asli Paul A. Patience
` (3 preceding siblings ...)
2022-07-24 12:02 ` [bug#56638] [PATCH v2 0/2] " Paul A. Patience
@ 2022-09-02 20:34 ` Paul A. Patience
2022-09-13 19:02 ` Paul A. Patience
2022-09-14 21:13 ` [bug#56638] [PATCH] " Ludovic Courtès
4 siblings, 2 replies; 18+ messages in thread
From: Paul A. Patience @ 2022-09-02 20:34 UTC (permalink / raw)
To: 56638; +Cc: Paul A. Patience
* 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.
---
Ludo,
I've added the header line to the patch file as you requested,
but I can't reproduce your failure to build the derivation.
The patch applies cleanly for me.
What command are you running so I can try to reproduce it?
Best regards,
Paul
gnu/local.mk | 1 +
gnu/packages/graphics.scm | 74 +++++++++++++++++++
.../patches/asli-use-system-libs.patch | 72 ++++++++++++++++++
3 files changed, 147 insertions(+)
create mode 100644 gnu/packages/patches/asli-use-system-libs.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 9d08fd5b28..5bee15ba1d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -867,6 +867,7 @@ dist_patch_DATA = \
%D%/packages/patches/aoflagger-use-system-provided-pybind11.patch \
%D%/packages/patches/apr-skip-getservbyname-test.patch \
%D%/packages/patches/ark-skip-xar-test.patch \
+ %D%/packages/patches/asli-use-system-libs.patch \
%D%/packages/patches/aspell-CVE-2019-25051.patch \
%D%/packages/patches/aspell-default-dict-dir.patch \
%D%/packages/patches/ath9k-htc-firmware-binutils.patch \
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm
index fdc72d5a8d..1200bb96c4 100644
--- a/gnu/packages/graphics.scm
+++ b/gnu/packages/graphics.scm
@@ -2295,6 +2295,80 @@ (define-public mmg
@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 searching
+ ;; online for “mTT KU Leuven”), BSD-3 licensed, header-only library.
+ #~(begin
+ ;;(delete-file-recursively "libs/AdaptTools") ; Missing from Guix
+ (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=ON"
+ (string-append "-DEIGEN3_INCLUDE_DIR="
+ #$(this-package-input "eigen")
+ "/include/eigen3")
+ (string-append "-DMMG_INCLUDE_DIR="
+ (ungexp (this-package-input "mmg") "lib")
+ "/include")
+ (string-append "-DMMG_LIBRARY_DIR="
+ (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=ON, 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 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
+lattice infill is constructed out of unit cells, described by implicit
+functions, whose type, size and feature can be varied locally to obtain the
+desired local properties.")
+ (license license:agpl3+)))
+
(define-public f3d
;; There have been many improvements since the last tagged version (1.2.1,
;; released in December 2021), including support for the Alembic file
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..6c4518e04e
--- /dev/null
+++ b/gnu/packages/patches/asli-use-system-libs.patch
@@ -0,0 +1,72 @@
+Adjust CMakeLists.txt to use system-provided mmg and yaml-cpp libraries.
+
+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=Release -DBUILD=MMG3D -DLIBMMG3D_STATIC=ON
+- -DLIBMMG3D_SHARED=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>)
+-
+- 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_LIBRARIES}")
++ 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/yaml/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.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH v3] gnu: Add asli.
2022-09-02 20:34 ` [bug#56638] [PATCH v3] " Paul A. Patience
@ 2022-09-13 19:02 ` Paul A. Patience
2022-09-14 21:13 ` [bug#56638] [PATCH] " Ludovic Courtès
1 sibling, 0 replies; 18+ messages in thread
From: Paul A. Patience @ 2022-09-13 19:02 UTC (permalink / raw)
To: 56638; +Cc: Ludovic Courtès
Hi Ludo,
On 2022-09-02 16:34:29-04:00, Paul A. Patience wrote:
> I've added the header line to the patch file as you requested,
> but I can't reproduce your failure to build the derivation.
> The patch applies cleanly for me.
> What command are you running so I can try to reproduce it?
Just pinging you, since I forgot to CC you in the v3 patch.
Best regards,
Paul
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH] gnu: Add asli.
2022-09-02 20:34 ` [bug#56638] [PATCH v3] " Paul A. Patience
2022-09-13 19:02 ` Paul A. Patience
@ 2022-09-14 21:13 ` Ludovic Courtès
2022-09-15 13:37 ` Paul A. Patience
1 sibling, 1 reply; 18+ messages in thread
From: Ludovic Courtès @ 2022-09-14 21:13 UTC (permalink / raw)
To: Paul A. Patience; +Cc: 56638
Hi Paul,
"Paul A. Patience" <paul@apatience.com> skribis:
> * 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.
Thanks; I hadn’t noticed this new version.
> I've added the header line to the patch file as you requested,
> but I can't reproduce your failure to build the derivation.
> The patch applies cleanly for me.
Unfortunately I’m still getting this error.
> What command are you running so I can try to reproduce it?
After applying this patch, I run “./pre-inst-env guix build asli”, which
fails while building the source derivation, applying
‘asli-use-system-libs.patch’:
--8<---------------cut here---------------start------------->8---
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/clean.sh' -> `asli-0.1-checkout/docs/manual/clean.sh'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/cube_mixed.png' -> `asli-0.1-checkout/docs/manual/figures/cube_mixed.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/cube_feature.png' -> `File CMakeLists.txt is read-only; trying to patch anyway
patching file CMakeLists.txt
Hunk #2 FAILED at 172.
Hunk #3 succeeded at 240 (offset 1 line).
Hunk #4 succeeded at 253 (offset 1 line).
1 out of 4 hunks FAILED -- saving rejects to file CMakeLists.txt.rej
source is at 'asli-0.1-checkout'
applying '/gnu/store/dfkl666kwj1kp2faqgxs53g0nl08xciy-asli-use-system-libs.patch'...
Backtrace:
5 (primitive-load "/gnu/store/2mbw73469dam9j1n9lf7n9yvq3h…")
In ice-9/eval.scm:
619:8 4 (_ #(#(#<directory (guile-user) 7ffff5fdbc80> "asl…") #))
In ice-9/boot-9.scm:
142:2 3 (dynamic-wind #<procedure 7ffff5f12320 at ice-9/eval.s…> …)
In ice-9/eval.scm:
619:8 2 (_ #(#(#<directory (guile-user) 7ffff5fdbc80>)))
In srfi/srfi-1.scm:
634:9 1 (for-each #<procedure apply-patch (a)> ("/gnu/store/df…"))
In guix/build/utils.scm:
762:6 0 (invoke "/gnu/store/z39hnrwds1dgcbpfgj8dnv2cngjb2xbl-p…" …)
guix/build/utils.scm:762:6: In procedure invoke:
ERROR:
1. &invoke-error:
program: "/gnu/store/z39hnrwds1dgcbpfgj8dnv2cngjb2xbl-patch-2.7.6/bin/patch"
arguments: ("--force" "--no-backup-if-mismatch" "-p1" "--input" "/gnu/store/dfkl666kwj1kp2faqgxs53g0nl08xciy-asli-use-system-libs.patch")
exit-status: 1
term-signal: #f
stop-signal: #f
asli-0.1-checkout/docs/manual/figures/cube_feature.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/KUL.png' -> `asli-0.1-checkout/docs/manual/figures/KUL.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/cube_standart.png' -> `asli-0.1-checkout/docs/manual/figures/cube_standart.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/ASLI.png' -> `asli-0.1-checkout/docs/manual/figures/ASLI.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/cube_type.png' -> `asli-0.1-checkout/docs/manual/figures/cube_type.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/cube_feature_dp.png' -> `asli-0.1-checkout/docs/manual/figures/cube_feature_dp.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/Sample-S5VF0p5.png' -> `asli-0.1-checkout/docs/manual/figures/Sample-S5VF0p5.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/gui.png' -> `asli-0.1-checkout/docs/manual/figures/gui.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/acetabular_implant.png' -> `asli-0.1-checkout/docs/manual/figures/acetabular_implant.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/femoral_implant.png' -> `asli-0.1-checkout/docs/manual/figures/femoral_implant.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/cube_type_dp.png' -> `asli-0.1-checkout/docs/manual/figures/cube_type_dp.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/cube.png' -> `asli-0.1-checkout/docs/manual/figures/cube.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/cube_size_dp.png' -> `asli-0.1-checkout/docs/manual/figures/cube_size_dp.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/docs/manual/figures/cube_size.png' -> `asli-0.1-checkout/docs/manual/figures/cube_size.png'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/inputs/cube.tap' -> `asli-0.1-checkout/inputs/cube.tap'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/inputs/cube.stl' -> `asli-0.1-checkout/inputs/cube.stl'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/inputs/cube.sap' -> `asli-0.1-checkout/inputs/cube.sap'
`/gnu/store/x9nvdyfsixc2j6vzi9131dl5wk8zg8g4-asli-0.1-checkout/inputs/cube.fap' -> `asli-0.1-checkout/inputs/cube.fap'
builder for `/gnu/store/5lhzvxmgxm20mq5agpq7kklbdq2ynd0m-asli-0.1-checkout.drv' failed with exit code 1
build of /gnu/store/5lhzvxmgxm20mq5agpq7kklbdq2ynd0m-asli-0.1-checkout.drv failed
--8<---------------cut here---------------end--------------->8---
And I have:
--8<---------------cut here---------------start------------->8---
$ sha256sum gnu/packages/patches/asli-use-system-libs.patch
1a922b39a53b8cb0bd99e6c94e90769efaad88634b56d8df03811f68e45a003c gnu/packages/patches/asli-use-system-libs.patch
--8<---------------cut here---------------end--------------->8---
Am I missing something?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH] gnu: Add asli.
2022-09-14 21:13 ` [bug#56638] [PATCH] " Ludovic Courtès
@ 2022-09-15 13:37 ` Paul A. Patience
2023-06-20 0:39 ` Paul A. Patience
2023-09-08 17:16 ` bug#56638: " Ludovic Courtès
0 siblings, 2 replies; 18+ messages in thread
From: Paul A. Patience @ 2022-09-15 13:37 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 56638
[-- Attachment #1: Type: text/plain, Size: 1141 bytes --]
Hi Ludo,
On 2022-09-14 17:13:28-04:00, Ludovic Courtès wrote:
> And I have:
>
> $ sha256sum gnu/packages/patches/asli-use-system-libs.patch
> 1a922b39a53b8cb0bd99e6c94e90769efaad88634b56d8df03811f68e45a003c gnu/packages/patches/asli-use-system-libs.patch
>
> Am I missing something?
Thanks for the shasum; it allowed me to discover the problem.
There are trailing spaces in the original CMakeLists.txt, which also
appear in the patch.
When sending the patch inline, these spaces are trimmed.
(The spaces are highlighted in Magit, so I was aware of them, but I
didn't realize they would be trimmed somewhere in the email pipeline.)
I will attach the patch file separately, and also a tarred version just
in case.
So you can verify that you have the right one, here's my shasum:
--8<---------------cut here---------------start------------->8---
$ sha256sum gnu/packages/patches/asli-use-system-libs.patch
fb1531a4f71e95354af6927175f67b90f39250604aa6859d9def4778027f1810 gnu/packages/patches/asli-use-system-libs.patch
--8<---------------cut here---------------end--------------->8---
Best regards,
Paul
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: asli-use-system-libs.patch --]
[-- Type: text/x-patch; name=asli-use-system-libs.patch, Size: 2780 bytes --]
Adjust CMakeLists.txt to use system-provided mmg and yaml-cpp libraries.
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=Release -DBUILD=MMG3D -DLIBMMG3D_STATIC=ON
- -DLIBMMG3D_SHARED=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>)
-
- 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_LIBRARIES}")
+ 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/yaml/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)
[-- Attachment #3: asli-use-system-libs.patch.tar --]
[-- Type: archive/tar, Size: 10240 bytes --]
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [bug#56638] [PATCH] gnu: Add asli.
2022-09-15 13:37 ` Paul A. Patience
@ 2023-06-20 0:39 ` Paul A. Patience
2023-09-08 17:16 ` bug#56638: " Ludovic Courtès
1 sibling, 0 replies; 18+ messages in thread
From: Paul A. Patience @ 2023-06-20 0:39 UTC (permalink / raw)
To: Ludovic Courtès
Hi Ludo,
On 2022-09-15 09:37:08-04:00, Paul A. Patience wrote:
> On 2022-09-14 17:13:28-04:00, Ludovic Courtès wrote:
>> And I have:
>>
>> $ sha256sum gnu/packages/patches/asli-use-system-libs.patch
>> 1a922b39a53b8cb0bd99e6c94e90769efaad88634b56d8df03811f68e45a003c gnu/packages/patches/asli-use-system-libs.patch
>>
>> Am I missing something?
>
> Thanks for the shasum; it allowed me to discover the problem.
> There are trailing spaces in the original CMakeLists.txt, which also
> appear in the patch.
> When sending the patch inline, these spaces are trimmed.
> (The spaces are highlighted in Magit, so I was aware of them, but I
> didn't realize they would be trimmed somewhere in the email pipeline.)
>
> I will attach the patch file separately, and also a tarred version just
> in case.
> So you can verify that you have the right one, here's my shasum:
>
> $ sha256sum gnu/packages/patches/asli-use-system-libs.patch
> fb1531a4f71e95354af6927175f67b90f39250604aa6859d9def4778027f1810 gnu/packages/patches/asli-use-system-libs.patch
Would you mind taking a look at this again?
Thanks,
Paul
^ permalink raw reply [flat|nested] 18+ messages in thread
* bug#56638: [PATCH] gnu: Add asli.
2022-09-15 13:37 ` Paul A. Patience
2023-06-20 0:39 ` Paul A. Patience
@ 2023-09-08 17:16 ` Ludovic Courtès
1 sibling, 0 replies; 18+ messages in thread
From: Ludovic Courtès @ 2023-09-08 17:16 UTC (permalink / raw)
To: Paul A. Patience; +Cc: 56638-done
Hi Paul,
"Paul A. Patience" <paul@apatience.com> skribis:
> Thanks for the shasum; it allowed me to discover the problem.
> There are trailing spaces in the original CMakeLists.txt, which also
> appear in the patch.
> When sending the patch inline, these spaces are trimmed.
> (The spaces are highlighted in Magit, so I was aware of them, but I
> didn't realize they would be trimmed somewhere in the email pipeline.)
>
> I will attach the patch file separately, and also a tarred version just
> in case.
> So you can verify that you have the right one, here's my shasum:
>
> $ sha256sum gnu/packages/patches/asli-use-system-libs.patch
> fb1531a4f71e95354af6927175f67b90f39250604aa6859d9def4778027f1810 gnu/packages/patches/asli-use-system-libs.patch
Perfect; pushed as 05f44bbeb40686599827cbe0df7fcc80122fe152.
Thank you and apologies for taking so much time!
Ludo’.
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2023-09-08 17:17 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-19 7:59 [bug#56638] [PATCH] gnu: Add asli Paul A. Patience
2022-07-19 8:10 ` Paul A. Patience
2022-07-19 14:21 ` Ludovic Courtès
2022-07-19 14:32 ` Maxime Devos
2022-07-19 14:34 ` Maxime Devos
2022-07-24 12:02 ` [bug#56638] [PATCH v2 0/2] " Paul A. Patience
2022-07-24 12:02 ` [bug#56638] [PATCH v2 1/2] gnu: Add mmg Paul A. Patience
2022-08-29 21:21 ` [bug#56638] [PATCH] gnu: Add asli Ludovic Courtès
2022-07-24 12:02 ` [bug#56638] [PATCH v2 2/2] " Paul A. Patience
2022-08-04 21:40 ` [bug#56638] [PATCH] " Ludovic Courtès
2022-08-29 21:21 ` Ludovic Courtès
2022-08-30 12:01 ` Paul A. Patience
2022-09-02 20:34 ` [bug#56638] [PATCH v3] " Paul A. Patience
2022-09-13 19:02 ` Paul A. Patience
2022-09-14 21:13 ` [bug#56638] [PATCH] " Ludovic Courtès
2022-09-15 13:37 ` Paul A. Patience
2023-06-20 0:39 ` Paul A. Patience
2023-09-08 17:16 ` bug#56638: " Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).