aboutsummaryrefslogtreecommitdiff
blob: c74b55bdc374ec978c582236451be35f06d50681 (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
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit eutils desktop font

REVISION=65562

DESCRIPTION="An open source metaverse viewer"
HOMEPAGE="http://www.firestormviewer.org/"

MY_P="Phoenix_Firestorm-Release_x86_64_${PV}.${REVISION}"
SRC_URI="
	https://downloads.firestormviewer.org/preview/linux/${MY_P}.tar.xz
	http://3p.firestormviewer.org/freetype-2.4.4.180841832-linux64-180841832.tar.bz2
"
# https://downloads.firestormviewer.org/linux/Phoenix_Firestorm-Release_x86_64_6.4.21.64531.tar.xz
# https://downloads.firestormviewer.org/preview/linux/Phoenix_Firestorm-Release_x86_64_6.5.3.65562.tar.xz

RESTRICT="mirror"

LICENSE="GPL-2-with-Linden-Lab-FLOSS-exception"
SLOT="0"
KEYWORDS="~amd64 -*"
IUSE="+system-fontconfig +system-sdl voice"

INST_DIR="opt/firestorm-bin"
QA_PREBUILT="${INST_DIR}/*"

RDEPEND="
	dev-libs/apr
	dev-libs/apr-util
	dev-libs/libgcrypt
	dev-libs/libgpg-error
	dev-libs/openssl
	dev-libs/boost
	media-fonts/kochi-substitute
	media-fonts/unifont
	media-libs/freetype
	media-libs/libogg
	media-libs/libvorbis
	media-libs/gstreamer
	media-plugins/gst-plugins-meta
	net-libs/gnutls
	net-misc/curl
	net-dns/c-ares
	sys-apps/dbus
	sys-libs/glibc
	sys-libs/zlib
	virtual/glu
	virtual/libcrypt
	virtual/opengl
	x11-libs/libX11
	x11-libs/libXau
	x11-libs/libXdmcp
	x11-libs/libXext
	x11-libs/libXinerama
	system-fontconfig? ( media-libs/fontconfig )
	system-sdl? ( media-libs/libsdl )
	voice? ( net-dns/libidn-compat )
"
DEPEND="${RDEPEND}
	app-admin/chrpath
"

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

src_prepare() {
	if use system-fontconfig ; then
		rm lib/libfontconfig.so.1* || die
	fi
	if use system-sdl ; then
		rm lib/libSDL-1.2.so.0* || die
	fi
	if ! use voice ; then
		rm bin/SLVoice lib/libortp.so lib/libvivoxplatform.so lib/libvivoxsdk.so || die
	fi

	# doesn't appear to be used
	rm lib/libpangox-1.0.so* || die

	# shouldn't need to null RPATH with chrpath - but scanelf
	# reports 'Security problem NULL DT_RPATH' otherwise
	chrpath -r '' lib/libffi.so.5.0.10
	scanelf -Xr lib/libffi.so.5.0.10
	chrpath -r '' lib/libalut.so.0.0.0
	scanelf -Xr lib/libalut.so.0.0.0
	chrpath -r '' bin/dullahan_host
	scanelf -Xr bin/dullahan_host

	eapply "${FILESDIR}/add-unifonts.patch"

	eapply_user
}

src_install() {
	mkdir -p "${D}/${INST_DIR}/"

	cp -a . "${D}/${INST_DIR}/" || die

	# https://github.com/lmiphay/gentoo.overlay/issues/15
	cp -a ${WORKDIR}/lib/release/libfreetype.so* "${D}/${INST_DIR}/lib/" || die

	dosym /${INST_DIR}/firestorm /usr/bin/firestorm-bin

	insinto /etc/revdep-rebuild
	doins "${FILESDIR}"/70${PN}

	make_desktop_entry firestorm-bin "Phoenix Firestorm Viewer (bin)" /${INST_DIR}/firestorm_icon.png

	# a hardwired fallback font in LLWindowSDL::getDynamicFallbackFontList
	mkdir -p "${D}/usr/share/fonts/truetype/kochi/"
	dosym /usr/share/fonts/kochi-substitute/kochi-gothic-subst.ttf \
		/usr/share/fonts/truetype/kochi/kochi-gothic.ttf
}