summaryrefslogtreecommitdiff
path: root/games-arcade/blobby/blobby-1.1.1.ebuild
blob: 7ac97d105e9021fabb51a4b0e8e9cbac1b74f2fa (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
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

LUA_COMPAT=( lua5-{1,3,4} luajit )

inherit cmake edo flag-o-matic lua-single xdg

DESCRIPTION="Beach ball game with blobs of goo"
HOMEPAGE="https://sourceforge.net/projects/blobby/"
SRC_URI="https://downloads.sourceforge.net/project/blobby/Blobby%20Volley%202%20%28Linux%29/${PV}/${PN}2-linux-${PV}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
REQUIRED_USE="${LUA_REQUIRED_USE}"
RESTRICT="!test? ( test )"

RDEPEND="
	${LUA_DEPS}
	dev-games/physfs[zip]
	dev-libs/tinyxml2:=
	media-libs/libglvnd
	media-libs/libsdl2[sound,joystick,opengl,video]
"
DEPEND="
	${RDEPEND}
	dev-libs/boost
"
BDEPEND="virtual/pkgconfig"

PATCHES=(
	"${FILESDIR}"/${PN}-1.1.1-fix_linkedlist.patch # from upstream
	"${FILESDIR}"/${PN}-1.1.1-fix_deps.patch
)

src_prepare() {
	cmake_src_prepare
	# lua and tinyxml2 unbundled by patch
	cmake_comment_add_subdirectory deps
}

src_configure() {
	# https://github.com/danielknobe/blobbyvolley2/issues/163
	filter-lto
	append-flags -fno-strict-aliasing
	local mycmakeargs=(
		-DBUILD_TESTS=$(usex test)
	)
	cmake_src_configure
}

src_test() {
	pushd "${BUILD_DIR}"/test || die
	edo ./blobbytest --report_level=short
	popd || die
}