From bb9b3645e8472adfb1e96788ed27b692c76db4f4 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 15 Mar 2022 22:20:15 +0200 Subject: gnu: mariadb: Fix building for powerpc-linux. * gnu/packages/databases.scm (mariadb)[arguments]: Add custom phase for powerpc-linux to apply patch. [native-inputs]: When building for powerpc-linux add patch and a patch file. * gnu/packages/patches/mariadb-link-libatomic.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/packages/databases.scm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 73eb20ff39..d2b4ef62f4 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -991,6 +991,14 @@ Language.") #:parallel-tests? ,(target-x86-64?) #:phases (modify-phases %standard-phases + ,@(if (target-ppc32?) + `((add-after 'unpack 'apply-libatomics-patch + (lambda* (#:key inputs #:allow-other-keys) + (let ((patch-file + (assoc-ref inputs + "mariadb-link-libatomic.patch"))) + (invoke "patch" "-p1" "-i" patch-file))))) + '()) (add-after 'unpack 'adjust-output-references (lambda _ ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX @@ -1141,7 +1149,13 @@ Language.") (("-lssl -lcrypto" all) (string-append "-L" openssl "/lib " all))))))))) (native-inputs - (list bison perl)) + (if (target-ppc32?) + `(("mariadb-link-libatomic.patch" + ,(search-patch "mariadb-link-libatomic.patch")) + ("patch" ,patch) + ("bison" ,bison) + ("perl" ,perl)) + (list bison perl))) (inputs `(("jemalloc" ,jemalloc) ("libaio" ,libaio) -- cgit v1.2.3