mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
gnu: libsecp256k1: Fix cross-compiling.
* gnu/packages/crypto.scm (libsecp256k1) [source]: Remove snippet deleting "src/precomputed_ecmult.c" and "src/precomputed_ecmult_gen.c". [arguments]: Add conditional phase 'delete-precomputed-files' that deletes them only when not cross-compiling. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
6e12325bf3
commit
5e89d39601
1 changed files with 18 additions and 12 deletions
|
|
@ -1136,20 +1136,26 @@ trivial to build for local use. Portability is emphasized over performance.")
|
|||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"1d0cnd2s607j642h64821mpklfvvzy70mkyl2dlsm5s9lgvndn2p"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
;; These files are pre-generated, the build system is able to
|
||||
;; re-generate those.
|
||||
#~(for-each delete-file '("src/precomputed_ecmult.c"
|
||||
"src/precomputed_ecmult_gen.c")))))
|
||||
"1d0cnd2s607j642h64821mpklfvvzy70mkyl2dlsm5s9lgvndn2p"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
'(#:configure-flags '("--enable-module-recovery"
|
||||
"--enable-experimental"
|
||||
"--enable-shared"
|
||||
"--disable-static"
|
||||
"--disable-benchmark")))
|
||||
(list #:configure-flags
|
||||
#~(list
|
||||
"--enable-module-recovery"
|
||||
"--enable-experimental"
|
||||
"--enable-shared"
|
||||
"--disable-static"
|
||||
"--disable-benchmark")
|
||||
#:phases
|
||||
(if (%current-target-system)
|
||||
#~%standard-phases
|
||||
#~(modify-phases %standard-phases
|
||||
;; These files are pre-generated, the build system is able to
|
||||
;; re-generate those if not cross-compiling,
|
||||
(add-after 'unpack 'delete-precomputed-files
|
||||
(lambda _
|
||||
(for-each delete-file '("src/precomputed_ecmult.c"
|
||||
"src/precomputed_ecmult_gen.c"))))))))
|
||||
(native-inputs
|
||||
(list autoconf automake libtool))
|
||||
(synopsis "C library for EC operations on curve secp256k1")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue