From b591052866e3956b543d130362d2f12fee0255e8 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 30 Jul 2021 13:46:43 +0300 Subject: gnu: bdb: Fix building on riscv64-linux. * gnu/packages/dbm.scm (bdb)[arguments]: Modify configure to build for the currect architecture when building for riscv64-linux. --- gnu/packages/dbm.scm | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'gnu/packages/dbm.scm') diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm index 607e4aecf8..8b6804aa92 100644 --- a/gnu/packages/dbm.scm +++ b/gnu/packages/dbm.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2016, 2020 Ludovic Courtès ;;; Copyright © 2013, 2015 Andreas Enge -;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner +;;; Copyright © 2016, 2017, 2018, 2020, 2021 Efraim Flashner ;;; Copyright © 2017, 2018 Marius Bakke ;;; Copyright © 2018 Mark H Weaver ;;; Copyright © 2020 Jakub Kądziołka @@ -30,7 +30,8 @@ (define-module (gnu packages dbm) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) - #:use-module (guix utils)) + #:use-module (guix utils) + #:use-module (ice-9 match)) ;;; Commentary: ;;; @@ -87,15 +88,17 @@ (define-public bdb-4.8 (string-append "CONFIG_SHELL=" (which "bash")) (string-append "SHELL=" (which "bash")) - ;; Bdb doesn't recognize aarch64 as an architecture. - ,@(if (string=? "aarch64-linux" (%current-system)) - '("--build=aarch64-unknown-linux-gnu") - '()) - - ;; Bdb doesn't recognize powerpc64le as an architecture. - ,@(if (string=? "powerpc64le-linux" (%current-system)) - '("--build=powerpc64le-unknown-linux-gnu") - '()) + ;; Bdb's config script doesn't recognize very many + ;; architectures, and is a dependant on the 'config' + ;; package, so we manually define the build target. + ,@(match (%current-system) + ("aarch64-linux" + '("--build=aarch64-unknown-linux-gnu")) + ("powerpc64le-linux" + '("--build=powerpc64le-unknown-linux-gnu")) + ("riscv64-linux" + '("--build=riscv64-unknown-linux-gnu")) + (_ '())) ,@(if (%current-target-system) ; cross building '((string-append "--host=" target)) -- cgit v1.2.3