mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
3.9 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/jimmy/mplayer/mplayer.conf
  9. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. prefer_program ()
  23. {
  24. local P
  25. for P ; do
  26. type -p "$P" >/dev/null && { echo "$P" ; break ; }
  27. done
  28. return
  29. }
  30. preferred_gcc="`prefer_program gcc-34 gcc-33 gcc-32 gcc-2`"
  31. if [ -n "$preferred_gcc" ] ; then
  32. CC="$preferred_gcc" ; HOST_CC="$preferred_gcc"
  33. var_append confopt ' ' "--cc=\"$preferred_gcc\" --host-cc=\"$preferred_gcc\""
  34. elif [ "${ROCKCFG_DEFAULT_CC:3:1}" -gt "3" ] ; then
  35. # only gcc 2.95 and gcc 3.x are officially supported
  36. var_append confopt " " "--disable-gcc-checking"
  37. fi
  38. mplayer_postmake() {
  39. if pkginstalled gtk+12 ; then
  40. echo "extracting the standard GUI ..."
  41. mkdir -p $datadir/$pkg/Skin
  42. tar $taropt $archdir/standard-1.9.tar.bz2 -C $datadir/$pkg/Skin
  43. ln -sf $datadir/$pkg/Skin/standard $datadir/$pkg/Skin/default
  44. fi
  45. echo "extracting the default font ..."
  46. tar $taropt $archdir/font-arial-iso-8859-1.tar.bz2 -C $datadir/$pkg
  47. rm -rf $datadir/$pkg/font
  48. ln -sf font-arial-24-iso-8859-1 $datadir/$pkg/font
  49. echo "copy/move some documentation ..."
  50. cp -fR DOCS/* $docdir
  51. mv -f $datadir/$pkg/README* $docdir
  52. echo "create a default configuration ..."
  53. cat <<- 'EOT' > $sysconfdir/mplayer.conf
  54. # Write your default config options here!
  55. framedrop=yes
  56. menu=yes
  57. rtc-device=/dev/misc/rtc
  58. # vop=pp
  59. # autoq=6
  60. EOT
  61. cp -f etc/{input,menu,codecs}.conf $sysconfdir
  62. echo "TAB menu up" >> $sysconfdir/input.conf
  63. rm -f $sysconfdir/*.older
  64. echo "correcting permissions and ownership ..."
  65. chown -R root:root $datadir/$pkg $docdir $sysconfdir
  66. find $datadir/$pkg $docdir $sysconfdir -type d | xargs -r chmod 0755
  67. find $datadir/$pkg $docdir $sysconfdir -type f | xargs -r chmod 0644
  68. }
  69. sysconfdir="$sysconfdir/mplayer"
  70. confopt="--prefix=$root/$prefix --confdir=$sysconfdir"
  71. var_append confopt " " "--enable-linux-devfs --enable-menu \
  72. --with-extraincdir=/usr/include/libpng \
  73. --enable-fbdev --enable-largefiles"
  74. if [ $arch = x86 -a "$ROCKCFG_X86_BITS" = "32" ] ; then
  75. var_append confopt " " "--with-win32libdir=$root/$prefix/lib/win32"
  76. fi
  77. if test "$ROCKCFG_PKG_MPLAYER_RUN_CPUDETECT" != 0 ; then
  78. var_append confopt " " "--enable-runtime-cpudetection"
  79. fi
  80. if test "$ROCKCFG_PKG_MPLAYER_BLINKENLIGHTS" != 0 ; then
  81. var_append confopt " " "--enable-bl"
  82. fi
  83. # this is b0rken with 2.6.10.
  84. var_append confopt " " "--disable-svga"
  85. pkginstalled rtsp && var_append confopt " " "--enable-live --with-livelibdir=$libdir/live"
  86. pkginstalled xmms && var_append confopt " " "--enable-xmms"
  87. pkginstalled gtk+12 && var_append confopt " " "--enable-gui"
  88. test "$ROCKCFG_DISABLE_NLS" = 0 || var_append confopt " " "--disable-i18n"
  89. if pkginstalled directfb ; then
  90. var_append confopt ' ' '--enable-directfb'
  91. var_append CFLAGS ' ' "-I$root/usr/include/directfb"
  92. fi
  93. var_append confopt " " "--enable-tv-v4l2 --enable-tv-v4l"
  94. hook_add postmake 5 mplayer_postmake
  95. # The function was obviously renamed in speex
  96. hook_add premake 3 "sed -i -e 's,speex_decode_stereo_int,speex_decode_stereo,' libmpcodecs/ad_speex.c"
  97. hook_add premake 3 "sed -i -e 's,speex_decode_int,speex_decode,' libmpcodecs/ad_speex.c"