bloaty: fix build on ppc32 and armv6 (use libatomic) + nocross

According to CI, this currently fails on all cross archs because
of failure to use vendored protobuf.
This commit is contained in:
q66 2020-01-09 02:41:23 +01:00 committed by Daniel Kolesa
parent 9ad3106e9b
commit a079fe8909

View file

@ -11,15 +11,27 @@ license="Apache-2.0"
homepage="https://github.com/google/bloaty" homepage="https://github.com/google/bloaty"
distfiles="https://github.com/google/bloaty/releases/download/v${version}/bloaty-${version}.tar.bz2" distfiles="https://github.com/google/bloaty/releases/download/v${version}/bloaty-${version}.tar.bz2"
checksum=e1cf9830ba6c455218fdb50e7a8554ff256da749878acfaf77c032140d7ddde0 checksum=e1cf9830ba6c455218fdb50e7a8554ff256da749878acfaf77c032140d7ddde0
nocross="fails to use vendored protobuf"
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in
armv6*) broken="undefined reference to __atomic_fetch_add_8'" ;; ppc64*) ;;
armv6*|ppc*) makedepends+=" libatomic-devel";;
esac esac
if [ "$CROSS_BUILD" ]; then if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" protobuf" hostmakedepends+=" protobuf"
fi 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() { do_install() {
vbin build/bloaty vbin build/bloaty
} }