summaryrefslogtreecommitdiff
blob: 483cae138b411db00976ba4a1f8784bb9149b961 (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-simulation/secondlife-bin/secondlife-bin-1.23_rc4.ebuild,v 1.5 2009/09/13 13:10:45 ssuominen Exp $

inherit eutils multilib games versionator

SECONDLIFE_REVISION=123523
SECONDLIFE_MAJOR_VER=$(get_version_component_range 1-2)
SECONDLIFE_MINOR_VER=$(get_version_component_range 3)
SECONDLIFE_MINOR_VER=${SECONDLIFE_MINOR_VER/rc/}
MY_P="SecondLife-i686-${SECONDLIFE_MAJOR_VER}.${SECONDLIFE_MINOR_VER}.${SECONDLIFE_REVISION}"

DESCRIPTION="The Second Life (an online, 3D virtual world) viewer"
HOMEPAGE="http://secondlife.com/"
SRC_URI="http://automated-builds-secondlife-com.s3.amazonaws.com/viewer-rc-frozen/${SECONDLIFE_REVISION}/${MY_P}.tar.bz2"
RESTRICT="mirror strip"

LICENSE="GPL-2-with-Linden-Lab-FLOSS-exception"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

# Note, used to RDEPEND on:
# media-fonts/kochi-substitute
RDEPEND="sys-libs/glibc
	sys-apps/dbus
	x11-libs/libX11
	x11-libs/libXau
	x11-libs/libXdmcp
	x11-libs/libXext
	>=x11-libs/gtk+-2.0
	x11-libs/libXinerama
	dev-libs/libgcrypt
	dev-libs/libgpg-error
	dev-libs/openssl
	dev-libs/apr
	dev-libs/apr-util
	dev-libs/boost
	dev-libs/elfio
	dev-libs/expat
	media-libs/freetype
	media-libs/libogg
	media-libs/libsdl
	media-libs/libvorbis
	media-libs/gstreamer
	media-plugins/gst-plugins-meta
	media-libs/fmod
	x86? ( || ( media-libs/jpeg-compat <media-libs/jpeg-7 ) )
	media-libs/openjpeg
	net-libs/gnutls
	net-misc/curl
	net-dns/c-ares
	sys-libs/zlib
	~virtual/libstdc++-3.3
	virtual/glu
	virtual/opengl
	media-libs/openal
	media-libs/freealut
	amd64? (
		app-emulation/emul-linux-x86-sdl
		app-emulation/emul-linux-x86-gtklibs
	)"

S="${WORKDIR}/${MY_P}"

SECONDLIFE_HOME="${GAMES_PREFIX_OPT}/secondlife"

QA_TEXTRELS="${SECONDLIFE_HOME:1}/bin/libllkdu.so
	${SECONDLIFE_HOME:1}/lib/libkdu.so
	${SECONDLIFE_HOME:1}/lib/libfmod-3.75.so
	${SECONDLIFE_HOME:1}/lib/libvivoxsdk.so
	${SECONDLIFE_HOME:1}/app_settings/mozilla-runtime-linux-i686/libxul.so"
QA_EXECSTACK="${SECONDLIFE_HOME:1}/bin/do-not-directly-run-secondlife-bin
	${SECONDLIFE_HOME:1}/bin/libllkdu.so
	${SECONDLIFE_HOME:1}/lib/libSDL-1.2.so.0
	${SECONDLIFE_HOME:1}/lib/libcrypto.so.0.9.7
	${SECONDLIFE_HOME:1}/lib/libkdu.so
	${SECONDLIFE_HOME:1}/lib/libfmod-3.75.so
	${SECONDLIFE_HOME:1}/app_settings/mozilla-runtime-linux-i686/libxul.so"

pkg_setup() {
	games_pkg_setup

	# x86 binary package, ABI=x86
	has_multilib_profile && ABI="x86"
}

src_unpack() {
	unpack ${A}
	cd "${S}"

	# On 64-bit systems, we need to uncomment LL_BAD_OPENAL_DRIVER=x
	# and comment out the amd64 streaming disable to fix streaming audio.
	use amd64 && epatch "${FILESDIR}/${P}-amd64-audio-streaming-fix.patch"
}

src_install() {
	exeinto "${SECONDLIFE_HOME}"
	doexe launch_url.sh secondlife || die
	rm -rf launch_url.sh secondlife

	exeinto "${SECONDLIFE_HOME}"/bin
	doexe bin/* || die
	rm -rf bin

	exeinto "${SECONDLIFE_HOME}"/lib
	doexe lib/* || die
	rm -rf lib

	insinto "${SECONDLIFE_HOME}"
	doins -r * || die "doins * failed"

	#dosym /usr/share/fonts/kochi-substitute/kochi-mincho-subst.ttf "${SECONDLIFE_HOME}"/unicode.ttf

	games_make_wrapper secondlife-bin "./secondlife --set VersionChannelName Gentoo" "${SECONDLIFE_HOME}" "${SECONDLIFE_HOME}"/lib
	make_desktop_entry secondlife-bin "Second Life (binary distribution)" /opt/secondlife/secondlife_icon.png

	prepgamesdirs
}