summaryrefslogtreecommitdiffstats
path: root/multimedia/ffmpeg/ffmpeg.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/ffmpeg/ffmpeg.SlackBuild')
-rw-r--r--multimedia/ffmpeg/ffmpeg.SlackBuild35
1 files changed, 26 insertions, 9 deletions
diff --git a/multimedia/ffmpeg/ffmpeg.SlackBuild b/multimedia/ffmpeg/ffmpeg.SlackBuild
index 9970c5b7f7..a2b5ea7d7d 100644
--- a/multimedia/ffmpeg/ffmpeg.SlackBuild
+++ b/multimedia/ffmpeg/ffmpeg.SlackBuild
@@ -7,7 +7,7 @@
# Modified by Heinz Wiesinger <pprkut@liwjatan.org>
PRGNAM=ffmpeg
-VERSION=${VERSION:-0.5}
+VERSION=${VERSION:-0.5.1}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -29,6 +29,8 @@ elif [ "$ARCH" = "x86_64" ]; then
fi
# Configure ffmpeg features not autodetected by default
+# Unfortunately ffmpeg's configure doesn't support --enable-feature=yes
+# syntax, so we have to do it the complicated way :/
if [ "${AMRNB:-no}" = "no" ]; then
amr_nb=""
@@ -44,6 +46,12 @@ else
amr_wb="--enable-libamr-wb"
fi
+if [ "${OPENCORE:-no}" = "no" ]; then
+ opencore_amr=""
+else
+ opencore_amr="--enable-libopencore-amrnb --enable-libopencore-amrwb"
+fi
+
if [ "${DC1394:-no}" = "no" ]; then
libdc1394=""
else
@@ -58,6 +66,7 @@ fi
if [ "${FAAC:-yes}" = "yes" ]; then
libfaac="--enable-libfaac"
+ non_free="--enable-nonfree"
else
libfaac=""
fi
@@ -111,6 +120,14 @@ else
libxvid="--enable-libxvid"
fi
+if [ "${RUNTIME:-yes}" = "yes" ]; then
+ doruntime="--enable-runtime-cpudetect"
+ PKGARCH=$ARCH
+else
+ doruntime=""
+ PKGARCH="custom"
+fi
+
set -e
rm -rf $PKG
@@ -135,11 +152,13 @@ CXXFLAGS="$SLKCFLAGS" \
--enable-pthreads \
--enable-libtheora \
--enable-gpl \
+ --enable-version3 \
--enable-postproc \
--enable-swscale \
--enable-x11grab \
--enable-avfilter \
--enable-avfilter-lavf \
+ --arch=$ARCH \
$openjpeg \
$libdc1394 \
$mp3lame \
@@ -153,17 +172,15 @@ CXXFLAGS="$SLKCFLAGS" \
$vdpau_opt \
$non_free \
$amr_nb \
- $amr_wb
+ $amr_wb \
+ $opencore_amr \
+ $doruntime
make
make install DESTDIR=$PKG
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
- xargs strip --strip-unneeded 2> /dev/null
-)
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
@@ -179,4 +196,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$PKGARCH-$BUILD$TAG.${PKGTYPE:-tgz}