-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-linux.sh
executable file
·68 lines (56 loc) · 1.49 KB
/
build-linux.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
#!/bin/bash
set -e
export MAKE_FLAGS=-j2
. ./download.sh
echo "[*] Downloading"
download
LIBS_DIR=$PWD/libs/linux-x86_64
TARGET_DIR=$PWD/target/linux-x86_64
rm -rf build/linux-x86_64
mkdir -p build/linux-x86_64
pushd build/linux-x86_64
echo "[*] Building jansson"
tar xf ../../tars/$JANSSON_TAR
pushd $JANSSON_NAME
CC="musl-gcc -static" ./configure --prefix=$LIBS_DIR --disable-shared
make
make install
popd
echo "[*] Building PCRE2"
tar xf ../../tars/$PCRE2_TAR
pushd $PCRE2_NAME
CC="musl-gcc -static" ./configure --prefix=$LIBS_DIR --disable-shared --enable-jit
make
make install
popd
# C++ so doesn't work with musl-gcc, needs full toolchain
# echo "[*] Building ICU4C"
# tar xf ../../tars/$ICU4C_TAR
# pushd $ICU4C_NAME/source
# CC="musl-gcc -static" ./configure --prefix=$LIBS_DIR --disable-shared --enable-static
# make
# make install
# popd
echo "[*] Building libxml2"
tar xf ../../tars/$LIBXML2_TAR
pushd $LIBXML2_NAME
PKG_CONFIG_PATH=$LIBS_DIR/lib/pkgconfig CC="musl-gcc -static" ./configure --prefix=$LIBS_DIR --disable-shared --enable-static --without-python --without-zlib --without-lzma
make
make install
popd
echo "[*] Building libyaml"
tar xf ../../tars/$LIBYAML_TAR
pushd $LIBYAML_NAME
CC="musl-gcc -static" ./configure --prefix=$LIBS_DIR --disable-shared
make
make install
popd
echo "[*] Building ctags"
tar xf ../../tars/$CTAGS_TAR
pushd $CTAGS_NAME
./autogen.sh
PKG_CONFIG_PATH=$LIBS_DIR/lib/pkgconfig CC="musl-gcc -static" ./configure --prefix=$TARGET_DIR
make
make install-strip
popd
popd