Bundle cmake and yasm

This commit is contained in:
Ali 2019-12-02 17:44:32 +04:00
parent c0f70aa421
commit 7449bcaa9d
7 changed files with 53 additions and 2 deletions

View File

@ -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",

View File

@ -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:...",

0
third-party/BUCK vendored Normal file
View File

21
third-party/cmake/BUCK vendored Normal file
View File

@ -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",
]
)

BIN
third-party/cmake/cmake-3.16.0.tar.gz vendored Normal file

Binary file not shown.

24
third-party/yasm/BUCK vendored Normal file
View File

@ -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",
]
)

BIN
third-party/yasm/yasm-1.3.0.tar.gz vendored Normal file

Binary file not shown.