summaryrefslogtreecommitdiff
blob: 23182a99ca53df981d331b887b37e479f5dc20dc (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-dsp/vmware-dsp-1.3.ebuild,v 1.6 2009/11/06 22:37:01 ssuominen Exp $

inherit eutils multilib

MY_PN=${PN/-/}
MY_P=${MY_PN}-${PV}

DESCRIPTION="Allows you to use VMware Workstation with ESD and ARTS."
HOMEPAGE="http://ftp.cvut.cz/vmware/"
SRC_URI="http://platan.vc.cvut.cz/ftp/pub/vmware/${MY_P}.tar.gz
	http://ftp.cvut.cz/vmware/${MY_P}.tar.gz
	http://ftp.cvut.cz/vmware/obsolete/${MY_P}.tar.gz
	http://knihovny.cvut.cz/ftp/pub/vmware/${MY_P}.tar.gz
	http://knihovny.cvut.cz/ftp/pub/vmware/obsolete/${MY_P}.tar.gz"

LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
IUSE="esd"
RESTRICT=""

RDEPEND="sys-libs/glibc
	amd64? (
		app-emulation/emul-linux-x86-soundlibs
		esd? ( media-sound/esound ) )
	x86? (
		esd? ( media-sound/esound ) )"
DEPEND="${RDEPEND}"

S=${WORKDIR}/${MY_P}

dir=/opt/vmware/dsp
Ddir=${D}/${dir}

src_compile() {
	cd "${S}"/src

	if use esd; then
		sed -i '/PLUGINS :=/ s/ libvmdsp_arts.so//' 32/Makefile 64/Makefile \
			|| die "sed failed"
	fi

	if use x86; then
		cd 32
		emake -j1 || die
	elif has_multilib_profile; then
		emake -j1 || die
	else
		cd 64
		emake -j1 || die
	fi
}

src_install() {
	cd "${S}"
	if use x86
	then
		dolib src/32/libvmdsp*.so || die "Copying libraries"
	elif has_multilib_profile
	then
		exeinto /usr/lib32
		doexe src/32/libvmdsp*.so || die
		dolib src/64/libvmdsp*.so || die
	else
		src/64/libvmdsp*.so || die
	fi
	if use esd; then
		dobin vmwareesd || die
		make_desktop_entry vmwareesd "VMware Workstation (ESD)" \
			vmware-workstation.png System
	fi
}