|
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
|
|
#
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
# Please add additional copyright information _after_ the line containing
|
|
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
|
|
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
|
|
#
|
|
# ROCK Linux: rock-src/package/jimmy/mplayer/mplayer.conf
|
|
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
# (at your option) any later version. A copy of the GNU General Public
|
|
# License can be found at Documentation/COPYING.
|
|
#
|
|
# Many people helped and are helping developing ROCK Linux. Please
|
|
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
|
|
# file for details.
|
|
#
|
|
# --- ROCK-COPYRIGHT-NOTE-END ---
|
|
|
|
mplayer_preconf() {
|
|
tar $taropt $archdir/MPlayer-${ver}.tar.bz2
|
|
tar $taropt $archdir/MPlayer-${ver}-ffmpeg.tar.bz2
|
|
mv MPlayer-${ver}-ffmpeg/{libavcodec,libavformat,libavutil} MPlayer-${ver}
|
|
cd MPlayer-${ver}
|
|
}
|
|
|
|
mplayer_postmake() {
|
|
if pkginstalled gtk+12 ; then
|
|
echo "extracting the standard GUI ..."
|
|
mkdir -p $datadir/$pkg/Skin
|
|
tar $taropt $archdir/standard-1.9.tar.bz2 -C $datadir/$pkg/Skin
|
|
ln -sf $datadir/$pkg/Skin/standard $datadir/$pkg/Skin/default
|
|
fi
|
|
|
|
echo "extracting the default font ..."
|
|
tar $taropt $archdir/font-arial-iso-8859-1.tar.bz2 -C $datadir/$pkg
|
|
rm -rf $datadir/$pkg/font
|
|
ln -sf font-arial-24-iso-8859-1 $datadir/$pkg/font
|
|
|
|
echo "copy/move some documentation ..."
|
|
cp -fR DOCS/* $docdir
|
|
mv -f $datadir/$pkg/README* $docdir
|
|
|
|
echo "create a default configuration ..."
|
|
cat <<- 'EOT' > $sysconfdir/mplayer.conf
|
|
# Write your default config options here!
|
|
|
|
framedrop=yes
|
|
menu=yes
|
|
rtc-device=/dev/misc/rtc
|
|
# vop=pp
|
|
# autoq=6
|
|
EOT
|
|
cp -f etc/{input,menu,codecs}.conf $sysconfdir
|
|
echo "TAB menu up" >> $sysconfdir/input.conf
|
|
rm -f $sysconfdir/*.older
|
|
|
|
echo "correcting permissions and ownership ..."
|
|
chown -R root:root $datadir/$pkg $docdir $sysconfdir
|
|
find $datadir/$pkg $docdir $sysconfdir -type d | xargs -r chmod 0755
|
|
find $datadir/$pkg $docdir $sysconfdir -type f | xargs -r chmod 0644
|
|
}
|
|
|
|
autoextract=0
|
|
|
|
sysconfdir="$sysconfdir/mplayer"
|
|
confopt="--prefix=$root/$prefix --confdir=$sysconfdir"
|
|
|
|
var_append confopt " " "--enable-linux-devfs --enable-menu \
|
|
--with-extraincdir=/usr/include/libpng \
|
|
--enable-fbdev --enable-largefiles"
|
|
|
|
if [ $arch = x86 -a "$ROCKCFG_X86_BITS" = "32" ] ; then
|
|
var_append confopt " " "--with-win32libdir=$root/$prefix/lib/win32"
|
|
fi
|
|
|
|
if test "$ROCKCFG_PKG_MPLAYER_RUN_CPUDETECT" != 0 ; then
|
|
var_append confopt " " "--enable-runtime-cpudetection"
|
|
fi
|
|
|
|
if test "$ROCKCFG_PKG_MPLAYER_BLINKENLIGHTS" != 0 ; then
|
|
var_append confopt " " "--enable-bl"
|
|
fi
|
|
|
|
# this is b0rken with 2.6.10.
|
|
var_append confopt " " "--disable-svga"
|
|
|
|
pkginstalled rtsp && var_append confopt " " "--enable-live --with-livelibdir=$libdir/live"
|
|
pkginstalled xmms && var_append confopt " " "--enable-xmms"
|
|
pkginstalled gtk+12 && var_append confopt " " "--enable-gui"
|
|
test "$ROCKCFG_DISABLE_NLS" = 0 || var_append confopt " " "--disable-i18n"
|
|
|
|
if pkginstalled directfb ; then
|
|
var_append confopt ' ' '--enable-directfb'
|
|
var_append CFLAGS ' ' "-I$root/usr/include/directfb"
|
|
fi
|
|
|
|
var_append confopt " " "--enable-tv-v4l2 --enable-tv-v4l"
|
|
|
|
# only gcc 2.95 and gcc 3.x are officially supported
|
|
[ "${ROCKCFG_DEFAULT_CC:3:1}" -gt "3" ] && var_append confopt " " "--disable-gcc-checking"
|
|
|
|
hook_add preconf 3 mplayer_preconf
|
|
hook_add postmake 5 mplayer_postmake
|
|
|
|
# The function was obviously renamed in speex
|
|
hook_add premake 3 "sed -i -e 's,speex_decode_stereo_int,speex_decode_stereo,' libmpcodecs/ad_speex.c"
|
|
hook_add premake 3 "sed -i -e 's,speex_decode_int,speex_decode,' libmpcodecs/ad_speex.c"
|