# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/mplayer/mplayer.conf # Copyright (C) 2004 - 2024 The T2 SDE Project # Copyright (C) 1998 - 2003 ROCK Linux Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- mplayer_postmake() { mkdir -p $root$datadir/$pkg if pkginstalled gtk+12 || pkginstalled gtk+2; then echo "extracting the default GUI ..." mkdir -p $root$datadir/$pkg/Skin tar $taropt `match_source_file -p Blue` cp -rvf Blue $root$datadir/$pkg/Skin/ rm -rf $root$datadir/$pkg/Skin/default ln -sfv Blue $root$datadir/$pkg/Skin/default fi echo "extracting the default font ..." tar $taropt `match_source_file -p font-arial-iso-8859` -C $root$datadir/$pkg rm -rf $root$datadir/$pkg/font ln -sf font-arial-24-iso-8859-1 $root$datadir/$pkg/font #echo "copy/move some documentation ..." #cp -fR DOCS/HTML/en/*.{css,html} DOCS/tech $root$docdir echo "create a default configuration ..." cat <<- 'EOT' > $root$sysconfdir/mplayer.conf # Write your default config options here! framedrop=yes menu=yes # vop=pp # autoq=6 EOT cp -f etc/{input,menu,codecs}.conf $root$sysconfdir echo "TAB menu up" >> $root$sysconfdir/input.conf rm -f $root$sysconfdir/*.older echo "correcting permissions and ownership ..." chown -R root:root $root$datadir/$pkg $root$docdir $root$sysconfdir find $root$datadir/$pkg $root$docdir $root$sysconfdir -type d | xargs -r chmod 0755 find $root$datadir/$pkg $root$docdir $root$sysconfdir -type f | xargs -r chmod 0644 } hook_add postmake 5 'mplayer_postmake' sysconfdir="$sysconfdir/mplayer" confopt="--target=$(echo $arch | arch2uname)-Linux" var_append confopt ' ' "--prefix=/$prefix --confdir=$sysconfdir" var_append confopt " " "--enable-linux-devfs --enable-menu \ --with-extraincdir=/usr/include/libpng \ --enable-fbdev --enable-largefiles" if [ $arch = x86 ]; then var_append confopt " " "--with-win32libdir=/$prefix/lib/win32" fi if [ "$SDECFG_PKG_MPLAYER_RUN_CPUDETECT" != 0 ]; then case $arch in x86|x86-64|powerpc|powerpc64) var_append confopt " " "--enable-runtime-cpudetection" esac fi if [ "$SDECFG_PKG_MPLAYER_BLINKENLIGHTS" != 0 ]; then var_append confopt " " "--enable-bl" fi # we need to remove the generic cpu selection to get the run-time detected # altivec code built ... :-(-ReneR [ "$arch" = "powerpc" ] && var_remove_regex GCC_WRAPPER_INSERT " " "-mcpu=.*" if pkginstalled gtk+2; then var_append confopt " " "--enable-gui" elif pkginstalled gtk+12; then var_append confopt " " "--enable-old-gtk" fi # TODO: used system avformat and postprocess ... pkginstalled ffmpeg && var_append confopt " " "--disable-libavcodec --disable-libavformat" pkginstalled directfb && var_append confopt " " "--enable-directfb" var_append confopt " " "--enable-tv-v4l2" if pkginstalled xmms; then var_append confopt " " "--enable-xmms" var_append confopt " " "--with-xmmslibdir=`pkgprefix libdir xmms`" [[ $libdir = *lib64 ]] && var_append GCC_WRAPPER_INSERT " " "-L/usr/lib64 -lxmms" [[ $libdir = *lib64 ]] && var_append GCC_WRAPPER_REMOVE " " "/usr/lib/libxmms.so.1" fi [ "$SDECFG_DISABLE_NLS" = 0 ] || var_append confopt " " "--disable-i18n" # mplayer is not fully lib64 aware, installs (vidix, ...) in /usr/lib var_append confopt ' ' "--libdir=/$libdir" pkginstalled libx11 && var_append confopt ' ' "--with-x11libdir=$(pkgprefix libdir libx11)" # make sure the code is optimized enough on x86, it fails otherwise [ "$arch" = "x86" ] && var_append GCC_WRAPPER_INSERT ' ' '-O2'