games-strategy/wesnoth: Bump to versions 1.14.11 and 1.15.3
[gentoo.git] / games-strategy / colobot / colobot-0.1.12.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit cmake-utils desktop xdg-utils
7
8 DESCRIPTION="Colobot is an educational real-time strategy video game featuring 3D graphics"
9 HOMEPAGE="https://colobot.info/"
10 SRC_URI="https://github.com/colobot/colobot/archive/${PN}-gold-${PV}-alpha.tar.gz"
11 S="${WORKDIR}/${PN}-${PN}-gold-${PV}-alpha"
12
13 LICENSE="GPL-3+"
14 SLOT="0"
15 KEYWORDS="~amd64"
16 IUSE="devbuild doc +openal test tools"
17 RESTRICT="!test? ( test )"
18
19 # perl for pod2man
20 BDEPEND="
21         app-text/po4a
22         dev-lang/perl
23         sys-devel/gettext"
24 DEPEND="
25         dev-games/physfs
26         dev-libs/boost:=
27         media-libs/glew:0
28         media-libs/libogg
29         media-libs/libpng:0=
30         media-libs/libsdl2:=
31         media-libs/libsndfile:=
32         media-libs/libvorbis:=
33         media-libs/sdl2-image
34         media-libs/sdl2-ttf
35         media-sound/vorbis-tools
36         openal? ( media-libs/openal )"
37 RDEPEND="${DEPEND}
38         games-strategy/colobot-data"
39
40 src_prepare() {
41         cmake-utils_src_prepare
42
43         # we need to call it explicitly to help Ninja figure out the deps
44         cd desktop || die
45         po4a po4a.cfg || die
46 }
47
48 src_configure() {
49         local mycmakeargs=(
50                 -DDEV_BUILD=$(usex devbuild)
51                 -DTESTS=$(usex test)
52                 -DTOOLS=$(usex tools)
53                 -DINSTALL_DOCS=$(usex doc)
54                 -DOPENAL_SOUND=$(usex openal)
55                 -DCOLOBOT_INSTALL_BIN_DIR="${EPREFIX}"/usr/bin
56                 -DCOLOBOT_INSTALL_LIB_DIR="${EPREFIX}"/usr/$(get_libdir)
57         )
58         cmake-utils_src_configure
59 }
60
61 pkg_postinst() {
62         xdg_icon_cache_update
63 }
64
65 pkg_postrm() {
66         xdg_icon_cache_update
67 }