# Copyright 2017-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 PYTHON_COMPAT=( python3_{10..11} ) MY_COMMIT="" # Games under Gentoo are marked as 'testing' by convention # # Other architectures are reported to work, but not tested regularly by # the core team. # # Raspberry Pi support is tested by an outside contributor, and his # fixes are merged into the main source by upstream. # # Cross-compilation to Windows is also supported. KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" inherit desktop flag-o-matic python-any-r1 scons-utils toolchain-funcs xdg if [[ "${PV}" = 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/dxx-rebirth/dxx-rebirth" unset KEYWORDS elif [[ -n ${MY_COMMIT} ]]; then S="${WORKDIR}/${PN}-${MY_COMMIT}" SRC_URI="https://codeload.github.com/dxx-rebirth/dxx-rebirth/tar.gz/${MY_COMMIT} -> ${PN}-${PVR}.tar.gz" unset MY_COMMIT else S="${WORKDIR}/${PN}_${PV##*_pre}-src" SRC_URI="https://www.dxx-rebirth.com/download/dxx/rebirth/${PN}_${PV##*_pre}-src.tar.xz" fi DESCRIPTION="Descent Rebirth - enhanced Descent 1 & 2 engine" HOMEPAGE="https://www.dxx-rebirth.com/" LICENSE="DXX-Rebirth GPL-3" SLOT="0" # Default to building both game engines. The total size is relatively # small. IUSE="+d1x +d2x +data debug editor +flac ipv6 +joystick l10n_de +midi +mp3 +music +opengl opl3-musicpack +png sc55-musicpack sdl2 tracker valgrind +vorbis" # Game data is stored in HOG files. # Game movies are in MVL files. # Various add-ons use zip files to bundle their content together. # # PNG support enables writing screenshots as PNG instead of TGA (for # USE=opengl) or PCX (for USE=-opengl). DEPEND="dev-games/physfs[hog,mvl,zip] opengl? ( virtual/opengl virtual/glu ) png? ( media-libs/libpng ) " # As of this writing, there is no Portage shorthand syntax to express: # " # flag1? ( package[flag1] ) # flag2? ( package[flag2] ) # ... # flagN? ( package[flagN] ) # ", such that unsetting all flags removes the dependency on package. # Fake it by using a text fragment that is repeatedly expanded with # differing substitutions. # # The use of single quotes is intentional here. The ${word} is a # placeholder to be matched by text substitution when the fragment is # expanded, not a shell variable reference. # # For each flag, depend on freedata using the same flag. If none of the # flags are set, freedata is not needed. DXX_RDEPEND_USE_FREEDATA_FRAGMENT=' ${USE}? ( games-action/descent${ENGINE}-freedata[${USE}] ) ' # Block <0.59.100 due to file collision. # # If USE=data, then require a game data package. # The build process does not use the game data, nor change how the game # is built based on what game data will be used. At startup, the game # will search for both types of game data and use what it finds. Users # can switch between shareware/retail data at any time by # adding/removing the appropriate data packages. A rebuild is _not_ # required after swapping the data files. # # USE-depend on freedata for various extras, but only if any of those # extras are enabled. DXX_RDEPEND_ENGINE_FRAGMENT=' d${ENGINE}x? ( !