summaryrefslogtreecommitdiff
path: root/other/travis/toxcore-linux-install
blob: 3bf452f1cd5df159459a3894469214244ad33304 (plain)
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
#!/bin/sh

# Install cpp-coveralls to upload test coverage results.
pip install --user urllib3[secure] cpp-coveralls

# Work around https://github.com/eddyxu/cpp-coveralls/issues/108 by manually
# installing the pyOpenSSL module and injecting it into urllib3 as per
# https://urllib3.readthedocs.io/en/latest/user-guide.html#ssl-py2
sed -i -e '/^import sys$/a import urllib3.contrib.pyopenssl\nurllib3.contrib.pyopenssl.inject_into_urllib3()' `which coveralls`

# Install astyle (version in ubuntu-precise too old).
[ -f $ASTYLE ] || {
  wget -O ../astyle.tar.gz https://deb.debian.org/debian/pool/main/a/astyle/astyle_2.06.orig.tar.gz
  tar -xf ../astyle.tar.gz -C $CACHE_DIR
  make -C $CACHE_DIR/astyle/build/gcc -j$NPROC
}

# Install libsodium (not in ubuntu-precise).
[ -f $CACHE_DIR/lib/libsodium.a ] || {
  git clone --depth=1 --branch=stable https://github.com/jedisct1/libsodium ../libsodium
  cd ../libsodium # pushd
  ./autogen.sh
  ./configure --prefix=$CACHE_DIR
  make install -j$NPROC
  cd - # popd
}