blob: bd8845392d5cc1302ffb6001202946d52aa4d83a (
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
93
94
95
96
97
98
99
100
101
102
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/mpg123/mpg123-1.8.1.ebuild,v 1.6 2009/08/01 16:16:51 jer Exp $
EAPI=2
DESCRIPTION="a realtime MPEG 1.0/2.0/2.5 audio player for layers 1, 2 and 3."
HOMEPAGE="http://www.mpg123.org"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
http://www.mpg123.org/download/${P}.tar.bz2"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~mips ppc ~ppc64 ~sparc x86 ~x86-fbsd"
IUSE="3dnow 3dnowext +alsa altivec ipv6 jack +mmx nas +network oss portaudio pulseaudio
sdl +sse"
RDEPEND="alsa? ( media-libs/alsa-lib )
jack? ( media-sound/jack-audio-connection-kit )
nas? ( media-libs/nas )
portaudio? ( media-libs/portaudio )
pulseaudio? ( media-sound/pulseaudio )
sdl? ( media-libs/libsdl )
!media-sound/mpg321[symlink]"
DEPEND="${RDEPEND}
dev-util/pkgconfig"
pkg_setup() {
# Make sure there is no mpg123 symlink left
local link="${ROOT}usr/bin/mpg123"
local msg="Removing invalid symlink ${link}"
if [ -L "${link}" ] && [ ! -x "${link}" ]; then
ebegin "${msg}"
rm -f "${link}" || die "${msg} failed, please open a bug."
eend $?
fi
}
src_prepare() {
sed -i -e 's:-faltivec::' configure || die "sed failed"
}
src_configure() {
# Audio outputs
local myaudio=dummy
local mydaudio=dummy
use nas && myaudio+=" nas" mydaudio=nas
use portaudio && myaudio+=" portaudio" mydaudio=portaudio
use sdl && myaudio+=" sdl" mydaudio=sdl
use oss && myaudio+=" oss" mydaudio=oss
use jack && myaudio+=" jack" mydaudio=jack
use alsa && myaudio+=" alsa" mydaudio=alsa
use pulseaudio && myaudio+=" pulse" mydaudio=pulse
# You only need to comment out the _dither part to
# enable default settings. In case you have probs.
local dither=_dither
local mcpu=generic${dither}
local int=no
use altivec && mcpu=altivec
if use amd64; then
use mmx && mcpu=x86-64
use 3dnow && mcpu=x86-64
use sse && mcpu=x86-64${dither} int=yes
use 3dnowext && mcpu=x86-64${dither} int=yes
fi
if use x86; then
mcpu=i586${dither}
use mmx && mcpu=mmx
use 3dnow && mcpu=3dnow
use sse && mcpu=sse int=yes
use 3dnowext && mcpu=3dnowext int=yes
use sse && use 3dnowext && mcpu=x86${dither} int=yes
fi
local myconf
use network && myconf+=" $(use_enable ipv6)"
econf \
--disable-dependency-tracking \
--disable-ipv6 \
--with-optimization=0 \
--with-audio="${myaudio}" \
--with-default-audio=${mydaudio} \
--with-cpu=${mcpu} \
$(use_enable network) \
--enable-int-quality=${int} \
${myconf}
einfo "Optimizing with ${mcpu} and int quality set to ${int}."
}
src_install() {
emake DESTDIR="${D}" install || die "emake install failed"
dodoc AUTHORS ChangeLog NEWS* README
}
|