forked from csparker247/ffmpeg-static
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·124 lines (100 loc) · 4.76 KB
/
build.sh
File metadata and controls
executable file
·124 lines (100 loc) · 4.76 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
#!/bin/sh
set -e
set -u
cd `dirname $0`
ENV_ROOT=`pwd`
. ./env.source
rm -rf "$BUILD_DIR" "$TARGET_DIR"
mkdir -p "$BUILD_DIR" "$TARGET_DIR"
# NOTE: this is a fetchurl parameter, nothing to do with the current script
#export TARGET_DIR_DIR="$BUILD_DIR"
echo "#### FFmpeg static build, by STVS SA ####"
cd $BUILD_DIR
../fetchurl "http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz"
../fetchurl "http://libav.org/releases/libav-0.8.3.tar.gz"
../fetchurl "http://zlib.net/zlib-1.2.7.tar.bz2"
../fetchurl "http://bzip.org/1.0.6/bzip2-1.0.6.tar.gz"
#../fetchurl "ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.2.50.tar.gz"
../fetchurl "http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz"
../fetchurl "http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz"
../fetchurl "http://ffmpeg.gusari.org/uploads/libaacplus-2.0.2.tar.gz"
#../fetchurl "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2"
#../fetchurl "http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2"
../fetchurl "http://downloads.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-0.1.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fopencore-amr%2Ffiles%2Ffdk-aac%2F&ts=1352301762&use_mirror=iweb"
#../fetchurl "ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20121106-2245.tar.bz2"
#../fetchurl "http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz"
../fetchurl "http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz?use_mirror=auto"
../fetchurl "http://ffmpeg.org/releases/ffmpeg-1.0.tar.gz"
echo "*** Building yasm ***"
cd "$BUILD_DIR/yasm-1.2.0"
./configure --prefix=$TARGET_DIR
make -j 4 && make install
echo "*** Building zlib ***"
cd "$BUILD_DIR/zlib-1.2.7"
./configure --prefix=$TARGET_DIR
make -j 4 && make install
echo "*** Building bzip2 ***"
cd "$BUILD_DIR/bzip2-1.0.6"
make
make install PREFIX=$TARGET_DIR
#echo "*** Building libpng ***"
#cd "$BUILD_DIR/libpng-1.2.50"
#./configure --prefix=$TARGET_DIR --enable-static --disable-shared
#make -j 4 && make install
# Ogg before vorbis
echo "*** Building libogg ***"
cd "$BUILD_DIR/libogg-1.3.0"
./configure --prefix=$TARGET_DIR --enable-static --disable-shared
make -j 4 && make install
# Vorbis before theora
echo "*** Building libvorbis ***"
cd "$BUILD_DIR/libvorbis-1.3.3"
./configure --prefix=$TARGET_DIR --enable-static --disable-shared
make -j 4 && make install
#echo "*** Building libtheora ***"
#cd "$BUILD_DIR/libtheora-1.1.1"
#./configure --prefix=$TARGET_DIR --enable-static --disable-shared
#make -j 4 && make install
#echo "*** Building livpx ***"
#cd "$BUILD_DIR/libvpx-v1.1.0"
#./configure --prefix=$TARGET_DIR --disable-shared
#make -j 4 && make install
# echo "*** Building faac ***"
# cd "$BUILD_DIR/faac-1.28"
# ./configure --prefix=$TARGET_DIR --enable-static --disable-shared
# FIXME: gcc incompatibility, does not work with log()
# sed -i -e "s|^char \*strcasestr.*|//\0|" common/mp4v2/mpeg4ip.h
# make -j 4 && make install
echo "*** Building fdk-aac ***"
cd "$BUILD_DIR/fdk-aac-0.1.0"
./configure --prefix=$TARGET_DIR --enable-shared --disable-static
make -j 4 && make install
echo "*** Building libaacplus ***"
cd "$BUILD_DIR/libaacplus-2.0.2"
./autogen.sh --prefix=$TARGET_DIR --enable-shared --disable-static
make && make install
cd "$BUILD_DIR/libav-0.8.3"
./configure --prefix=$TARGET_DIR/lavf --enable-gpl --disable-debug --enable-runtime-cpudetect
make -j 4 && make install
#echo "*** Building x264 ***"
#cd "$BUILD_DIR/x264-snapshot-20121106-2245"
#CFLAGS="-I$TARGET_DIR/lavf/include" LDFLAGS="-L$TARGET_DIR/lavf/lib -framework CoreFoundation -framework CoreVideo -framework VideoDecodeAcceleration" ./configure --prefix=$TARGET_DIR --host=x86_64-apple-darwin --enable-static
#make -j 4 && make install
#echo "*** Building xvidcore ***"
#cd "$BUILD_DIR/xvidcore/build/generic"
#./configure --prefix=$TARGET_DIR --enable-static --disable-shared
#make -j 4 && make install
##rm $TARGET_DIR/lib/libxvidcore.so.*
echo "*** Building lame ***"
cd "$BUILD_DIR/lame-3.99.5"
./configure --prefix=$TARGET_DIR --enable-static --disable-shared
make -j 4 && make install
# FIXME: only OS-sepcific
#rm -f "$TARGET_DIR/lib/*.dylib"
#rm -f "$TARGET_DIR/lib/*.so"
# FFMpeg
echo "*** Building FFmpeg ***"
cd "$BUILD_DIR/ffmpeg-1.0"
# patch -p1 <../../ffmpeg_config.patch
CFLAGS="-I$TARGET_DIR/include" LDFLAGS="-L$TARGET_DIR/lib -lm" ./configure --cc=gcc --prefix=${OUTPUT_DIR:-$TARGET_DIR} --extra-version=static --disable-debug --disable-shared --enable-static --extra-cflags=--static --disable-ffplay --disable-ffserver --disable-doc --enable-gpl --enable-pthreads --enable-postproc --enable-gray --enable-runtime-cpudetect --enable-libfdk-aac --enable-libmp3lame --enable-libaacplus --enable-libvorbis --enable-bzlib --enable-zlib --enable-nonfree --enable-version3 --disable-devices
make -j 4 && make install