openimageio: use generic libatomic checks

This commit is contained in:
q66 2020-02-08 17:21:56 +01:00
parent 9202e1bd86
commit f1156145af

View file

@ -21,8 +21,12 @@ checksum=a019086c05a6150d445a2240bab1723dff540dde5f5c327c36a97f0b5ae0e157
CXXFLAGS="-faligned-new"
case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*) configure_args+=" -DUSE_SIMD=sse2" ;;
armv[56]*|mips*|ppc|ppc-musl) makedepends+=" libatomic-devel" ;;
esac
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
fi
if [ "$CROSS_BUILD" ]; then
configure_args+=" -DUSE_STD_REGEX_EXITCODE=0 -DUSE_STD_REGEX_EXITCODE__TRYRUN_OUTPUT=0"
fi
@ -32,8 +36,7 @@ pre_build() {
# Replace -isystem with -I to avoid "#include_next <stdlib.h>" file not found
vsed -i src/cmake/compiler.cmake -e "s;-isystem;-I;g"
case "$XBPS_TARGET_MACHINE" in
armv[56]*|mips*|ppc|ppc-musl)
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
# Add libatomic to the targets
vsed -i src/libOpenImageIO/CMakeLists.txt \
-e "s;^\(target_link_libraries (OpenImageIO ${ZLIB_LIBRARIES}\));\1 atomic);"
@ -41,8 +44,7 @@ pre_build() {
vsed -i src/${f}/CMakeLists.txt \
-e "s;^\(target_link_libraries .*\));\1 atomic);"
done
;;
esac
fi
}
post_install() {