H
Harry3
unregistriert
Thread Starter
- Dabei seit
- 19.04.2014
- Beiträge
- 157
- Reaktionspunkte
- 0
Diese Anleitung ist eine Weiterentwicklung der Anleitung hier funktioniert aber auch mit aktuellem Xcode.
Vorbereitung: folgende Dateien runterladen (etliche ändern sich sehr selten)
Zuerst eine Ramdisk mit 2GB anlegen und ein paar Umgebungsvariablen setzen.
Jetzt auf der Ramdisk einen Ordner "source" erstellen und alle Dateien hinkopieren.
Auf einem Mac Mini (i7) läuft ein persönliches Shell-Script das alles compiliert in weniger als 15 Minuten komplett durch und am Ende befinden sich die Binaries in dem bin-Unterordner auf der Ramdisk.
Vorbereitung: folgende Dateien runterladen (etliche ändern sich sehr selten)
amrnb-7.0.0.2.tar.bz2, amrwb-7.0.0.4.tar.bz2, bzip2-1.0.6.tar.gz, cmake-2.8.12.1.tar.gz, faac-1.28.tar.gz, faad2-2.7.tar.gz, fdk-aac-0.1.3.tar.gz, flac-1.3.0.tar, georgmartius-vid.stab-release-0.98b-0-g3b35b4d.tar.gz, git-1.9.0.tar.gz, gsm-1.0.13.tar.gz, lame-3.99.5.tar.gz, libilbc-master.zip, libogg-1.3.1.tar.gz, libtheora-1.1.1.tar.bz2, libvorbis-1.3.4.tar.gz, libvpx-v1.3.0.tar.bz2, openal-soft-1.13.tar.bz2, openal-soft-1.15.1.tar.bz2, opencore-amr-0.1.3.tar.gz, opus-1.1.tar.gz, pkg-config-0.28.tar.gz, soxr-0.1.1-Source.tar, speex-1.2rc1.tar.gz, twolame-0.3.13.tar.gz, vo-aacenc-0.1.3.tar.gz, vo-amrwbenc-0.1.3.tar.gz, wavpack-4.70.0.tar.bz2, xvidcore-1.3.2.tar.gz, yasm-1.2.0.tar.gz, zeromq-3.2.4.tar.gz, zlib-1.2.8.tar.gz
Zuerst eine Ramdisk mit 2GB anlegen und ein paar Umgebungsvariablen setzen.
Code:
VOLNAME=Ramdisk
DISK_ID=$(hdid -nomount ram://4194304)
newfs_hfs -v ${VOLNAME} ${DISK_ID}
diskutil mount ${DISK_ID}
export TARGET="/Volumes/${VOLNAME}/"
export CMPL="/Volumes/${VOLNAME}/compile"
export PATH=${TARGET}/bin:$PATH
export CC="clang"
export CPP="clang -E"
export CXX="clang++"
export CXXCPP="clang++ -E"
export LDFLAGS="-stdlib=libc++"
export CXXFLAGS="-stdlib=libc++"
mkdir ${CMPL}
Code:
# Building xvidcore and removing the dynamic library
cd ${CMPL}
tar xzpf ../source/xvidcore-1.3.2.tar.gz
cd xvidcore
cd build/generic
./configure --prefix=${TARGET}
make -j 2 && make install
rm ${TARGET}/lib/libxvidcore.4.dylib
# yasm
cd ${CMPL}
tar xzpf ../source/yasm-1.2.0.tar.gz
cd yasm-1.2.0
./configure --prefix=${TARGET}
make -j 2 && make install
# pkg-config
cd ${CMPL}
tar xzpf ../source/pkg-config-0.28.tar.gz
cd pkg-config-0.28
./configure --prefix=${TARGET} --with-pc-path=${TARGET}/lib/pkgconfig --with-internal-glib
make -j 2 && make install
# git
cd ${CMPL}
tar xzpf ../source/git-1.9.0.tar.gz
cd git-1.9.0
./configure --prefix=${TARGET}/git --with-iconv=/Volumes/Ramdisk
make && make install
# wavpack
cd ${CMPL}
tar xjpf ../source/wavpack-4.70.0.tar.bz2
cd wavpack-4.70.0
./configure --prefix=${TARGET} --enable-static --disable-shared --with-iconv=/usr/
make -j 2 && make install
# lame
cd ${CMPL}
tar xzpf ../source/lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --prefix=${TARGET} --disable-shared --enable-static
make -j 2 && make install
# faac
cd ${CMPL}
tar xzpf ../source/faac-1.28.tar.gz
cd faac-1.28
./configure --prefix=${TARGET} --disable-shared --enable-static
make -j 2 && make install
# faad
cd ${CMPL}
tar xjpf ../source/faad2-2.7.tar.gz
cd faad2-2.7
./configure --prefix=${TARGET} --disable-shared --enable-static
make -j 2 && make install
# x264
cd ${CMPL}
curl -O ftp://ftp.videolan.org/pub/videolan/x264/snapshots/last_stable_x264.tar.bz2
tar xjpf last_stable_x264.tar.bz2
cd x264*stable
./configure --prefix=${TARGET} --disable-shared --enable-static
make -j 2 && make install && make install-lib-static
# ogg
cd ${CMPL}
tar xzpf ../source/libogg-1.3.1.tar.gz
cd libogg-1.3.1
./configure --prefix=${TARGET} --disable-shared --enable-static
make -j 2 && make install
# vorbis
cd ${CMPL}
tar xzpf ../source/libvorbis-1.3.4.tar.gz
cd libvorbis-1.3.4
./configure --prefix=${TARGET} --with-ogg-libraries=${TARGET}/lib --with-ogg-includes=${TARGET}/include/ --enable-static --disable-shared
make -j 2 && make install
# theora
cd ${CMPL}
tar xjpf ../source/libtheora-1.1.1.tar.bz2
cd libtheora-1.1.1
# in order to compile with Xcode 5.1
perl -p -i -e "s/-falign-loops=16//g" configure
perl -p -i -e "s/-fforce-addr//g" configure
./configure --prefix=${TARGET} --disable-asm --with-ogg-libraries=${TARGET}/lib --with-ogg-includes=${TARGET}/include/ --with-vorbis-libraries=${TARGET}/lib --with-vorbis-includes=${TARGET}/include/ --enable-static --disable-shared
make -j 2 && make install
# libopus
cd ${CMPL}
tar xjpf ../source/opus-1.1.tar.gz
cd opus-1.1
./configure --prefix=${TARGET} --disable-shared --enable-static
make -j 2 && make install
# gsm
cd ${CMPL}
tar xzpf ../source/gsm-1.0.13.tar.gz
cd gsm-1.0-pl13
mkdir -p ${TARGET}/man/man3
mkdir -p ${TARGET}/man/man1
mkdir -p ${TARGET}/include/gsm
perl -p -i -e "s#^INSTALL_ROOT.*#INSTALL_ROOT = $TARGET#g" Makefile
perl -p -i -e "s#_ROOT\)/inc#_ROOT\)/include#g" Makefile
sed "/GSM_INSTALL_INC/s/include/include\/gsm/g" Makefile > Makefile.new
mv Makefile.new Makefile
make -j 2 && make install
# amrwb
cd ${CMPL}
tar xjpf ../source/amrwb-7.0.0.4.tar.bz2
cd amrwb-7.0.0.4
./configure --prefix=${TARGET} --disable-shared --enable-static
make -j 2 && make install
# amrnb downloads additional sources
cd ${CMPL}
tar xjpf ../source/amrnb-7.0.0.2.tar.bz2
cd amrnb-7.0.0.2
./configure --prefix=${TARGET} --disable-shared --enable-static
make -j 2 && make install
# opencore_amr
cd ${CMPL}
tar xzpf ../source/opencore-amr-0.1.3.tar.gz
cd opencore-amr-0.1.3
./configure --prefix=${TARGET} --disable-shared --enable-static
make -j 2 && make install
# speex
cd ${CMPL}
tar xzpf ../source/speex-1.2rc1.tar.gz
cd speex-1.2rc1
./configure --prefix=${TARGET} --with-ogg-libraries=${TARGET}/lib --with-ogg-includes=${TARGET}/include/ --enable-static --disable-shared
make -j 2 && make install
# flac
cd ${CMPL}
tar xpf ../source/flac-1.3.0.tar
cd flac-1.3.0
./configure --prefix=${TARGET} --disable-asm-optimizations --disable-xmms-plugin --with-ogg-libraries=${TARGET}/lib --with-ogg-includes=${TARGET}/include/ --enable-static --disable-shared
make -j 2 && make install
# xavs
cd ${CMPL}
svn co https://svn.code.sf.net/p/xavs/code/ xavs
cd xavs/trunk
# in order to compile with Xcode 5.1
perl -p -i -e "s/-falign-loops=16//g" configure
perl -p -i -e "s/-fforce-addr//g" configure
./configure --prefix=${TARGET} --disable-asm
make -j 2 && make install
# vo-aacenc
cd ${CMPL}
tar xzpf ../source/vo-aacenc-0.1.3.tar.gz
cd vo-aacenc-0.1.3
./configure --prefix=${TARGET} --disable-shared --enable-static
make -j 2 && make install
# vo-amrwbenc
cd ${CMPL}
tar xzpf ../source/vo-amrwbenc-0.1.3.tar.gz
cd vo-amrwbenc-0.1.3
./configure --prefix=${TARGET} --disable-shared --enable-static
make -j 2 && make install
# libvpx
cd ${CMPL}
tar xjpf ../source/libvpx-v1.3.0.tar.bz2
cd libvpx-v1.3.0
./configure --prefix=${TARGET} --as=yasm --disable-shared --enable-static --enable-vp8
make -j 2 && make install
# fdk-aac
cd ${CMPL}
tar xzpf ../source/fdk-aac-0.1.3.tar.gz
cd fdk-aac-0.1.3
./configure --prefix=${TARGET} --enable-static --disable-shared
make -j 2 && make install
# twolame
cd ${CMPL}
tar xzpf ../source/twolame-0.3.13.tar.gz
cd twolame-0.3.13
./configure --prefix=${TARGET} --disable-shared --enable-static
make -j 2 && make install
# libutvideo
cd ${CMPL}
git clone https://github.com/qyot27/libutvideo
cd libutvideo
./configure --prefix=${TARGET}
make -j 2 && make install
# zeromq
cd ${CMPL}
tar xzpf ../source/zeromq-3.2.4.tar.gz
cd zeromq-3.2.4
./configure --without-documentation --prefix=${TARGET} --enable-static --disable-shared
make -j 2 && make install
# cmake
cd ${CMPL}
tar xzpf ../source/cmake-2.8.12.1.tar.gz
cd cmake-2.8.12.1
./configure --prefix=${TARGET}
make -j 2 && make install
# OpenAl
cd ${CMPL}
tar xjpf ../source/openal-soft-1.13.tar.bz2
cd openal-soft-1.13
cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DLIBTYPE=STATIC .
make -j 2 && make install
# libsoxr
cd ${CMPL}
tar xpf ../source/soxr-0.1.1-Source.tar
cd soxr-0.1.1-Source
cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} -DBUILD_SHARED_LIBS=OFF .
make -j 2 && make install
# libvidstab
cd ${CMPL}
tar xzpf ../source/georgmartius-vid.stab-release*
cd georgmartius-vid.stab*
perl -p -i -e 's/vidstab SHARED/vidstab STATIC/' CMakeLists.txt
cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} .
make -j 2 && make install
# libilbc
cd ${CMPL}
unzip -a ../source/libilbc-master.zip
cd libilbc-master
sed '/TARGETS/s/ ilbc / /' CMakeLists.txt >CMakeLists.txt.new
mv CMakeLists.txt.new CMakeLists.txt
cmake -DCMAKE_INSTALL_PREFIX:PATH=${TARGET} .
make -j 2 && make install
# zlib
cd ${CMPL}
tar xzpf ../source/zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure --prefix=${TARGET} --static
make -j 2 && make install
# bzip2
cd ${CMPL}
tar xzpf ../source/bzip2-1.0.6.tar.gz
cd bzip2-1.0.6
make
make install PREFIX=${TARGET}
# Building FFMPEG
cd ${CMPL}
curl -O http://www.ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjpf ffmpeg-snapshot.tar.bz2
cd ffmpeg
export LDFLAGS="-L${TARGET}/lib $CFLAGS"
export CFLAGS="-I${TARGET}/include $LDFLAGS"
# utvideo, limzmq not enabled
./configure --prefix=${TARGET} --as=yasm --disable-shared --disable-ffplay --enable-static --disable-ffserver --enable-gpl --enable-pthreads --enable-postproc --enable-gray --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libspeex --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-nonfree --enable-version3 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvpx --enable-libgsm --enable-libopus --enable-libtwolame --enable-openal --enable-libsoxr --enable-libfdk-aac --enable-libwavpack --enable-libvidstab --enable-libilbc --enable-runtime-cpudetect
make -j 2 && make install
# Building Mplayer/Mencoder
cd ${CMPL}
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
cd mplayer
./configure --prefix=${TARGET} --extra-cflags="-I${TARGET}/include/" --extra-ldflags="-L${TARGET}/lib"
make -j 2 && make install
Auf einem Mac Mini (i7) läuft ein persönliches Shell-Script das alles compiliert in weniger als 15 Minuten komplett durch und am Ende befinden sich die Binaries in dem bin-Unterordner auf der Ramdisk.