-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathlinux.install.deps.sh
More file actions
executable file
·217 lines (194 loc) · 10.6 KB
/
Copy pathlinux.install.deps.sh
File metadata and controls
executable file
·217 lines (194 loc) · 10.6 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
#!/bin/bash
# Exit immediately if a command exits with a non-zero status
set -e
# Print commands and their arguments as they are executed.
set -x
# Use TRAVIS_JOB_ID to detect that we are in travis.
# In that case, use a simple check to detect if the cache is already there.
if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then
export LD_LIBRARY_PATH=${DEPENDENCY_INSTALL_PATH}/lib:${DEPENDENCY_INSTALL_PATH}/lib64
export PKG_CONFIG_PATH=${DEPENDENCY_INSTALL_PATH}/lib/pkgconfig:${DEPENDENCY_INSTALL_PATH}/lib64/pkgconfig
export PATH=$PATH:${DEPENDENCY_INSTALL_PATH}/bin
echo "Build log file: ${DEPENDENCY_LOG_FILE}"
# yasm
echo "Building YASM (${YASM_VERSION})"
DIR=$(mktemp -d yasmXXX) && cd ${DIR} && \
curl -Os http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz && \
tar xzf yasm-${YASM_VERSION}.tar.gz && \
cd yasm-${YASM_VERSION} && \
./configure --prefix="$DEPENDENCY_INSTALL_PATH" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" && \
make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
if [ $? != 0 ]; then cat ${DEPENDENCY_LOG_FILE} && exit 1; fi
make install && \
rm -rf ${DIR}
# x264
echo ""
echo "Building x264 (last version)"
# or before commit https://code.videolan.org/videolan/x264/commit/e9a5903edf8ca59ef20e6f4894c196f135af735e
# => see https://trac.ffmpeg.org/ticket/6932
DIR=$(mktemp -d x264XXX) && cd ${DIR} && \
git clone https://code.videolan.org/videolan/x264.git && \
cd x264 && \
if [[ ${DEPENDENCY_VERSION} == 2.*.* ]]; then git checkout ba24899b0bf23345921da022f7a51e0c57dbe73d; fi
./configure --prefix="$DEPENDENCY_INSTALL_PATH" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" --enable-shared --disable-asm && \
make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
if [ $? != 0 ]; then cat ${DEPENDENCY_LOG_FILE} && exit 1; fi
make install && \
rm -rf ${DIR}
# libmp3lame
echo ""
echo "Building libmp3lame (${LAME_VERSION})"
DIR=$(mktemp -d libmp3lameXXX) && cd ${DIR} && \
curl -L -Os http://downloads.sourceforge.net/project/lame/lame/${LAME_VERSION}/lame-${LAME_VERSION}.tar.gz && \
tar xzf lame-${LAME_VERSION}.tar.gz && \
cd lame-${LAME_VERSION} && \
./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" --enable-nasm && \
make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
if [ $? != 0 ]; then cat ${DEPENDENCY_LOG_FILE} && exit 1; fi
make install && \
rm -rf ${DIR}
# faac
# Compilation error on OSX
# http://stackoverflow.com/a/4320377
# http://sourceforge.net/p/faac/bugs/162/#46a0
# echo ""
# echo "Building faac (${FAAC_VERSION})"
# DIR=$(mktemp -d faacXXX) && cd ${DIR} && \
# curl -L -Os http://downloads.sourceforge.net/faac/faac-${FAAC_VERSION}.tar.gz && \
# tar xzf faac-${FAAC_VERSION}.tar.gz && \
# cd faac-${FAAC_VERSION} && \
# sed -i '126d' common/mp4v2/mpeg4ip.h && \
# ./bootstrap && \
# ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" --enable-shared --with-mp4v2=no && \
# make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
# make install && \
# rm -rf ${DIR}
# xvid
echo ""
echo "Building xvid (${XVID_VERSION})"
DIR=$(mktemp -d xvidXXX) && cd ${DIR} && \
curl -L -Os http://downloads.xvid.org/downloads/xvidcore-${XVID_VERSION}.tar.gz && \
tar xzf xvidcore-${XVID_VERSION}.tar.gz && \
cd xvidcore/build/generic && \
./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" && \
make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
if [ $? != 0 ]; then cat ${DEPENDENCY_LOG_FILE} && exit 1; fi
make install && \
rm -rf ${DIR}
# fdk-aac
# Compilation error on OSX
# Warning: need automake + libtool
# echo ""
# echo "Building fdk-aac (${FDKAAC_VERSION})"
# DIR=$(mktemp -d fdk-aacXXX) && cd ${DIR} && \
# curl -s https://codeload.github.com/mstorsjo/fdk-aac/tar.gz/v${FDKAAC_VERSION} | tar zxf - && \
# cd fdk-aac-${FDKAAC_VERSION} && \
# autoreconf -fiv && \
# ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --enable-shared && \
# make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
# make install && \
# rm -rf ${DIR}
# libogg
echo ""
echo "Building libogg (${OGG_VERSION})"
DIR=$(mktemp -d liboggXXX) && cd ${DIR} && \
wget http://downloads.xiph.org/releases/ogg/libogg-${OGG_VERSION}.tar.gz && \
tar xzf libogg-${OGG_VERSION}.tar.gz && \
cd libogg-${OGG_VERSION} && \
./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --disable-shared --with-pic && \
make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
if [ $? != 0 ]; then cat ${DEPENDENCY_LOG_FILE} && exit 1; fi
make install && \
rm -rf ${DIR}
# libvorbis
echo ""
echo "Building libvorbis (${VORBIS_VERSION})"
DIR=$(mktemp -d libvorbisXXX) && cd ${DIR} && \
wget http://downloads.xiph.org/releases/vorbis/libvorbis-${VORBIS_VERSION}.tar.gz && \
tar xzf libvorbis-${VORBIS_VERSION}.tar.gz && \
cd libvorbis-${VORBIS_VERSION} && \
./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --with-ogg="${DEPENDENCY_INSTALL_PATH}" --disable-shared --with-pic && \
make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
if [ $? != 0 ]; then cat ${DEPENDENCY_LOG_FILE} && exit 1; fi
make install && \
rm -rf ${DIR}
# libtheora
# Compilation error with clang
# echo ""
# echo "Building libtheora (${THEORA_VERSION})"
# DIR=$(mktemp -d libtheoraXXX) && cd ${DIR} && \
# curl -O http://downloads.xiph.org/releases/theora/libtheora-${THEORA_VERSION}.tar.bz2 && \
# tar xvjf libtheora-${THEORA_VERSION}.tar.bz2 && \
# cd libtheora-${THEORA_VERSION} && \
# ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" && \
# make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
# make install && \
# make check && \
# rm -rf ${DIR}
# libvpx
# https://trac.ffmpeg.org/ticket/4956
echo ""
echo "Building libvpx (${VPX_VERSION})"
DIR=$(mktemp -d libvpxXXX) && cd ${DIR} && \
git clone https://github.com/webmproject/libvpx.git && \
cd libvpx && \
git checkout v${VPX_VERSION} && \
./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --disable-examples --enable-pic && \
make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
if [ $? != 0 ]; then cat ${DEPENDENCY_LOG_FILE} && exit 1; fi
make install && \
rm -rf ${DIR}
# libopus
# Compilation error on OSX
# echo ""
# echo "Building libopus (last version)"
# DIR=$(mktemp -d libopusXXX) && cd ${DIR} && \
# git clone git://git.opus-codec.org/opus.git && \
# cd opus && \
# autoreconf -fiv && \
# ./configure --prefix="${DEPENDENCY_INSTALL_PATH}" --enable-shared --with-pic && \
# make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
# make install && \
# rm -rf ${DIR}
export COMPILE_OPTIONS=--extra-libs=-ldl\ --enable-small\ --enable-shared\ --disable-static
export RELEASE_OPTIONS=--disable-debug
export DEBUG_OPTIONS=--enable-debug=3\ --disable-optimizations\ --disable-sse\ --disable-stripping
export LICENSING_OPTIONS=--enable-gpl\ --enable-nonfree
export THIRD_PARTIES_OPTIONS=--enable-libmp3lame\ --enable-libx264\ --enable-libxvid\ --enable-avresample\ --enable-libvpx
export PKG_CONFIG_PATH="${DEPENDENCY_INSTALL_PATH}/lib/pkgconfig"
if [[ ${DEPENDENCY_NAME} == "ffmpeg" ]]; then
echo ""
echo "Building ffmpeg (${DEPENDENCY_VERSION})"
DIR=$(mktemp -d ffmpegXXX) && cd ${DIR} && \
curl -Os http://ffmpeg.org/releases/ffmpeg-${DEPENDENCY_VERSION}.tar.gz && \
tar xzf ffmpeg-${DEPENDENCY_VERSION}.tar.gz && \
cd ffmpeg-${DEPENDENCY_VERSION} && \
./configure --prefix="${DEPENDENCY_INSTALL_PATH}" \
--extra-cflags="-I${DEPENDENCY_INSTALL_PATH}/include" --extra-ldflags="-L${DEPENDENCY_INSTALL_PATH}/lib64 -L${DEPENDENCY_INSTALL_PATH}/lib" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" \
$COMPILE_OPTIONS \
$RELEASE_OPTIONS \
$LICENSING_OPTIONS \
$THIRD_PARTIES_OPTIONS --enable-postproc && \
make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
if [ $? != 0 ]; then cat ${DEPENDENCY_LOG_FILE} && exit 1; fi
make install && \
rm -rf ${DIR}
elif [[ ${DEPENDENCY_NAME} == "libav" ]]; then
echo ""
echo "Building libav (${DEPENDENCY_VERSION})"
DIR=$(mktemp -d libavXXX) && cd ${DIR} && \
curl -Os https://libav.org/releases/libav-${DEPENDENCY_VERSION}.tar.gz && \
tar xzf libav-${DEPENDENCY_VERSION}.tar.gz && \
cd libav-${DEPENDENCY_VERSION} && \
./configure --prefix="${DEPENDENCY_INSTALL_PATH}" \
--extra-cflags="-I${DEPENDENCY_INSTALL_PATH}/include" --extra-ldflags="-L${DEPENDENCY_INSTALL_PATH}/lib64 -L${DEPENDENCY_INSTALL_PATH}/lib" --bindir="${DEPENDENCY_INSTALL_PATH}/bin" \
$COMPILE_OPTIONS \
$RELEASE_OPTIONS \
$LICENSING_OPTIONS \
$THIRD_PARTIES_OPTIONS && \
make -k > ${DEPENDENCY_LOG_FILE} 2>&1 && \
if [ $? != 0 ]; then cat ${DEPENDENCY_LOG_FILE} && exit 1; fi
make install && \
rm -rf ${DIR}
fi
fi