LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 11119|回复: 10

mplayer播放rmvb格式必须使用realplayer的解码器吗?

[复制链接]
发表于 2006-2-25 21:14:23 | 显示全部楼层 |阅读模式
用win32codecs中的real解码器不行吗?
发表于 2006-2-25 21:55:52 | 显示全部楼层
根据我个人的使用经验
rmvb还是realplay好一点
mplayer有时候会影音不同步
http://www.thizlinux.com/~robert/realplayer
这里的有ebuild,源代码和标题栏显示中文补丁
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-26 08:40:53 | 显示全部楼层
是有不同步的现象,现在已经装了realplayer了,感觉播一个rmvb格式就安装一种播放器太浪费。
回复 支持 反对

使用道具 举报

发表于 2006-2-26 19:46:02 | 显示全部楼层
我个人严重抵制real media……
回复 支持 反对

使用道具 举报

发表于 2006-2-26 20:00:57 | 显示全部楼层
呵呵 楼上兄弟和real啥血海深仇?经常看到你抵制
回复 支持 反对

使用道具 举报

发表于 2006-2-27 04:01:49 | 显示全部楼层

可以不装realplayer的


  1. # Copyright 1999-2006 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0.20060102.ebuild,v 1.3 2006/01/06 05:15:59 lu_zero Exp $

  4. inherit eutils flag-o-matic

  5. RESTRICT="nostrip"
  6. IUSE="3dfx 3dnow 3dnowext aac aalib alsa altivec arts bidi bl bindist
  7. cpudetection custom-cflags debug dga doc dts dvb cdparanoia directfb dvd dv
  8. dvdread edl encode esd fbcon gif ggi gtk i8x0 ipv6 jack joystick jpeg libcaca
  9. lirc live livecd lzo mad matroska matrox mmx mmxext nas nls nvidia
  10. vorbis opengl oss png real rtc samba sdl sse sse2 svga tga theora truetype
  11. v4l v4l2 win32codecs X xanim xinerama xmms xv xvid xvmc"

  12. BLUV=1.4
  13. SVGV=1.9.17

  14. # Handle PREversions as well
  15. SRC_URI="mirror://mplayer/releases/${P}.tar.bz2
  16.         mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
  17.         mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
  18.         mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
  19.         svga? ( http://mplayerhq.hu/~alex/svgalib_helper-${SVGV}-mplayer.tar.bz2 )
  20.         gtk? ( mirror://mplayer/Skin/Blue-${BLUV}.tar.bz2 )"

  21. # Only install Skin if GUI should be build (gtk as USE flag)
  22. DESCRIPTION="Media Player for Linux (snapshot)"
  23. HOMEPAGE="http://www.mplayerhq.hu/"

  24. # 'encode' in USE for MEncoder.
  25. # [color="Olive"]comment this line to delete the depend of realplayer[/color]
  26. # x86? ( real? ( >=media-video/realplayer-10.0.3 ) )
  27. RDEPEND="xvid? ( >=media-libs/xvid-0.9.0 )
  28.         win32codecs? ( >=media-libs/win32codecs-20040916 )
  29.         aalib? ( media-libs/aalib )
  30.         alsa? ( media-libs/alsa-lib )
  31.         arts? ( kde-base/arts )
  32.         bidi? ( dev-libs/fribidi )
  33.         cdparanoia? ( media-sound/cdparanoia )
  34.         dga? ( || ( x11-libs/libXxf86dga virtual/x11 ) )
  35.         directfb? ( dev-libs/DirectFB )
  36.         dts? ( media-libs/libdts )
  37.         dvd? ( dvdread? ( media-libs/libdvdread ) )
  38.         encode? (
  39.                 media-sound/lame
  40.                 dv? ( >=media-libs/libdv-0.9.5 )
  41.                 )
  42.         esd? ( media-sound/esound )
  43.         gif? ( media-libs/giflib )
  44.         ggi? ( media-libs/libggi )
  45.         gtk? (
  46.                 media-libs/libpng
  47.                 || ( ( x11-libs/libXxf86vm
  48.                                 x11-libs/libXext
  49.                                 x11-libs/libXi
  50.                         )
  51.                         virtual/x11
  52.                 )
  53.                 )
  54.         jpeg? ( media-libs/jpeg )
  55.         libcaca? ( media-libs/libcaca )
  56.         lirc? ( app-misc/lirc )
  57.         lzo? ( =dev-libs/lzo-1* )
  58.         mad? ( media-libs/libmad )
  59.         nas? ( media-libs/nas )
  60.         nls? ( sys-devel/gettext )
  61.         vorbis? ( media-libs/libvorbis )
  62.         opengl? ( virtual/opengl )
  63.         png? ( media-libs/libpng )
  64.         samba? ( >=net-fs/samba-2.2.8a )
  65.         sdl? ( media-libs/libsdl )
  66.         svga? ( media-libs/svgalib )
  67.         theora? ( media-libs/libtheora )
  68.         live? ( >=media-plugins/live-2004.07.20 )
  69.         truetype? ( >=media-libs/freetype-2.1 )
  70.         xinerama? ( || ( ( x11-libs/libXinerama
  71.                                 x11-libs/libXxf86vm
  72.                                 x11-libs/libXext
  73.                         )
  74.                         virtual/x11
  75.                 )
  76.         )
  77.         xmms? ( media-sound/xmms )
  78.         xanim? ( >=media-video/xanim-2.80.1-r4 )
  79.         sys-libs/ncurses
  80.         xv? ( || ( ( x11-libs/libXv
  81.                                 x11-libs/libXxf86vm
  82.                                 x11-libs/libXext
  83.                         )
  84.                         virtual/x11
  85.                 )
  86.         )
  87.         xvmc? ( || ( x11-libs/libXvMC virtual/x11 ) )
  88.         X? ( || ( ( x11-libs/libXxf86vm
  89.                                 x11-libs/libXext
  90.                         )
  91.                         virtual/x11
  92.                 )
  93.         )"

  94. DEPEND="${RDEPEND}
  95.         app-arch/unzip
  96.         dga? ( || ( x11-proto/xf86dgaproto virtual/x11 ) )
  97.         xinerama? ( || ( x11-proto/xineramaproto virtual/x11 ) )
  98.         xv? ( || ( ( x11-proto/videoproto
  99.                                 x11-proto/xf86vidmodeproto
  100.                         )
  101.                         virtual/x11
  102.                 )
  103.         )
  104.         gtk? ( || ( ( x11-proto/xextproto
  105.                                 x11-proto/xf86vidmodeproto
  106.                         )
  107.                         virtual/x11
  108.                 )
  109.         )
  110.         X? ( || ( ( x11-proto/xextproto
  111.                                 x11-proto/xf86vidmodeproto
  112.                         )
  113.                         virtual/x11
  114.                 )
  115.         )"

  116. SLOT="0"
  117. LICENSE="GPL-2"
  118. KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"

  119. pkg_setup() {
  120. #[color="Olive"] change the reallibdir to /usr/lib/real where win32codecs put real codecs in[/color]
  121.         if use real && use x86; then
  122.                                 REALLIBDIR="/usr/lib/real"
  123.         fi
  124. }

  125. src_unpack() {

  126.         unpack ${P}.tar.bz2 \
  127.                 font-arial-iso-8859-1.tar.bz2 font-arial-iso-8859-2.tar.bz2 \
  128.                 font-arial-cp1250.tar.bz2

  129.         use svga && unpack svgalib_helper-${SVGV}-mplayer.tar.bz2

  130.         use gtk && unpack Blue-${BLUV}.tar.bz2

  131.         cd ${S}

  132.         # Fix hppa compilation
  133.         [ "${ARCH}" = "hppa" ] && sed -i -e "s/-O4/-O1/" "${S}/configure"

  134.         if use svga
  135.         then
  136.                 echo
  137.                 einfo "Enabling vidix non-root mode."
  138.                 einfo "(You need a proper svgalib_helper.o module for your kernel"
  139.                 einfo " to actually use this)"
  140.                 echo

  141.                 mv ${WORKDIR}/svgalib_helper ${S}/libdha
  142.         fi

  143.         # Remove kernel-2.6 workaround as the problem it works around is
  144.         # fixed, and the workaround breaks sparc
  145.         use sparc && sed -i 's:#define __KERNEL__::' osdep/kerneltwosix.h
  146.         # epatch ${FILESDIR}/mplayer-1.0_pre7-gtk2.patch
  147. }

  148. linguas_warn() {
  149.         ewarn "Language ${LANG[0]} or ${LANG_CC} not avaliable"
  150.         ewarn "Language set to English"
  151.         ewarn "If this is a mistake, please set the"
  152.         ewarn "First LINGUAS language to one of the following"
  153.         ewarn
  154.         ewarn "bg - Bulgarian"
  155.         ewarn "cs - Czech"
  156.         ewarn "de - German"
  157.         ewarn "dk - Danish"
  158.         ewarn "el - Greek"
  159.         ewarn "en - English"
  160.         ewarn "es - Spanish"
  161.         ewarn "fr - French"
  162.         ewarn "hu - Hungarian"
  163.         ewarn "ja - Japanese"
  164.         ewarn "ko - Korean"
  165.         ewarn "mk - FYRO Macedonian"
  166.         ewarn "nl - Dutch"
  167.         ewarn "no - Norwegian"
  168.         ewarn "pl - Polish"
  169.         ewarn "pt_BR - Portuguese - Brazil"
  170.         ewarn "ro - Romanian"
  171.         ewarn "ru - Russian"
  172.         ewarn "sk - Slovak"
  173.         ewarn "tr - Turkish"
  174.         ewarn "uk - Ukranian"
  175.         ewarn "zh_CN - Chinese - China"
  176.         ewarn "zh_TW - Chinese - Taiwan"
  177.         export LINGUAS="en ${LINGUAS}"
  178. }

  179. src_compile() {

  180.         # have fun with LINGUAS variable
  181.         if [[ -n $LINGUAS ]]
  182.         then
  183.                 # LINGUAS has stuff in it, start the logic
  184.                 LANG=( $LINGUAS )
  185.                 if [ -e ${S}/help/help_mp-${LANG[0]}.h ]
  186.                 then
  187.                         einfo "Setting MPlayer messages to language: ${LANG[0]}"
  188.                 else
  189.                         LANG_CC=${LANG[0]}
  190.                         if [ ${#LANG_CC} -ge 2 ]
  191.                         then
  192.                                 LANG_CC=${LANG_CC:0:2}
  193.                                 if [ -e ${S}/help/help_mp-${LANG_CC}.h ]
  194.                                 then
  195.                                         einfo "Setting MPlayer messages to language ${LANG_CC}"
  196.                                         export LINGUAS="${LANG_CC} ${LINGUAS}"
  197.                                 else
  198.                                         linguas_warn
  199.                                 fi
  200.                         else
  201.                                 linguas_warn
  202.                         fi
  203.                 fi
  204.         else
  205.                 # sending blank LINGUAS, make it default to en
  206.                 einfo "No LINGUAS given, defaulting to English"
  207.                 export LINGUAS="en ${LINGUAS}"
  208.         fi



  209.         #FIXME make it work in the snapshot
  210.         local myconf="--disable-x264"
  211.         ################
  212.         #Optional features#
  213.         ###############
  214.         if use cpudetection || use livecd || use bindist
  215.         then
  216.         myconf="${myconf} --enable-runtime-cpudetection"
  217.         fi

  218.         myconf="${myconf} $(use_enable bidi fribidi)"
  219.         myconf="${myconf} $(use_enable cdparanoia)"
  220.         if use dvd; then
  221.                 myconf="${myconf} $(use_enable dvdread) $(use_enable !dvdread mpdvdkit)"
  222.         else
  223.                 myconf="${myconf} --disable-dvdread --disable-mpdvdkit"
  224.         fi
  225.         myconf="${myconf} $(use_enable edl)"

  226.         if use encode ; then
  227.                 myconf="${myconf} --enable-mencoder $(use_enable dv libdv)"
  228.         else
  229.                 myconf="${myconf} --disable-mencoder --disable-libdv"
  230.         fi

  231.         myconf="${myconf} $(use_enable gtk gui)"

  232.         if use !gtk && use !X && use !xv && use !xinerama; then
  233.                 myconf="${myconf} --disable-gui --disable-x11 --disable-xv --disable-xmga --disable-xinerama --disable-vm --disable-xvmc"
  234.         else
  235.                 #note we ain't touching --enable-vm.  That should be locked down in the future.
  236.                 myconf="${myconf} --enable-x11 $(use_enable xinerama) $(use_enable xv) $(use_enable gtk gui)"
  237.         fi

  238.         # this looks like a hack, but the
  239.         # --enable-dga needs a paramter, but there's no surefire
  240.         # way to tell what it is.. so I'm letting MPlayer decide
  241.         # the enable part
  242.         if ! use dga && ! use 3dfx ; then
  243.                 myconf="${myconf} --disable-dga"
  244.         fi
  245.         # disable png *only* if gtk && png aren't on
  246.         if use png || use gtk; then
  247.                 myconf="${myconf} --enable-png"
  248.         else
  249.                 myconf="${myconf} --disable-png"
  250.         fi
  251.         myconf="${myconf} $(use_enable ipv6 inet6)"
  252.         myconf="${myconf} $(use_enable joystick)"
  253.         myconf="${myconf} $(use_enable lirc)"
  254.         myconf="${myconf} $(use_enable live)"
  255.         myconf="${myconf} $(use_enable rtc)"
  256.         myconf="${myconf} $(use_enable samba smb)"
  257.         myconf="${myconf} $(use_enable truetype freetype)"
  258.         myconf="${myconf} $(use_enable v4l tv-v4l)"
  259.         myconf="${myconf} $(use_enable v4l2 tv-v4l2)"
  260.         use jack || myconf="${myconf} --disable-jack"

  261.         #########
  262.         # Codecs #
  263.         ########
  264.         myconf="${myconf} $(use_enable gif)"
  265.         myconf="${myconf} $(use_enable jpeg)"
  266.         #myconf="${myconf} $(use_enable ladspa)"
  267.         myconf="${myconf} $(use_enable dts libdts)"
  268.         myconf="${myconf} $(use_enable lzo liblzo)"
  269.         myconf="${myconf} $(use_enable matroska internal-matroska)"
  270.         myconf="${myconf} $(use_enable aac internal-faad)"
  271.         myconf="${myconf} $(use_enable vorbis)"
  272.         myconf="${myconf} $(use_enable theora)"
  273.         myconf="${myconf} $(use_enable xmms)"
  274.         myconf="${myconf} $(use_enable xvid)"
  275.         use x86 && myconf="${myconf} $(use_enable real)"
  276.         myconf="${myconf} $(use_enable win32codecs win32)"

  277.         #############
  278.         # Video Output #
  279.         #############
  280.         myconf="${myconf} $(use_enable 3dfx)"
  281.         if use 3dfx; then
  282.                 myconf="${myconf} --enable-tdfxvid"
  283.         else
  284.                 myconf="${myconf} --disable-tdfxvid"
  285.         fi
  286.         if use fbcon && use 3dfx; then
  287.                 myconf="${myconf} --enable-tdfxfb"
  288.         else
  289.                 myconf="${myconf} --disable-tdfxfb"
  290.         fi

  291.         if use dvb ; then
  292.                 myconf="${myconf} --enable-dvbhead --with-dvbincdir=/usr/src/linux/include"
  293.         else
  294.                 myconf="${myconf} --disable-dvbhead"
  295.         fi

  296.         use aalib || myconf="${myconf} --disable-aa"
  297.         myconf="${myconf} $(use_enable directfb)"
  298.         myconf="${myconf} $(use_enable fbcon fbdev)"
  299.         myconf="${myconf} $(use_enable ggi)"
  300.         myconf="${myconf} $(use_enable libcaca caca)"
  301.         if use matrox && use X; then
  302.                 myconf="${myconf} $(use_enable matrox xmga)"
  303.         fi
  304.         myconf="${myconf} $(use_enable matrox mga)"
  305.         myconf="${myconf} $(use_enable opengl gl)"
  306.         myconf="${myconf} $(use_enable sdl)"

  307.         if use svga
  308.         then
  309.                 myconf="${myconf} --enable-svga"
  310.         else
  311.                 myconf="${myconf} --disable-svga --disable-vidix"
  312.         fi

  313.         myconf="${myconf} $(use_enable tga)"

  314.         ( use xvmc && use nvidia ) \
  315.                 && myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCNVIDIA"

  316.         ( use xvmc && use i8x0 ) \
  317.                 && myconf="${myconf} --enable-xvmc --with-xvmclib=I810XvMC"

  318.         ( use xvmc && use nvidia && use i8x0 ) \
  319.                 && {
  320.                         eerror "Invalid combination of USE flags"
  321.                         eerror "When building support for xvmc, you may only"
  322.                         eerror "include support for one video card:"
  323.                         eerror "   nvidia, i8x0"
  324.                         eerror
  325.                         eerror "Emerge again with different USE flags"

  326.                         exit 1
  327.                 }

  328.         ( use xvmc && ! use nvidia && ! use i8x0 ) && {
  329.                 ewarn "You tried to build with xvmc support."
  330.                 ewarn "No supported graphics hardware was specified."
  331.                 ewarn
  332.                 ewarn "No xvmc support will be included."
  333.                 ewarn "Please one appropriate USE flag and re-emerge:"
  334.                 ewarn "   nvidia or i8x0"

  335.                 myconf="${myconf} --disable-xvmc"
  336.         }

  337.         #############
  338.         # Audio Output #
  339.         #############
  340.         myconf="${myconf} $(use_enable alsa)"
  341.         myconf="${myconf} $(use_enable arts)"
  342.         myconf="${myconf} $(use_enable esd)"
  343.         myconf="${myconf} $(use_enable mad)"
  344.         myconf="${myconf} $(use_enable nas)"
  345.         myconf="${myconf} $(use_enable oss ossaudio)"

  346.         #################
  347.         # Advanced Options #
  348.         #################
  349.         # Platform specific flags, hardcoded on amd64 (see below)
  350.         use x86 && myconf="${myconf} $(use_enable 3dnow)"
  351.         use x86 && myconf="${myconf} $(use_enable 3dnowext 3dnowex)";
  352.         use x86 && myconf="${myconf} $(use_enable sse)"
  353.         use x86 && myconf="${myconf} $(use_enable sse2)"
  354.         use x86 && myconf="${myconf} $(use_enable mmx)"
  355.         use x86 && myconf="${myconf} $(use_enable mmxext mmx2)"
  356.         myconf="${myconf} $(use_enable debug)"
  357.         myconf="${myconf} $(use_enable nls i18n)"

  358.         # mplayer now contains SIMD assembler code for amd64
  359.         # AMD64 Team decided to hardenable SIMD assembler for all users
  360.         # Danny van Dyk <kugelfang@gentoo.org> 2005/01/11
  361.         if use amd64; then
  362.                 myconf="${myconf} --enable-3dnow --enable-3dnowex --enable-sse --enable-sse2 --enable-mmx --enable-mmx2"
  363.         fi

  364.         if use ppc64
  365.         then
  366.                 myconf="${myconf} --disable-altivec"
  367.         else
  368.                 myconf="${myconf} $(use_enable altivec)"
  369.                 use altivec && append-flags -maltivec -mabi=altivec
  370.         fi


  371.         if use xanim
  372.         then
  373.                 myconf="${myconf} --with-xanimlibdir=/usr/lib/xanim/mods"
  374.         fi

  375.         if [ -e /dev/.devfsd ]
  376.         then
  377.                 myconf="${myconf} --enable-linux-devfs"
  378.         fi

  379.         use xmms && myconf="${myconf} --with-xmmslibdir=/usr/$(get_libdir)"

  380.         use live && myconf="${myconf} --with-livelibdir=/usr/$(get_libdir)/live"

  381.         # support for blinkenlights
  382.         use bl && myconf="${myconf} --enable-bl"

  383.         #leave this in place till the configure/compilation borkage is completely corrected back to pre4-r4 levels.
  384.         # it's intended for debugging so we can get the options we configure mplayer w/, rather then hunt about.
  385.         # it *will* be removed asap; in the meantime, doesn't hurt anything.
  386.         echo "${myconf}" > ${T}/configure-options

  387.         if use custom-cflags
  388.         then
  389.         # let's play the filtration game!  MPlayer hates on all!
  390.         strip-flags
  391.         # ugly optimizations cause MPlayer to cry on x86 systems!
  392.                 if use x86 ; then
  393.                         replace-flags -O0 -O2
  394.                         replace-flags -O3 -O2
  395.                         filter-flags -fPIC -fPIE
  396.                 fi
  397.         else
  398.         unset CFLAGS CXXFLAGS
  399.         fi

  400.         CFLAGS="$CFLAGS" ./configure \
  401.                 --prefix=/usr \
  402.                 --confdir=/usr/share/mplayer \
  403.                 --datadir=/usr/share/mplayer \
  404.                 --enable-largefiles \
  405.                 --enable-menu \
  406.                 --enable-network --enable-ftp \
  407.                 --with-reallibdir=${REALLIBDIR} \
  408.                 --with-x11incdir=/usr/X11R6/include \
  409.                 --disable-external-faad \
  410.                 ${myconf} || die

  411.         # we run into problems if -jN > -j1
  412.         # see #86245
  413.         MAKEOPTS="${MAKEOPTS} -j1"

  414.         einfo "Make"
  415.         make depend && emake || die "Failed to build MPlayer!"
  416.         einfo "Make completed"

  417.         # We build the shared libpostproc.so here so that our
  418.         # mplayer binary is not linked to it, ensuring that we
  419.         # do not run into issues ... (bug #14479)
  420.         cd ${S}/libavcodec/libpostproc
  421.         make SHARED_PP="yes" || die "Failed to build libpostproc.so!"
  422. }

  423. src_install() {

  424.         einfo "Make install"
  425.         make prefix=${D}/usr \
  426.              BINDIR=${D}/usr/bin \
  427.                  LIBDIR=${D}/usr/$(get_libdir) \
  428.              CONFDIR=${D}/usr/share/mplayer \
  429.              DATADIR=${D}/usr/share/mplayer \
  430.              MANDIR=${D}/usr/share/man \
  431.              install || die "Failed to install MPlayer!"
  432.         einfo "Make install completed"

  433.         dodoc AUTHORS ChangeLog README
  434.         # Install the documentation; DOCS is all mixed up not just html
  435.         if use doc ; then
  436.                 find "${S}/DOCS" -type d | xargs -- chmod 0755
  437.                 find "${S}/DOCS" -type f | xargs -- chmod 0644
  438.                 cp -r "${S}/DOCS" "${D}/usr/share/doc/${PF}/" || die
  439.         fi

  440.         # Copy misc tools to documentation path, as they're not installed directly
  441.         # and yes, we are nuking the +x bit.
  442.         find "${S}/TOOLS" -type d | xargs -- chmod 0755
  443.         find "${S}/TOOLS" -type f | xargs -- chmod 0644
  444.         cp -r "${S}/TOOLS" "${D}/usr/share/doc/${PF}/" || die

  445.         # Install the default Skin and Gnome menu entry
  446.         if use gtk; then
  447.                 dodir /usr/share/mplayer/Skin
  448.                 cp -r ${WORKDIR}/Blue ${D}/usr/share/mplayer/Skin/default || die

  449.                 # Fix the symlink
  450.                 rm -rf ${D}/usr/bin/gmplayer
  451.                 dosym mplayer /usr/bin/gmplayer

  452.                 insinto /usr/share/pixmaps
  453.                 newins ${S}/Gui/mplayer/pixmaps/logo.xpm mplayer.xpm
  454.                 insinto /usr/share/applications
  455.                 doins ${FILESDIR}/mplayer.desktop
  456.         fi

  457.         dodir /usr/share/mplayer/fonts
  458.         local x=
  459.         # Do this generic, as the mplayer people like to change the structure
  460.         # of their zips ...
  461.         for x in $(find ${WORKDIR}/ -type d -name 'font-arial-*')
  462.         do
  463.                 cp -Rd ${x} ${D}/usr/share/mplayer/fonts
  464.         done
  465.         # Fix the font symlink ...
  466.         rm -rf ${D}/usr/share/mplayer/font
  467.         dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font

  468.         insinto /etc
  469.         newins ${S}/etc/example.conf mplayer.conf
  470.         dosed -e 's/include =/#include =/' /etc/mplayer.conf
  471.         dosed -e 's/fs=yes/fs=no/' /etc/mplayer.conf
  472.         dosym ../../../etc/mplayer.conf /usr/share/mplayer/mplayer.conf

  473.         #mv the midentify script to /usr/bin for emovix.
  474.         cp ${D}/usr/share/doc/${PF}/TOOLS/midentify ${D}/usr/bin
  475.         chmod a+x ${D}/usr/bin/midentify

  476.         insinto /usr/share/mplayer
  477.         doins ${S}/etc/codecs.conf
  478.         doins ${S}/etc/input.conf
  479.         doins ${S}/etc/menu.conf
  480. }

  481. pkg_preinst() {

  482.         if [ -d "${ROOT}/usr/share/mplayer/Skin/default" ]
  483.         then
  484.                 rm -rf ${ROOT}/usr/share/mplayer/Skin/default
  485.         fi
  486. }

  487. pkg_postinst() {

  488.         if use matrox; then
  489.                 depmod -a &>/dev/null || :
  490.         fi

  491.         if use alsa ; then
  492.                 einfo "For those using alsa, please note the ao driver name is no longer"
  493.                 einfo "alsa9x or alsa1x.  It is now just 'alsa' (omit quotes)."
  494.                 einfo "The syntax for optional drivers has also changed.  For example"
  495.                 einfo "if you use a dmix driver called 'dmixer,' use"
  496.                 einfo "ao=alsa:device=dmixer instead of ao=alsa:dmixer"
  497.                 einfo "Some users may not need to specify the extra driver with the ao="
  498.                 einfo "command."
  499.         fi
  500. }

  501. pkg_postrm() {

  502.         # Cleanup stale symlinks
  503.         if [ -L ${ROOT}/usr/share/mplayer/font -a \
  504.              ! -e ${ROOT}/usr/share/mplayer/font ]
  505.         then
  506.                 rm -f ${ROOT}/usr/share/mplayer/font
  507.         fi

  508.         if [ -L ${ROOT}/usr/share/mplayer/subfont.ttf -a \
  509.              ! -e ${ROOT}/usr/share/mplayer/subfont.ttf ]
  510.         then
  511.                 rm -f ${ROOT}/usr/share/mplayer/subfont.ttf
  512.         fi
  513. }


复制代码



自己hack一下就行了
1.必须要用win32codecs,而且编译的时候要real选项
2.取消对realplayer的依赖
3.将realplayer装解码器的目录改成win32codecs的real安装目录

然后再重新编译mplayer
这里最好是有一个local portage
要不然下一次emerge sync 就有可能删掉这个文件
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-2-27 08:48:10 | 显示全部楼层
可以了,谢谢
回复 支持 反对

使用道具 举报

发表于 2006-10-22 21:28:59 | 显示全部楼层

没成功

改动以后文件大小变了,安装报错


Post by arping

  1. # Copyright 1999-2006 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-1.0.20060102.ebuild,v 1.3 2006/01/06 05:15:59 lu_zero Exp $

  4. inherit eutils flag-o-matic

  5. RESTRICT="nostrip"
  6. IUSE="3dfx 3dnow 3dnowext aac aalib alsa altivec arts bidi bl bindist
  7. cpudetection custom-cflags debug dga doc dts dvb cdparanoia directfb dvd dv
  8. dvdread edl encode esd fbcon gif ggi gtk i8x0 ipv6 jack joystick jpeg libcaca
  9. lirc live livecd lzo mad matroska matrox mmx mmxext nas nls nvidia
  10. vorbis opengl oss png real rtc samba sdl sse sse2 svga tga theora truetype
  11. v4l v4l2 win32codecs X xanim xinerama xmms xv xvid xvmc"

  12. BLUV=1.4
  13. SVGV=1.9.17

  14. # Handle PREversions as well
  15. SRC_URI="mirror://mplayer/releases/${P}.tar.bz2
  16.         mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
  17.         mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
  18.         mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2
  19.         svga? ( http://mplayerhq.hu/~alex/svgalib_helper-${SVGV}-mplayer.tar.bz2 )
  20.         gtk? ( mirror://mplayer/Skin/Blue-${BLUV}.tar.bz2 )"

  21. # Only install Skin if GUI should be build (gtk as USE flag)
  22. DESCRIPTION="Media Player for Linux (snapshot)"
  23. HOMEPAGE="http://www.mplayerhq.hu/"

  24. # 'encode' in USE for MEncoder.
  25. # [color="Olive"]comment this line to delete the depend of realplayer[/color]
  26. # x86? ( real? ( >=media-video/realplayer-10.0.3 ) )
  27. RDEPEND="xvid? ( >=media-libs/xvid-0.9.0 )
  28.         win32codecs? ( >=media-libs/win32codecs-20040916 )
  29.         aalib? ( media-libs/aalib )
  30.         alsa? ( media-libs/alsa-lib )
  31.         arts? ( kde-base/arts )
  32.         bidi? ( dev-libs/fribidi )
  33.         cdparanoia? ( media-sound/cdparanoia )
  34.         dga? ( || ( x11-libs/libXxf86dga virtual/x11 ) )
  35.         directfb? ( dev-libs/DirectFB )
  36.         dts? ( media-libs/libdts )
  37.         dvd? ( dvdread? ( media-libs/libdvdread ) )
  38.         encode? (
  39.                 media-sound/lame
  40.                 dv? ( >=media-libs/libdv-0.9.5 )
  41.                 )
  42.         esd? ( media-sound/esound )
  43.         gif? ( media-libs/giflib )
  44.         ggi? ( media-libs/libggi )
  45.         gtk? (
  46.                 media-libs/libpng
  47.                 || ( ( x11-libs/libXxf86vm
  48.                                 x11-libs/libXext
  49.                                 x11-libs/libXi
  50.                         )
  51.                         virtual/x11
  52.                 )
  53.                 )
  54.         jpeg? ( media-libs/jpeg )
  55.         libcaca? ( media-libs/libcaca )
  56.         lirc? ( app-misc/lirc )
  57.         lzo? ( =dev-libs/lzo-1* )
  58.         mad? ( media-libs/libmad )
  59.         nas? ( media-libs/nas )
  60.         nls? ( sys-devel/gettext )
  61.         vorbis? ( media-libs/libvorbis )
  62.         opengl? ( virtual/opengl )
  63.         png? ( media-libs/libpng )
  64.         samba? ( >=net-fs/samba-2.2.8a )
  65.         sdl? ( media-libs/libsdl )
  66.         svga? ( media-libs/svgalib )
  67.         theora? ( media-libs/libtheora )
  68.         live? ( >=media-plugins/live-2004.07.20 )
  69.         truetype? ( >=media-libs/freetype-2.1 )
  70.         xinerama? ( || ( ( x11-libs/libXinerama
  71.                                 x11-libs/libXxf86vm
  72.                                 x11-libs/libXext
  73.                         )
  74.                         virtual/x11
  75.                 )
  76.         )
  77.         xmms? ( media-sound/xmms )
  78.         xanim? ( >=media-video/xanim-2.80.1-r4 )
  79.         sys-libs/ncurses
  80.         xv? ( || ( ( x11-libs/libXv
  81.                                 x11-libs/libXxf86vm
  82.                                 x11-libs/libXext
  83.                         )
  84.                         virtual/x11
  85.                 )
  86.         )
  87.         xvmc? ( || ( x11-libs/libXvMC virtual/x11 ) )
  88.         X? ( || ( ( x11-libs/libXxf86vm
  89.                                 x11-libs/libXext
  90.                         )
  91.                         virtual/x11
  92.                 )
  93.         )"

  94. DEPEND="${RDEPEND}
  95.         app-arch/unzip
  96.         dga? ( || ( x11-proto/xf86dgaproto virtual/x11 ) )
  97.         xinerama? ( || ( x11-proto/xineramaproto virtual/x11 ) )
  98.         xv? ( || ( ( x11-proto/videoproto
  99.                                 x11-proto/xf86vidmodeproto
  100.                         )
  101.                         virtual/x11
  102.                 )
  103.         )
  104.         gtk? ( || ( ( x11-proto/xextproto
  105.                                 x11-proto/xf86vidmodeproto
  106.                         )
  107.                         virtual/x11
  108.                 )
  109.         )
  110.         X? ( || ( ( x11-proto/xextproto
  111.                                 x11-proto/xf86vidmodeproto
  112.                         )
  113.                         virtual/x11
  114.                 )
  115.         )"

  116. SLOT="0"
  117. LICENSE="GPL-2"
  118. KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"

  119. pkg_setup() {
  120. #[color="Olive"] change the reallibdir to /usr/lib/real where win32codecs put real codecs in[/color]
  121.         if use real && use x86; then
  122.                                 REALLIBDIR="/usr/lib/real"
  123.         fi
  124. }

  125. src_unpack() {

  126.         unpack ${P}.tar.bz2 \
  127.                 font-arial-iso-8859-1.tar.bz2 font-arial-iso-8859-2.tar.bz2 \
  128.                 font-arial-cp1250.tar.bz2

  129.         use svga && unpack svgalib_helper-${SVGV}-mplayer.tar.bz2

  130.         use gtk && unpack Blue-${BLUV}.tar.bz2

  131.         cd ${S}

  132.         # Fix hppa compilation
  133.         [ "${ARCH}" = "hppa" ] && sed -i -e "s/-O4/-O1/" "${S}/configure"

  134.         if use svga
  135.         then
  136.                 echo
  137.                 einfo "Enabling vidix non-root mode."
  138.                 einfo "(You need a proper svgalib_helper.o module for your kernel"
  139.                 einfo " to actually use this)"
  140.                 echo

  141.                 mv ${WORKDIR}/svgalib_helper ${S}/libdha
  142.         fi

  143.         # Remove kernel-2.6 workaround as the problem it works around is
  144.         # fixed, and the workaround breaks sparc
  145.         use sparc && sed -i 's:#define __KERNEL__::' osdep/kerneltwosix.h
  146.         # epatch ${FILESDIR}/mplayer-1.0_pre7-gtk2.patch
  147. }

  148. linguas_warn() {
  149.         ewarn "Language ${LANG[0]} or ${LANG_CC} not avaliable"
  150.         ewarn "Language set to English"
  151.         ewarn "If this is a mistake, please set the"
  152.         ewarn "First LINGUAS language to one of the following"
  153.         ewarn
  154.         ewarn "bg - Bulgarian"
  155.         ewarn "cs - Czech"
  156.         ewarn "de - German"
  157.         ewarn "dk - Danish"
  158.         ewarn "el - Greek"
  159.         ewarn "en - English"
  160.         ewarn "es - Spanish"
  161.         ewarn "fr - French"
  162.         ewarn "hu - Hungarian"
  163.         ewarn "ja - Japanese"
  164.         ewarn "ko - Korean"
  165.         ewarn "mk - FYRO Macedonian"
  166.         ewarn "nl - Dutch"
  167.         ewarn "no - Norwegian"
  168.         ewarn "pl - Polish"
  169.         ewarn "pt_BR - Portuguese - Brazil"
  170.         ewarn "ro - Romanian"
  171.         ewarn "ru - Russian"
  172.         ewarn "sk - Slovak"
  173.         ewarn "tr - Turkish"
  174.         ewarn "uk - Ukranian"
  175.         ewarn "zh_CN - Chinese - China"
  176.         ewarn "zh_TW - Chinese - Taiwan"
  177.         export LINGUAS="en ${LINGUAS}"
  178. }

  179. src_compile() {

  180.         # have fun with LINGUAS variable
  181.         if [[ -n $LINGUAS ]]
  182.         then
  183.                 # LINGUAS has stuff in it, start the logic
  184.                 LANG=( $LINGUAS )
  185.                 if [ -e ${S}/help/help_mp-${LANG[0]}.h ]
  186.                 then
  187.                         einfo "Setting MPlayer messages to language: ${LANG[0]}"
  188.                 else
  189.                         LANG_CC=${LANG[0]}
  190.                         if [ ${#LANG_CC} -ge 2 ]
  191.                         then
  192.                                 LANG_CC=${LANG_CC:0:2}
  193.                                 if [ -e ${S}/help/help_mp-${LANG_CC}.h ]
  194.                                 then
  195.                                         einfo "Setting MPlayer messages to language ${LANG_CC}"
  196.                                         export LINGUAS="${LANG_CC} ${LINGUAS}"
  197.                                 else
  198.                                         linguas_warn
  199.                                 fi
  200.                         else
  201.                                 linguas_warn
  202.                         fi
  203.                 fi
  204.         else
  205.                 # sending blank LINGUAS, make it default to en
  206.                 einfo "No LINGUAS given, defaulting to English"
  207.                 export LINGUAS="en ${LINGUAS}"
  208.         fi



  209.         #FIXME make it work in the snapshot
  210.         local myconf="--disable-x264"
  211.         ################
  212.         #Optional features#
  213.         ###############
  214.         if use cpudetection || use livecd || use bindist
  215.         then
  216.         myconf="${myconf} --enable-runtime-cpudetection"
  217.         fi

  218.         myconf="${myconf} $(use_enable bidi fribidi)"
  219.         myconf="${myconf} $(use_enable cdparanoia)"
  220.         if use dvd; then
  221.                 myconf="${myconf} $(use_enable dvdread) $(use_enable !dvdread mpdvdkit)"
  222.         else
  223.                 myconf="${myconf} --disable-dvdread --disable-mpdvdkit"
  224.         fi
  225.         myconf="${myconf} $(use_enable edl)"

  226.         if use encode ; then
  227.                 myconf="${myconf} --enable-mencoder $(use_enable dv libdv)"
  228.         else
  229.                 myconf="${myconf} --disable-mencoder --disable-libdv"
  230.         fi

  231.         myconf="${myconf} $(use_enable gtk gui)"

  232.         if use !gtk && use !X && use !xv && use !xinerama; then
  233.                 myconf="${myconf} --disable-gui --disable-x11 --disable-xv --disable-xmga --disable-xinerama --disable-vm --disable-xvmc"
  234.         else
  235.                 #note we ain't touching --enable-vm.  That should be locked down in the future.
  236.                 myconf="${myconf} --enable-x11 $(use_enable xinerama) $(use_enable xv) $(use_enable gtk gui)"
  237.         fi

  238.         # this looks like a hack, but the
  239.         # --enable-dga needs a paramter, but there's no surefire
  240.         # way to tell what it is.. so I'm letting MPlayer decide
  241.         # the enable part
  242.         if ! use dga && ! use 3dfx ; then
  243.                 myconf="${myconf} --disable-dga"
  244.         fi
  245.         # disable png *only* if gtk && png aren't on
  246.         if use png || use gtk; then
  247.                 myconf="${myconf} --enable-png"
  248.         else
  249.                 myconf="${myconf} --disable-png"
  250.         fi
  251.         myconf="${myconf} $(use_enable ipv6 inet6)"
  252.         myconf="${myconf} $(use_enable joystick)"
  253.         myconf="${myconf} $(use_enable lirc)"
  254.         myconf="${myconf} $(use_enable live)"
  255.         myconf="${myconf} $(use_enable rtc)"
  256.         myconf="${myconf} $(use_enable samba smb)"
  257.         myconf="${myconf} $(use_enable truetype freetype)"
  258.         myconf="${myconf} $(use_enable v4l tv-v4l)"
  259.         myconf="${myconf} $(use_enable v4l2 tv-v4l2)"
  260.         use jack || myconf="${myconf} --disable-jack"

  261.         #########
  262.         # Codecs #
  263.         ########
  264.         myconf="${myconf} $(use_enable gif)"
  265.         myconf="${myconf} $(use_enable jpeg)"
  266.         #myconf="${myconf} $(use_enable ladspa)"
  267.         myconf="${myconf} $(use_enable dts libdts)"
  268.         myconf="${myconf} $(use_enable lzo liblzo)"
  269.         myconf="${myconf} $(use_enable matroska internal-matroska)"
  270.         myconf="${myconf} $(use_enable aac internal-faad)"
  271.         myconf="${myconf} $(use_enable vorbis)"
  272.         myconf="${myconf} $(use_enable theora)"
  273.         myconf="${myconf} $(use_enable xmms)"
  274.         myconf="${myconf} $(use_enable xvid)"
  275.         use x86 && myconf="${myconf} $(use_enable real)"
  276.         myconf="${myconf} $(use_enable win32codecs win32)"

  277.         #############
  278.         # Video Output #
  279.         #############
  280.         myconf="${myconf} $(use_enable 3dfx)"
  281.         if use 3dfx; then
  282.                 myconf="${myconf} --enable-tdfxvid"
  283.         else
  284.                 myconf="${myconf} --disable-tdfxvid"
  285.         fi
  286.         if use fbcon && use 3dfx; then
  287.                 myconf="${myconf} --enable-tdfxfb"
  288.         else
  289.                 myconf="${myconf} --disable-tdfxfb"
  290.         fi

  291.         if use dvb ; then
  292.                 myconf="${myconf} --enable-dvbhead --with-dvbincdir=/usr/src/linux/include"
  293.         else
  294.                 myconf="${myconf} --disable-dvbhead"
  295.         fi

  296.         use aalib || myconf="${myconf} --disable-aa"
  297.         myconf="${myconf} $(use_enable directfb)"
  298.         myconf="${myconf} $(use_enable fbcon fbdev)"
  299.         myconf="${myconf} $(use_enable ggi)"
  300.         myconf="${myconf} $(use_enable libcaca caca)"
  301.         if use matrox && use X; then
  302.                 myconf="${myconf} $(use_enable matrox xmga)"
  303.         fi
  304.         myconf="${myconf} $(use_enable matrox mga)"
  305.         myconf="${myconf} $(use_enable opengl gl)"
  306.         myconf="${myconf} $(use_enable sdl)"

  307.         if use svga
  308.         then
  309.                 myconf="${myconf} --enable-svga"
  310.         else
  311.                 myconf="${myconf} --disable-svga --disable-vidix"
  312.         fi

  313.         myconf="${myconf} $(use_enable tga)"

  314.         ( use xvmc && use nvidia ) \
  315.                 && myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCNVIDIA"

  316.         ( use xvmc && use i8x0 ) \
  317.                 && myconf="${myconf} --enable-xvmc --with-xvmclib=I810XvMC"

  318.         ( use xvmc && use nvidia && use i8x0 ) \
  319.                 && {
  320.                         eerror "Invalid combination of USE flags"
  321.                         eerror "When building support for xvmc, you may only"
  322.                         eerror "include support for one video card:"
  323.                         eerror "   nvidia, i8x0"
  324.                         eerror
  325.                         eerror "Emerge again with different USE flags"

  326.                         exit 1
  327.                 }

  328.         ( use xvmc && ! use nvidia && ! use i8x0 ) && {
  329.                 ewarn "You tried to build with xvmc support."
  330.                 ewarn "No supported graphics hardware was specified."
  331.                 ewarn
  332.                 ewarn "No xvmc support will be included."
  333.                 ewarn "Please one appropriate USE flag and re-emerge:"
  334.                 ewarn "   nvidia or i8x0"

  335.                 myconf="${myconf} --disable-xvmc"
  336.         }

  337.         #############
  338.         # Audio Output #
  339.         #############
  340.         myconf="${myconf} $(use_enable alsa)"
  341.         myconf="${myconf} $(use_enable arts)"
  342.         myconf="${myconf} $(use_enable esd)"
  343.         myconf="${myconf} $(use_enable mad)"
  344.         myconf="${myconf} $(use_enable nas)"
  345.         myconf="${myconf} $(use_enable oss ossaudio)"

  346.         #################
  347.         # Advanced Options #
  348.         #################
  349.         # Platform specific flags, hardcoded on amd64 (see below)
  350.         use x86 && myconf="${myconf} $(use_enable 3dnow)"
  351.         use x86 && myconf="${myconf} $(use_enable 3dnowext 3dnowex)";
  352.         use x86 && myconf="${myconf} $(use_enable sse)"
  353.         use x86 && myconf="${myconf} $(use_enable sse2)"
  354.         use x86 && myconf="${myconf} $(use_enable mmx)"
  355.         use x86 && myconf="${myconf} $(use_enable mmxext mmx2)"
  356.         myconf="${myconf} $(use_enable debug)"
  357.         myconf="${myconf} $(use_enable nls i18n)"

  358.         # mplayer now contains SIMD assembler code for amd64
  359.         # AMD64 Team decided to hardenable SIMD assembler for all users
  360.         # Danny van Dyk <kugelfang@gentoo.org> 2005/01/11
  361.         if use amd64; then
  362.                 myconf="${myconf} --enable-3dnow --enable-3dnowex --enable-sse --enable-sse2 --enable-mmx --enable-mmx2"
  363.         fi

  364.         if use ppc64
  365.         then
  366.                 myconf="${myconf} --disable-altivec"
  367.         else
  368.                 myconf="${myconf} $(use_enable altivec)"
  369.                 use altivec && append-flags -maltivec -mabi=altivec
  370.         fi


  371.         if use xanim
  372.         then
  373.                 myconf="${myconf} --with-xanimlibdir=/usr/lib/xanim/mods"
  374.         fi

  375.         if [ -e /dev/.devfsd ]
  376.         then
  377.                 myconf="${myconf} --enable-linux-devfs"
  378.         fi

  379.         use xmms && myconf="${myconf} --with-xmmslibdir=/usr/$(get_libdir)"

  380.         use live && myconf="${myconf} --with-livelibdir=/usr/$(get_libdir)/live"

  381.         # support for blinkenlights
  382.         use bl && myconf="${myconf} --enable-bl"

  383.         #leave this in place till the configure/compilation borkage is completely corrected back to pre4-r4 levels.
  384.         # it's intended for debugging so we can get the options we configure mplayer w/, rather then hunt about.
  385.         # it *will* be removed asap; in the meantime, doesn't hurt anything.
  386.         echo "${myconf}" > ${T}/configure-options

  387.         if use custom-cflags
  388.         then
  389.         # let's play the filtration game!  MPlayer hates on all!
  390.         strip-flags
  391.         # ugly optimizations cause MPlayer to cry on x86 systems!
  392.                 if use x86 ; then
  393.                         replace-flags -O0 -O2
  394.                         replace-flags -O3 -O2
  395.                         filter-flags -fPIC -fPIE
  396.                 fi
  397.         else
  398.         unset CFLAGS CXXFLAGS
  399.         fi

  400.         CFLAGS="$CFLAGS" ./configure \
  401.                 --prefix=/usr \
  402.                 --confdir=/usr/share/mplayer \
  403.                 --datadir=/usr/share/mplayer \
  404.                 --enable-largefiles \
  405.                 --enable-menu \
  406.                 --enable-network --enable-ftp \
  407.                 --with-reallibdir=${REALLIBDIR} \
  408.                 --with-x11incdir=/usr/X11R6/include \
  409.                 --disable-external-faad \
  410.                 ${myconf} || die

  411.         # we run into problems if -jN > -j1
  412.         # see #86245
  413.         MAKEOPTS="${MAKEOPTS} -j1"

  414.         einfo "Make"
  415.         make depend && emake || die "Failed to build MPlayer!"
  416.         einfo "Make completed"

  417.         # We build the shared libpostproc.so here so that our
  418.         # mplayer binary is not linked to it, ensuring that we
  419.         # do not run into issues ... (bug #14479)
  420.         cd ${S}/libavcodec/libpostproc
  421.         make SHARED_PP="yes" || die "Failed to build libpostproc.so!"
  422. }

  423. src_install() {

  424.         einfo "Make install"
  425.         make prefix=${D}/usr \
  426.              BINDIR=${D}/usr/bin \
  427.                  LIBDIR=${D}/usr/$(get_libdir) \
  428.              CONFDIR=${D}/usr/share/mplayer \
  429.              DATADIR=${D}/usr/share/mplayer \
  430.              MANDIR=${D}/usr/share/man \
  431.              install || die "Failed to install MPlayer!"
  432.         einfo "Make install completed"

  433.         dodoc AUTHORS ChangeLog README
  434.         # Install the documentation; DOCS is all mixed up not just html
  435.         if use doc ; then
  436.                 find "${S}/DOCS" -type d | xargs -- chmod 0755
  437.                 find "${S}/DOCS" -type f | xargs -- chmod 0644
  438.                 cp -r "${S}/DOCS" "${D}/usr/share/doc/${PF}/" || die
  439.         fi

  440.         # Copy misc tools to documentation path, as they're not installed directly
  441.         # and yes, we are nuking the +x bit.
  442.         find "${S}/TOOLS" -type d | xargs -- chmod 0755
  443.         find "${S}/TOOLS" -type f | xargs -- chmod 0644
  444.         cp -r "${S}/TOOLS" "${D}/usr/share/doc/${PF}/" || die

  445.         # Install the default Skin and Gnome menu entry
  446.         if use gtk; then
  447.                 dodir /usr/share/mplayer/Skin
  448.                 cp -r ${WORKDIR}/Blue ${D}/usr/share/mplayer/Skin/default || die

  449.                 # Fix the symlink
  450.                 rm -rf ${D}/usr/bin/gmplayer
  451.                 dosym mplayer /usr/bin/gmplayer

  452.                 insinto /usr/share/pixmaps
  453.                 newins ${S}/Gui/mplayer/pixmaps/logo.xpm mplayer.xpm
  454.                 insinto /usr/share/applications
  455.                 doins ${FILESDIR}/mplayer.desktop
  456.         fi

  457.         dodir /usr/share/mplayer/fonts
  458.         local x=
  459.         # Do this generic, as the mplayer people like to change the structure
  460.         # of their zips ...
  461.         for x in $(find ${WORKDIR}/ -type d -name 'font-arial-*')
  462.         do
  463.                 cp -Rd ${x} ${D}/usr/share/mplayer/fonts
  464.         done
  465.         # Fix the font symlink ...
  466.         rm -rf ${D}/usr/share/mplayer/font
  467.         dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font

  468.         insinto /etc
  469.         newins ${S}/etc/example.conf mplayer.conf
  470.         dosed -e 's/include =/#include =/' /etc/mplayer.conf
  471.         dosed -e 's/fs=yes/fs=no/' /etc/mplayer.conf
  472.         dosym ../../../etc/mplayer.conf /usr/share/mplayer/mplayer.conf

  473.         #mv the midentify script to /usr/bin for emovix.
  474.         cp ${D}/usr/share/doc/${PF}/TOOLS/midentify ${D}/usr/bin
  475.         chmod a+x ${D}/usr/bin/midentify

  476.         insinto /usr/share/mplayer
  477.         doins ${S}/etc/codecs.conf
  478.         doins ${S}/etc/input.conf
  479.         doins ${S}/etc/menu.conf
  480. }

  481. pkg_preinst() {

  482.         if [ -d "${ROOT}/usr/share/mplayer/Skin/default" ]
  483.         then
  484.                 rm -rf ${ROOT}/usr/share/mplayer/Skin/default
  485.         fi
  486. }

  487. pkg_postinst() {

  488.         if use matrox; then
  489.                 depmod -a &>/dev/null || :
  490.         fi

  491.         if use alsa ; then
  492.                 einfo "For those using alsa, please note the ao driver name is no longer"
  493.                 einfo "alsa9x or alsa1x.  It is now just 'alsa' (omit quotes)."
  494.                 einfo "The syntax for optional drivers has also changed.  For example"
  495.                 einfo "if you use a dmix driver called 'dmixer,' use"
  496.                 einfo "ao=alsa:device=dmixer instead of ao=alsa:dmixer"
  497.                 einfo "Some users may not need to specify the extra driver with the ao="
  498.                 einfo "command."
  499.         fi
  500. }

  501. pkg_postrm() {

  502.         # Cleanup stale symlinks
  503.         if [ -L ${ROOT}/usr/share/mplayer/font -a \
  504.              ! -e ${ROOT}/usr/share/mplayer/font ]
  505.         then
  506.                 rm -f ${ROOT}/usr/share/mplayer/font
  507.         fi

  508.         if [ -L ${ROOT}/usr/share/mplayer/subfont.ttf -a \
  509.              ! -e ${ROOT}/usr/share/mplayer/subfont.ttf ]
  510.         then
  511.                 rm -f ${ROOT}/usr/share/mplayer/subfont.ttf
  512.         fi
  513. }


复制代码



自己hack一下就行了
1.必须要用win32codecs,而且编译的时候要real选项
2.取消对realplayer的依赖
3.将realplayer装解码器的目录改成win32codecs的real安装目录

然后再重新编译mplayer
这里最好是有一个local portage
要不然下一次emerge sync 就有可能删掉这个文件
回复 支持 反对

使用道具 举报

发表于 2006-10-22 21:54:16 | 显示全部楼层
ebuild xxx.ebuild digest
回复 支持 反对

使用道具 举报

发表于 2006-10-22 23:26:04 | 显示全部楼层
下载http://www4.mplayerhq.hu/MPlayer ... ll-20060611.tar.bz2,解压到/usr/lib/win32,
用“xine”后端的totem就可以搞定,在我这里比realplayer快多了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表