summaryrefslogtreecommitdiff
blob: 1e433d6eddfb39e3493ea2a44cf9de5ef8c8feab (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-sound/sexypsf/sexypsf-0.4.5.ebuild,v 1.5 2004/07/20 01:02:18 eradicator Exp $

inherit eutils

DESCRIPTION="sexyPSF is an open-source PSF (Playstation music) file player"

MY_P="${PN}${PV//./}"
HOMEPAGE="http://xodnizel.net/${PN}/"
SRC_URI="http://xodnizel.net/${PN}/${MY_P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
IUSE="xmms"
#-amd64: 0.4.5: Segfault on playback using sexypsf.
#-sparc: 0.4.5: Couldn't load minispf
KEYWORDS="x86 ~ppc -amd64 -sparc"

DEPEND="sys-libs/zlib
	xmms? ( media-sound/xmms )"

S=${WORKDIR}/${PN}

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

src_compile() {
	cd ${S}/Linux

	# ppc and sparc are big-endian while all other keywords are
	# little-endian (as far as I know)
	use ppc64 || use ppc || use sparc && CPU="MSBFIRST" || CPU="LSBFIRST"

	emake CPU="${CPU}" || die

	if use xmms; then
		cd ${S}/xmms
		emake CPU="${CPU}" || die
	fi
}

src_install() {
	cd ${S}/Linux
	dobin sexypsf

	if use xmms; then
		cd ${S}/xmms
		exeinto `xmms-config --input-plugin-dir`
		doexe libsexypsf.so
	fi

	dodoc ${S}/Docs/*
}

pkg_postinst() {
	ewarn "The xmms plugin seems to be unstable.  It does not play minipsf files,"
	ewarn "but the command line works fine with them."
}