LinuxSir.cn,穿越时空的Linuxsir!

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

教主进来,mplayer(中文portage)

[复制链接]
发表于 2004-10-19 17:50:43 | 显示全部楼层 |阅读模式
[PHP] * Make install completed
doc
gtk
QA Notice: USE Flag 'gnome' not in IUSE for media-video/mplayer-1.0_pre5-r4
gnome
glc
ACCESS DENIED  mkdir:     /usr/share/mplayer/font
cp: cannot create directory `/usr/share/mplayer/font/': Permission denied
gtk
ACCESS DENIED  mkdir:     /usr/share/mplayer/Skin/OSX-Mod
cp: cannot create directory `/usr/share/mplayer/Skin/OSX-Mod': Permission deniedACCESS DENIED  open_wr:   /usr/share/mplayer/gui.conf
cp: cannot create regular file `/usr/share/mplayer/gui.conf': Permission denied
man:
gzipping man page: mplayer.1
fixing man page symlink: mencoder.1.gz
removing old symlink: mencoder.1
prepallstrip:
strip:
strip:
   usr/bin/mplayer
   usr/bin/mencoder
   usr/lib/libdha.so.1.0
   usr/lib/mplayer/vidix/rage128_vid.so
   usr/lib/mplayer/vidix/pm3_vid.so
   usr/lib/mplayer/vidix/mga_crtc2_vid.so
   usr/lib/mplayer/vidix/sis_vid.so
   usr/lib/mplayer/vidix/radeon_vid.so
   usr/lib/mplayer/vidix/nvidia_vid.so
   usr/lib/mplayer/vidix/mach64_vid.so
   usr/lib/mplayer/vidix/mga_vid.so
   usr/lib/mplayer/vidix/cyberblade_vid.so
making executable: /usr/lib/libdha.so.1.0
>>> Completed installing into /var/tmp/portage/mplayer-1.0_pre5-r4/image/

--------------------------- ACCESS VIOLATION SUMMARY ---------------------------LOG FILE = "/tmp/sandbox-media-video_-_mplayer-1.0_pre5-r4-30328.log"

mkdir:     /usr/share/mplayer/font
mkdir:     /usr/share/mplayer/Skin/OSX-Mod
open_wr:   /usr/share/mplayer/gui.conf
--------------------------------------------------------------------------------[/PHP]

第一次失败后,我把原来的mplayer给emerge -C之后重新安装,还是这个问题。

PS: /usr/share/mplayer/font是链接到 /usr/share/mplayer/fonts/下的一个文件夹中去的,是不是应该改成 /usr/share/mplayer/fonts呢?
望教主斟酌……

发表于 2004-10-19 17:57:35 | 显示全部楼层
我也正想发帖报告呢
发表于 2004-10-19 18:04:48 | 显示全部楼层
我先看看~~
发表于 2004-10-19 18:20:05 | 显示全部楼层
修正后的ebuild.

  1. # Copyright 1999-2004 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_pre5-r4.ebuild,v 1.4 2004/09/28 18:01:00 eradicator Exp $

  4. inherit eutils flag-o-matic kmod

  5. IUSE="3dfx 3dnow 3dnowex aalib alsa altivec arts bidi debug divx4linux doc dvb cdparanoia directfb dvd dvdread edl encode esd fbcon gif ggi gtk i8x0 ipv6 jack joystick jpeg libcaca lirc live lzo mad matroska matrox mpeg mmx mmx2 mythtv nas network nls nvidia oggvorbis opengl oss png rtc samba sdl sse sse2 svga tga theora truetype v4l v4l2 X xinerama xmms xv xvid xvmc glc gnome"

  6. BLUV=1.4
  7. SVGV=1.9.17

  8. # Handle PREversions as well
  9. MY_PV="${PV/_/}"
  10. S="${WORKDIR}/MPlayer-${MY_PV}"
  11. SRC_URI="mirror://mplayer/MPlayer/releases/MPlayer-${MY_PV}.tar.bz2
  12.         mirror://mplayer/releases/fonts/font-arial-iso-8859-1.tar.bz2
  13.         mirror://mplayer/releases/fonts/font-arial-iso-8859-2.tar.bz2
  14.         mirror://gentoo/${P}-alsa-gui.patch.tar.bz2
  15.         svga? ( [url]http://mplayerhq.hu/~alex/svgalib_helper-[/url]${SVGV}-mplayer.tar.bz2 )
  16.         gtk? ( mirror://mplayer/Skin/Blue-${BLUV}.tar.bz2 )
  17.         gtk? ( [url]http://www1.mplayerhq.hu/MPlayer/Skin/OSX-Mod-1.1.tar.bz2[/url] )
  18.         glc? ( [url]http://www1.mplayerhq.hu/MPlayer/contrib/fonts/chinesefonts/gb2312-kai.tar.bz2[/url] )"

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

  22. # 'encode' in USE for MEncoder.
  23. RDEPEND="xvid? ( >=media-libs/xvid-0.9.0 )
  24.         x86? (
  25.                 divx4linux? (  >=media-libs/divx4linux-20030428 )
  26.                 >=media-libs/win32codecs-0.60               
  27.                 )
  28.         aalib? ( media-libs/aalib )
  29.         alsa? ( media-libs/alsa-lib )
  30.         arts? ( kde-base/arts )
  31.         bidi? ( dev-libs/fribidi )
  32.         cdparanoia? ( media-sound/cdparanoia )
  33.         directfb? ( dev-libs/DirectFB )
  34.         dvd? ( dvdread? ( media-libs/libdvdread ) )
  35.         encode? (
  36.                 media-sound/lame
  37.                 >=media-libs/libdv-0.9.5
  38.                 )
  39.         esd? ( media-sound/esound )
  40.         gif? ( media-libs/giflib
  41.                 media-libs/libungif )
  42.         ggi? ( media-libs/libggi )
  43.         gtk? (
  44.                 media-libs/libpng
  45.                 virtual/x11
  46.                 =x11-libs/gtk+-1.2*
  47.                 =dev-libs/glib-1.2*
  48.                 )
  49.         jpeg? ( media-libs/jpeg )
  50.         libcaca? ( media-libs/libcaca )
  51.         lirc? ( app-misc/lirc )
  52.         lzo? ( dev-libs/lzo )
  53.         mad? ( media-libs/libmad )
  54.         matroska? ( >=media-libs/libmatroska-0.7.0 )
  55.         mpeg? ( media-libs/faad2 )
  56.         nas? ( media-libs/nas )
  57.         nls? ( sys-devel/gettext )
  58.         oggvorbis? ( media-libs/libvorbis )
  59.         opengl? ( virtual/opengl )
  60.         png? ( media-libs/libpng )
  61.         samba? ( >=net-fs/samba-2.2.8a )
  62.         sdl? ( media-libs/libsdl )
  63.         svga? ( media-libs/svgalib )
  64.         !ia64? (
  65.                 theora? ( media-libs/libtheora )
  66.                 live? ( >=media-plugins/live-2004.07.20 )
  67.                 )
  68.         truetype? ( >=media-libs/freetype-2.1 )
  69.         xinerama? ( virtual/x11 )
  70.         jack? ( >=media-libs/bio2jack-0.3-r1 )
  71.         xmms? ( media-sound/xmms )
  72.         >=sys-apps/portage-2.0.36"

  73. DEPEND="${RDEPEND}
  74.         x86? ( dev-lang/nasm )
  75.         app-arch/unzip"

  76. SLOT="0"
  77. LICENSE="GPL-2"
  78. KEYWORDS="~x86 ~ppc ~alpha ~amd64 ~ia64 ~hppa ~sparc"

  79. src_unpack() {

  80.         unpack MPlayer-${MY_PV}.tar.bz2 \
  81.                 font-arial-iso-8859-1.tar.bz2 font-arial-iso-8859-2.tar.bz2

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

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

  84.         #Gentoo Linux Chinese Portage Group
  85.         #[url]http://gentoo.linuxsir.cn[/url]
  86.         if use glc; then
  87.                 # chinese fonts by default.
  88.                 unpack gb2312-kai.tar.bz2
  89.                 # use OSX skin by default.
  90.                 unpack OSX-Mod-1.1.tar.bz2
  91.         fi

  92.         cd ${S}

  93.         # Custom CFLAGS
  94.         epatch ${FILESDIR}/${P}-configure.patch
  95.         sed -e 's:CFLAGS="custom":CFLAGS=${CFLAGS}:' -i configure

  96.         if use !network; then
  97.                 einfo "Please note, a new network USE flag was added for users"
  98.                 einfo "with networkless installs.  If you use mplayer for streaming"
  99.                 einfo "media, please enable the network USE flag or it will not work!"
  100.                 einfo
  101.         fi

  102.         # Fix head/tail call for new coreutils
  103.         epatch ${FILESDIR}/${PN}-0.90-coreutils-fixup.patch

  104.         #bug #49669, horrid syntax errors in help/help_mp-ro.h       
  105.         epatch ${FILESDIR}/mplayer-1.0_pre4-help_mp-ro.h.patch

  106.         #adds mythtv support to mplayer
  107.         use mythtv && epatch ${FILESDIR}/mplayer-mythtv.patch

  108.         # GCC 3.4 fixes
  109.         epatch ${FILESDIR}/mplayer-1.0_pre4-alsa-gcc34.patch

  110.         #Workaround for the altivec softscaler issues
  111.         epatch ${FILESDIR}/mplayer-1.0_pre5-yuv2rbg_kludge.patch

  112.         #bug #55936, eradicator's cachefill patch.
  113.         epatch ${FILESDIR}/cachefill.patch

  114.         #bug #58082.  Fixes LANGUAGE variable issues
  115.         epatch ${FILESDIR}/mplayer-1.0_pre5-r1-conf_locale.patch

  116.         #fixes recent api changes to the latest live
  117.         use live && epatch ${FILESDIR}/${P}-live.patch

  118.         #mplayer gui uses oss all the time.
  119.         #this patch enables true alsa output in
  120.         #gmplayer.  Fixes Bug #58619.
  121.         use alsa && epatch ${DISTDIR}/${P}-alsa-gui.patch.tar.bz2
  122.        
  123.         #Gentoo Linux Chinese Portage Group
  124.         #[url]http://gentoo.linuxsir.cn[/url]
  125.         epatch ${FILESDIR}/mplayer-1.0pr5-mms.patch

  126.         #Setup the matrox makefile
  127.         if use matrox; then
  128.                 get_kernel_info
  129.                 epatch ${FILESDIR}/${P}-mga-kernel-2.6.patch
  130.                 sed -i -e \
  131.                 "s:^#KERNEL_OUTPUT_PATH=: \
  132.                 KERNEL_OUTPUT_PATH =${KV_OUTPUT}:" \
  133.                 ${S}/Makefile
  134.         fi # end of matrox related stuff

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

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

  144.                 mv ${WORKDIR}/svgalib_helper ${S}/libdha
  145.         fi

  146.         # Remove kernel-2.6 workaround as the problem it works around is
  147.         # fixed, and the workaround breaks sparc
  148.         use sparc && sed -i 's:#define __KERNEL__::' osdep/kerneltwosix.h
  149.         # Doesn't break if bio2jack is in
  150.         epatch ${FILESDIR}/${P}-bio2jack.patch
  151. }

  152. src_compile() {

  153.         filter-flags -fPIE -fPIC

  154.         local myconf=
  155.         ################
  156.         #Optional features#
  157.         ###############
  158.         myconf="${myconf} $(use_enable bidi fribidi)"
  159.         myconf="${myconf} $(use_enable cdparanoia)"
  160.         if use dvd; then
  161.                 myconf="${myconf} $(use_enable dvdread) $(use_enable !dvdread mpdvdkit)"
  162.         else
  163.                 myconf="${myconf} --disable-dvdread --disable-mpdvdkit"
  164.         fi
  165.         myconf="${myconf} $(use_enable edl)"
  166.         myconf="${myconf} $(use_enable encode mencoder)"
  167.         myconf="${myconf} $(use_enable gtk gui)"

  168.         if use !gtk && use !X && use !xv && use !xinerama; then
  169.                 myconf="${myconf} --disable-gui --disable-x11 --disable-xv --disable-xmga --disable-xinerama --disable-vm --disable-xvmc"
  170.         else
  171.                 #note we ain't touching --enable-vm.  That should be locked down in the future.
  172.                 myconf="${myconf} --enable-x11 $(use_enable xinerama) $(use_enable xv) $(use_enable gtk gui)"
  173.         fi

  174.         # disable png *only* if gtk && png aren't on
  175.         if use png || use gtk; then
  176.                 myconf="${myconf} --enable-png"
  177.         else
  178.                 myconf="${myconf} --disable-png"
  179.         fi
  180.         myconf="${myconf} $(use_enable ipv6 inet6)"
  181.         myconf="${myconf} $(use_enable joystick)"
  182.         myconf="${myconf} $(use_enable lirc)"
  183.         if use ia64 || use !network; then
  184.                 myconf="${myconf} --disable-live"
  185.         else
  186.                 myconf="${myconf} $(use_enable live)"
  187.         fi
  188.         myconf="${myconf} $(use_enable network) $(use_enable network ftp)"
  189.         myconf="${myconf} $(use_enable rtc)"
  190.         myconf="${myconf} $(use_enable samba smb)"
  191.         myconf="${myconf} $(use_enable truetype freetype)"
  192.         myconf="${myconf} $(use_enable v4l tv-v4l)"
  193.         myconf="${myconf} $(use_enable v4l2 tv-v4l2)"
  194.         myconf="${myconf} $(use_enable jack)"

  195.         #########
  196.         # Codecs #
  197.         ########
  198.         myconf="${myconf} $(use_enable divx4linux)"
  199.         myconf="${myconf} $(use_enable gif)"
  200.         myconf="${myconf} $(use_enable jpeg)"
  201.         myconf="${myconf} $(use_enable lzo liblzo)"
  202.         myconf="${myconf} $(use_enable matroska external-matroska) $(use_enable !matroska internal-matroska)"
  203.         myconf="${myconf} $(use_enable mpeg external-faad) $(use_enable !mpeg internal-faad)"
  204.         myconf="${myconf} $(use_enable oggvorbis vorbis)"
  205.         if use ia64; then
  206.                 myconf="${myconf} --disable-theora"
  207.         else
  208.                 myconf="${myconf} $(use_enable theora)"
  209.         fi
  210.         myconf="${myconf} $(use_enable xmms)"
  211.         myconf="${myconf} $(use_enable xvid)"

  212.         #############
  213.         # Video Output #
  214.         #############
  215.         myconf="${myconf} $(use_enable 3dfx)"
  216.         if use xvid && use 3dfx; then
  217.                 myconf="${myconf} --enable-tdfxvid"
  218.         else
  219.                 myconf="${myconf} --disable-tdfxvid"
  220.         fi
  221.         if use fbcon && use 3dfx; then
  222.                 myconf="${myconf} --enable-tdfxfb"
  223.         else
  224.                 myconf="${myconf} --disable-tdfxfb"
  225.         fi
  226.         myconf="${myconf} $(use_enable aalib aa)"
  227.         myconf="${myconf} $(use_enable directfb)"
  228.         myconf="${myconf} $(use_enable dvb)"
  229.         myconf="${myconf} $(use_enable fbcon fbdev)"
  230.         myconf="${myconf} $(use_enable ggi)"
  231.         myconf="${myconf} $(use_enable libcaca caca)"
  232.         if use matrox && use X; then
  233.                 myconf="${myconf} $(use_enable matrox xmga)"
  234.         fi
  235.         myconf="${myconf} $(use_enable opengl gl)"
  236.         myconf="${myconf} $(use_enable sdl)"
  237.         myconf="${myconf} $(use_enable svga)"
  238.         myconf="${myconf} $(use_enable tga)"

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

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

  243.         ( use xvmc && use nvidia && use i8x0 ) \
  244.                 && {
  245.                         eerror "Invalid combination of USE flags"
  246.                         eerror "When building support for xvmc, you may only"
  247.                         eerror "include support for one video card:"
  248.                         eerror "   nvidia, i8x0"
  249.                         eerror ""
  250.                         eerror "Emerge again with different USE flags"

  251.                         exit 1
  252.                 }

  253.         ( use xvmc && ! use nvidia && ! use i8x0 ) && {
  254.                 ewarn "You tried to build with xvmc support."
  255.                 ewarn "No supported graphics hardware was specified."
  256.                 ewarn ""
  257.                 ewarn "No xvmc support will be included."
  258.                 ewarn "Please one appropriate USE flag and re-emerge:"
  259.                 ewarn "   nvidia or i8x0"

  260.                 myconf="${myconf} --disable-xvmc"
  261.         }

  262.         #############
  263.         # Audio Output #
  264.         #############
  265.         myconf="${myconf} $(use_enable alsa)"
  266.         myconf="${myconf} $(use_enable arts)"
  267.         myconf="${myconf} $(use_enable esd)"
  268.         myconf="${myconf} $(use_enable mad)"
  269.         myconf="${myconf} $(use_enable nas)"
  270.         myconf="${myconf} $(use_enable oss ossaudio)"

  271.         #################
  272.         # Advanced Options #
  273.         #################
  274.         myconf="${myconf} $(use_enable 3dnow)"
  275.         myconf="${myconf} $(use_enable 3dnowex)";
  276.         myconf="${myconf} $(use_enable sse)"
  277.         myconf="${myconf} $(use_enable sse2)";
  278.         myconf="${myconf} $(use_enable mmx)"
  279.         myconf="${myconf} $(use_enable mmx2)"
  280.         myconf="${myconf} $(use_enable 3dnow)"
  281.         myconf="${myconf} $(use_enable altivec)"
  282.         myconf="${myconf} $(use_enable debug)"
  283.         myconf="${myconf} $(use_enable nls i18n)"

  284.         if [ -d /opt/RealPlayer9/Real/Codecs ]
  285.         then
  286.                 einfo "Setting REALLIBDIR to /opt/RealPlayer9/Real/Codecs..."
  287.                 REALLIBDIR="/opt/RealPlayer9/Real/Codecs"
  288.         elif [ -d /opt/RealPlayer8/Codecs ]
  289.         then
  290.                 einfo "Setting REALLIBDIR to /opt/RealPlayer8/Codecs..."
  291.                 REALLIBDIR="/opt/RealPlayer8/Codecs"
  292.         else
  293.                 REALLIBDIR="/usr/lib/real"
  294.         fi

  295.         if [ -e /dev/.devfsd ]
  296.         then
  297.                 myconf="${myconf} --enable-linux-devfs"
  298.         fi

  299.         # Build the matrox driver before mplayer configuration.
  300.         # That way the configure script sees it and builds the support
  301.         #build the matrox driver before the
  302.         if use matrox ; then
  303.                 if use x86 ; then
  304.                         check_KV
  305.                         cd ${S}/drivers
  306.                         # bad hack, will be fixed later
  307.                         addwrite /usr/src/linux/
  308.                         unset ARCH
  309.                         make all || die "Matrox build failed!  Your kernel may need to have `make mrproper` run on it before trying to use matrox support in this ebuild again."
  310.                         cd ${S}
  311.                 else
  312.                         einfo "Not building matrox driver.  It doesn't seem to like other archs.  Please let me know at [email]chriswhite@gentoo.org[/email] if you find out otherwise."
  313.                 fi
  314.         fi

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

  319.         #Gentoo Linux Chinese Portage
  320.         #[url]http://gentoo.linuxsir.cn[/url]
  321.         # enable chinese menu by default.
  322.         use glc && test -z $LINGUAS && export LINGUAS="zh_CN"

  323.         ./configure --prefix=/usr \
  324.                 --confdir=/usr/share/mplayer \
  325.                 --datadir=/usr/share/mplayer \
  326.                 --disable-runtime-cpudetection \
  327.                 --enable-largefiles \
  328.                 --enable-menu \
  329.                 --enable-real \
  330.                 --with-reallibdir=${REALLIBDIR} \
  331.                 --with-x11incdir=/usr/X11R6/include \
  332.                 ${myconf} || die

  333.         # when gif is autodetected, GIF_LIB is set correctly.  We're explicitly controlling it, and it doesn't behave correctly.
  334.         # so... we have to help it along.
  335.         if use gif; then
  336.                 sed -e "s:GIF_LIB =:GIF_LIB = -lungif:" -i config.mak
  337.         fi

  338.         einfo "Make"

  339.         make all || die "Failed to build MPlayer!"
  340.         einfo "Make completed"

  341.         # We build the shared libpostproc.so here so that our
  342.         # mplayer binary is not linked to it, ensuring that we
  343.         # do not run into issues ... (bug #14479)
  344.         cd ${S}/libavcodec/libpostproc
  345.         make SHARED_PP="yes" || die "Failed to build libpostproc.so!"
  346. }

  347. src_install() {

  348.         einfo "Make install"
  349.         make prefix=${D}/usr \
  350.              BINDIR=${D}/usr/bin \
  351.                  LIBDIR=${D}/usr/lib \
  352.              CONFDIR=${D}/usr/share/mplayer \
  353.              DATADIR=${D}/usr/share/mplayer \
  354.              MANDIR=${D}/usr/share/man \
  355.              install || die "Failed to install MPlayer!"
  356.         einfo "Make install completed"

  357.         if use matrox; then
  358.                 cd ${S}/drivers
  359.                 insinto /lib/modules/${KV}/kernel/drivers/char
  360.                 doins mga_vid.${KV_OBJ}
  361.         fi

  362.         dodoc AUTHORS ChangeLog README
  363.         # Install the documentation; DOCS is all mixed up not just html
  364.         if use doc ; then
  365.                 find "${S}/DOCS" -type d | xargs -- chmod 0755
  366.                 find "${S}/DOCS" -type f | xargs -- chmod 0644
  367.                 cp -r "${S}/DOCS" "${D}/usr/share/doc/${PF}/" || die
  368.         fi

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

  374.         # Install the default Skin and Gnome menu entry
  375.         if use gtk; then
  376.                 dodir /usr/share/mplayer/Skin
  377.                 cp -r ${WORKDIR}/Blue ${D}/usr/share/mplayer/Skin/default || die

  378.                 # Fix the symlink
  379.                 rm -rf ${D}/usr/bin/gmplayer
  380.                 dosym mplayer /usr/bin/gmplayer
  381.         fi

  382.         if use gnome; then
  383.                 insinto /usr/share/pixmaps
  384.                 newins ${S}/Gui/mplayer/pixmaps/logo.xpm mplayer.xpm
  385.                 insinto /usr/share/gnome/apps/Multimedia
  386.                 doins ${FILESDIR}/mplayer.desktop
  387.         fi

  388.         dodir /usr/share/mplayer/fonts
  389.         local x=
  390.         # Do this generic, as the mplayer people like to change the structure
  391.         # of their zips ...
  392.         for x in $(find ${WORKDIR}/ -type d -name 'font-arial-??-iso-*')
  393.         do
  394.                 cp -Rd ${x} ${D}/usr/share/mplayer/fonts
  395.         done
  396.         # Fix the font symlink ...
  397.         rm -rf ${D}/usr/share/mplayer/font
  398.         dosym fonts/font-arial-14-iso-8859-1 /usr/share/mplayer/font

  399.         #Gentoo Linux Chinese Portage
  400.         #[url]http://gentoo.linuxsir.cn[/url]
  401.         if use glc
  402.         then
  403.                 # install chinese fonts.
  404.                         dodir /usr/share/mplayer/font/
  405.                 cp -a ${WORKDIR}/gb2312-kai/gkai00mp24 ${D}/usr/share/mplayer/font/
  406.                 # install Quicktime-like Skin.
  407.                 use gtk && cp -a ${WORKDIR}/OSX-Mod ${D}/usr/share/mplayer/Skin/
  408.                         # install gui configuration.
  409.                         cp ${FILESDIR}/gui.conf ${D}/usr/share/mplayer/
  410.         fi
  411.        
  412.         insinto /etc
  413.         newins ${S}/etc/example.conf mplayer.conf
  414.         dosed -e 's/include =/#include =/' /etc/mplayer.conf
  415.         dosed -e 's/fs=yes/fs=no/' /etc/mplayer.conf
  416.         dosym ../../../etc/mplayer.conf /usr/share/mplayer/mplayer.conf

  417.         insinto /usr/share/mplayer
  418.         doins ${S}/etc/codecs.conf
  419.         doins ${S}/etc/input.conf
  420.         doins ${S}/etc/menu.conf
  421. }

  422. pkg_preinst() {

  423.         if [ -d "${ROOT}/usr/share/mplayer/Skin/default" ]
  424.         then
  425.                 rm -rf ${ROOT}/usr/share/mplayer/Skin/default
  426.         fi
  427. }

  428. pkg_postinst() {

  429.         if use ppc
  430.         then
  431.                 echo
  432.                 einfo "When you see only GREEN salad on your G4 while playing"
  433.                 einfo "a DivX, you should recompile _without_ altivec enabled."
  434.                 einfo "Further information: [url]http://bugs.gentoo.org/show_bug.cgi?id=18511[/url]"
  435.                 echo
  436.                 einfo "If everything functions fine with watching DivX and"
  437.                 einfo "altivec enabled, please drop a comment on the mentioned bug!"
  438.                 echo
  439.                 einfo "libpostproc is no longer installed by mplayer. If you have an"
  440.                 einfo "application that depends on it, install >=ffmpeg-0.4.8.20040222"
  441.         fi

  442.         if use matrox; then
  443.                 depmod -a &>/dev/null || :
  444.         fi
  445.         if use glc; then
  446.                 echo
  447.                 einfo "To active glc's configuration with gmplayer, copy /usr/share/mplayer/gui.conf"
  448.                 einfo "to <your home dir>/.mplayer. It's important."
  449.         fi
  450. }

  451. pkg_postrm() {

  452.         # Cleanup stale symlinks
  453.         if [ -L ${ROOT}/usr/share/mplayer/font -a \
  454.              ! -e ${ROOT}/usr/share/mplayer/font ]
  455.         then
  456.                 rm -f ${ROOT}/usr/share/mplayer/font
  457.         fi

  458. if [ -L ${ROOT}/usr/share/mplayer/subfont.ttf -a \
  459.       ! -e ${ROOT}/usr/share/mplayer/subfont.ttf ]
  460. then
  461.   rm -f ${ROOT}/usr/share/mplayer/subfont.ttf
  462. fi
  463. }


复制代码
发表于 2004-10-19 18:23:51 | 显示全部楼层
放到附件里了, 改一下名覆盖原来的文件就可以了。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2004-10-19 22:11:59 | 显示全部楼层
终于装好了,但srt格式的中文字幕还是显示不了阿,只有一条横线:confused: :confused: :confused:
发表于 2004-10-19 22:18:49 | 显示全部楼层
最初由 whblackhorse 发表
终于装好了,但srt格式的中文字幕还是显示不了阿,只有一条横线:confused: :confused: :confused:

cp /usr/share/mplayer/gui.conf ~/.mplayer/

ps:要注意post-install的信息。
发表于 2004-10-20 12:57:13 | 显示全部楼层
还要注意的是,修改mplayer的设置后,最好重启mplayer一两次使修改生效。
发表于 2004-10-21 13:09:05 | 显示全部楼层
cp /usr/share/mplayer/gui.conf ~/.mplayer/
后可以加载srt的字幕了, 可是大部分的中文都显示“靠”,这是怎么回事?
发表于 2004-10-21 13:10:59 | 显示全部楼层
cp /usr/share/mplayer/gui.conf ~/.mplayer/
后可以加载srt的字幕了, 可是大部分的中文都显示“靠”,这是怎么回事?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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