From ba94e500c3ac991424cf5b36c28c4711ad8fc779 Mon Sep 17 00:00:00 2001 From: q66 Date: Thu, 9 Jan 2020 02:41:23 +0100 Subject: [PATCH] bloaty: fix build on ppc32 and armv6 (use libatomic) --- srcpkgs/bloaty/template | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/srcpkgs/bloaty/template b/srcpkgs/bloaty/template index 44d402dbbea..d496211f35f 100644 --- a/srcpkgs/bloaty/template +++ b/srcpkgs/bloaty/template @@ -11,15 +11,27 @@ license="Apache-2.0" homepage="https://github.com/google/bloaty" distfiles="https://github.com/google/bloaty/releases/download/v${version}/bloaty-${version}.tar.bz2" checksum=e1cf9830ba6c455218fdb50e7a8554ff256da749878acfaf77c032140d7ddde0 +nocross="fails to use vendored protobuf" case "$XBPS_TARGET_MACHINE" in - armv6*) broken="undefined reference to __atomic_fetch_add_8'" ;; + ppc64*) ;; + armv6*|ppc*) makedepends+=" libatomic-devel";; esac if [ "$CROSS_BUILD" ]; then hostmakedepends+=" protobuf" fi +post_extract() { + case "$XBPS_TARGET_MACHINE" in + ppc64*) ;; + armv6*|ppc*) + echo 'target_link_libraries(libprotobuf atomic)' >> \ + third_party/protobuf/cmake/libprotobuf.cmake + ;; + esac +} + do_install() { vbin build/bloaty }