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.

93 lines
3.3 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 - 2004 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. mplayer_premake() {
  23. # disable all crappy altivec code the hard way (look into the configure
  24. # to see why we need to do it this way. Hopefully at one day all
  25. # the altivec crap code will compile ... -ReneR
  26. sed -i 's/TARGET_ALTIVEC = yes/TARGET_ALTIVEC = /' config.mak
  27. sed -i -e 's/#define HAVE_ALTIVEC 1/#undef HAVE_ALTIVEC/' \
  28. -e 's/#define HAVE_ALTIVEC_H 1/#undef HAVE_ALTIVEC_H/' config.h
  29. }
  30. mplayer_postmake() {
  31. if pkginstalled gtk+12 ; then
  32. echo "extracting the default GUI ..."
  33. mkdir -p $datadir/$pkg/Skin
  34. tar $taropt $archdir/default-1.7.tar.bz2 -C $datadir/$pkg/Skin
  35. fi
  36. echo "extracting the default font ..."
  37. tar $taropt $archdir/font-arial-iso-8859-1.tar.bz2 -C $datadir/$pkg
  38. rm -rf $datadir/$pkg/font
  39. ln -sf font-arial-24-iso-8859-1 $datadir/$pkg/font
  40. echo "copy/move some documentation ..."
  41. cp -fR DOCS/HTML/en/*.{css,html} DOCS/tech $docdir
  42. mv -f $datadir/$pkg/README* $docdir
  43. echo "create a default configuration ..."
  44. cat <<- 'EOT' > $sysconfdir/mplayer.conf
  45. # Write your default config options here!
  46. framedrop=yes
  47. menu=yes
  48. rtc-device=/dev/misc/rtc
  49. # vop=pp
  50. # autoq=6
  51. EOT
  52. cp -f etc/{input,menu,codecs}.conf $sysconfdir
  53. echo "TAB menu up" >> $sysconfdir/input.conf
  54. rm -f $sysconfdir/*.older
  55. echo "correcting permissions and ownership ..."
  56. chown -R root:root $datadir/$pkg $docdir $sysconfdir
  57. find $datadir/$pkg $docdir $sysconfdir -type d | xargs -r chmod 0755
  58. find $datadir/$pkg $docdir $sysconfdir -type f | xargs -r chmod 0644
  59. }
  60. sysconfdir="$sysconfdir/mplayer"
  61. confopt="--prefix=$root/$prefix --confdir=$sysconfdir"
  62. var_append confopt " " "--enable-linux-devfs --enable-menu \
  63. --with-extraincdir=/usr/include/libpng \
  64. --enable-fbdev --enable-largefiles --enable-shared-pp"
  65. if [ $arch = x86 ] ; then
  66. var_append confopt " " "--with-win32libdir=$root/$prefix/lib/win32"
  67. fi
  68. if test "$ROCKCFG_PKG_MPLAYER_RUN_CPUDETECT" != 0 ; then
  69. var_append confopt " " "--enable-runtime-cpudetection"
  70. fi
  71. if test "$ROCKCFG_PKG_MPLAYER_BLINKENLIGHTS" != 0 ; then
  72. var_append confopt " " "--enable-bl"
  73. fi
  74. pkginstalled rtsp && var_append confopt " " "--enable-live"
  75. pkginstalled xmms && var_append confopt " " "--enable-xmms"
  76. pkginstalled gtk+12 && var_append confopt " " "--enable-gui"
  77. test "$ROCKCFG_DISABLE_NLS" = 0 || var_append confopt " " "--disable-i18n"
  78. hook_add premake 3 mplayer_premake
  79. hook_add postmake 5 mplayer_postmake