summaryrefslogtreecommitdiff
blob: 67fe57093fc64d1bcc8681c2ab6c5a86f9d4587f (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
73
74
75
76
77
78
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/media-plugins/rmxmms/rmxmms-0.5.1.ebuild,v 1.10 2004/06/24 23:34:45 agriffis Exp $

IUSE=""

inherit gcc

S=${WORKDIR}/rmxmms/${P}
DESCRIPTION="RealAudio plugin for xmms"
SRC_URI="ftp://ftp.xmms.org/xmms/plugins/${PN}/${P}.tar.gz"
HOMEPAGE="http://www.xmms.org http://forms.real.com/rnforms/resources/server/realsystemsdk/index.html#download"
REALSDK="rsg2sdk_r4.tar.gz"
REALSDK_HOMEPAGE="http://proforma.real.com/rnforms/resources/server/realsystemsdk/index.html"

SLOT="0"
LICENSE="GPL-2 realsdk"
KEYWORDS="x86 -ppc -sparc "

DEPEND="media-sound/xmms
	media-video/realplayer"

pkg_setup() {
	if [ "`gcc-major-version`" -eq "3" ]; then
		ewarn "This plugin will not work when compiled with gcc-3.x"
		ewarn "Either install and select a gcc-2.95.x compiler with"
		ewarn  "gcc-config, or give up."
		die "Doesn't work with gcc-3.xx"
	fi
}

src_unpack () {

	# Check if we got the SDK from real.com
	if [ ! -f ${DISTDIR}/${REALSDK} ]; then
		einfo "Please download the Real System SDK file from www.real.com"
		einfo "and place it in ${DISTDIR}."
		einfo "The file should be named ${REALSDK} and a good starting point is:"
		einfo "${REALSDK_HOMEPAGE}"
		einfo "The SDK is needed only to build the plugin, it won't be installed."
		rm -rf ${WORKDIR}
		exit 1
	fi

	# Unpack both realsdk and rmxmms
	mkdir ${WORKDIR}/realsdk
	mkdir ${WORKDIR}/rmxmms

	cd ${WORKDIR}/realsdk
	unpack ${REALSDK}

	cd ${WORKDIR}/rmxmms
	unpack ${A}

}

src_compile () {
	# patch Makefiles to use -lgcc
	cd ${S}/rmxmms
	sed -e 's/^LIBS =/LIBS = -lgcc/' Makefile.in > Makefile.in.new
	sed -e 's/^LDFLAGS =/LDFLAGS = -lgcc/' Makefile.in.new > Makefile.in

	cd ${S}
	econf "--with-realsdk-dir=${WORKDIR}/realsdk/rmasdk_6_0" || die
	emake || die
}

src_install () {

	make install DESTDIR=${D} || die

	dodoc ${S}/README
	dodoc ${S}/COPYING
	dodoc ${S}/INSTALL
	dodoc ${S}/ChangeLog

}