diff options
author | Ryan Tolboom <ryan@gentoo.org> | 2001-12-17 00:49:57 +0000 |
---|---|---|
committer | Ryan Tolboom <ryan@gentoo.org> | 2001-12-17 00:49:57 +0000 |
commit | 6b762ebe4055cc590abedb27b28280645fd0c6b5 (patch) | |
tree | 179ab2ef183be84881a2511fee2ed3ae4697b856 /media-video/mplayer | |
parent | Added 21jsse to env.d, moved jars into /usr/share/jsse/lib, so JSSE_HOME works (diff) | |
download | gentoo-2-6b762ebe4055cc590abedb27b28280645fd0c6b5.tar.gz gentoo-2-6b762ebe4055cc590abedb27b28280645fd0c6b5.tar.bz2 gentoo-2-6b762ebe4055cc590abedb27b28280645fd0c6b5.zip |
Added devfs support for mga_vid module
Diffstat (limited to 'media-video/mplayer')
-rw-r--r-- | media-video/mplayer/files/digest-mplayer-0.50-r4 | 3 | ||||
-rw-r--r-- | media-video/mplayer/files/mga_vid_devfs.patch | 64 | ||||
-rw-r--r-- | media-video/mplayer/mplayer-0.50-r4.ebuild | 206 |
3 files changed, 273 insertions, 0 deletions
diff --git a/media-video/mplayer/files/digest-mplayer-0.50-r4 b/media-video/mplayer/files/digest-mplayer-0.50-r4 new file mode 100644 index 000000000000..967415ccb3d1 --- /dev/null +++ b/media-video/mplayer/files/digest-mplayer-0.50-r4 @@ -0,0 +1,3 @@ +MD5 b8c4fc82db0571a237bbed81c602d48c MPlayer-0.50.tar.bz2 1277952 +MD5 6762b5dbae1fc19c4fc505d4ff124f33 default.tar.bz2 167936 +MD5 ab23f8e01a860a97852b28a3b0b118da mp-arial-iso-8859-1.zip 274432 diff --git a/media-video/mplayer/files/mga_vid_devfs.patch b/media-video/mplayer/files/mga_vid_devfs.patch new file mode 100644 index 000000000000..91ee3956b682 --- /dev/null +++ b/media-video/mplayer/files/mga_vid_devfs.patch @@ -0,0 +1,64 @@ +--- mga_vid.c.orig Fri Dec 7 20:15:07 2001 ++++ mga_vid.c Mon Dec 17 00:25:44 2001 +@@ -48,6 +48,10 @@ + #include <asm/mtrr.h> + #endif + ++#ifdef CONFIG_DEVFS_FS ++#include <linux/devfs_fs_kernel.h> ++#endif ++ + #include <asm/uaccess.h> + #include <asm/system.h> + #include <asm/io.h> +@@ -77,6 +81,9 @@ + + MODULE_AUTHOR("Aaron Holtzman <aholtzma@engr.uvic.ca>"); + ++#ifdef CONFIG_DEVFS_FS ++static devfs_handle_t dev_handle = NULL; ++#endif + + typedef struct bes_registers_s + { +@@ -1022,7 +1029,16 @@ + } + } + ++#ifdef CONFIG_DEVFS_FS ++ if ((dev_handle = devfs_register( ++ NULL, ++ "mga_vid", DEVFS_FL_NONE, ++ MGA_VID_MAJOR, 0, ++ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IFCHR, ++ &mga_vid_fops, NULL)) == NULL) ++#else + if(register_chrdev(MGA_VID_MAJOR, "mga_vid", &mga_vid_fops)) ++#endif + { + printk(KERN_ERR "mga_vid: unable to get major: %d\n", MGA_VID_MAJOR); + return -EIO; +@@ -1031,7 +1047,11 @@ + if (!mga_vid_find_card()) + { + printk(KERN_ERR "mga_vid: no supported devices found\n"); ++#ifdef CONFIG_DEVFS_FS ++ devfs_unregister(dev_handle); ++#else + unregister_chrdev(MGA_VID_MAJOR, "mga_vid"); ++#endif + return -EINVAL; + } + +@@ -1056,6 +1076,11 @@ + + //FIXME turn off BES + printk(KERN_INFO "mga_vid: Cleaning up module\n"); ++#ifdef CONFIG_DEVFS_FS ++ devfs_unregister(dev_handle); ++#else + unregister_chrdev(MGA_VID_MAJOR, "mga_vid"); ++#endif ++ + } + diff --git a/media-video/mplayer/mplayer-0.50-r4.ebuild b/media-video/mplayer/mplayer-0.50-r4.ebuild new file mode 100644 index 000000000000..f457dd0d556f --- /dev/null +++ b/media-video/mplayer/mplayer-0.50-r4.ebuild @@ -0,0 +1,206 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Maintainer: Desktop Team <desktop@cvs.gentoo.org> +# Authors Bruce Locke <blocke@shivan.org>, Martin Schlemmer <azarah@gentoo.org> +# /space/gentoo/cvsroot/gentoo-x86/media-video/mplayer/mplayer-0.50-r2.ebuild,v 1.3 2001/11/18 21:45:59 azarah Exp + +# Handle PREversions as well +MY_PV="`echo ${PV} |sed -e 's/_//'`" +S="${WORKDIR}/MPlayer-${MY_PV}" +# Only install Skin if GUI should be build (gtk as USE flag) +SRC_URI="ftp://mplayerhq.hu/MPlayer/releases/MPlayer-${MY_PV}.tar.bz2 + ftp://mplayerhq.hu/MPlayer/releases/mp-arial-iso-8859-1.zip + gtk? ( ftp://mplayerhq.hu/MPlayer/Skin/default.tar.bz2 )" +DESCRIPTION="Media Player for Linux" +HOMEPAGE="http://www.mplayerhq.hu" + +# Experimental USE flags dvd and decss +DEPEND="virtual/glibc + dev-lang/nasm + app-arch/unzip + media-libs/win32codecs + >=media-libs/divx4linux-20011010 + dvd? ( media-libs/libdvdread ) + decss? ( media-libs/libdvdcss ) + opengl? ( virtual/opengl ) + sdl? ( media-libs/libsdl ) + ggi? ( media-libs/libggi ) + svga? ( media-libs/svgalib ) + X? ( virtual/x11 ) + gtk? ( >=x11-libs/gtk+-1.2.10-r4 ) + esd? ( media-sound/esound ) + alsa? ( media-libs/alsa-lib ) + ogg? ( media-libs/libogg )" + +RDEPEND="virtual/glibc + media-libs/win32codecs + >=media-libs/divx4linux-20011010 + dvd? ( media-libs/libdvdread ) + decss? ( media-libs/libdvdcss ) + opengl? ( virtual/opengl ) + sdl? ( media-libs/libsdl ) + ggi? ( media-libs/libggi ) + svga? ( media-libs/svgalib ) + X? ( virtual/x11 ) + gtk? ( >=x11-libs/gtk+-1.2.10-r4 ) + esd? ( media-sound/esound ) + alsa? ( media-libs/alsa-lib ) + ogg? ( media-libs/libogg )" + + +src_unpack() { + + unpack ${A} + + # Fix bug with the default Skin + cd ${WORKDIR}/default + patch <${FILESDIR}/default-skin.diff + + if [ "`use mga`" ] ; then + cd ${S}/drivers; + patch -p0 < ${FILESDIR}/mga_vid_devfs.patch + fi +} + +src_compile() { + + local myconf + use 3dnow || myconf="${myconf} --disable-3dnow --disable-3dnowex" + use mmx || myconf="${myconf} --disable-mmx --disable-mmx2" + use X || myconf="${myconf} --disable-x11 --disable-xv" + # Try to fix bug where build will fail with gtk in USE, but not X + # NB: hope opengl, sdl, ggi build fine ... i will test later. + use gtk && myconf="${myconf} --enable-gui --enable-x11 --enable-xv" + use oss || myconf="${myconf} --disable-ossaudio" + use nls || myconf="${myconf} --disable-nls" + use opengl || myconf="${myconf} --disable-gl" + use sdl || myconf="${myconf} --disable-sdl" + use ggi || myconf="${myconf} --disable-ggi" + use sse || myconf="${myconf} --disable-sse" + use svga || myconf="${myconf} --disable-svga" + use alsa || myconf="${myconf} --disable-alsa" + use esd || myconf="${myconf} --disable-esd" + use ogg || myconf="${myconf} --disable-oggvorbis" + use decss && myconf="${myconf} --enable-css" + use mga && myconf="${myconf} --enable-mga" + + ./configure --host=${CHOST} \ + --prefix=/usr \ + --mandir=/usr/share/man \ + ${myconf} || die + + emake OPTFLAGS="${CFLAGS}" all || die + if [ "`use mga`" ] ; then + cd drivers + emake all + fi +} + +src_install() { + + make prefix=${D}/usr/share \ + BINDIR=${D}/usr/bin \ + mandir=${D}/usr/share/man \ + install || die + + # MAN pages are already installed ... + rm DOCS/*.1 + # Install the rest of the documentation + dodir /usr/share/doc/${PF} + cp -a DOCS/* ${D}/usr/share/doc/${PF} + doalldocs + + # Install the default Skin + if [ "`use gtk`" ] ; then + + insinto /usr/share/mplayer/Skin/default + doins ${WORKDIR}/default/* + + # Permissions is fried by default + chmod a+rx ${D}/usr/share/mplayer/Skin/default/ + chmod a+r ${D}/usr/share/mplayer/Skin/default/* + fi + + # Install the font used by OSD and the GUI + dodir /usr/share/mplayer/fonts + cp -a ${WORKDIR}/iso-8859-1/ ${D}/usr/share/mplayer/fonts + dosym /usr/share/mplayer/fonts/iso-8859-1/arial-14/ /usr/share/mplayer/font + + # This tries setting up mplayer.conf automagically + local video="sdl" audio="sdl" + if [ "`use X`" ] ; then + if [ "`use gtk`" ] ; then + video="xv" + elif [ "`use sdl`" ] ; then + video="sdl" + elif [ "`use xv`" ] ; then + video="xv" + elif [ "`use opengl`" ] ; then + video="gl" + elif [ "`use ggi`" ] ; then + video="ggi" + elif [ "`use dga`" ] ; then + video="dga" + else + video="x11" + fi + else + if [ "`use fbcon`" ] ; then + video="fbdev" + elif [ "`use svga`" ] ; then + video="svga" + elif [ "`use aalib`" ] ; then + video="aa" + fi + fi + if [ "`use sdl`" ] ; then + audio="sdl" + elif [ "`use alsa`" ] ; then + audio="alsa" + elif [ "`use oss`" ] ; then + audio="oss" + fi + + # Note to myself: do not change " into ' + sed -e "s/vo=xv/vo=${video}/" \ + -e "s/ao=oss/ao=${audio}/" \ + -e 's/include =/#include =/' \ + ${S}/etc/example.conf > ${T}/mplayer.conf + + insinto /etc + doins ${T}/mplayer.conf + + # Thanks goes to Mog for this one! + insinto /usr/share/mplayer + doins ${S}/etc/codecs.conf + + if [ "`use mga`" ] ; then + dodir /lib/modules/${KVERS}/kernel/drivers/char + cp drivers/mga_vid.o ${D}/lib/modules/${KVERS}/kernel/drivers/char + fi +} + +pkg_postinst() { + + echo + echo '######################################################################' + echo '# MPlayer users that are going to use the GUI, please note the #' + echo '# following: #' + echo '# #' + echo '# The GUI works best with mplayer -vo xv -gui, but since there is #' + echo '# no USE flag for XVideo, or for using the GUI, the autodetection #' + echo '# process cannot detect this by default (SDL will be used rather). #' + echo '# So, if your setup supports XVideo (xvinfo should give output), #' + echo '# maybe do something like: #' + echo '# #' + echo '# echo "vo = xv" >~/.mplayer/config #' + echo '# echo "gui = 1" >>~/.mplayer/config #' + echo '# #' + echo '# after launching mplayer for the first time. #' + echo '# #' + echo '# NB: the GUI needs "gtk" as USE flag to build. #' + echo '######################################################################' + echo + depmod -a +} + |