1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/mplayer/mplayer.conf
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4 # Copyright (C) 1998 - 2003 ROCK Linux Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
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 ---
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
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
32 mv -f $root$datadir/$pkg/README* $root$docdir
34 echo "create a default configuration ..."
35 cat <<- 'EOT' > $root$sysconfdir/mplayer.conf
36 # Write your default config options here!
43 cp -f etc/{input,menu,codecs}.conf $root$sysconfdir
44 echo "TAB menu up" >> $root$sysconfdir/input.conf
45 rm -f $root$sysconfdir/*.older
47 echo "correcting permissions and ownership ..."
48 chown -R root:root $root$datadir/$pkg $root$docdir $root$sysconfdir
49 find $root$datadir/$pkg $root$docdir $root$sysconfdir -type d | xargs -r chmod 0755
50 find $root$datadir/$pkg $root$docdir $root$sysconfdir -type f | xargs -r chmod 0644
52 hook_add postmake 5 'mplayer_postmake'
54 sysconfdir="$sysconfdir/mplayer"
55 confopt="--target=$(echo $arch | arch2uname)-Linux"
56 var_append confopt ' ' "--prefix=/$prefix --confdir=$sysconfdir"
58 var_append confopt " " "--enable-linux-devfs --enable-menu \
59 --with-extraincdir=/usr/include/libpng \
60 --enable-fbdev --enable-largefiles"
62 if [ $arch = x86 ]; then
63 var_append confopt " " "--with-win32libdir=/$prefix/lib/win32"
66 if [ "$SDECFG_PKG_MPLAYER_RUN_CPUDETECT" != 0 ]; then
68 x86|x86-64|powerpc|powerpc64)
69 var_append confopt " " "--enable-runtime-cpudetection"
73 if [ "$SDECFG_PKG_MPLAYER_BLINKENLIGHTS" != 0 ]; then
74 var_append confopt " " "--enable-bl"
77 # we need to remove the generic cpu selection to get the run-time detected
78 # altivec code built ... :-( -ReneR
79 [ "$arch" = "powerpc" ] && var_remove_regex GCC_WRAPPER_INSERT " " "-mcpu=.*"
81 if pkginstalled gtk+2; then
82 var_append confopt " " "--enable-gui"
83 elif pkginstalled gtk+12; then
84 var_append confopt " " "--enable-old-gtk"
87 # TODO: used system avformat and postprocess ...
88 pkginstalled ffmpeg && var_append confopt " " "--disable-libavcodec --disable-libavformat"
89 pkginstalled directfb && var_append confopt " " "--enable-directfb"
90 var_append confopt " " "--enable-tv-v4l2"
92 if pkginstalled xmms; then
93 var_append confopt " " "--enable-xmms"
94 var_append confopt " " "--with-xmmslibdir=`pkgprefix libdir xmms`"
96 [[ $libdir = *lib64 ]] && var_append GCC_WRAPPER_INSERT " " "-L/usr/lib64 -lxmms"
97 [[ $libdir = *lib64 ]] && var_append GCC_WRAPPER_REMOVE " " "/usr/lib/libxmms.so.1"
100 [ "$SDECFG_DISABLE_NLS" = 0 ] || var_append confopt " " "--disable-i18n"
102 # mplayer is not fully lib64 aware, installs (vidix, ...) in /usr/lib
103 var_append confopt ' ' "--libdir=/$libdir"
104 pkginstalled libx11 && var_append confopt ' ' "--with-x11libdir=$(pkgprefix libdir libx11)"
106 # make sure the code is optimized enough on x86, it fails otherwise
107 [ "$arch" = "x86" ] && var_append GCC_WRAPPER_INSERT ' ' '-O2'