summaryrefslogtreecommitdiff
path: root/gnu/packages/networking.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-08-11 19:34:01 +0300
committerEfraim Flashner <efraim@flashner.co.il>2022-08-11 19:35:22 +0300
commit0f6dc5478063e0f48bfc58fe4db99f17e495991d (patch)
treec3ef6abe11dfeec1b062c90d30bbd45cfbeb1b32 /gnu/packages/networking.scm
parentee981ba5f90bd3ba3f958cd0a2d08a68fd63ce7e (diff)
downloadguix-patches-0f6dc5478063e0f48bfc58fe4db99f17e495991d.tar
guix-patches-0f6dc5478063e0f48bfc58fe4db99f17e495991d.tar.gz
gnu: lcsync: Fix building on non-x86 hardware.
* gnu/packages/networking.scm (lcsync)[arguments]: Add phase to use simde instead of immintrin.h directly. [native-inputs]: Add simde.
Diffstat (limited to 'gnu/packages/networking.scm')
-rw-r--r--gnu/packages/networking.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 8c5ef72f7f..21c9014cfe 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -89,6 +89,7 @@
#:use-module (gnu packages audio)
#:use-module (gnu packages autogen)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages assembly)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages bison)
@@ -304,6 +305,17 @@ the RFC.")
(delete-file "./test/0000-0027.c")
(delete-file "./test/0000-0049.c")
(delete-file "./test/0000-0074.c")))
+ (add-after 'unpack 'remove-immintrin.h
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "Makefile"
+ (("CFLAGS :=")
+ (string-append "CFLAGS := -I" (search-input-directory
+ inputs "include/simde"))))
+ (substitute* (find-files "src")
+ ((".*immintrin\\.h.*")
+ (string-append "#include <simde-features.h>\n"
+ "#include <x86/ssse3.h>\n"))
+ (("__m128i") "simde__m128i"))))
(add-before 'build 'add-library-paths
(lambda* (#:key inputs #:allow-other-keys)
(let* ((librecast (assoc-ref inputs "librecast")))
@@ -311,6 +323,7 @@ the RFC.")
(("-llibrecast")
(string-append "-L" librecast "/lib -llibrecast")))))))))
(inputs (list librecast libsodium))
+ (native-inputs (list simde))
(home-page "https://librecast.net/lcsync.html")
(synopsis "librecast file and data syncing tool")
(description