commit: 8868a8d5c560db8f7f7baf4cfd8aeb2adb3968ab Author: Ian Silvester <iansilvester <AT> fastmail <DOT> fm> AuthorDate: Thu Jun 18 02:22:37 2020 +0000 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> CommitDate: Fri Jul 3 19:53:35 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8868a8d5
games-action/dxx-rebirth: Add udpated ebuilds Add ebuilds so that the package supports current testing gcc 10, including a live ebuild, and references new free content packages. Closes: https://bugs.gentoo.org/724886 Signed-off-by: Ian Silvester <iansilvester <AT> fastmail.fm> Closes: https://github.com/gentoo/gentoo/pull/16308 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> games-action/dxx-rebirth/Manifest | 1 + .../dxx-rebirth-0.61.0_pre20200615.ebuild | 262 +++++++++++++++++++++ games-action/dxx-rebirth/dxx-rebirth-9999.ebuild | 254 ++++++++++++++++++++ games-action/dxx-rebirth/metadata.xml | 16 +- 4 files changed, 529 insertions(+), 4 deletions(-) diff --git a/games-action/dxx-rebirth/Manifest b/games-action/dxx-rebirth/Manifest index 5a8d4fe15ad..730b013b264 100644 --- a/games-action/dxx-rebirth/Manifest +++ b/games-action/dxx-rebirth/Manifest @@ -5,4 +5,5 @@ DIST d1xr-sc55-music.dxa 72803408 BLAKE2B eb52491f5c43e9f04aea5715cffc0a47d029dd DIST d2xr-briefings-ger.dxa 11717 BLAKE2B 27af93656ac91bf5490195d2aebc9c9f252cb730094cccb53298b07f2e2031935033b8db765b40fdad93fb55b157a2be07906ea45185b754e5ec7c205803cc92 SHA512 479aa577dc65271c705e80404ec46e6c59ee3a5122d6e9705dbdd16b71b16c0d3447426e3e74937aa20eb7026f67a3896c5e814fbfcede9164bd557b6eb8423c DIST d2xr-opl3-music.dxa 22710919 BLAKE2B 82bdf29b6afe88305d4c7b69bb8b094efcf33ad23becec223311775cd50600ed399c207ee3a05da3800bcc5e123d00f9f8fa7d2d4f4d4be57bbf71e1c2482a9c SHA512 876321a9a16403f6e9d12e10bb73c9cdc57e1a106fa64833a1be8cc17b74f6f13e57e40f051a1b40e7bc88b95bfe86cff181c93c8619383dfdeb74f36f5cce86 DIST d2xr-sc55-music.dxa 19579531 BLAKE2B 16091e24477a49319f2685884a7538a3597a9132707ac1d59405fa08ce7492158075df4ee680a5c7ba44aa0bd0b16170057f6a8956eab4b56913d00ee2f1f339 SHA512 290713b05627bf65bdc55fc6631a0c86e50f484a167f3fd20b3fe2bc5b772437939b5bf32eea852874dd983fbd47f160cae2412a2d6c5319f0d1583a33d28da6 +DIST dxx-rebirth-0.61.0_pre20200615.tar.gz 1959226 BLAKE2B 08d66eb1599100172e2bd8dcb8e13ca11314f3b06658c36851ddc7d91897a8376899b7c33b6e7a2d7b72e93cf7f20f157994d06f880e138dc807350e4c64c517 SHA512 3470e2b9cf20268f1af5e8084f0b361d1dd5d797bee9a1d97ce5509046f79750ac214d0f34e7eef1acc4ee4ae868ad3f34d33b45ff163863333e9d8a7d758db2 DIST dxx-rebirth_v0.59.100-src.tar.gz 1809614 BLAKE2B 6826380312fa23dbc99459db9272cf7ffb5a00a14cfdd777339633fbd943a288af00f182692ebc3078e4c39bf6b6cc9fb05cc6a533ec126b8c881eb22c465868 SHA512 dc9b7ad263e189e779756b62613d4bc62371cb5fec2176a4013395fc18c9d03ab0c9ddc5ccf2668b87e4a77b25d500bdef373126f176bfce49f73b5a98de23d7 diff --git a/games-action/dxx-rebirth/dxx-rebirth-0.61.0_pre20200615.ebuild b/games-action/dxx-rebirth/dxx-rebirth-0.61.0_pre20200615.ebuild new file mode 100644 index 00000000000..484618e8c27 --- /dev/null +++ b/games-action/dxx-rebirth/dxx-rebirth-0.61.0_pre20200615.ebuild @@ -0,0 +1,262 @@ +# Copyright 2017-2020 DXX Rebirth project contributors +# Distributed under the terms of the GNU General Public License v2 + +# This file is part of the DXX-Rebirth project. +# +# It is copyright by its individual contributors, as recorded in the +# project's Git history. See COPYING.txt at the top level for license +# terms and a link to the Git history. + +EAPI=7 +PYTHON_COMPAT=( python3_7 ) + +inherit desktop eutils 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" + # Live ebuilds have blank keywords. + KEYWORDS= + PROPERTIES="live" +else + # dxx-rebirth-0.61.0_pre20190720.ebuild + #MY_COMMIT='a17792c89fd49dd12fdf5981670dd7f64b42850f' + # dxx-rebirth-0.61.0_pre20200615.ebuild + MY_COMMIT='0c2fcf691ffb2a586991350d67f3efd1cca2a1f3' + # dxx-rebirth-0.61.0_pre20200627.ebuild + #MY_COMMIT='aba40babb47d36a88011af01e4bc0fc00dca74ef' + S="$WORKDIR/$PN-$MY_COMMIT" + #SRC_URI="https://github.com/dxx-rebirth/dxx-rebirth/archive/$MY_COMMIT.tar.gz -> $PN-$PVR.tar.gz" + SRC_URI="https://codeload.github.com/dxx-rebirth/dxx-rebirth/tar.gz/$MY_COMMIT -> $PN-$PVR.tar.gz" + unset 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 ~x86" +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? ( + !<games-action/d${ENGINE}x-rebirth-0.59.100 + data? ( + || ( + games-action/descent${ENGINE}-data + games-action/descent${ENGINE}-demodata + ) + ) + '" + ${DXX_RDEPEND_USE_FREEDATA_FRAGMENT//\$\{USE\}/l10n_de} + ${DXX_RDEPEND_USE_FREEDATA_FRAGMENT//\$\{USE\}/opl3-musicpack} + ${DXX_RDEPEND_USE_FREEDATA_FRAGMENT//\$\{USE\}/sc55-musicpack} + "' + ) +' + +DXX_DEPEND_USE_SDL_VERSION_FRAGMENT=' + media-libs/lib${SDL_version}[joystick?,opengl?,sound,video] + media-libs/${SDL_version}-image + music? ( media-libs/${SDL_version}-mixer ) +' +DXX_RDEPEND_USE_SDL_VERSION_FRAGMENT=' + music? ( media-libs/${SDL_version}-mixer[flac?,midi?,mp3?,vorbis?] ) +' +DEPEND="${DEPEND} + !sdl2? ( ${DXX_DEPEND_USE_SDL_VERSION_FRAGMENT//\$\{SDL_version\}/sdl} ) + sdl2? ( ${DXX_DEPEND_USE_SDL_VERSION_FRAGMENT//\$\{SDL_version\}/sdl2} ) +" +unset DXX_DEPEND_USE_SDL_VERSION_FRAGMENT + +unset DXX_RDEPEND_USE_FREEDATA_FRAGMENT +RDEPEND="${DEPEND} + !sdl2? ( ${DXX_RDEPEND_USE_SDL_VERSION_FRAGMENT//\$\{SDL_version\}/sdl} ) + sdl2? ( ${DXX_RDEPEND_USE_SDL_VERSION_FRAGMENT//\$\{SDL_version\}/sdl2} ) + ${DXX_RDEPEND_ENGINE_FRAGMENT//\$\{ENGINE\}/1} + ${DXX_RDEPEND_ENGINE_FRAGMENT//\$\{ENGINE\}/2} +" +unset DXX_RDEPEND_ENGINE_FRAGMENT +unset DXX_RDEPEND_USE_SDL_VERSION_FRAGMENT + +# USE=valgrind enables use of a Valgrind header. A build with valgrind +# instrumentation can be run without installing Valgrind, so this +# dependency is only in DEPEND, instead of being in both DEPEND and +# RDEPEND. +DEPEND+=' + valgrind? ( dev-util/valgrind ) +' + +# This ebuild builds d1x-rebirth, d2x-rebirth, or both. Building none +# would mean this ebuild installs zero files. +# +# For each of the supported music flags, require USE=music, so that the +# package is built with sdl-mixer support. Individual music types can be +# changed without a Rebirth rebuild by rebuilding sdl-mixer with +# appropriate support, but Rebirth must have sdl-mixer support at build +# time in order to support any of these music formats at runtime. +# +# All music files in the optional musicpack downloads are .ogg, so +# require USE=vorbis if those packs are enabled. +REQUIRED_USE=' + || ( d1x d2x ) + flac? ( music ) + midi? ( music ) + mp3? ( music ) + vorbis? ( music ) + opl3-musicpack? ( vorbis ) + sc55-musicpack? ( vorbis ) + sdl2? ( opengl ) +' + +# As of this writing, IUSE_RUNTIME is a GLEP, but not an implemented +# feature. This variable is stored here to be ready to activate when +# Portage implements this feature. +# +# Note that while individual music formats can be switched without a +# rebuild, the master flag USE=music controls whether sdl-mixer is used, +# and therefore requires a rebuild when changed. +#IUSE_RUNTIME="flac l10n_de midi mp3 opl3-musicpack sc55-musicpack vorbis" + +dxx_scons() { + # Always build profile `m`. If use editor, also build profile `e`. + # Set most variables in the default anonymous profile. Only + # `builddir` and `editor` are set in the named profiles, since those + # must be different between the two builds. + # + # Notes for end users: + # - Per-engine options can be set with an engine prefix, as shown + # for sharepath. Such options are used in place of + # engine-unqualified options. For example, to disable sdlmixer + # for Descent 2: Rebirth, but use the setting below for Descent 1: + # Rebirth, set EXTRA_ESCONS="d2x_sdlmixer=0". + # - Profile `site` is searched before the anonymous profile, and is + # deliberately unused in this ebuild. Set options in the site + # profile to affect both engines: + # EXTRA_ESCONS="site_verbosebuild=0". + local scons_build_profile=m mysconsargs=( + sdl2=$(usex sdl2 1 0) + sdlmixer=$(usex music 1 0) + verbosebuild=1 + debug=$(usex debug 1 0) + ipv6=$(usex ipv6 1 0) + opengl=$(usex opengl 1 0) + use_tracker=$(usex tracker 1 0) + prefix="${EPREFIX}"/usr + screenshot=$(usex png png legacy) + m_builddir=build/main/ + m_editor=0 + ) + if use editor; then + scons_build_profile+=+e + mysconsargs+=( \ + e_builddir=build/editor/ + e_editor=1 + ) + fi + if ! use joystick; then + mysconsargs+=( \ + max_joysticks=0 + ) + fi + # Add sharepath and enable build of selected games. The trailing + # comma after `$scons_build_profile` is required to cause scons to + # search the anonymous profile. If omitted, only settings from the + # named profile would be used. + use d1x && mysconsargs+=( d1x_sharepath="/usr/share/games/d1x" d1x="$scons_build_profile,site," ) + use d2x && mysconsargs+=( d2x_sharepath="/usr/share/games/d2x" d2x="$scons_build_profile,site," ) + use valgrind && mysconsargs+=( poison=valgrind ) + escons "${mysconsargs[@]}" "$@" +} + +src_compile() { + tc-export CXX PKG_CONFIG + dxx_scons register_install_target=0 build +} + +src_install() { + # Use upstream install target to handle the various combinations of + # enabled/disabled engines and optional editor support. + dxx_scons register_compile_target=0 register_install_target=1 DESTDIR="$D" "$D" + local DV + for DV in 1 2; do + if ! use d${DV}x; then + continue + fi + local PROGRAM=d${DV}x-rebirth + docinto "${PROGRAM}" + dodoc "${PROGRAM}"/*.txt + make_desktop_entry "${PROGRAM}" "Descent ${DV} Rebirth" "${PROGRAM}" + doicon "${PROGRAM}/${PROGRAM}.xpm" + done +} + +pkg_postinst() { + xdg_pkg_postinst + if ! use data; then + elog "$PN requires game data to play." + elog "Game data is not included in this package. To play the game," + elog "emerge the packages required by USE=data or install the game" + elog "data by hand." + elog + elog "Changing USE=data does not change how this package is built," + elog "only its runtime dependencies." + fi +} diff --git a/games-action/dxx-rebirth/dxx-rebirth-9999.ebuild b/games-action/dxx-rebirth/dxx-rebirth-9999.ebuild new file mode 100644 index 00000000000..119e998d23c --- /dev/null +++ b/games-action/dxx-rebirth/dxx-rebirth-9999.ebuild @@ -0,0 +1,254 @@ +# Copyright 2017-2020 DXX Rebirth project contributors +# Distributed under the terms of the GNU General Public License v2 + +# This file is part of the DXX-Rebirth project. +# +# It is copyright by its individual contributors, as recorded in the +# project's Git history. See COPYING.txt at the top level for license +# terms and a link to the Git history. + +EAPI=7 +PYTHON_COMPAT=( python3_7 ) + +inherit desktop eutils 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" + # Live ebuilds have blank keywords. + KEYWORDS= + PROPERTIES="live" +else + MY_COMMIT='' + 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 + + # 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 ~x86" +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? ( + !<games-action/d${ENGINE}x-rebirth-0.59.100 + data? ( + || ( + games-action/descent${ENGINE}-data + games-action/descent${ENGINE}-demodata + ) + ) + '" + ${DXX_RDEPEND_USE_FREEDATA_FRAGMENT//\$\{USE\}/l10n_de} + ${DXX_RDEPEND_USE_FREEDATA_FRAGMENT//\$\{USE\}/opl3-musicpack} + ${DXX_RDEPEND_USE_FREEDATA_FRAGMENT//\$\{USE\}/sc55-musicpack} + "' + ) +' + +DXX_DEPEND_USE_SDL_VERSION_FRAGMENT=' + media-libs/lib${SDL_version}[joystick?,opengl?,sound,video] + media-libs/${SDL_version}-image + music? ( media-libs/${SDL_version}-mixer ) +' +DXX_RDEPEND_USE_SDL_VERSION_FRAGMENT=' + music? ( media-libs/${SDL_version}-mixer[flac?,midi?,mp3?,vorbis?] ) +' +DEPEND="${DEPEND} + !sdl2? ( ${DXX_DEPEND_USE_SDL_VERSION_FRAGMENT//\$\{SDL_version\}/sdl} ) + sdl2? ( ${DXX_DEPEND_USE_SDL_VERSION_FRAGMENT//\$\{SDL_version\}/sdl2} ) +" +unset DXX_DEPEND_USE_SDL_VERSION_FRAGMENT + +unset DXX_RDEPEND_USE_FREEDATA_FRAGMENT +RDEPEND="${DEPEND} + !sdl2? ( ${DXX_RDEPEND_USE_SDL_VERSION_FRAGMENT//\$\{SDL_version\}/sdl} ) + sdl2? ( ${DXX_RDEPEND_USE_SDL_VERSION_FRAGMENT//\$\{SDL_version\}/sdl2} ) + ${DXX_RDEPEND_ENGINE_FRAGMENT//\$\{ENGINE\}/1} + ${DXX_RDEPEND_ENGINE_FRAGMENT//\$\{ENGINE\}/2} +" +unset DXX_RDEPEND_ENGINE_FRAGMENT +unset DXX_RDEPEND_USE_SDL_VERSION_FRAGMENT + +# USE=valgrind enables use of a Valgrind header. A build with valgrind +# instrumentation can be run without installing Valgrind, so this +# dependency is only in DEPEND, instead of being in both DEPEND and +# RDEPEND. +DEPEND+=' + valgrind? ( dev-util/valgrind ) +' + +# This ebuild builds d1x-rebirth, d2x-rebirth, or both. Building none +# would mean this ebuild installs zero files. +# +# For each of the supported music flags, require USE=music, so that the +# package is built with sdl-mixer support. Individual music types can be +# changed without a Rebirth rebuild by rebuilding sdl-mixer with +# appropriate support, but Rebirth must have sdl-mixer support at build +# time in order to support any of these music formats at runtime. +# +# All music files in the optional musicpack downloads are .ogg, so +# require USE=vorbis if those packs are enabled. +REQUIRED_USE=' + || ( d1x d2x ) + flac? ( music ) + midi? ( music ) + mp3? ( music ) + vorbis? ( music ) + opl3-musicpack? ( vorbis ) + sc55-musicpack? ( vorbis ) + sdl2? ( opengl ) +' + +# As of this writing, IUSE_RUNTIME is a GLEP, but not an implemented +# feature. This variable is stored here to be ready to activate when +# Portage implements this feature. +# +# Note that while individual music formats can be switched without a +# rebuild, the master flag USE=music controls whether sdl-mixer is used, +# and therefore requires a rebuild when changed. +#IUSE_RUNTIME="flac l10n_de midi mp3 opl3-musicpack sc55-musicpack vorbis" + +dxx_scons() { + # Always build profile `m`. If use editor, also build profile `e`. + # Set most variables in the default anonymous profile. Only + # `builddir` and `editor` are set in the named profiles, since those + # must be different between the two builds. + # + # Notes for end users: + # - Per-engine options can be set with an engine prefix, as shown + # for sharepath. Such options are used in place of + # engine-unqualified options. For example, to disable sdlmixer + # for Descent 2: Rebirth, but use the setting below for Descent 1: + # Rebirth, set EXTRA_ESCONS="d2x_sdlmixer=0". + # - Profile `site` is searched before the anonymous profile, and is + # deliberately unused in this ebuild. Set options in the site + # profile to affect both engines: + # EXTRA_ESCONS="site_verbosebuild=0". + local scons_build_profile=m mysconsargs=( + sdl2=$(usex sdl2 1 0) + sdlmixer=$(usex music 1 0) + verbosebuild=1 + debug=$(usex debug 1 0) + ipv6=$(usex ipv6 1 0) + opengl=$(usex opengl 1 0) + use_tracker=$(usex tracker 1 0) + prefix="${EPREFIX}"/usr + screenshot=$(usex png png legacy) + m_builddir=build/main/ + m_editor=0 + ) + if use editor; then + scons_build_profile+=+e + mysconsargs+=( \ + e_builddir=build/editor/ + e_editor=1 + ) + fi + if ! use joystick; then + mysconsargs+=( \ + max_joysticks=0 + ) + fi + # Add sharepath and enable build of selected games. The trailing + # comma after `$scons_build_profile` is required to cause scons to + # search the anonymous profile. If omitted, only settings from the + # named profile would be used. + use d1x && mysconsargs+=( d1x_sharepath="/usr/share/games/d1x" d1x="$scons_build_profile,site," ) + use d2x && mysconsargs+=( d2x_sharepath="/usr/share/games/d2x" d2x="$scons_build_profile,site," ) + use valgrind && mysconsargs+=( poison=valgrind ) + escons "${mysconsargs[@]}" "$@" +} + +src_compile() { + tc-export CXX PKG_CONFIG + dxx_scons register_install_target=0 build +} + +src_install() { + # Use upstream install target to handle the various combinations of + # enabled/disabled engines and optional editor support. + dxx_scons register_compile_target=0 register_install_target=1 DESTDIR="$D" "$D" + local DV + for DV in 1 2; do + if ! use d${DV}x; then + continue + fi + local PROGRAM=d${DV}x-rebirth + docinto "${PROGRAM}" + dodoc "${PROGRAM}"/*.txt + make_desktop_entry "${PROGRAM}" "Descent ${DV} Rebirth" "${PROGRAM}" + doicon "${PROGRAM}/${PROGRAM}.xpm" + done +} + +pkg_postinst() { + xdg_pkg_postinst + if ! use data; then + elog "$PN requires game data to play." + elog "Game data is not included in this package. To play the game," + elog "emerge the packages required by USE=data or install the game" + elog "data by hand." + elog + elog "Changing USE=data does not change how this package is built," + elog "only its runtime dependencies." + fi +} diff --git a/games-action/dxx-rebirth/metadata.xml b/games-action/dxx-rebirth/metadata.xml index fe3cc527f00..2d1f5ab3ad7 100644 --- a/games-action/dxx-rebirth/metadata.xml +++ b/games-action/dxx-rebirth/metadata.xml @@ -20,14 +20,22 @@ DXX-Rebirth. </longdescription> <use> - <flag name="data">Install data files</flag> - <flag name="descent1">Install Descent 1 resources and executable</flag> - <flag name="descent2">Install Descent 2 resources and executable</flag> + <flag name="d1x">Install Descent 1 resources and executable</flag> + <flag name="d2x">Install Descent 2 resources and executable</flag> + <flag name="descent1">Install Descent 1 resources and executable (used prior to version 0.61)</flag> + <flag name="descent2">Install Descent 2 resources and executable (used prior to version 0.61)</flag> + <flag name="data">Ensure some game levels are present; if the full game's level data is not already installed then install the playable demo data (i.e. shareware levels)</flag> + <flag name="debug">Enable various debugging code paths and sanity checks, not just output. Some of these checks date back to the retail build, and choke on some custom levels because the game was never coded to sufficiently distrust inputs</flag> + <flag name="editor">Enable level editor support</flag> <flag name="l10n_de">Provides German translations for the game's briefings, robot descriptions, and outro of the original campaign</flag> + <flag name="midi">Enforce that SDL-mixer is used and has midi support</flag> <flag name="music">Enable music support</flag> <flag name="opl3-musicpack">Include alternate version of the game's music, recorded with the Yamaha YMF262 OPL3 soundchip</flag> <flag name="sc55-musicpack">Include alternate version of the game's music, recorded with the Roland Sound Canvas SC-55 MIDI module</flag> - <flag name="textures">Include high resolution (640x480) backgrounds, briefing images and fonts (Descent 1)</flag> + <flag name="sdl2">Use libSDL2, SDL2-mixer instead of libSDL-1* and SDL-mixer-1*</flag> + <flag name="tracker">Enable support for the PHP-based multiplayer game tracker</flag> + <flag name="textures">Include high resolution (640x480) backgrounds, briefing images and fonts (for Descent 1)</flag> + <flag name="valgrind">Include a Valgrind header in build in order to support Memcheck client requests</flag> </use> <upstream> <remote-id type="github">dxx-rebirth/dxx-rebirth</remote-id>