summaryrefslogtreecommitdiff
blob: 9475e1ac800d7b73c348b3be35c2124368960e2b (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
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/gnustep-apps/cdplayer/cdplayer-0.5-r1.ebuild,v 1.1 2011/04/20 15:35:43 voyageur Exp $

EAPI=4
inherit gnustep-2

S=${WORKDIR}/CDPlayer-${PV}

DESCRIPTION="Small CD Audio Player for GNUstep"
HOMEPAGE="http://gsburn.sf.net"
SRC_URI="mirror://sourceforge/gsburn/${P}.tar.bz2"

KEYWORDS="~amd64 ~x86"
LICENSE="GPL-2"
SLOT="0"

IUSE="preferences +systempreferences"
DEPEND=">=media-libs/libcdaudio-0.7
	preferences? ( gnustep-apps/preferences )
	systempreferences? ( gnustep-apps/systempreferences )
	gnustep-libs/cddb"
RDEPEND="${DEPEND}"

cdplayer_preferences() {
	# SystemPreferences over Preferences
	if use systempreferences; then
		echo "prefs=sysprefs"
	elif use preferences; then
		echo ""
	else
		echo "prefs=no"
	fi
}

src_prepare() {
	# Reserved keyword
	sed -e "s/bool/boolean/" -i Cddb/Cddb.h || die "sed failed"
}

src_compile() {
	egnustep_env
	egnustep_make $(cdplayer_preferences) || die "make failed"
}

src_install() {
	egnustep_env
	egnustep_install $(cdplayer_preferences) || die "install failed"
	egnustep_install_config
}

gnustep_config_script() {
	echo "echo ' * Setting AudioCD device to /dev/cdrom'"
	echo "defaults write AudioCD Devices '(/dev/cdrom)'"
}