-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_aws_c_deps.sh
executable file
·70 lines (49 loc) · 2.15 KB
/
build_aws_c_deps.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
set -e
EM_BIN=/tmp/emsdk-3.1.15/upstream/emscripten
source /tmp/emsdk-3.1.15/emsdk_env.sh
# aws-c-common
wget https://github.com/awslabs/aws-c-common/archive/refs/tags/v0.6.9.tar.gz -O aws-c-common.tar.gz
tar xzf aws-c-common.tar.gz
mv aws-c-common-0.6.9 aws-c-common && rm aws-c-common.tar.gz
pushd aws-c-common
cmake ../aws-c-common \
-DCMAKE_TOOLCHAIN_FILE=/tmp/emsdk-3.1.15/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
-DCMAKE_PREFIX_PATH=/build/arrow/awssdk_ep-install \
-DCMAKE_INSTALL_PREFIX=/build/arrow/awssdk_ep-install \
-DCMAKE_BUILD_TYPE=release \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=OFF
emmake make
emmake make install
popd
# aws-checksums
wget https://github.com/awslabs/aws-checksums/archive/refs/tags/v0.1.7.tar.gz -O aws-checksums.tar.gz
tar xzf aws-checksums.tar.gz
mv aws-checksums-0.1.7 aws-checksums && rm aws-checksums.tar.gz
pushd aws-checksums
cmake ../aws-checksums \
-DCMAKE_TOOLCHAIN_FILE=/tmp/emsdk-3.1.15/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
-DCMAKE_INSTALL_PREFIX=/build/arrow/awssdk_ep-install \
-DCMAKE_PREFIX_PATH=/build/arrow/awssdk_ep-install \
-DBUILD_SHARED_LIBS=OFF
emmake make
emmake make install
popd
# aws-c-event-stream
wget https://github.com/awslabs/aws-c-event-stream/archive/refs/tags/v0.1.5.tar.gz -O aws-c-event-stream.tar.gz
tar xzf aws-c-event-stream.tar.gz
mv aws-c-event-stream-0.1.5 aws-c-event-stream && rm aws-c-event-stream.tar.gz
pushd aws-c-event-stream
perl -0777 -i -pe 's/(find_(library|package|path)\(([^\)]|\n)*)/$1 CMAKE_FIND_ROOT_PATH_BOTH/ig' /build/arrow/awssdk_ep-install/lib/cmake/AwsFindPackage.cmake
perl -0777 -i -pe 's/(find_(library|package|path)\(([^\)]|\n)*)/$1 CMAKE_FIND_ROOT_PATH_BOTH/ig' CMakeLists.txt
cmake ../aws-c-event-stream \
-DCMAKE_TOOLCHAIN_FILE=/tmp/emsdk-3.1.15/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \
-DCMAKE_INSTALL_PREFIX=/build/arrow/awssdk_ep-install \
-DCMAKE_PREFIX_PATH=/build/arrow/awssdk_ep-install \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=release \
-DCMAKE_INSTALL_LIBDIR=lib
emmake make
emmake make install
popd