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

EAPI=7

PYTHON_COMPAT=( python3_{8..10} )

inherit xdg cmake python-any-r1

DESCRIPTION="Game similar to Settlers 2"
HOMEPAGE="https://www.widelands.org/"

if [[ ${PV} == 9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/widelands/widelands.git"
else
	SRC_URI="https://github.com/widelands/widelands/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
	KEYWORDS="~amd64 ~x86"
fi

LICENSE="|| ( Apache-2.0 GPL-3 ) BitstreamVera CC-BY-SA-3.0 GPL-2 GPL-2+ MIT OFL-1.1 ZLIB"
SLOT="0"
IUSE="test"
RESTRICT="!test? ( test )"

RDEPEND="
	dev-libs/icu:=
	media-libs/glew:0=
	media-libs/libglvnd
	media-libs/libpng:=
	media-libs/libsdl2[opengl,sound,video]
	media-libs/sdl2-image[jpeg,png]
	media-libs/sdl2-mixer[vorbis]
	media-libs/sdl2-ttf
	net-misc/curl
	sys-libs/zlib:=
	virtual/libintl"
DEPEND="
	${RDEPEND}
	dev-libs/boost"
BDEPEND="
	${PYTHON_DEPS}
	sys-devel/gettext"

PATCHES=(
	"${FILESDIR}"/${P}-boost-1.77.patch
)

src_configure() {
	CMAKE_BUILD_TYPE="Release"

	local mycmakeargs=(
		-DCMAKE_INSTALL_PREFIX="${EPREFIX}"/usr/bin
		-DWL_INSTALL_BASEDIR="${EPREFIX}"/usr/share/doc/${PF}
		-DWL_INSTALL_DATADIR="${EPREFIX}"/usr/share/${PN}
		-DGTK_UPDATE_ICON_CACHE=OFF
		-DOPTION_BUILD_TESTS=$(usex test)
	)

	cmake_src_configure
}