summaryrefslogtreecommitdiff
blob: 6db2dbdbb45814febc0b0ffffe6fd07be53a1b28 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/aumix/aumix-2.8-r2.ebuild,v 1.12 2004/11/08 15:27:18 vapier Exp $

inherit eutils

DESCRIPTION="Aumix volume/mixer control program"
HOMEPAGE="http://jpj.net/~trevor/aumix/"
SRC_URI="http://jpj.net/~trevor/aumix/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm hppa ia64 mips ppc ~ppc64 sparc x86"
IUSE="gtk gtk2 gpm nls"

#alsa support is broken in 2.8	alsa? ( >=media-libs/alsa-lib-0.9.0_rc1 )
RDEPEND=">=sys-libs/ncurses-5.2
	gpm? ( >=sys-libs/gpm-1.19.3 )
	gtk? (
		!gtk2? ( =x11-libs/gtk+-1.2* )
		gtk2? ( >=x11-libs/gtk+-2.0.0 )
	)"
DEPEND="${RDEPEND}
	>=sys-apps/portage-2.0.51
	nls? ( sys-devel/gettext )"

src_unpack() {
	unpack ${A}
	cd ${S}
	epatch ${FILESDIR}/${P}-nohome.patch
	epatch ${FILESDIR}/${P}-close-dialogs.patch
	epatch ${FILESDIR}/${P}-save_load.patch
	epatch ${FILESDIR}/${P}-nls.patch
}

src_compile() {
#	`use_with alsa`

	# use_with borks becasue of bad configure script.
	if use gtk; then
		if use gtk2; then
			myconf="${myconf} --without-gtk1";
		else
			myconf="${myconf} --without-gtk";
		fi
	else
		myconf="${myconf} --without-gtk --without-gtk1";
	fi

	if ! use gpm; then
		myconf="${myconf} --without-gpm"
	fi

	econf \
		`use_enable nls` \
		${myconf} || die
	emake || die "make failed"
}

src_install() {
	einstall

	dodoc AUTHORS BUGS ChangeLog NEWS README TODO

	insinto /usr/share/applications
	doins ${FILESDIR}/aumix.desktop

	dodir /usr/share/pixmaps
	ln -s ../aumix/aumix.xpm ${D}/usr/share/pixmaps

	newinitd ${FILESDIR}/aumix.rc6 aumix
}