guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

24/32: gnu: r-lpsymphony: Fix building on some architectures.


From: guix-commits
Subject: 24/32: gnu: r-lpsymphony: Fix building on some architectures.
Date: Mon, 6 May 2024 19:19:43 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit a9c89cd11b7f8fee63fbb8b1180f46784af3cb81
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Mon May 6 19:00:14 2024 +0300

    gnu: r-lpsymphony: Fix building on some architectures.
    
    * gnu/packages/bioconductor.scm (r-lpsymphony) [arguments]: When
    building for aarch64-linux or riscv64-linux replace all the config.guess
    and config.sub files with newer ones.
    [native-inputs]: When building for aarch64-linux or riscv64-linux add
    config.
    
    Change-Id: Iaddda8c6d7330fb02bdd83733e7fa70b851a82f2
---
 gnu/packages/bioconductor.scm | 39 ++++++++++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/bioconductor.scm b/gnu/packages/bioconductor.scm
index 1a8d9b91d2..94649d8a45 100644
--- a/gnu/packages/bioconductor.scm
+++ b/gnu/packages/bioconductor.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2016 Pjotr Prins <pjotr.guix@thebird.nl>
 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
-;;; Copyright © 2017, 2022 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2022, 2024 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017, 2018, 2019, 2020, 2021 Tobias Geerinckx-Rice 
<me@tobias.gr>
 ;;; Copyright © 2019, 2020, 2021, 2022, 2023 Simon Tournier 
<zimon.toutoune@gmail.com>
 ;;; Copyright © 2020 Peter Lo <peterloleungyau@gmail.com>
@@ -34,6 +34,7 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix gexp)
+  #:use-module (guix utils)
   #:use-module (guix git-download)
   #:use-module (guix build-system r)
   #:use-module (gnu packages)
@@ -14320,17 +14321,37 @@ coordinates.")
     (arguments
      (list
       #:phases
-      '(modify-phases %standard-phases
-         (add-after 'unpack 'make-build-order-reproducible
-           (lambda _
-             (substitute* '("src/SYMPHONY/Cgl/configure.ac"
-                            "src/SYMPHONY/Cgl/configure")
-               (("for file in `ls \\*/Makefile.in`")
-                "for file in `ls */Makefile.in | sort`")))))))
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'make-build-order-reproducible
+            (lambda _
+              (substitute* '("src/SYMPHONY/Cgl/configure.ac"
+                             "src/SYMPHONY/Cgl/configure")
+                (("for file in `ls \\*/Makefile.in`")
+                 "for file in `ls */Makefile.in | sort`"))))
+          #$@(if (or (target-aarch64?)
+                     (target-riscv64?))
+                 #~((add-after 'unpack 'update-config-files
+                      (lambda* (#:key native-inputs inputs #:allow-other-keys)
+                        (for-each
+                          (lambda (location)
+                            (for-each (lambda (file)
+                                        (install-file
+                                          (search-input-file
+                                            (or native-inputs inputs)
+                                            (string-append "/bin/" file))
+                                          (dirname location)))
+                                      '("config.guess" "config.sub")))
+                          (find-files "." "config\\.guess")))))
+                 #~()))))
     (inputs
      (list zlib))
     (native-inputs
-     (list pkg-config r-knitr))
+     (append
+       (list pkg-config r-knitr)
+       (if (or (target-aarch64?)
+               (target-riscv64?))
+           (list config)
+           '())))
     (home-page "https://r-forge.r-project.org/projects/rsymphony";)
     (synopsis "Symphony integer linear programming solver in R")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]