@@ -80,7 +80,7 @@ OPUS_VERSION="1.1.5"
80
80
if [ ! -d " opus-${OPUS_VERSION} " ]; then
81
81
echo " Downloading opus-${OPUS_VERSION} "
82
82
curl -LO https://archive.mozilla.org/pub/opus/opus-${OPUS_VERSION} .tar.gz
83
- tar -xzf opus-${OPUS_VERSION} .tar.gz
83
+ tar -xf opus-${OPUS_VERSION} .tar.gz
84
84
else
85
85
echo " Using existing ` pwd` /opus-${OPUS_VERSION} "
86
86
fi
@@ -89,7 +89,7 @@ FDK_AAC_VERSION="0.1.5"
89
89
if [ ! -d " fdk-aac-${FDK_AAC_VERSION} " ]; then
90
90
echo " Downloading fdk-aac-${FDK_AAC_VERSION} "
91
91
curl -LO http://downloads.sourceforge.net/opencore-amr/fdk-aac-${FDK_AAC_VERSION} .tar.gz
92
- tar -xzf fdk-aac-${FDK_AAC_VERSION} .tar.gz
92
+ tar -xf fdk-aac-${FDK_AAC_VERSION} .tar.gz
93
93
else
94
94
echo " Using existing ` pwd` /fdk-aac-${FDK_AAC_VERSION} "
95
95
fi
@@ -99,7 +99,7 @@ LAME_VERSION="3.99.5"
99
99
if [ ! -d " lame-${LAME_VERSION} " ]; then
100
100
echo " Downloading lame-${LAME_VERSION} "
101
101
curl -LO http://downloads.sourceforge.net/project/lame/lame/${LAME_MAJOR} /lame-${LAME_VERSION} .tar.gz
102
- tar -xzf lame-${LAME_VERSION} .tar.gz
102
+ tar -xf lame-${LAME_VERSION} .tar.gz
103
103
curl -L -o lame-${LAME_VERSION} /config.guess " http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD"
104
104
curl -L -o lame-${LAME_VERSION} /config.sub " http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD"
105
105
else
@@ -117,7 +117,7 @@ LIBOGG_VERSION="1.3.2"
117
117
if [ ! -d " libogg-${LIBOGG_VERSION} " ]; then
118
118
echo " Downloading libogg-${LIBOGG_VERSION} "
119
119
curl -LO http://downloads.xiph.org/releases/ogg/libogg-${LIBOGG_VERSION} .tar.gz
120
- tar -xzf libogg-${LIBOGG_VERSION} .tar.gz
120
+ tar -xf libogg-${LIBOGG_VERSION} .tar.gz
121
121
else
122
122
echo " Using existing ` pwd` /libogg-${LIBOGG_VERSION} "
123
123
fi
@@ -126,7 +126,7 @@ LIBVORBIS_VERSION="1.3.4"
126
126
if [ ! -d " libvorbis-${LIBVORBIS_VERSION} " ]; then
127
127
echo " Downloading libvorbis-${LIBVORBIS_VERSION} "
128
128
curl -LO http://downloads.xiph.org/releases/vorbis/libvorbis-${LIBVORBIS_VERSION} .tar.gz
129
- tar -xzf libvorbis-${LIBVORBIS_VERSION} .tar.gz
129
+ tar -xf libvorbis-${LIBVORBIS_VERSION} .tar.gz
130
130
else
131
131
echo " Using existing ` pwd` /libvorbis-${LIBVORBIS_VERSION} "
132
132
fi
140
140
# echo "Using existing `pwd`/libvpx-${LIBVPX_VERSION}"
141
141
# fi
142
142
143
+ LIBFREETYPE_VERSION=" 2.9"
144
+ if [ ! -d " freetype-${LIBFREETYPE_VERSION} " ]; then
145
+ echo " Downloading freetype-${LIBFREETYPE_VERSION} "
146
+ curl -LO https://download.savannah.gnu.org/releases/freetype/freetype-${LIBFREETYPE_VERSION} .tar.gz
147
+ tar -xf freetype-${LIBFREETYPE_VERSION} .tar.gz
148
+ else
149
+ echo " Using existing ` pwd` /freetype-${LIBFREETYPE_VERSION} "
150
+ fi
151
+
152
+ EXPAT_VERSION=" 2.2.3"
153
+ if [ ! -d " expat-${EXPAT_VERSION} " ]; then
154
+ echo " Downloading expat-${EXPAT_VERSION} "
155
+ curl -LO http://downloads.sourceforge.net/project/expat/expat/${EXPAT_VERSION} /expat-${EXPAT_VERSION} .tar.bz2
156
+ tar -xf expat-${EXPAT_VERSION} .tar.bz2
157
+ else
158
+ echo " Using existing ` pwd` /expat-${EXPAT_VERSION} "
159
+ fi
160
+
161
+ LIBUUID_VERSION=" 1.0.3"
162
+ if [ ! -d " libuuid-${LIBUUID_VERSION} " ]; then
163
+ echo " Downloading libuuid-${LIBUUID_VERSION} "
164
+ curl -LO https://downloads.sourceforge.net/project/libuuid/libuuid-${LIBUUID_VERSION} .tar.gz
165
+ tar -xf libuuid-${LIBUUID_VERSION} .tar.gz
166
+ else
167
+ echo " Using existing ` pwd` /libuuid-${LIBUUID_VERSION} "
168
+ fi
169
+
170
+ LIBFONTCONFIG_VERSION=" 2.13.0"
171
+ if [ ! -d " fontconfig-${LIBFONTCONFIG_VERSION} " ]; then
172
+ echo " Downloading fontconfig-${LIBFONTCONFIG_VERSION} "
173
+ curl -LO https://www.freedesktop.org/software/fontconfig/release/fontconfig-${LIBFONTCONFIG_VERSION} .tar.gz
174
+ tar -xf fontconfig-${LIBFONTCONFIG_VERSION} .tar.gz
175
+ else
176
+ echo " Using existing ` pwd` /fontconfig-${LIBFONTCONFIG_VERSION} "
177
+ fi
178
+
179
+ GETTEXT_VERSION=" 0.19.8.1"
180
+ if [ ! -d " gettext-${GETTEXT_VERSION} " ]; then
181
+ echo " Downloading gettext-${GETTEXT_VERSION} "
182
+ curl -LO http://ftp.gnu.org/pub/gnu/gettext/gettext-${GETTEXT_VERSION} .tar.gz
183
+ tar -xf gettext-${GETTEXT_VERSION} .tar.gz
184
+ else
185
+ echo " Using existing ` pwd` /gettext-${GETTEXT_VERSION} "
186
+ fi
187
+
188
+ LIBPNG_VERSION=" 1.6.34"
189
+ if [ ! -d " libpng-${LIBPNG_VERSION} " ]; then
190
+ echo " Downloading libpng-${LIBPNG_VERSION} "
191
+ curl -LO https://downloads.sourceforge.net/project/libpng/libpng16/${LIBPNG_VERSION} /libpng-${LIBPNG_VERSION} .tar.xz
192
+ tar -xf libpng-${LIBPNG_VERSION} .tar.xz
193
+ else
194
+ echo " Using existing ` pwd` /libpng-${LIBPNG_VERSION} "
195
+ fi
196
+
143
197
# Download lib openssl prebuilt
144
198
OPENSSL_PREBUILT_FOLDER=" $( pwd) /openssl-prebuilt"
145
199
if [ ! -d $OPENSSL_PREBUILT_FOLDER /android ]; then
@@ -152,8 +206,11 @@ function build_one
152
206
{
153
207
154
208
if [ " $( uname) " == " Darwin" ]; then
155
- brew install yasm nasm
209
+ brew install yasm nasm automake gettext
210
+ export PATH=" /usr/local/opt/gettext/bin:$PATH "
156
211
else
212
+ sudo apt-get update
213
+ sudo apt-get -y install automake autopoint libtool gperf
157
214
# Install nasm >= 2.13 for libx264
158
215
if [ ! -d " nasm-2.13.03" ]; then
159
216
curl -LO ' http://www.nasm.us/pub/nasm/releasebuilds/2.13.03/nasm-2.13.03.tar.xz'
@@ -164,6 +221,14 @@ else
164
221
make
165
222
sudo make install
166
223
popd
224
+
225
+ if [ " $FLAVOR " = " full" ]; then
226
+ pushd gettext-${GETTEXT_VERSION}
227
+ ./configure --prefix=/usr
228
+ make
229
+ sudo make install
230
+ popd
231
+ fi ;
167
232
fi
168
233
169
234
if [ $ARCH == " native" ]
@@ -257,6 +322,80 @@ if [ "$FLAVOR" = "full" ]; then
257
322
make -j8
258
323
make install
259
324
popd
325
+
326
+ pushd libpng-${LIBPNG_VERSION}
327
+ ./configure \
328
+ --prefix=$PREFIX \
329
+ --host=$HOST \
330
+ --with-pic \
331
+ --enable-static \
332
+ --disable-shared \
333
+ --enable-arm-neon=" $ARM_NEON " \
334
+ --disable-shared
335
+
336
+ make clean
337
+ make -j8
338
+ make install
339
+ popd
340
+
341
+ pushd freetype-${LIBFREETYPE_VERSION}
342
+ ./configure \
343
+ --prefix=$PREFIX \
344
+ --host=$HOST \
345
+ --with-pic \
346
+ --with-png=yes \
347
+ --with-zlib=yes \
348
+ --enable-static \
349
+ --disable-shared
350
+
351
+ make clean
352
+ make -j8
353
+ make install
354
+ popd
355
+
356
+ # required by fontconfig
357
+ pushd libuuid-${LIBUUID_VERSION}
358
+ ./configure \
359
+ --prefix=$PREFIX \
360
+ --host=$HOST \
361
+ --enable-static \
362
+ --disable-shared
363
+
364
+ make clean
365
+ make -j8
366
+ make install
367
+ popd
368
+
369
+ # required by fontconfig
370
+ pushd expat-${EXPAT_VERSION}
371
+ ./configure \
372
+ --prefix=$PREFIX \
373
+ --host=$HOST \
374
+ --with-pic \
375
+ --enable-static \
376
+ --disable-shared
377
+
378
+ make clean
379
+ make -j8
380
+ make install
381
+ popd
382
+
383
+ pushd fontconfig-${LIBFONTCONFIG_VERSION}
384
+ autoreconf -iv
385
+ ./configure \
386
+ --prefix=$PREFIX \
387
+ --host=$HOST \
388
+ --with-pic \
389
+ --disable-libxml2 \
390
+ --disable-iconv \
391
+ --enable-static \
392
+ --disable-shared \
393
+ --disable-docs
394
+
395
+ make clean
396
+ make -j8
397
+ make install
398
+ popd
260
399
fi ;
261
400
262
401
@@ -369,6 +508,9 @@ if [ "$FLAVOR" = "full" ]; then
369
508
--enable-libfdk-aac \
370
509
--enable-bsf=aac_adtstoasc \
371
510
--enable-openssl \
511
+ --enable-libfreetype \
512
+ --enable-libfontconfig \
513
+ --enable-zlib \
372
514
\
373
515
--disable-doc \
374
516
$ADDITIONAL_CONFIGURE_FLAG
@@ -423,6 +565,7 @@ cp $PREFIX/bin/ffmpeg $DESTINATION_FOLDER/$FLAVOR/
423
565
popd
424
566
}
425
567
568
+ ARM_NEON=" no"
426
569
if [ $TARGET == ' arm-v7n' ]; then
427
570
# arm v7n
428
571
CPU=armv7-a
@@ -431,6 +574,7 @@ if [ $TARGET == 'arm-v7n' ]; then
431
574
ADDITIONAL_CONFIGURE_FLAG=" --enable-neon "
432
575
LIBX264_FLAGS=
433
576
cp -a $OPENSSL_PREBUILT_FOLDER /android/openssl-armeabi-v7a/. $PREFIX
577
+ ARM_NEON=" yes"
434
578
build_one
435
579
elif [ $TARGET == ' arm64-v8a' ]; then
436
580
# arm64-v8a
0 commit comments