nix: fix build on ppc32 (need libatomic)

[ci skip]
This commit is contained in:
q66 2019-12-02 14:15:59 +01:00 committed by Helmut Pozimski
parent 79b1cb2525
commit 72b0a45ab5

View file

@ -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