1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit cmake-utils 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}"
34 "${FILESDIR}/${P}-install_soundfonts.patch"
35 "${FILESDIR}/${P}-Introduce-the-BUILD_NONFREE-option.patch"
39 rm -rf docs/licenses || die
40 if ! use nonfree ; then
41 rm -rf wadsrc_bm wadsrc_extra || die
44 cmake-utils_src_prepare
49 -DINSTALL_DOCS_PATH="${EPREFIX}/usr/share/doc/${PF}"
50 -DINSTALL_PK3_PATH="${EPREFIX}/usr/share/doom"
51 -DINSTALL_SOUNDFONT_PATH="${EPREFIX}/usr/share/doom"
56 -DNO_GTK="$(usex !gtk)"
58 -DNO_OPENMP="$(usex !openmp)"
59 -DBUILD_NONFREE="$(usex nonfree)"
61 cmake-utils_src_configure
65 newicon src/posix/zdoom.xpm "${PN}.xpm"
66 make_desktop_entry "${PN}" "GZDoom" "${PN}" "Game;ActionGame"
67 cmake-utils_src_install
73 if ! use nonfree ; then
75 ewarn "GZDoom installed without nonfree components."
76 ewarn "Note: The nonfree game_support.pk3 file is needed to play"
77 ewarn " games natively supported by GZDoom."
78 ewarn "A list of games natively supported by GZDoom may be found"
79 ewarn "on the ZDoom wiki: https://zdoom.org/wiki/IWAD"