summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZheng Junjie <zhengjunjie@iscas.ac.cn>2023-09-04 23:18:35 +0800
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-09-06 00:25:42 -0400
commitf8e3e02b98001bcc51603ef8a2068c7342be496d (patch)
treec051ca73c8a04e3a5781ed2694f4c53971f98e2a
parent2d6c4e7198231c5bb41c0f5dcd5e1779797c3141 (diff)
gnu: libndp: Fix cross-compile.
* gnu/packages/networking.scm (libndp) [native-inputs]: When cross-compile add pkg-config, libtool, gettext-minimal, autoconf, automake. [arguments]: When cross-compile, add phase to fix rpl_malloc undefined references. Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
-rw-r--r--gnu/packages/networking.scm20
1 files changed, 20 insertions, 0 deletions
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 7d1fa307a3..7259336b35 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -1474,6 +1474,26 @@ containing both Producer and Consumer support.")
(base32
"0ay0n0d85254zdmv8znmn399gfiqpk6ga0jwdwa7ylpbw9pbdzw8"))))
(build-system gnu-build-system)
+ (native-inputs
+ (if (%current-target-system)
+ (list pkg-config
+ libtool
+ gettext-minimal
+ autoconf automake)
+ '()))
+ (arguments
+ (if (%current-target-system)
+ (list #:phases
+ #~(modify-phases %standard-phases
+ ;; AC_FUNC_MALLOC and AC_FUNC_REALLOC usually unneeded
+ ;; see https://lists.gnu.org/archive/html/autoconf/2003-02/msg00017.html
+ (add-after 'unpack 'fix-rpl_malloc
+ (lambda _
+ (substitute* "configure.ac"
+ (("AC_FUNC_MALLOC") ""))
+ ;; let bootstrap phase run.
+ (delete-file "./configure")))))
+ '()))
(home-page "https://libndp.org/")
(synopsis "Library for Neighbor Discovery Protocol")
(description