summaryrefslogtreecommitdiff
blob: e27e32d78d446612b5e1b18c21853571c04cbd56 (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/xwax/xwax-0.4.ebuild,v 1.2 2008/09/15 17:32:52 pvdabeel Exp $

inherit eutils

DESCRIPTION="Digital vinyl emulation software"
HOMEPAGE="http://www.xwax.co.uk/"
SRC_URI="http://www.xwax.co.uk/releases/${P}.tar.gz"

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

DEPEND="media-libs/libsdl
	media-libs/sdl-ttf
	media-fonts/ttf-bitstream-vera
	alsa? ( media-libs/alsa-lib )"

DOCS="README"

src_unpack() {
	unpack ${A}

	cd "${S}"
	# Fix fonts directory in source
	epatch "${FILESDIR}/${P}-fonts.patch"
	# Remove the 'CFLAGS += -Wall -03' line from Makefile
	# Add LDFLAGS to Makefile
	sed -i -e 's:^CFLAGS:#CFLAGS:' \
		-e 's:\($(CC) .* $(DEVICE_LIBS)\):\1 $(LDFLAGS):' \
		Makefile
}

src_compile() {
	econf $(use_enable alsa) || die "econf failed"

	emake || die "emake failed"
}

src_install() {
	# Manually install into ${D}/usr/bin
	exeinto "/usr/bin"

	doexe xwax
	doexe xwax_import
	# Install documentation
	dodoc ${DOCS}
}