1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit cmake desktop xdg
8 DESCRIPTION="A modder-friendly OpenGL source port based on the DOOM engine"
9 HOMEPAGE="https://zdoom.org"
10 SRC_URI="https://github.com/coelckers/${PN}/archive/g${PV}.tar.gz -> ${P}.tar.gz"
12 LICENSE="BSD BZIP2 DUMB-0.9.3 GPL-3 LGPL-3 MIT
13 nonfree? ( Activision ChexQuest3 DOOM-COLLECTORS-EDITION freedist )"
15 KEYWORDS="~amd64 ~arm ~x86"
16 IUSE="gtk gtk2 +nonfree openmp"
19 media-libs/libsdl2[opengl]
22 media-sound/fluidsynth:=
27 gtk2? ( x11-libs/gtk+:2 )
28 !gtk2? ( x11-libs/gtk+:3 )
32 S="${WORKDIR}/${PN}-g${PV}"
35 "${FILESDIR}/${PN}-4.2.1-install_soundfonts.patch"
36 "${FILESDIR}/${PN}-4.2.1-Introduce-the-BUILD_NONFREE-option.patch"
40 rm -rf docs/licenses || die
41 if ! use nonfree ; then
42 rm -rf wadsrc_bm wadsrc_extra || die
50 -DINSTALL_DOCS_PATH="${EPREFIX}/usr/share/doc/${PF}"
51 -DINSTALL_PK3_PATH="${EPREFIX}/usr/share/doom"
52 -DINSTALL_SOUNDFONT_PATH="${EPREFIX}/usr/share/doom"
57 -DNO_GTK="$(usex !gtk)"
59 -DNO_OPENMP="$(usex !openmp)"
60 -DBUILD_NONFREE="$(usex nonfree)"
66 newicon src/posix/zdoom.xpm "${PN}.xpm"
67 make_desktop_entry "${PN}" "GZDoom" "${PN}" "Game;ActionGame"
74 if ! use nonfree ; then
76 ewarn "GZDoom installed without nonfree components."
77 ewarn "Note: The nonfree game_support.pk3 file is needed to play"
78 ewarn " games natively supported by GZDoom."
79 ewarn "A list of games natively supported by GZDoom is available"
80 ewarn "on the ZDoom wiki: https://zdoom.org/wiki/IWAD"