diff --git a/wheelbuild/config.sh b/wheelbuild/config.sh index 40552a5..9ca0309 100644 --- a/wheelbuild/config.sh +++ b/wheelbuild/config.sh @@ -380,10 +380,18 @@ function build_libsharpyuv { "${cmake_flags[@]}" \ && ninja sharpyuv) - cp libwebp-$LIBWEBP_SHA/build/libsharpyuv.a $BUILD_PREFIX/lib - cp libwebp-$LIBWEBP_SHA/build/sharpyuv/libsharpyuv.pc $BUILD_PREFIX/lib/pkgconfig - mkdir -p $BUILD_PREFIX/include/webp/sharpyuv - cp libwebp-$LIBWEBP_SHA/sharpyuv/*.h $BUILD_PREFIX/include/webp/sharpyuv + if [ -n "$IS_MACOS" ]; then + CP="sudo cp" + MKDIR="sudo mkdir" + else + CP="cp" + MKDIR="mkdir" + fi + + $CP libwebp-$LIBWEBP_SHA/build/libsharpyuv.a $BUILD_PREFIX/lib + $CP libwebp-$LIBWEBP_SHA/build/sharpyuv/libsharpyuv.pc $BUILD_PREFIX/lib/pkgconfig + $MKDIR -p $BUILD_PREFIX/include/webp/sharpyuv + $CP libwebp-$LIBWEBP_SHA/sharpyuv/*.h $BUILD_PREFIX/include/webp/sharpyuv require_package libsharpyuv group_end @@ -415,8 +423,14 @@ function build_libyuv { "${cmake_flags[@]}" .. \ && ninja yuv) - cp libyuv-$LIBYUV_SHA/build/libyuv.a $BUILD_PREFIX/lib - cp -a libyuv-$LIBYUV_SHA/include/* $BUILD_PREFIX/include + if [ -n "$IS_MACOS" ]; then + CP="sudo cp" + else + CP="cp" + fi + + $CP libyuv-$LIBYUV_SHA/build/libyuv.a $BUILD_PREFIX/lib + $CP -a libyuv-$LIBYUV_SHA/include/* $BUILD_PREFIX/include group_end touch libyuv-stamp