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

EAPI=7

inherit desktop eutils multilib-minimal

DESCRIPTION="2D physics puzzle / sandbox game."
HOMEPAGE="http://crayonphysics.com/"

SRC_URI="${PN//-/_}-linux-release${PV}.tar.gz"

LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
IUSE="multilib"
RESTRICT="strip fetch"

RDEPEND="
	app-arch/bzip2[${MULTILIB_USEDEP}]
	dev-libs/expat[${MULTILIB_USEDEP}]
	dev-libs/glib[${MULTILIB_USEDEP}]
	dev-libs/libffi[${MULTILIB_USEDEP}]
	media-libs/fontconfig[${MULTILIB_USEDEP}]
	media-libs/freetype:2[${MULTILIB_USEDEP}]
	virtual/glu[${MULTILIB_USEDEP}]
	media-libs/libogg[${MULTILIB_USEDEP}]
	media-libs/libpng[${MULTILIB_USEDEP}]
	virtual/opengl[${MULTILIB_USEDEP}]
	sys-apps/util-linux[${MULTILIB_USEDEP}]
	sys-libs/zlib[${MULTILIB_USEDEP}]
	x11-libs/libdrm[${MULTILIB_USEDEP}]
	x11-libs/libICE[${MULTILIB_USEDEP}]
	x11-libs/libSM[${MULTILIB_USEDEP}]
	x11-libs/libX11[${MULTILIB_USEDEP}]
	x11-libs/libXau[${MULTILIB_USEDEP}]
	x11-libs/libxcb[${MULTILIB_USEDEP}]
	x11-libs/libXdamage[${MULTILIB_USEDEP}]
	x11-libs/libXdmcp[${MULTILIB_USEDEP}]
	x11-libs/libXext[${MULTILIB_USEDEP}]
	x11-libs/libXfixes[${MULTILIB_USEDEP}]
	x11-libs/libXinerama[${MULTILIB_USEDEP}]
	x11-libs/libXrandr[${MULTILIB_USEDEP}]
	x11-libs/libXrender[${MULTILIB_USEDEP}]
	x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
	media-libs/smpeg[${MULTILIB_USEDEP}]
	media-libs/libvorbis[${MULTILIB_USEDEP}]
	media-libs/libmikmod[${MULTILIB_USEDEP}]
	media-libs/sdl-mixer[${MULTILIB_USEDEP}]
	media-libs/sdl-image[${MULTILIB_USEDEP}]
"

MY_PN="CrayonPhysicsDeluxe"
S="${WORKDIR}/${MY_PN}"

src_install() {
	( use amd64 && use multilib ) && ABI=x86
	local dir="/opt/${MY_PN}"

	insinto "${dir}"
	exeinto "${dir}"

	# install icon
	newicon "icon.png" "${PN}.png" || die "install icon"

	# install docs
	dodoc readme.html

	# cleanup unneeded files
	rm -rf "./$(get_libdir)"
	rm \
		"icon.png" \
		"install_shortcuts.sh" \
		"launchcrayon.sh" \
		"launcher" \
		"LGPL.txt" \
		"LICENSE.txt" \
		"log.txt" \
		"README-CC.txt" \
		"README-GLEW.txt" \
		"readme.html" \
		"README-QT.txt" \
		"README-SDL.txt" \
		"uninstall_shortcuts.sh" \
		"update"

	# install game files
	doins -r * || die "doins opt"
	doexe crayon || die "doexe failed"

	# install shortcuts
	make_wrapper "${PN}" "./crayon" "${dir}" || die "install shortcut"
	make_desktop_entry "${PN}" "Crayon Physics Deluxe" "${PN}"
}