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.

104 lines
3.7 KiB

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