diff mbox series

[bug#51479,1/1] gnu: ta-lib: Explicitly link math library

Message ID PU1PR01MB21551A6412ED8F3204D7925F8D879@PU1PR01MB2155.apcprd01.prod.exchangelabs.com
State New
Headers show
Series gnu: ta-lib: Explicitly link math library | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Foo Chuan Wei Oct. 29, 2021, 11:06 a.m. UTC
* gnu/packages/finance.scm (ta-lib): Explicitly link math library.
---
 gnu/packages/finance.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Guillaume Le Vaillant Oct. 30, 2021, 12:46 p.m. UTC | #1
Patch pushed as d4449565ed90aabaa6b755dfe1786a1dce370707 with a slightly
modified commit message.
Thanks.
diff mbox series

Patch

diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index f0093ba635..f662b5b774 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1768,7 +1768,17 @@  editing on the Web.")
         (base32 "0lf69nna0aahwpgd9m9yjzbv2fbfn081djfznssa84f0n7y1xx4z"))))
     (build-system gnu-build-system)
     (arguments
-     `(;; Parallel build fails with:
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'edit-makefile-to-link-math-library
+           (lambda _
+             (substitute* "src/Makefile.am"
+               (("ta_common/libta_common.la")
+                "ta_common/libta_common.la -lm"))
+             (substitute* "src/Makefile.in"
+               (("\\$\\(libta_lib_la_LDFLAGS\\) \\$\\(LDFLAGS\\) -o \\$@")
+                "$(libta_lib_la_LDFLAGS) $(LDFLAGS) -lm -o $@")))))
+       ;; Parallel build fails with:
        ;; mv -f .deps/gen_code-gen_code.Tpo .deps/gen_code-gen_code.Po
        ;; mv: cannot stat '.deps/gen_code-gen_code.Tpo': No such file or directory
        ;; Makefile:254: recipe for target 'gen_code-gen_code.o' failed