LinuxSir.cn,穿越时空的Linuxsir!

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

弟兄们才更新过的mplayer能播放rm文件吗?

[复制链接]
发表于 2008-12-29 21:51:25 | 显示全部楼层 |阅读模式
搜索了一些办法,搞来搞去还是播不了rm,搞成了麻烦的指点下,谢谢
发表于 2008-12-29 22:03:15 | 显示全部楼层
我能用最新的"~x86"的mplayer正常播放rmvb。
回复 支持 反对

使用道具 举报

发表于 2008-12-29 22:08:23 | 显示全部楼层
现在直接可以看,不再需要什么二进制的codecs
也就是只要emerge mplayer即可,别的都不需要了
当然支持的realmedia的版本可能较低一点
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-29 22:35:58 | 显示全部楼层
是这个版本的不?1.0_rc2_p28058-r1
rmvb还是可以放,就是rm放不了,有声音没图像

请求的视频编解码器族 [rv3040] (vfm=realvid) 不可用。
请在编译时启用它。
请求的视频编解码器族 [rv3040win] (vfm=realvid) 不可用。
请在编译时启用它。
请求的视频编解码器族 [rv30] (vfm=realvid) 不可用。
请在编译时启用它。
请求的视频编解码器族 [rv30win] (vfm=realvid) 不可用。
请在编译时启用它。
请求的视频编解码器族 [rv30mac] (vfm=realvid) 不可用。
请在编译时启用它。
回复 支持 反对

使用道具 举报

发表于 2008-12-29 22:45:43 | 显示全部楼层
我就是这个原因,所以才降回到原来版本的。
回复 支持 反对

使用道具 举报

发表于 2008-12-29 22:47:12 | 显示全部楼层
刚更新完之后似乎可以直接播放了。
回复 支持 反对

使用道具 举报

发表于 2008-12-29 23:52:14 | 显示全部楼层
我是下载了mplayer的源码和win32codecs然后手动编译的,然后打包出来,放到哪个发行版里都是解压后直接用,十分方便
回复 支持 反对

使用道具 举报

发表于 2008-12-30 01:46:58 | 显示全部楼层
Post by peter_l;1931595
是这个版本的不?1.0_rc2_p28058-r1
rmvb还是可以放,就是rm放不了,有声音没图像

请求的视频编解码器族 [rv3040] (vfm=realvid) 不可用。
请在编译时启用它。
请求的视频编解码器族 [rv3040win] (vfm=realvid) 不可用。
请在编译时启用它。
请求的视频编解码器族 [rv30] (vfm=realvid) 不可用。
请在编译时启用它。
请求的视频编解码器族 [rv30win] (vfm=realvid) 不可用。
请在编译时启用它。
请求的视频编解码器族 [rv30mac] (vfm=realvid) 不可用。
请在编译时启用它。

rm3版本好像mplayer不直接支持。
如果rm格式对你很重要。你需要用win32-codecs的支持。
回复 支持 反对

使用道具 举报

