From 23e2ff223c0511317edf236504fb474e3b5ac301 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 2 Aug 2023 20:23:01 +0300 Subject: gnu: apr: Fix building on powerpc-linux. * gnu/packages/apr.scm (apr): When building for powerpc-linux add a phase to apply a patch. [native-inputs]: When building for powerpc-linux add a patch. * gnu/packages/patches/apr-fix-atomics.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/packages/apr.scm | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'gnu/packages/apr.scm') diff --git a/gnu/packages/apr.scm b/gnu/packages/apr.scm index aedddd8644..aac3822eae 100644 --- a/gnu/packages/apr.scm +++ b/gnu/packages/apr.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2014, 2015, 2018 Mark H Weaver +;;; Copyright © 2023 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,6 +22,8 @@ #:use-module ((guix licenses) #:prefix l:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) + #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages perl) @@ -46,9 +49,23 @@ ;; Sometimes we end up with two processes concurrently trying to make ;; 'libmod_test.la': . ;; Thus, build sequentially. - '(#:parallel-build? #f - #:parallel-tests? #f)) + `(#:parallel-build? #f + #:parallel-tests? #f + ,@(if (target-ppc32?) + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-sources + (lambda* (#:key inputs native-inputs #:allow-other-keys) + (invoke "patch" "-p1" "--force" "--input" + (assoc-ref (or native-inputs inputs) + "atomics-patch")))))) + '()))) (inputs (list perl libltdl)) + (native-inputs + `(,@(if (target-ppc32?) + `(("atomics-patch" + ,(local-file (search-patch "apr-fix-atomics.patch")))) + '()))) (home-page "https://apr.apache.org/") (synopsis "The Apache Portable Runtime Library") (description -- cgit v1.2.3