summaryrefslogtreecommitdiffstats
path: root/ffmpeg/build/ffmpeg.SlackBuild
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2008-08-06 07:41:01 +0000
committer Eric Hameleers <alien@slackware.com>2008-08-06 07:41:01 +0000
commitc4c9fd0e0e9ee67c409b0e66e342438d2a3a1db9 (patch)
treec579dada716b314d056aaf1554befeba6a14b181 /ffmpeg/build/ffmpeg.SlackBuild
parentcbeea32712f46f7527e28872a0f64634fc0c1fd6 (diff)
downloadasb-c4c9fd0e0e9ee67c409b0e66e342438d2a3a1db9.tar.gz
asb-c4c9fd0e0e9ee67c409b0e66e342438d2a3a1db9.tar.xz
This script produces a good package for ffmpeg-r14080
Diffstat (limited to 'ffmpeg/build/ffmpeg.SlackBuild')
-rwxr-xr-xffmpeg/build/ffmpeg.SlackBuild44
1 files changed, 34 insertions, 10 deletions
diff --git a/ffmpeg/build/ffmpeg.SlackBuild b/ffmpeg/build/ffmpeg.SlackBuild
index 19c14a18..d75c047a 100755
--- a/ffmpeg/build/ffmpeg.SlackBuild
+++ b/ffmpeg/build/ffmpeg.SlackBuild
@@ -119,7 +119,12 @@ LAME=398
OIL=0.3.15
RAW1394=1.3.0
SCHROEDINGER=1.0.5
-X264=20080804-2245
+X264_SAFE=20080301-2245 # In later versions nasm complains
+ # about 'function hidden'
+X264=20080804-2245 # Needs yasm installed
+#X264=20080618-2245 # Never snapshots show "fatal: ambiguous argument
+ # 'origin/master': unknown revision or path not in
+ # the working tree."
# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)
@@ -129,6 +134,25 @@ TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+# Check for yasm, use older x264 snapshot if not found:
+if ! which yasm >/dev/null 2>&1 ; then
+ echo "##"
+ echo "## The 'yasm' program does not seem to be installed."
+ echo "## The X264 codec compilation needs yasm (nasm will not do)"
+ if [ "$REQUIRE_YASM" != "YES" ]; then
+ X264=$X264_SAFE
+ echo "## Continuing the build anyway, but will use an older X264 ($X264)..."
+ echo "##"
+ else
+ echo "## Aborting the build - set the internal script variable:"
+ echo "## REQUIRE_YASM to 'NO' if you don't have yasm installed,"
+ echo "## and want to fall back to an old (but still useable)"
+ echo "## version of X264 that builds with nasm instead."
+ echo "##"
+ exit 1
+ fi
+fi
+
# ---------------------------------------------------------------------------
# Source tarballs and source URLs.
# Sources which are not patented should have SRCPAT[n]="NO"
@@ -612,8 +636,7 @@ cd -
make_x264()
{
echo -e "**\n** x264 ...\n**"
-mv $TMP/tmp-$PRGNAM/x264-snapshot-${X264} $TMP/tmp-$PRGNAM/x264-${X264}
-cd $TMP/tmp-$PRGNAM/x264-${X264}
+cd $TMP/tmp-$PRGNAM/x264-snapshot-${X264}
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="$SLKLDFLAGS" \
@@ -757,14 +780,13 @@ PKG_CONFIG_PATH="$FFMPEGDEPSDIR/usr/lib/pkgconfig" \
--enable-gpl \
--enable-postproc \
--enable-avfilter \
- --enable-swscaler \
- --enable-avisynth \
+ --enable-swscale \
--enable-libtheora \
--enable-libfaad \
--enable-liba52 \
--enable-libx264 \
--enable-libgsm \
- --enable-schroedinger \
+ --enable-libschroedinger \
--enable-libdc1394 \
--enable-pthreads \
--enable-memalign-hack \
@@ -772,7 +794,7 @@ PKG_CONFIG_PATH="$FFMPEGDEPSDIR/usr/lib/pkgconfig" \
--enable-shared \
--enable-static \
--disable-debug \
- --log=$OUTPUT/ffmpeg_conf.log \
+ --logfile=$OUTPUT/ffmpeg_conf.log \
--extra-cflags="-I$FFMPEGDEPSDIR/usr/include -DRUNTIME_CPUDETECT" \
--extra-ldflags="-L$FFMPEGDEPSDIR/usr/lib" \
2>&1 | tee $OUTPUT/configure-${PRGNAM}_ffmpeg.log
@@ -785,6 +807,7 @@ cd $OLDDIR
# into convenient functions... let's call them one by one now:
#
+#if [ 'xy' != 'xy' ]; then # use this block if you want to skip a lot
# Needed before ffmpeg:
# Based on the value of $USE_PATENTS enable or disable patented code:
if [ "${USE_PATENTS}" = "YES" ]; then
@@ -797,11 +820,12 @@ fi
make_1394
make_faad2
make_a52
-make_x264
make_gsm
make_oil
make_schroedinger
+make_x264
+#fi # end of 'xy'
# ffmpeg uses the above static libraries:
make_ffmpeg
@@ -844,8 +868,8 @@ config etc/ffserver.conf.new
EOINS
-# Add documentation (for all the deps as well) - docs for patented code are
-# only added if we build a package that actually uses them:
+# Add documentation (for all the deps as well)
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
# Add all the supporting packages' documentation too:
cp -a $FFMPEGDEPSDIR/doc/* $PKG/usr/doc/$PRGNAM-$VERSION || true