xref: /aosp_15_r20/external/libffi/.travis/install.sh (revision 1fd5a2e1d639cd1ddf29dd0c484c123bbd850c21)
1#!/bin/bash
2set -x
3
4if [[ $TRAVIS_OS_NAME != 'linux' ]]; then
5    brew update > brew-update.log 2>&1
6    # fix an issue with libtool on travis by reinstalling it
7    brew uninstall libtool;
8    brew install libtool dejagnu;
9
10    # Download and extract the rlgl client
11    wget -qO - https://rl.gl/cli/rlgl-darwin-amd64.tgz | \
12	tar --strip-components=2 -xvzf - ./rlgl/rlgl
13
14else
15
16    # Download and extract the rlgl client
17    wget -qO - http://rl.gl/cli/rlgl-linux-amd64.tgz | \
18	tar --strip-components=2 -xvzf - ./rlgl/rlgl
19
20    sudo apt-get clean # clear the cache
21    sudo apt-get update
22    case $HOST in
23	aarch64-linux-gnu | powerpc64le-unknown-linux-gnu | mips64el-linux-gnu | sparc64-linux-gnu)
24        ;;
25	alpha-linux-gnu | arm32v7-linux-gnu | m68k-linux-gnu | sh4-linux-gnu | s390x-linux-gnu )
26	    sudo apt-get install qemu-user-static
27	    ;;
28	hppa-linux-gnu )
29	    sudo apt-get install -y qemu-user-static g++-5-hppa-linux-gnu
30	    ;;
31	i386-pc-linux-gnu)
32	    sudo apt-get install gcc-multilib g++-multilib;
33	    ;;
34	moxie-elf)
35	    echo 'deb https://repos.moxielogic.org:7114/MoxieLogic moxiedev main' | sudo tee -a /etc/apt/sources.list
36	    sudo apt-get clean # clear the cache
37	    sudo apt-get update ## -qq
38	    sudo apt-get update
39	    sudo apt-get install -y --allow-unauthenticated moxielogic-moxie-elf-gcc moxielogic-moxie-elf-gcc-c++ moxielogic-moxie-elf-gcc-libstdc++ moxielogic-moxie-elf-gdb-sim
40	    ;;
41	x86_64-w64-mingw32)
42	    sudo apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 wine;
43	    ;;
44	i686-w32-mingw32)
45	    sudo apt-get install gcc-mingw-w64-i686 g++-mingw-w64-i686 wine;
46	    ;;
47    esac
48    case $HOST in
49	arm32v7-linux-gnu | aarch64-linux-gnu | ppc64le-linux-gnu | s390x-linux-gnu)
50        # don't install host tools
51        ;;
52	*)
53	    sudo apt-get install dejagnu texinfo sharutils
54	    ;;
55    esac
56fi
57