summary refs log tree commit diff
path: root/gnu/packages/databases.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-05-15 11:11:49 +0300
committerEfraim Flashner <efraim@flashner.co.il>2023-05-15 11:16:39 +0300
commit13e252af79ffb85bc68d8104fdf700269b903875 (patch)
tree13158fc6e9ec48cd788b9bb9a129e285333fb22c /gnu/packages/databases.scm
parent56bf67505ae2bed5927e1a997cf739ec2df6350b (diff)
downloadguix-13e252af79ffb85bc68d8104fdf700269b903875.tar.gz
gnu: mariadb: Fix building on riscv64-linux.
* gnu/packages/databases.scm (mariadb)[arguments]: Add a phase when
building for riscv64-linux to apply a patch.
[native-inputs]: When building for riscv64-linux add patch and a patch
file.
* gnu/packages/patches/mariadb-rocksdb-atomic-linking.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r--gnu/packages/databases.scm17
1 files changed, 15 insertions, 2 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 496aab918a..2b4ec5e09a 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -10,7 +10,7 @@
 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
 ;;; Copyright © 2016, 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
-;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015-2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2016, 2017, 2018 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2016 David Craven <david@craven.ch>
@@ -968,6 +968,14 @@ Language.")
        #:parallel-tests? ,(target-x86-64?)
        #:phases
        (modify-phases %standard-phases
+         ;; TODO: Move this patch to the source field.
+         ,@(if (target-riscv64?)
+             `((add-after 'unpack 'patch-source
+                 (lambda* (#:key inputs native-inputs #:allow-other-keys)
+                   (invoke "patch" "-p1" "--force" "--input"
+                           (assoc-ref (or native-inputs inputs)
+                                      "patch-file")))))
+             '())
          (add-after 'unpack 'adjust-output-references
            (lambda _
              ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX
@@ -1103,7 +1111,12 @@ Language.")
                 (("-lssl -lcrypto" all)
                  (string-append "-L" openssl " " all)))))))))
     (native-inputs
-     (list bison perl))
+     `(,@(if (target-riscv64?)
+           `(("patch" ,patch)
+             ("patch-file" ,(search-patch "mariadb-rocksdb-atomic-linking.patch")))
+           `())
+        ("bison" ,bison)
+        ("perl" ,perl)))
     (inputs
      (list fmt
            jemalloc