发表于 2008-12-30 07:38:22 | 显示全部楼层
我需要它支持任何格式,所以我还是修改了ebuild, emerge realcodecs 了。
请# USE="realcodecs" emerge -av mplayer-1.0_rc2_p28058-r1.ebuild  
  1. # Copyright 1999-2008 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_rc2_p28058-r1.ebuild,v 1.3 2008/12/17 20:10:33 maekke Exp $
  4. EAPI="1"
  5. inherit eutils flag-o-matic multilib
  6. # Ugly hack, feel free to fix
  7. MPLAYER_REVISION=28058
  8. IUSE="3dnow 3dnowext +a52 +aac -aalib +alsa altivec amrnb amrwb -arts +ass bidi bl
  9. bindist cddb cdio cdparanoia -cpudetection -custom-cflags -custom-cpuopts debug
  10. dga dirac doc dts dvb directfb +dvd dvdnav dv dxr3 enca +encode esd -fbcon ftp -gif ggi
  11. -gtk iconv ipv6 jack joystick -jpeg kernel_linux ladspa -libcaca lirc live lzo
  12. +mad -md5sum +mmx mmxext mng mp2 +mp3 musepack nas nemesi opengl
  13. openal oss -png -pnm pulseaudio -pvr +quicktime radio -rar realcodecs rtc -samba schroedinger sdl
  14. speex sse sse2 ssse3 svga teletext tga +theora +truetype unicode v4l v4l2
  15. vidix +vorbis win32codecs +X x264 xanim xinerama +xscreensaver +xv xvid xvmc zoran"
  16. VIDEO_CARDS="s3virge mga tdfx vesa"
  17. for x in ${VIDEO_CARDS}; do
  18.         IUSE="${IUSE} video_cards_${x}"
  19. done
  20. BLUV="1.7"
  21. SVGV="1.9.17"
  22. AMR_URI="http://www.3gpp.org/ftp/Specs/archive"
  23. SRC_URI="mirror://gentoo/${P}.tar.bz2
  24.         !truetype? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
  25.                                  mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
  26.                                  mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 )
  27.         !iconv? ( mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
  28.                           mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
  29.                           mirror://mplayer/releases/fonts/font-arial-cp1250.tar.bz2 )
  30.         gtk? ( mirror://mplayer/Skin/Blue-${BLUV}.tar.bz2 )
  31.         svga? ( http://mplayerhq.hu/~alex/svgalib_helper-${SVGV}-mplayer.tar.bz2 )"
  32. DESCRIPTION="Media Player for Linux"
  33. HOMEPAGE="http://www.mplayerhq.hu/"
  34. RDEPEND="sys-libs/ncurses
  35.         !bindist? (
  36.                 x86? (
  37.                         win32codecs? ( media-libs/win32codecs )
  38.                         realcodecs? ( media-libs/win32codecs
  39.                                 media-libs/realcodecs )
  40.                         )
  41.                 amd64? ( realcodecs? ( media-libs/amd64codecs ) )
  42.         )
  43.         aalib? ( media-libs/aalib )
  44.         alsa? ( media-libs/alsa-lib )
  45.         amrnb? ( media-libs/amrnb )
  46.         amrwb? ( media-libs/amrwb )
  47.         arts? ( kde-base/arts )
  48.         ass? ( >=media-libs/freetype-2.1
  49.                 media-libs/fontconfig )
  50.         openal? ( media-libs/openal )
  51.         bidi? ( dev-libs/fribidi )
  52.         cdio? ( dev-libs/libcdio )
  53.         cdparanoia? ( media-sound/cdparanoia )
  54.         dirac? ( >=media-video/dirac-0.10.0 )
  55.         directfb? ( dev-libs/DirectFB )
  56.         dga? ( x11-libs/libXxf86dga  )
  57.         dts? ( media-libs/libdca )
  58.         dvdnav? ( >=media-libs/libdvdnav-4.1.3
  59.                 >=media-libs/libdvdread-4.1.3 )
  60.         dv? ( media-libs/libdv )
  61.         dvb? ( media-tv/linuxtv-dvb-headers )
  62.         encode? (
  63.                 aac? ( media-libs/faac )
  64.                 mp2? ( media-sound/twolame )
  65.                 mp3? ( media-sound/lame )
  66.                 x264? ( >=media-libs/x264-0.0.20080406 )
  67.                 )
  68.         esd? ( media-sound/esound )
  69.         enca? ( app-i18n/enca )
  70.         gif? ( media-libs/giflib )
  71.         ggi? ( media-libs/libggi
  72.                 media-libs/libggiwmh )
  73.         gtk? ( media-libs/libpng
  74.                 x11-libs/libXxf86vm
  75.                 x11-libs/libXext
  76.                 x11-libs/libXi
  77.                 =x11-libs/gtk+-2* )
  78.         jpeg? ( media-libs/jpeg )
  79.         ladspa? ( media-libs/ladspa-sdk )
  80.         libcaca? ( media-libs/libcaca )
  81.         lirc? ( app-misc/lirc )
  82.         lzo? ( >=dev-libs/lzo-2 )
  83.         mad? ( media-libs/libmad )
  84.         mng? ( media-libs/libmng )
  85.         musepack? ( >=media-libs/libmpcdec-1.2.2 )
  86.         nas? ( media-libs/nas )
  87.         opengl? ( virtual/opengl )
  88.         png? ( media-libs/libpng )
  89.         pnm? ( media-libs/netpbm )
  90.         pulseaudio? ( media-sound/pulseaudio )
  91.         samba? ( net-fs/samba )
  92.         schroedinger? ( media-libs/schroedinger )
  93.         sdl? ( media-libs/libsdl )
  94.         speex? ( >=media-libs/speex-1.1.7 )
  95.         svga? ( media-libs/svgalib )
  96.         theora? ( media-libs/libtheora )
  97.         live? ( >=media-plugins/live-2007.02.20 )
  98.         truetype? ( >=media-libs/freetype-2.1
  99.                 media-libs/fontconfig )
  100.         vidix? ( x11-libs/libXxf86vm
  101.                          x11-libs/libXext )
  102.         xanim? ( media-video/xanim )
  103.         xinerama? ( x11-libs/libXinerama
  104.                 x11-libs/libXxf86vm
  105.                 x11-libs/libXext )
  106.         xscreensaver? ( x11-libs/libXScrnSaver )
  107.         xv? ( x11-libs/libXv
  108.                 x11-libs/libXxf86vm
  109.                 x11-libs/libXext
  110.                 xvmc? ( x11-libs/libXvMC ) )
  111.         xvid? ( media-libs/xvid )
  112.         X? ( x11-libs/libXxf86vm
  113.                 x11-libs/libXext
  114.         )"
  115. DEPEND="${RDEPEND}
  116.         doc? ( dev-libs/libxslt )
  117.         dga? ( x11-proto/xf86dgaproto )
  118.         dxr3? ( media-video/em8300-libraries )
  119.         xinerama? ( x11-proto/xineramaproto )
  120.         xv? ( x11-proto/videoproto
  121.                   x11-proto/xf86vidmodeproto )
  122.         gtk? ( x11-proto/xextproto
  123.                    x11-proto/xf86vidmodeproto )
  124.         X? ( x11-proto/xextproto
  125.                  x11-proto/xf86vidmodeproto )
  126.         xscreensaver? ( x11-proto/scrnsaverproto )
  127.         iconv? ( virtual/libiconv )"
  128. # Make sure the assembler USE flags are unmasked on amd64
  129. # Remove this once default-linux/amd64/2006.1 is deprecated
  130. DEPEND="${DEPEND} amd64? ( >=sys-apps/portage-2.1.2 )
  131.         mp2? ( >=sys-apps/portage-2.1.2 )"
  132. SLOT="0"
  133. LICENSE="GPL-2"
  134. KEYWORDS="~alpha amd64 hppa ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd"
  135. pkg_setup() {
  136.         if [[ -n ${LINGUAS} ]]; then
  137.                 elog ""
  138.                 elog "MPlayer's build system uses the LINGUAS variable for both"
  139.                 elog "output messages and which man pages to build.  The first"
  140.                 elog "language in the LINGUAS variable will be used to display"
  141.                 elog "output messages.  See bug #228799."
  142.         fi
  143.         if use gtk; then
  144.                 ewarn ""
  145.                 ewarn "You've enabled the 'gtk' use flag which will build"
  146.                 ewarn "GMPlayer, which is no longer actively developed upstream"
  147.                 ewarn "and is not supported by Gentoo.  There are alternatives"
  148.                 ewarn "for a GUI frontend: smplayer, gnome-mplayer and kmplayer."
  149.         fi
  150.         if use cpudetection; then
  151.                 ewarn ""
  152.                 ewarn "You've enabled the cpudetection flag.  This feature is"
  153.                 ewarn "included mainly for people who want to use the same"
  154.                 ewarn "binary on another system with a different CPU architecture."
  155.                 ewarn "MPlayer will already detect your CPU settings by default at"
  156.                 ewarn "buildtime; this flag is used for runtime detection."
  157.                 ewarn "You won't need this turned on if you are only building"
  158.                 ewarn "mplayer for this system.  Also, if your compile fails, try"
  159.                 ewarn "disabling this use flag."
  160.         fi
  161.         if use custom-cpuopts; then
  162.                 ewarn ""
  163.                 ewarn "You are using the custom-cpuopts flag which will"
  164.                 ewarn "specifically allow you to enable / disable certain"
  165.                 ewarn "CPU optimizations."
  166.                 ewarn ""
  167.                 ewarn "Most desktop users won't need this functionality, but it"
  168.                 ewarn "is included for corner cases like cross-compiling and"
  169.                 ewarn "certain profiles.  If unsure, disable this flag and MPlayer"
  170.                 ewarn "will automatically detect and use your available CPU"
  171.                 ewarn "optimizations."
  172.                 ewarn ""
  173.                 ewarn "Using this flag means your build is unsupported, so"
  174.                 ewarn "please make sure your CPU optimization use flags (3dnow"
  175.                 ewarn "3dnowext mmx mmxext sse sse2 ssse3) are properly set."
  176.         fi
  177. }
  178. src_unpack() {
  179.         unpack ${A}
  180.         if ! use truetype ; then
  181.                 unpack font-arial-iso-8859-1.tar.bz2 \
  182.                         font-arial-iso-8859-2.tar.bz2 \
  183.                         font-arial-cp1250.tar.bz2
  184.         fi
  185.         use gtk && unpack "Blue-${BLUV}.tar.bz2"
  186.         use svga && unpack "svgalib_helper-${SVGV}-mplayer.tar.bz2"
  187.         cd "${S}"
  188.         # Fix sparc compilation, bug 241110
  189.         epatch "${FILESDIR}/mplayer-libavcodec.patch"
  190.         # Fix x264 compilation, bug 240347
  191.         epatch "${FILESDIR}/mplayer-1.0_rc2_p27725-libx264.patch"
  192.         # Security bug 251017
  193.         epatch "${FILESDIR}"/mplayer-1.0_rc2_p28058-demux_vqf.patch
  194.         # Set version #
  195.         sed -i s/UNKNOWN/${MPLAYER_REVISION}/ "${S}/version.sh"
  196.         # Fix hppa compilation
  197.         use hppa && sed -i -e "s/-O4/-O1/" "${S}/configure"
  198.         if use svga; then
  199.                 echo
  200.                 einfo "Enabling vidix non-root mode."
  201.                 einfo "(You need a proper svgalib_helper.o module for your kernel"
  202.                 einfo "to actually use this)"
  203.                 echo
  204.                 mv "${WORKDIR}/svgalib_helper" "${S}/libdha"
  205.         fi
  206.         # Fix polish spelling errors
  207.         [[ -n ${LINGUAS} ]] && sed -e 's:Zarządano:Zażądano:' -i help/help_mp-pl.h
  208. }
  209. src_compile() {
  210.         local myconf=" --disable-tv-bsdbt848 \
  211.                 --disable-faad"
  212.         # broken upstream, won't work with recent kernels
  213.         myconf="${myconf} --disable-ivtv"
  214.         # MPlayer reads in the LINGUAS variable from make.conf, and sets
  215.         # the languages accordingly.  Some will have to be altered to match
  216.         # upstream's naming scheme.
  217.         [[ -n $LINGUAS ]] && LINGUAS=${LINGUAS/da/dk}
  218.         ################
  219.         #Optional features#
  220.         ###############
  221.         use ass || myconf="${myconf} --disable-ass"
  222.         use bidi || myconf="${myconf} --disable-fribidi"
  223.         use bl && myconf="${myconf} --enable-bl"
  224.         use enca || myconf="${myconf} --disable-enca"
  225.         use encode || myconf="${myconf} --disable-mencoder"
  226.         use ftp || myconf="${myconf} --disable-ftp"
  227.         use nemesi || myconf="${myconf} --disable-nemesi"
  228.         use xscreensaver || myconf="${myconf} --disable-xss"
  229.         # libcdio support: prefer libcdio over cdparanoia
  230.         # don't check for cddb w/cdio
  231.         if use cdio; then
  232.                 myconf="${myconf} --disable-cdparanoia"
  233.         else
  234.                 myconf="${myconf} --disable-libcdio"
  235.                 use cdparanoia || myconf="${myconf} --disable-cdparanoia"
  236.                 use cddb || myconf="${myconf} --disable-cddb"
  237.         fi
  238.         # DVD support
  239.         # dvdread and libdvdcss are internal libs
  240.         # http://www.mplayerhq.hu/DOCS/HTML/en/dvd.html
  241.         # You can optionally use external dvdread/dvdnav support.
  242.         if use dvdnav; then
  243.                 myconf="${myconf} --with-dvdread-config=/usr/bin/dvdread-config \
  244.                         --with-dvdnav-config=/usr/bin/dvdnav-config \
  245.                         --disable-dvdread-internal"
  246.         elif ! use dvd && ! use dvdread; then
  247.                 myconf="${myconf} --disable-dvdnav --disable-dvdread"
  248.                 use a52 || myconf="${myconf} --disable-liba52 \
  249.                         --disable-liba52-internal"
  250.         fi
  251.         # SRT (subtitles) requires freetype support
  252.         # freetype support requires iconv
  253.         # iconv optionally can use unicode
  254.         if ! use ass; then
  255.                 if ! use truetype; then
  256.                         myconf="${myconf} --disable-freetype"
  257.                         if ! use iconv; then
  258.                                 myconf="${myconf} --disable-iconv --charset=noconv"
  259.                         fi
  260.                 fi
  261.         fi
  262.         use iconv && use unicode && myconf="${myconf} --charset=UTF-8"
  263.         use lirc || myconf="${myconf} --disable-lirc --disable-lircc"
  264.         myconf="${myconf} $(use_enable joystick)"
  265.         use ipv6 || myconf="${myconf} --disable-inet6"
  266.         use rar || myconf="${myconf} --disable-unrarexec"
  267.         use rtc || myconf="${myconf} --disable-rtc"
  268.         use samba || myconf="${myconf} --disable-smb"
  269.         # DVB / Video4Linux / Radio support
  270.         if { use dvb || use v4l || use v4l2 || use pvr || use radio; }; then
  271.                 use dvb || myconf="${myconf} --disable-dvb --disable-dvbhead"
  272.                 use pvr || myconf="${myconf} --disable-pvr"
  273.                 use v4l        || myconf="${myconf} --disable-tv-v4l1"
  274.                 use v4l2 || myconf="${myconf} --disable-tv-v4l2"
  275.                 use teletext || myconf="${myconf} --disable-tv-teletext"
  276.                 if use radio && { use dvb || use v4l || use v4l2; }; then
  277.                         myconf="${myconf} --enable-radio $(use_enable encode radio-capture)"
  278.                 else
  279.                         myconf="${myconf} --disable-radio-v4l2 --disable-radio-bsdbt848"
  280.                 fi
  281.         else
  282.                 myconf="${myconf} --disable-tv --disable-tv-v4l1 --disable-tv-v4l2 \
  283.                         --disable-radio --disable-radio-v4l2 --disable-radio-bsdbt848 \
  284.                         --disable-dvb --disable-dvbhead --disable-tv-teletext \
  285.                         --disable-v4l2 --disable-pvr"
  286.         fi
  287.         #########
  288.         # Codecs #
  289.         ########
  290.         for x in gif jpeg live mad musepack pnm speex tga theora xanim; do
  291.                 use ${x} || myconf="${myconf} --disable-${x}"
  292.         done
  293.         for x in dirac schroedinger ; do
  294.                 use ${x} || myconf="${myconf} --disable-lib${x}-lavc"
  295.         done
  296.         use aac || myconf="${myconf} --disable-faac --disable-faac-lavc"
  297.         use amrnb || myconf="${myconf} --disable-libamr_nb"
  298.         use amrwb || myconf="${myconf} --disable-libamr_wb"
  299.         use dts || myconf="${myconf} --disable-libdca"
  300.         use dv || myconf="${myconf} --disable-libdv"
  301.         ! use png && ! use gtk && myconf="${myconf} --disable-png"
  302.         use lzo || myconf="${myconf} --disable-liblzo"
  303.         use encode && use mp2 || myconf="${myconf} --disable-twolame \
  304.                 --disable-toolame"
  305.         use mp3 || myconf="${myconf} --disable-mp3lame --disable-mp3lame-lavc"
  306.         use vorbis || myconf="${myconf} --disable-libvorbis"
  307.         use x264 || myconf="${myconf} --disable-x264 --disable-x264-lavc"
  308.         use xanim && myconf="${myconf} --xanimcodecsdir=/usr/lib/xanim/mods"
  309.         use xvid || myconf="${myconf} --disable-xvid --disable-xvid-lavc"
  310.         # Real codec support, only available on x86, amd64
  311.         if use realcodecs && use x86; then
  312.                 myconf="${myconf} --realcodecsdir=/opt/RealPlayer/codecs"
  313.         elif use realcodecs && use amd64; then
  314.                 myconf="${myconf} --realcodecsdir=/usr/$(get_libdir)/codecs"
  315.         else
  316.                 myconf="${myconf} --disable-real"
  317.         fi
  318.         if ! use bindist && ! use real; then
  319.                 myconf="${myconf} $(use_enable win32codecs win32dll)"
  320.         fi
  321.         # bug 213836
  322.         if ! use x86 || ! use win32codecs; then
  323.                 use quicktime || myconf="${myconf} --disable-qtx"
  324.         fi
  325.         #############
  326.         # Video Output #
  327.         #############
  328.         for x in directfb ggi md5sum sdl xinerama; do
  329.                 use ${x} || myconf="${myconf} --disable-${x}"
  330.         done
  331.         use aalib || myconf="${myconf} --disable-aa"
  332.         use dga || myconf="${myconf} --disable-dga1 --disable-dga2"
  333.         use fbcon || myconf="${myconf} --disable-fbdev"
  334.         use fbcon && use video_cards_s3virge && myconf="${myconf} --enable-s3fb"
  335.         use libcaca || myconf="${myconf} --disable-caca"
  336.         use opengl || myconf="${myconf} --disable-gl"
  337.         use video_cards_vesa || myconf="${myconf} --disable-vesa"
  338.         use vidix || myconf="${myconf} --disable-vidix \
  339.                 --disable-vidix-pcidb"
  340.         use zoran || myconf="${myconf} --disable-zr"
  341.         # MPlayer incorrectly looks for DXR3 support, so forcibly enable
  342.         # if requested. See bug 223587
  343.         myconf="${myconf} $(use_enable dxr3)"
  344.         # GTK gmplayer gui
  345.         myconf="${myconf} $(use_enable gtk gui)"
  346.         if use xv; then
  347.                 if use xvmc; then
  348.                         myconf="${myconf} --enable-xvmc --with-xvmclib=XvMCW"
  349.                 else
  350.                         myconf="${myconf} --disable-xvmc"
  351.                 fi
  352.         else
  353.                 myconf="${myconf} --disable-xv --disable-xvmc"
  354.         fi
  355.         if ! use kernel_linux && ! use video_cards_mga; then
  356.                  myconf="${myconf} --disable-mga --disable-xmga"
  357.         fi
  358.         if use video_cards_tdfx; then
  359.                 myconf="${myconf} $(use_enable video_cards_tdfx tdfxvid) \
  360.                         $(use_enable fbcon tdfxfb)"
  361.         else
  362.                 myconf="${myconf} --disable-3dfx --disable-tdfxvid --disable-tdfxfb"
  363.         fi
  364.         #############
  365.         # Audio Output #
  366.         #############
  367.         for x in alsa arts esd jack ladspa nas openal; do
  368.                 use ${x} || myconf="${myconf} --disable-${x}"
  369.         done
  370.         use pulseaudio || myconf="${myconf} --disable-pulse"
  371.         if ! use radio; then
  372.                 use oss || myconf="${myconf} --disable-ossaudio"
  373.         fi
  374.         #################
  375.         # Advanced Options #
  376.         #################
  377.         # Platform specific flags, hardcoded on amd64 (see below)
  378.         if use cpudetection || use bindist; then
  379.                 myconf="${myconf} --enable-runtime-cpudetection"
  380.         fi
  381.         # Turning off CPU optimizations usually will break the build.
  382.         # However, this use flag, if enabled, will allow users to completely
  383.         # specify which ones to use.  If disabled, mplayer will automatically
  384.         # enable all CPU optimizations that the host build supports.
  385.         if use custom-cpuopts; then
  386.                 for x in 3dnow 3dnowext mmx mmxext sse sse2 ssse3; do
  387.                         myconf="${myconf} $(use_enable $x)"
  388.                 done
  389.         fi
  390.         use debug && myconf="${myconf} --enable-debug=3"
  391.         myconf="${myconf} $(use_enable altivec)"
  392.         if use custom-cflags; then
  393.                 # let's play the filtration game!  MPlayer hates on all!
  394.                 strip-flags
  395.                 # ugly optimizations cause MPlayer to cry on x86 systems!
  396.                         if use x86 || use x86-fbsd ; then
  397.                                 replace-flags -O* -O2
  398.                                 filter-flags -fPIC -fPIE
  399.                                 use debug || append-flags -fomit-frame-pointer
  400.                         fi
  401.                 append-flags -D__STDC_LIMIT_MACROS
  402.         else
  403.                 unset CFLAGS CXXFLAGS
  404.         fi
  405.         myconf="--cc=$(tc-getCC) \
  406.                 --host-cc=$(tc-getBUILD_CC) \
  407.                 --prefix=/usr \
  408.                 --confdir=/etc/mplayer \
  409.                 --datadir=/usr/share/mplayer \
  410.                 --libdir=/usr/$(get_libdir) \
  411.                 --enable-menu \
  412.                 --enable-network \
  413.                 ${myconf}"
  414.         #echo "CFLAGS="${CFLAGS}" ./configure ${myconf}"
  415.         CFLAGS="${CFLAGS}" ./configure ${myconf} || die "configure died"
  416.         emake || die "Failed to build MPlayer!"
  417.         use doc && make -C DOCS/xml html-chunked
  418. }
  419. src_install() {
  420.         make prefix="${D}/usr" \
  421.                  BINDIR="${D}/usr/bin" \
  422.                  LIBDIR="${D}/usr/$(get_libdir)" \
  423.                  CONFDIR="${D}/etc/mplayer" \
  424.                  DATADIR="${D}/usr/share/mplayer" \
  425.                  MANDIR="${D}/usr/share/man" \
  426.                  INSTALLSTRIP="" \
  427.                  install || die "Failed to install MPlayer!"
  428.         dodoc AUTHORS Changelog README etc/codecs.conf
  429.         # Install the documentation; DOCS is all mixed up not just html
  430.         if use doc ; then
  431.                 find "${S}/DOCS" -type d | xargs -- chmod 0755
  432.                 find "${S}/DOCS" -type f | xargs -- chmod 0644
  433.                 cp -r "${S}/DOCS" "${D}/usr/share/doc/${PF}/" || die "cp docs died"
  434.         fi
  435.         # Copy misc tools to documentation path, as they're not installed directly
  436.         # and yes, we are nuking the +x bit.
  437.         find "${S}/TOOLS" -type d | xargs -- chmod 0755
  438.         find "${S}/TOOLS" -type f | xargs -- chmod 0644
  439.         cp -r "${S}/TOOLS" "${D}/usr/share/doc/${PF}/" || die "cp docs died"
  440.         # Install the default Skin and Gnome menu entry
  441.         if use gtk; then
  442.                 dodir /usr/share/mplayer/skins
  443.                 cp -r "${WORKDIR}/Blue" \
  444.                         "${D}/usr/share/mplayer/skins/default" || die "cp skins died"
  445.                 # Fix the symlink
  446.                 rm -rf "${D}/usr/bin/gmplayer"
  447.                 dosym mplayer /usr/bin/gmplayer
  448.         fi
  449.         if ! use ass && ! use truetype; then
  450.                 dodir /usr/share/mplayer/fonts
  451.                 local x=
  452.                 # Do this generic, as the mplayer people like to change the structure
  453.                 # of their zips ...
  454.                 for x in $(find "${WORKDIR}/" -type d -name 'font-arial-*')
  455.                 do
  456.                         cp -pPR "${x}" "${D}/usr/share/mplayer/fonts"
  457.                 done
  458.                 # Fix the font symlink ...
  459.                 rm -rf "${D}/usr/share/mplayer/font"
  460.                 dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font
  461.         fi
  462.         insinto /etc/mplayer
  463.         newins "${S}/etc/example.conf" mplayer.conf
  464.         if use ass || use truetype;        then
  465.                 cat >> "${D}/etc/mplayer/mplayer.conf" << EOT
  466. fontconfig=1
  467. subfont-osd-scale=4
  468. subfont-text-scale=3
  469. EOT
  470.         fi
  471.         dosym ../../../etc/mplayer/mplayer.conf /usr/share/mplayer/mplayer.conf
  472.         newbin "${S}/TOOLS/midentify.sh" midentify
  473.         insinto /usr/share/mplayer
  474.         doins "${S}/etc/input.conf"
  475.         doins "${S}/etc/menu.conf"
  476. }
  477. pkg_preinst() {
  478.         if [[ -d ${ROOT}/usr/share/mplayer/Skin/default ]]
  479.         then
  480.                 rm -rf "${ROOT}/usr/share/mplayer/Skin/default"
  481.         fi
  482. }
  483. pkg_postrm() {
  484.         # Cleanup stale symlinks
  485.         if [ -L "${ROOT}/usr/share/mplayer/font" -a \
  486.                  ! -e "${ROOT}/usr/share/mplayer/font" ]
  487.         then
  488.                 rm -f "${ROOT}/usr/share/mplayer/font"
  489.         fi
  490.         if [ -L "${ROOT}/usr/share/mplayer/subfont.ttf" -a \
  491.                  ! -e "${ROOT}/usr/share/mplayer/subfont.ttf" ]
  492.         then
  493.                 rm -f "${ROOT}/usr/share/mplayer/subfont.ttf"
  494.         fi
  495. }
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-30 09:46:41 | 显示全部楼层
Post by blackwhite;1931640
rm3版本好像mplayer不直接支持。
如果rm格式对你很重要。你需要用win32-codecs的支持。


win32codecs也被强制-real了,USE里加了也用不了,搜本月有不少人问这个问题有的说可以放rm,也不知道我这是不是个案

前面有兄弟说直接下源码自己编,这不是用惯了portage后懒嘛,以前啥东西都喜欢自己编,PATH LIBPATH什么的都自己设,但一升级碰到有依赖关系或有一堆补丁要打的时候麻烦的很后来也就懒的搞了,要是官方没个合适的解决方案那也只能自己编先用着了
回复 支持 反对

使用道具 举报

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

本版积分规则

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