blob: 78a1f73b568e096d414a3dabc07127a0684c9f8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Authors Bruce Locke <blocke@shivan.org>, Martin Schlemmer <azarah@gentoo.org>
# Donny Davies <woodchip@gentoo.org>
# $Header: /var/cvsroot/gentoo-x86/media-video/mplayer/mplayer-0.18_pre-r1.ebuild,v 1.2 2001/09/28 18:50:23 azarah Exp $
MY_P="MPlayer-0.18pre"
S=${WORKDIR}/${MY_P}?
DESCRIPTION="Media Player for Linux"
SRC_URI="http://mp.dev.hu/MPlayer/releases/${MY_P}.tgz"
HOMEPAGE="http://mplayer.sourceforge.net"
DEPEND="virtual/glibc
dev-lang/nasm
media-libs/win32codecs
opengl? ( media-libs/mesa )
sdl? ( media-libs/libsdl )
ggi? ( media-libs/libggi )
svga? ( media-libs/svgalib )
X? ( virtual/x11 )
esd? ( media-sound/esound )
alsa? ( media-libs/alsa-lib )"
RDEPEND="virtual/glibc
media-libs/win32codecs
opengl? ( media-libs/mesa )
sdl? ( media-libs/libsdl )
ggi? ( media-libs/libggi )
svga? ( media-libs/svgalib )
X? ( virtual/x11 )
esd? ( media-sound/esound )
alsa? ( media-libs/alsa-lib )"
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"
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"
./configure --mandir=/usr/share/man --prefix=/usr --host=${CHOST} ${myconf} || die
make OPTFLAGS="${CFLAGS}" all || die
}
src_install() {
make prefix=${D}/usr/share BINDIR=${D}/usr/bin install || die
mkdir -p ${D}/usr/share/doc/${PF}
cp -a DOCS/* ${D}/usr/share/doc/${PF}
# Install a wrapper for mplayer to handle the codecs.conf
mv ${D}/usr/bin/mplayer ${D}/usr/bin/mplayer-bin
exeinto /usr/bin ; doexe ${FILESDIR}/mplayer
# This tries setting up mplayer.conf automagically
local video="sdl" audio="sdl"
if [ "`use X`" ] ; then
if [ "`use sdl`" ] ; then
video="sdl"
elif [ "`use ggi`" ] ; then
video="ggi"
elif [ "`use opengl`" ] ; then
video="gl"
else
video="x11"
fi
else
if [ "`use fbcon`" ] ; then
video="fbdev"
elif [ "`use svga`" ] ; then
video="svga"
fi
fi
if [ "`use sdl`" ] ; then
audio="sdl"
elif [ "`use alsa`" ] ; then
audio="alsa"
elif [ "`use oss`" ] ; then
audio="oss"
fi
sed -e "s/vo=sdl/vo=${video}/" -e "s/ao=sdl/ao=${audio}/" ${FILESDIR}/mplayer.conf > mplayer.conf
insinto /etc
doins mplayer.conf ${FILESDIR}/codecs.conf
}
|