1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit cmake prefix xdg
8 DESCRIPTION="Space exploration, trading & combat in the tradition of Terminal Velocity"
9 HOMEPAGE="https://endless-sky.github.io/"
11 https://github.com/endless-sky/endless-sky/archive/refs/tags/v${PV}.tar.gz
17 CC-BY-2.0 CC-BY-3.0 CC-BY-4.0
18 CC-BY-SA-3.0 CC-BY-SA-4.0
22 KEYWORDS="~amd64 ~x86"
23 IUSE="gles2-only test"
24 RESTRICT="!test? ( test )"
28 media-libs/libjpeg-turbo:=
31 media-libs/libsdl2[video]
34 gles2-only? ( media-libs/libsdl2[gles2] )
37 media-libs/libsdl2[opengl]
45 # no /usr/*games/ on Gentoo, adjust docdir, install even if != Release,
46 # and GLEW is unused if USE=gles2-only (using sed for less rebasing)
47 sed -e '/install(/s: games: bin:' \
48 -e '/install(/s: share/games: share:' \
49 -e "/install(/s: share/doc/endless-sky: share/doc/${PF}:" \
50 -e '/install(/s: CONFIGURATIONS Release::' \
51 -e 's:GLEW REQUIRED:GLEW:' \
52 -i CMakeLists.txt || die
53 sed -i '/PATH/s:share/games:share:' source/Files.cpp || die
55 hprefixify -w /PATH/ source/Files.cpp
60 -DBUILD_TESTING=$(usex test)
61 -DES_GLES=$(usex gles2-only)
62 -DES_USE_SYSTEM_LIBRARIES=yes
72 gzip -d -- "${ED}"/usr/share/man/man6/${PN}.6.gz || die
73 rm -- "${ED}"/usr/share/doc/${PF}/{copyright,license.txt} || die
79 if [[ ! ${REPLACING_VERSIONS} ]]; then
80 elog "Endless Sky provides high-res sprites for high-dpi screens."
81 elog "If you want to use them, download:"
83 elog " https://github.com/endless-sky/endless-sky-high-dpi/releases"
85 elog "and extract it to ~/.local/share/endless-sky/plugins/"