diff --git a/submodules/ffmpeg/BUCK b/submodules/ffmpeg/BUCK index aed1b5364a..19a4d37012 100644 --- a/submodules/ffmpeg/BUCK +++ b/submodules/ffmpeg/BUCK @@ -113,7 +113,9 @@ genrule( srcs = glob([ "FFMpeg/**/*", ], exclude = ["FFMpeg/**/.*"]), - bash = "$SRCDIR/FFMpeg/build-ffmpeg.sh release \"" + library_archs + "\" $OUT $SRCDIR/FFMpeg", + bash = + "PATH=\"$PATH:$(location //third-party/yasm:yasm)/yasm-1.3.0/build\" " + + "$SRCDIR/FFMpeg/build-ffmpeg.sh release \"" + library_archs + "\" $OUT $SRCDIR/FFMpeg", out = "libffmpeg", visibility = [ "//submodules/ffmpeg:FFMpeg", diff --git a/submodules/ton/BUCK b/submodules/ton/BUCK index 1829fad04f..11b04572d7 100644 --- a/submodules/ton/BUCK +++ b/submodules/ton/BUCK @@ -46,7 +46,11 @@ genrule( "tonlib-src", "iOS.cmake" ], - bash = "sh $SRCDIR/build-ton.sh $OUT $SRCDIR $(location //submodules/openssl:openssl_build_merged)", + bash = +""" + export PATH=\"$PATH:$(location //third-party/cmake:cmake)/cmake-3.16.0/bin\" + sh $SRCDIR/build-ton.sh $OUT $SRCDIR $(location //submodules/openssl:openssl_build_merged) +""", out = "ton", visibility = [ "//submodules/ton:...", diff --git a/third-party/BUCK b/third-party/BUCK new file mode 100644 index 0000000000..e69de29bb2 diff --git a/third-party/cmake/BUCK b/third-party/cmake/BUCK new file mode 100644 index 0000000000..99d7db5a9f --- /dev/null +++ b/third-party/cmake/BUCK @@ -0,0 +1,21 @@ + +genrule( + name = "cmake", + srcs = [ + "cmake-3.16.0.tar.gz", + ], + bash = +""" + core_count="`sysctl -n hw.logicalcpu`" + mkdir -p "$OUT" + tar -xzf "$SRCDIR/cmake-3.16.0.tar.gz" --directory "$OUT" + pushd "$OUT/cmake-3.16.0" + ./bootstrap --parallel=$core_count -- -DCMAKE_BUILD_TYPE:STRING=Release + make -j $core_count + popd +""", + out = "cmake", + visibility = [ + "PUBLIC", + ] +) diff --git a/third-party/cmake/cmake-3.16.0.tar.gz b/third-party/cmake/cmake-3.16.0.tar.gz new file mode 100644 index 0000000000..af3e739dab Binary files /dev/null and b/third-party/cmake/cmake-3.16.0.tar.gz differ diff --git a/third-party/yasm/BUCK b/third-party/yasm/BUCK new file mode 100644 index 0000000000..eade17fbf2 --- /dev/null +++ b/third-party/yasm/BUCK @@ -0,0 +1,24 @@ + +genrule( + name = "yasm", + srcs = [ + "yasm-1.3.0.tar.gz", + ], + bash = +""" + core_count="`sysctl -n hw.logicalcpu`" + mkdir -p "$OUT" + tar -xzf "$SRCDIR/yasm-1.3.0.tar.gz" --directory "$OUT" + pushd "$OUT/yasm-1.3.0" + mkdir build + cd build + export PATH=\"$PATH:$(location //third-party/cmake:cmake)/cmake-3.16.0/bin\" + cmake .. -DYASM_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF + make -j $core_count + popd +""", + out = "yasm", + visibility = [ + "PUBLIC", + ] +) diff --git a/third-party/yasm/yasm-1.3.0.tar.gz b/third-party/yasm/yasm-1.3.0.tar.gz new file mode 100644 index 0000000000..665692ba80 Binary files /dev/null and b/third-party/yasm/yasm-1.3.0.tar.gz differ