summaryrefslogtreecommitdiff
path: root/other
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-02-04 00:06:47 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-02-04 00:36:31 +0000
commitf41c11c34e04e6d7a04cb20f79bc2643c0e33dd1 (patch)
treed6de2568920dc521d4d57680ac396dc5d5212859 /other
parent99bfb9a4f2b15d3b5a9fe3878df2eb5e55c428aa (diff)
Use more ubuntu packages; remove hstox for now.
Since trusty has more up-to-date packages, we can remove some of the custom install code. Also, we're not using hstox at the moment, so there is no need to slow down the builds for now.
Diffstat (limited to 'other')
-rwxr-xr-xother/travis/toxcore-linux-install60
1 files changed, 1 insertions, 59 deletions
diff --git a/other/travis/toxcore-linux-install b/other/travis/toxcore-linux-install
index cc567a20..6d72728d 100755
--- a/other/travis/toxcore-linux-install
+++ b/other/travis/toxcore-linux-install
@@ -21,7 +21,7 @@ sed -i -e '/^import sys$/a import urllib3.contrib.pyopenssl\nurllib3.contrib.pyo
21 21
22# Install astyle (version in ubuntu-precise too old). 22# Install astyle (version in ubuntu-precise too old).
23[ -f $ASTYLE ] || { 23[ -f $ASTYLE ] || {
24 wget -O ../astyle.tar.gz https://launchpad.net/ubuntu/+archive/primary/+files/astyle_2.05.1.orig.tar.gz 24 wget -O ../astyle.tar.gz http://http.debian.net/debian/pool/main/a/astyle/astyle_2.06.orig.tar.gz
25 tar -xf ../astyle.tar.gz -C $CACHE_DIR 25 tar -xf ../astyle.tar.gz -C $CACHE_DIR
26 make -C $CACHE_DIR/astyle/build/gcc -j$NPROC 26 make -C $CACHE_DIR/astyle/build/gcc -j$NPROC
27} 27}
@@ -35,61 +35,3 @@ sed -i -e '/^import sys$/a import urllib3.contrib.pyopenssl\nurllib3.contrib.pyo
35 make install -j$NPROC 35 make install -j$NPROC
36 cd - # popd 36 cd - # popd
37} 37}
38
39# Install msgpack-c.
40[ -f $CACHE_DIR/lib/libmsgpackc.so ] || {
41 git clone --depth=1 https://github.com/msgpack/msgpack-c ../msgpack-c
42 $CC -shared -fPIC -O3 -I../msgpack-c/include ../msgpack-c/src/*.c -o $CACHE_DIR/lib/libmsgpackc.so
43 cp -a ../msgpack-c/include/* $CACHE_DIR/include/
44 sed -e "s|@prefix@|$CACHE_DIR|" \
45 -e 's|@exec_prefix@|${prefix}|' \
46 -e 's|@libdir@|${prefix}/lib|' \
47 -e 's|@includedir@|${prefix}/include|' \
48 -e 's|@VERSION@|2.1.1|' \
49 ../msgpack-c/msgpack.pc.in \
50 > $CACHE_DIR/lib/pkgconfig/msgpack.pc
51 # TODO(iphydf): This doesn't work, because the cmake version on travis is too
52 # old. We're building it manually, instead.
53 # cd ../msgpack-c # pushd
54 # cmake . -DCMAKE_INSTALL_PREFIX:PATH=$CACHE_DIR \
55 # -DMSGPACK_ENABLE_CXX=OFF \
56 # -DMSGPACK_BUILD_EXAMPLES=OFF \
57 # -DMSGPACK_BUILD_TESTS=OFF
58 # make -j$NPROC
59 # make install -j$NPROC
60 # cd - # popd
61}
62
63# Install libconfig (version in ubuntu-precise too old).
64[ -f $CACHE_DIR/lib/libconfig.a ] || {
65 git clone --depth=1 --branch=v1.7.1 https://github.com/hyperrealm/libconfig ../libconfig
66 cd ../libconfig # pushd
67 autoreconf -fi
68 ./configure --prefix=$CACHE_DIR
69 touch lib/scanner.l
70 make install -j$NPROC
71 cd - # popd
72}
73
74# Install libopus (not in ubuntu-precise).
75[ -f $CACHE_DIR/lib/libopus.a ] || {
76 git clone --depth=1 --branch=1.1.2 https://github.com/xiph/opus ../opus
77 cd ../opus # pushd
78 ./autogen.sh
79 ./configure --prefix=$CACHE_DIR
80 make install -j$NPROC
81 cd - # popd
82}
83
84if [ "$CC" = "clang" ]; then
85 # An initial update is required or the cabal cache will be empty and no packages
86 # can be installed.
87 cabal update
88
89 # Install the hstox test runner after installing libsodium.
90 CABAL_FLAGS="--disable-library-profiling"
91 CABAL_FLAGS="$CABAL_FLAGS --extra-include-dirs=$CACHE_DIR/include"
92 CABAL_FLAGS="$CABAL_FLAGS --extra-lib-dirs=$CACHE_DIR/lib"
93 git clone --recursive --depth=1 https://github.com/TokTok/hs-toxcore ../hs-toxcore
94 (cd ../hs-toxcore && cabal install $CABAL_FLAGS)
95fi