Debian Codegraph @

docker/images/armabuild/build_libsdl_mixer.sh

raw
1 #!/bin/bash
2
3 # usage: $0 <name of library directory>, e.g. SDL_mixer-1.2.12
4 set -x
5 archive=$1
6
7 # if it already exists (Steam SDK), don't bother
8 test -r /usr/include/SDL/SDL_mixer.h && exit 0
9
10 # remove system provided libxml2
11 # rm -f /usr/lib/libxml2.so.2 /usr/lib/x86_64-linux-gnu/libxml2.so.2 /usr/lib/i386-linux-gnu/libxml2.so.2
12
13 # fetch
14 curl https://www.libsdl.org/projects/SDL_mixer/release/${archive}.tar.gz -o ${archive}.tar.gz || exit $?
15
16 # unpack, configure, build, install, cleanup
17 tar -xzf ${archive}.tar.gz
18 rm ${archive}.tar.gz
19 cd ${archive}
20 CFLAGS=-Os ./configure --prefix=/usr/ || exit $?
21 make -j 5 || exit $?
22 make install || exit $?
23 cd .. && rm -rf ${archive}
24