summaryrefslogtreecommitdiff
blob: 151913703ad9570974455fa14e0f0b2aa6a64845 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Copyright 1999-2008 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.5 2008/10/05 16:45:56 flameeyes 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="arts esd"
RESTRICT=""

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

S=${WORKDIR}/${MY_P}

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

src_compile() {
	cd "${S}"/src
	if use arts && use esd
	then
		einfo "Building both aRts and ESD support."
	elif use arts
	then
		einfo "Building aRts support only."
		sed -i '/PLUGINS :=/ s/ libvmdsp_esd.so//' 32/Makefile 64/Makefile \
			|| die "sed failed"
	else
		einfo "Building ESD support only."
		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 arts
	then
		dobin vmwarearts || die
		make_desktop_entry vmwarearts "VMware Workstation (aRts)" \
			vmware-workstation.png System
	fi
	if use esd
	then
		dobin vmwareesd || die
		make_desktop_entry vmwareesd "VMware Workstation (ESD)" \
			vmware-workstation.png System
	fi
}