Subject: [PATCH] gnu: psascan: Do not build with "-march=native".

From: Z572 <[email-masked]>
Date: Wed, 14 Jun 2023 21:46:14 +0800

* gnu/packages/cpp.scm (psascan)[origin]: Add 'snippet'.
[properties]: New field.
---
 gnu/packages/cpp.scm | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 365b15a3b9..39a34c20dd 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -30,7 +30,7 @@
 ;;; Copyright © 2022 Attila Lendvai <[email-masked]>
 ;;; Copyright © 2022 Arun Isaac <[email-masked]>
 ;;; Copyright © 2022 David Elsing <[email-masked]>
-;;; Copyright © 2022 Zheng Junjie <[email-masked]>
+;;; Copyright © 2022, 2023 Zheng Junjie <[email-masked]>
 ;;; Copyright © 2022 Maxim Cournoyer <[email-masked]>
 ;;; Copyright © 2023 Sughosha <[email-masked]>
 ;;; Copyright © 2023 Artyom V. Poptsov <[email-masked]>
@@ -1173,7 +1173,11 @@ (define-public psascan
                                   "/pSAscan-" version ".tar.bz2"))
               (sha256
                (base32
-                "1cphk4gf202nzkxz6jdjzls4zy27055gwpm0r8cn99gr6c8548cy"))))
+                "1cphk4gf202nzkxz6jdjzls4zy27055gwpm0r8cn99gr6c8548cy"))
+              (modules '((guix build utils)))
+              (snippet '(begin (substitute* '("src/Makefile"
+                                              "tools/delete-bytes-255/Makefile")
+                                 (("-march=native") ""))))))
     (build-system gnu-build-system)
     (arguments
      (list
@@ -1187,6 +1191,7 @@ (define-public psascan
               (install-file "psascan"
                             (string-append #$output "/bin")))))))
     (inputs (list libdivsufsort))
+    (properties '((tunable? . #t)))
     (home-page "https://www.cs.helsinki.fi/group/pads/pSAscan.html")
     (synopsis "Parallel external memory suffix array construction")
     (description "This package contains an implementation of the parallel

base-commit: 7c12255eb9fdd73b481c3c588b02809abd633be8
-- 
2.40.1