summaryrefslogtreecommitdiff
blob: 7072a832f46b4a0022e5c04d32c11c6a92206851 (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-roguelike/FTL/FTL-1.03.1.ebuild,v 1.7 2013/05/09 14:19:45 hasufell Exp $

# TODO: update libpng to slot 1.5 when stable

EAPI=5

inherit eutils games

DESCRIPTION="Faster Than Light: A spaceship simulation real-time roguelike-like game"
HOMEPAGE="http://www.ftlgame.com/"
SRC_URI="ftl_faster_than_light-linux-${PV}.tar.gz"

LICENSE="all-rights-reserved Boost-1.0 free-noncomm MIT bundled-libs? ( FTL LGPL-2.1 ZLIB libpng )"
SLOT="0"
KEYWORDS="-* ~amd64 x86"
IUSE="bundled-libs"
RESTRICT="fetch bindist splitdebug"

RDEPEND="
	=media-libs/libpng-1.5*
	sys-devel/gcc[cxx]
	virtual/opengl
	!bundled-libs? (
		media-libs/devil[png,opengl]
		media-libs/freetype:2
		media-libs/libsdl[X,audio,joystick,opengl,video]
		sys-libs/zlib
	)"

QA_PREBUILT="${GAMES_PREFIX_OPT}/${PN}/bin/${PN}
	${GAMES_PREFIX_OPT}/${PN}/lib/*"

S=${WORKDIR}/${PN}

pkg_nofetch() {
	einfo "Please buy & download ${SRC_URI} from:"
	einfo "  ${HOMEPAGE}"
	einfo "and move it to ${DISTDIR}"
	einfo
}

src_prepare() {
	if ! use bundled-libs ; then
		# no system lib for libbass available
		find data/${ARCH}/lib -type f \! -name "libbass*" -delete || die
	fi
}

src_install() {
	local dir=${GAMES_PREFIX_OPT}/${PN}

	insinto "${dir}"
	doins -r data/resources
	doins data/exe_icon.bmp

	exeinto "${dir}"/bin
	doexe data/${ARCH}/bin/${PN}
	exeinto "${dir}"/lib
	doexe data/${ARCH}/lib/*.so*

	games_make_wrapper ${PN} "${dir}/bin/${PN}" "${dir}" "${dir}/lib"
	make_desktop_entry ${PN} "Faster Than Light" "/usr/share/pixmaps/FTL.bmp"

	newicon data/exe_icon.bmp FTL.bmp
	dohtml ${PN}_README.html

	prepgamesdirs
}