summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2020-11-16 15:10:30 +0200
committerEfraim Flashner <efraim@flashner.co.il>2020-11-16 15:10:30 +0200
commit455daf46adadf47582f57ff2ec8898b927913793 (patch)
treebb246d337869a8865cb5948301e8a76af1a618d6
parent9f58c83c3a94210fe75297eff09a56680c4c9fa8 (diff)
downloadguix-455daf46adadf47582f57ff2ec8898b927913793.tar.gz
gnu: pzstd: Cross compile.
* gnu/packages/compression.scm (pzstd)[arguments]: use cc-for-target,
cxx-for-target in make-flags.
[native-inputs]: Only use googletest when compiling natively.
[inputs]: Add googletest when cross compiling.
-rw-r--r--gnu/packages/compression.scm11
1 files changed, 9 insertions, 2 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index e7993f2b42..c19946f15c 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1461,8 +1461,14 @@ speed.")
     (version (package-version zstd))
     (source (package-source zstd))
     (build-system gnu-build-system)
+    (inputs
+     `(,@(if (%current-target-system)
+           `(("googletest" ,googletest))
+           '())))
     (native-inputs
-     `(("googletest" ,googletest)))
+     `(,@(if (%current-system)
+           `(("googletest" ,googletest))
+           '())))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -1480,7 +1486,8 @@ speed.")
                (install-file "README.md" doc)
                #t))))
        #:make-flags
-       (list "CC=gcc"
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "CXX=" ,(cxx-for-target))
              (string-append "PREFIX=" (assoc-ref %outputs "out")))))
     (home-page (package-home-page zstd))
     (synopsis "Threaded implementation of the Zstandard compression algorithm")