summaryrefslogtreecommitdiff
blob: 7ed4712454e2cf092c79b7ba64ca34c659b9f8fd (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/sexypsf/sexypsf-0.4.7.ebuild,v 1.9 2006/11/03 21:25:21 opfer Exp $

inherit eutils flag-o-matic

DESCRIPTION="sexyPSF is an open-source PSF1 (Playstation music) file player"
HOMEPAGE="http://projects.raphnet.net/#sexypsf"
SRC_URI="http://projects.raphnet.net/sexypsf/${P}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"

#-sparc: 0.4.5: Couldn't load minispf
KEYWORDS="~amd64 ppc -sparc x86"
IUSE=""

DEPEND="sys-libs/zlib"

S=${WORKDIR}/${PN}

src_unpack() {
	unpack ${A}
	cd "${S}"
	epatch "${FILESDIR}"/${P}-misc.patch

	# ppc and sparc are big-endian while all other keywords are
	# little-endian (as far as I know)
	use ppc64 || use ppc || use sparc &&
	sed -i -e "s:-D__LINUX__:& -DMSB_FIRST:" "${S}"/Linux/Makefile
	# what about using the correct macro and avoid to cause severe damages to
	# innocent ears?
	sed -i -e "s:AFMT_S16_LE:AFMT_S16_NE:" "${S}"/Linux/oss.c
}

src_compile() {
	cd "${S}"/Linux
	emake || die "emake failed"
}

src_install() {
	dobin Linux/sexypsf
	dodoc Docs/*
}