* mark python sqlite DEP opt and update .cache
[t2sde.git] / package / attic / mplayer / mplayer.conf
blobb3dcda40ad8f585e239d01298d4f834b95bf4d8d
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/mplayer/mplayer.conf
3 # Copyright (C) 2004 - 2024 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
5
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 mplayer_postmake() {
14         mkdir -p $root$datadir/$pkg
16         if pkginstalled gtk+12 || pkginstalled gtk+2; then
17                 echo "extracting the default GUI ..."
18                 mkdir -p $root$datadir/$pkg/Skin
19                 tar $taropt `match_source_file -p Blue`
20                 cp -rvf Blue $root$datadir/$pkg/Skin/
21                 rm -rf $root$datadir/$pkg/Skin/default
22                 ln -sfv Blue $root$datadir/$pkg/Skin/default
23         fi
24         
25         echo "extracting the default font ..."
26         tar $taropt `match_source_file -p font-arial-iso-8859` -C $root$datadir/$pkg
27         rm -rf $root$datadir/$pkg/font
28         ln -sf font-arial-24-iso-8859-1 $root$datadir/$pkg/font
30         #echo "copy/move some documentation ..."
31         #cp -fR DOCS/HTML/en/*.{css,html} DOCS/tech $root$docdir
33         echo "create a default configuration ..."
34         cat <<- 'EOT' > $root$sysconfdir/mplayer.conf
35                 # Write your default config options here!
37                 framedrop=yes
38                 menu=yes
39                 # vop=pp
40                 # autoq=6
41         EOT
42         cp -f etc/{input,menu,codecs}.conf $root$sysconfdir
43         echo "TAB menu up" >> $root$sysconfdir/input.conf
44         rm -f $root$sysconfdir/*.older
45         
46         echo "correcting permissions and ownership ..."
47         chown -R root:root $root$datadir/$pkg $root$docdir $root$sysconfdir
48         find $root$datadir/$pkg $root$docdir $root$sysconfdir -type d | xargs -r chmod 0755
49         find $root$datadir/$pkg $root$docdir $root$sysconfdir -type f | xargs -r chmod 0644
51 hook_add postmake 5 'mplayer_postmake'
53 sysconfdir="$sysconfdir/mplayer"
54 confopt="--target=$(echo $arch | arch2uname)-Linux"
55 var_append confopt ' ' "--prefix=/$prefix --confdir=$sysconfdir"
57 var_append confopt " " "--enable-linux-devfs --enable-menu \
58 --with-extraincdir=/usr/include/libpng \
59 --enable-fbdev --enable-largefiles"
61 if [ $arch = x86 ]; then
62         var_append confopt " " "--with-win32libdir=/$prefix/lib/win32"
65 if [ "$SDECFG_PKG_MPLAYER_RUN_CPUDETECT" != 0 ]; then
66   case $arch in
67     x86|x86-64|powerpc|powerpc64)
68         var_append confopt " " "--enable-runtime-cpudetection"
69   esac
72 if [ "$SDECFG_PKG_MPLAYER_BLINKENLIGHTS" != 0 ]; then
73         var_append confopt " " "--enable-bl"
76 # we need to remove the generic cpu selection to get the run-time detected
77 # altivec code built ... :-(-ReneR
78 [ "$arch" = "powerpc" ] && var_remove_regex GCC_WRAPPER_INSERT " " "-mcpu=.*"
80 if pkginstalled gtk+2; then
81         var_append confopt " " "--enable-gui"
82 elif pkginstalled gtk+12; then
83         var_append confopt " " "--enable-old-gtk"
86 # TODO: used system avformat and postprocess ...
87 pkginstalled ffmpeg && var_append confopt " " "--disable-libavcodec --disable-libavformat"
88 pkginstalled directfb && var_append confopt " " "--enable-directfb"
89 var_append confopt " " "--enable-tv-v4l2"
91 if pkginstalled xmms; then
92         var_append confopt " " "--enable-xmms"
93         var_append confopt " " "--with-xmmslibdir=`pkgprefix libdir xmms`"
95         [[ $libdir = *lib64 ]] && var_append GCC_WRAPPER_INSERT " " "-L/usr/lib64 -lxmms"
96         [[ $libdir = *lib64 ]] && var_append GCC_WRAPPER_REMOVE " " "/usr/lib/libxmms.so.1"
99 [ "$SDECFG_DISABLE_NLS" = 0 ] || var_append confopt " " "--disable-i18n"
101 # mplayer is not fully lib64 aware, installs (vidix, ...)  in /usr/lib
102 var_append confopt ' ' "--libdir=/$libdir"
103 pkginstalled libx11 && var_append confopt ' ' "--with-x11libdir=$(pkgprefix libdir libx11)"
105 # make sure the code is optimized enough on x86, it fails otherwise
106 [ "$arch" = "x86" ] && var_append GCC_WRAPPER_INSERT ' ' '-O2'