You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
2.0 KiB
84 lines
2.0 KiB
5 years ago
|
# Copyright 1999-2019 Gentoo Authors
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=7
|
||
|
|
||
|
inherit cmake-utils desktop xdg
|
||
|
|
||
|
DESCRIPTION="A modder-friendly OpenGL source port based on the DOOM engine"
|
||
|
HOMEPAGE="https://zdoom.org"
|
||
|
SRC_URI="https://github.com/coelckers/${PN}/archive/g${PV}.tar.gz -> ${P}.tar.gz"
|
||
|
|
||
5 years ago
|
LICENSE="BSD BZIP2 DUMB-0.9.3 GPL-3 LGPL-3 MIT
|
||
|
nonfree? ( Activision ChexQuest3 DOOM-COLLECTORS-EDITION freedist )"
|
||
5 years ago
|
SLOT="0"
|
||
5 years ago
|
KEYWORDS="~amd64 ~arm ~x86"
|
||
5 years ago
|
IUSE="gtk gtk2 +nonfree openmp"
|
||
5 years ago
|
|
||
|
DEPEND="
|
||
|
media-libs/libsdl2[opengl]
|
||
5 years ago
|
media-libs/libsndfile
|
||
|
media-libs/openal
|
||
|
media-sound/fluidsynth:=
|
||
|
media-sound/mpg123
|
||
5 years ago
|
sys-libs/zlib
|
||
|
virtual/jpeg:0
|
||
|
gtk? (
|
||
|
gtk2? ( x11-libs/gtk+:2 )
|
||
|
!gtk2? ( x11-libs/gtk+:3 )
|
||
|
)"
|
||
5 years ago
|
RDEPEND="${DEPEND}"
|
||
5 years ago
|
|
||
|
S="${WORKDIR}/${PN}-g${PV}"
|
||
5 years ago
|
|
||
5 years ago
|
PATCHES=(
|
||
5 years ago
|
"${FILESDIR}/${PN}-4.2.1-install_soundfonts.patch"
|
||
|
"${FILESDIR}/${PN}-4.2.1-Introduce-the-BUILD_NONFREE-option.patch"
|
||
5 years ago
|
)
|
||
5 years ago
|
|
||
|
src_prepare() {
|
||
|
rm -rf docs/licenses || die
|
||
5 years ago
|
if ! use nonfree ; then
|
||
|
rm -rf wadsrc_bm wadsrc_extra || die
|
||
|
fi
|
||
|
|
||
5 years ago
|
cmake-utils_src_prepare
|
||
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
local mycmakeargs=(
|
||
|
-DINSTALL_DOCS_PATH="${EPREFIX}/usr/share/doc/${PF}"
|
||
|
-DINSTALL_PK3_PATH="${EPREFIX}/usr/share/doom"
|
||
5 years ago
|
-DINSTALL_SOUNDFONT_PATH="${EPREFIX}/usr/share/doom"
|
||
5 years ago
|
-DDYN_FLUIDSYNTH=OFF
|
||
|
-DDYN_OPENAL=OFF
|
||
|
-DDYN_SNDFILE=OFF
|
||
|
-DDYN_MPG123=OFF
|
||
5 years ago
|
-DNO_GTK="$(usex !gtk)"
|
||
5 years ago
|
-DNO_OPENAL=OFF
|
||
5 years ago
|
-DNO_OPENMP="$(usex !openmp)"
|
||
5 years ago
|
-DBUILD_NONFREE="$(usex nonfree)"
|
||
5 years ago
|
)
|
||
|
cmake-utils_src_configure
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
newicon src/posix/zdoom.xpm "${PN}.xpm"
|
||
|
make_desktop_entry "${PN}" "GZDoom" "${PN}" "Game;ActionGame"
|
||
|
cmake-utils_src_install
|
||
|
}
|
||
5 years ago
|
|
||
|
pkg_postinst() {
|
||
|
xdg_pkg_postinst
|
||
|
|
||
|
if ! use nonfree ; then
|
||
5 years ago
|
ewarn
|
||
|
ewarn "GZDoom installed without nonfree components."
|
||
|
ewarn "Note: The nonfree game_support.pk3 file is needed to play"
|
||
|
ewarn " games natively supported by GZDoom."
|
||
5 years ago
|
ewarn "A list of games natively supported by GZDoom is available"
|
||
5 years ago
|
ewarn "on the ZDoom wiki: https://zdoom.org/wiki/IWAD"
|
||
|
ewarn
|
||
5 years ago
|
fi
|
||
|
}
|