From 72b0a45ab5a95c1b02e8eaba20882e3aeff93842 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 2 Dec 2019 14:15:59 +0100 Subject: [PATCH] nix: fix build on ppc32 (need libatomic) [ci skip] --- srcpkgs/nix/template | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/srcpkgs/nix/template b/srcpkgs/nix/template index f9c9030e72..2ca9cfdcff 100644 --- a/srcpkgs/nix/template +++ b/srcpkgs/nix/template @@ -46,7 +46,21 @@ case "${XBPS_TARGET_MACHINE}" in ;; esac +case "$XBPS_TARGET_MACHINE" in + ppc64*) ;; + armv6*|ppc*) _need_libatomic=yes;; +esac + +if [ -n "$_need_libatomic" ] ;then + makedepends+=" libatomic-devel" +fi + pre_configure() { + if [ -n "$_need_libatomic" ]; then + echo "libexpr_LDFLAGS += -latomic" >> src/libexpr/local.mk + echo "libutil_LDFLAGS += -latomic" >> src/libutil/local.mk + echo "libstore_LDFLAGS += -latomic" >> src/libstore/local.mk + fi sed -i '/^CFLAGS=/d;/^CXXFLAGS=/d' configure echo "GLOBAL_LDFLAGS += $LDFLAGS" >>mk/lib.mk autoreconf -fi