Created
August 11, 2011 22:16
-
-
Save ehowe/1140946 to your computer and use it in GitHub Desktop.
ffmpeg ey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
media_libs="/engineyard/portage/media-libs" | |
media_sound="/engineyard/portage/media-sound" | |
media_video="/engineyard/portage/media-video" | |
dev_lang="/engineyard/portage/dev-lang" | |
dev_python="/engineyard/portage/dev-python" | |
if [ $(uname -m) == 'x86_64' ]; then | |
mask="~amd64" | |
elif [ $(uname -m) == 'i686' ]; then | |
mask="~x86" | |
fi | |
ffmpeg="ffmpeg-0.11.1" | |
libtheora="libtheora-1.1.1" | |
openjpeg="openjpeg-1.3-r3" | |
vo_aacenc="vo-aacenc-0.1.1" | |
x264="x264-0.0.20120707" | |
lame="lame-3.98.4" | |
opencore_amr="opencore-amr-0.1.2" | |
vo_amrwbenc="vo-amrwbenc-0.1.1" | |
yasm="yasm-1.2.0" | |
cython="cython-0.16" | |
x264_append=' | |
src_install() { | |
make DESTDIR="${D}" install || die | |
dodoc AUTHORS doc/*.txt | |
}' | |
yasm_append=' | |
src_install() { | |
emake DESTDIR="${D}" install || die "make install failed" | |
dodoc AUTHORS INSTALL | |
}' | |
openjpeg_files=("1.3-freebsd.patch" "1.3-darwin.patch" "r3-codec-Makefile" "1.3-Makefile.patch") | |
x264_files=("nostrip.patch" "altivec.patch" "onlylib-20100605.patch" "onlylib-20110425.patch") | |
lame_files=("3.98.2-get_audio.patch" "3.98.2-ffmpeg-0.5.patch") | |
vo_aacenc_files=("0.1.1-neon.patch") | |
yasm_files=("fix_cython_check.patch") | |
needed_directories=("${media_libs}/vo-aacenc/files" "${media_libs}/opencore-amr" "${media_libs}/vo-amrwbenc" "${dev_lang}/yasm/files") | |
masked_packages=("=media-video/${ffmpeg}" "=media-libs/${x264}") | |
if [ $(uname -m) == 'x86_64' ]; then | |
echo "media-libs/vo-amrwbenc" >> /etc/portage/package.keywords/local | |
fi | |
if ! egrep "=media-video/${ffmpeg} -ieee1394" /etc/portage/package.use; then | |
echo "=media-video/${ffmpeg} -ieee1394" >> /etc/portage/package.use | |
fi | |
for package in "${masked_packages[@]}"; do | |
if ! egrep "${package} ${mask}" /etc/portage/package.keywords/local; then | |
echo "${package} ${mask}" >> /etc/portage/package.keywords/local | |
fi | |
if ! egrep "${package}" /etc/portage/package.unmask/local; then | |
echo "${package}" >> /etc/portage/package.unmask/local | |
fi | |
done | |
for directory in "${needed_directories[@]}"; do | |
mkdir -p ${directory} | |
done | |
for file in "${openjpeg_files[@]}"; do | |
cd ${media_libs}/openjpeg/files | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/openjpeg/files/openjpeg-${file} | |
done | |
for file in "${x264_files[@]}"; do | |
cd ${media_libs}/x264/files | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/x264/files/x264-${file} | |
done | |
for file in "${lame_files[@]}"; do | |
cd ${media_sound}/lame/files | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-sound/lame/files/lame-${file} | |
done | |
for file in "${vo_aacenc_files[@]}"; do | |
cd ${media_libs}/vo-aacenc/files | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/vo-aacenc/files/vo-aacenc-${file} | |
done | |
for file in "${yasm_files[@]}"; do | |
cd ${dev_lang}/yasm/files | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-lang/yasm/files/${yasm}-${file} | |
done | |
cd ${media_video}/ffmpeg | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-video/ffmpeg/${ffmpeg}.ebuild | |
sed -i -r -e 's/EAPI.*/EAPI="2"/' ${media_video}/ffmpeg/${ffmpeg}.ebuild | |
sed -i -r -e 's/virtual\/pkgconfig/dev-util\/pkgconfig/g' ${media_video}/ffmpeg/${ffmpeg}.ebuild | |
ebuild ${ffmpeg}.ebuild digest | |
cd ${media_sound}/lame | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-sound/lame/${lame}.ebuild | |
sed -i -r -e 's/EAPI.*/EAPI="2"/' ${media_sound}/lame/${lame}.ebuild | |
ebuild ${lame}.ebuild digest | |
cd ${media_libs}/libtheora | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/libtheora/${libtheora}.ebuild | |
sed -i -r -e 's/virtual\/pkgconfig/dev-util\/pkgconfig/g' ${media_libs}/libtheora/${libtheora}.ebuild | |
ebuild ${libtheora}.ebuild digest | |
cd ${media_libs}/openjpeg | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/openjpeg/${openjpeg}.ebuild | |
ebuild ${openjpeg}.ebuild digest | |
cd ${media_libs}/vo-aacenc | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/vo-aacenc/${vo_aacenc}.ebuild | |
sed -i -r -e 's/EAPI.*/EAPI="2"/' ${media_libs}/vo-aacenc/${vo_aacenc}.ebuild | |
ebuild ${vo_aacenc}.ebuild digest | |
cd ${media_libs}/x264 | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/x264/${x264}.ebuild | |
sed -i -r -e 's/EAPI.*/EAPI="2"/' ${media_libs}/x264/${x264}.ebuild | |
echo "${x264_append}" >> ${media_libs}/x264/${x264}.ebuild | |
ebuild ${x264}.ebuild digest | |
cd ${media_libs}/opencore-amr | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/opencore-amr/${opencore_amr}.ebuild | |
ebuild ${opencore_amr}.ebuild digest | |
cd ${media_libs}/vo-amrwbenc | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/vo-amrwbenc/${vo_amrwbenc}.ebuild | |
sed -i -r -e 's/EAPI.*/EAPI="2"/' ${media_libs}/vo-amrwbenc/${vo_amrwbenc}.ebuild | |
ebuild ${vo_amrwbenc}.ebuild digest | |
cd ${dev_lang}/yasm | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-lang/yasm/${yasm}.ebuild | |
sed -i -r -e 's/EAPI.*/EAPI="2"/' ${dev_lang}/yasm/${yasm}.ebuild | |
echo "${yasm_append}" >> ${dev_lang}/yasm/${yasm}.ebuild | |
ebuild ${yasm}.ebuild digest | |
cd ${dev_python}/cython | |
wget http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-python/cython/${cython}.ebuild | |
sed -i -r -e 's/EAPI.*/EAPI="2"/' ${dev_python}/cython/${cython}.ebuild | |
ebuild ${cython}.ebuild digest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment