Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add udpated ebuild so that the package supports current gcc #15903

Closed
wants to merge 9 commits into from
4 changes: 4 additions & 0 deletions games-action/descent1-freedata/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
DIST d1xr-briefings-ger.dxa 16798 BLAKE2B f5e1f4f91cb3464b3d356fab1e3993700cc19f3f2db8682f5194e59aa5d2623efa427db4135c3595534e5dac0f2589b53aac7df3610501b759407e1ead342458 SHA512 956a3ef1fe7379b71d5f651fdcb1f26b786883a35193a0a22009204e885a12fceb3a69c6accbeb2bd20be65afe087d23532d7ef3439edd97cc8904968bf519e3
DIST d1xr-hires.dxa 1426884 BLAKE2B c4d9b950353fc450c64568779bc3d2e93a46e17980c8df08a2ef06bff5b9709869fdbbaf4fb6698be994b3faae7a75036a53357743d47b728bb3ef9df126afd8 SHA512 3fc84d5610ba40ee383c1720f80513a21b4644ff8b6da4b84ebca13b11c1131deb4897ded6324b54845b6c847dfc0f16700535e16afdd7ebe83bfff042892302
DIST d1xr-opl3-music.dxa 81503503 BLAKE2B b560597e0f08139109a6dc4ee7996c05010561686029d1fd754375278b8a11e6df0f6106c797d524e92d4998683d6e1e07b6cfc982ea3ff167a0b9ca92ba0dc2 SHA512 4ac82c4bc2ddb02e2941746921443e38b698c6e54cfcab317fc9108f84ada7b868ec2ee3c70b28c1dfe9f41e2aadab4124c8daa65a409905cba5d674f0aab8a8
DIST d1xr-sc55-music.dxa 72803408 BLAKE2B eb52491f5c43e9f04aea5715cffc0a47d029dda0b8e5ae1a79ec36122a17c01e3b2a731f369d72fe0e069e1188bdaf03f82d0845b574d76b6798be33481e3b84 SHA512 3cdce5b6535e28397b3216cc9ca05cccf7194349c62d64c54300f02f39248b98598d170599e5c61b6900d780e4917f905c3c31eb814fbb8429221c804cbd8bf9
55 changes: 55 additions & 0 deletions games-action/descent1-freedata/descent1-freedata-1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright 1999-2019 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=6

DXX_ENGINE="${PN:7:1}"
DESCRIPTION="Free content for games-action/d${DXX_ENGINE}x-rebirth"
HOMEPAGE="https://www.dxx-rebirth.com/"
IUSE="l10n_de opl3-musicpack sc55-musicpack"
SRC_URI="
l10n_de? ( https://www.dxx-rebirth.com/download/dxx/res/d${DXX_ENGINE}xr-briefings-ger.dxa )
opl3-musicpack? ( https://www.dxx-rebirth.com/download/dxx/res/d${DXX_ENGINE}xr-opl3-music.dxa )
sc55-musicpack? ( https://www.dxx-rebirth.com/download/dxx/res/d${DXX_ENGINE}xr-sc55-music.dxa )
"

if [[ "${PN}" = descent1-freedata ]]; then
IUSE+=" +textures"
SRC_URI+="
textures? ( https://www.dxx-rebirth.com/download/dxx/res/d1xr-hires.dxa )
"
fi

LICENSE="public-domain"
SLOT="0"
KEYWORDS="~amd64 ~x86"

# If all USE flags are unset, this ebuild installs zero files. Require
# at least one to be set.
REQUIRED_USE="|| ( ${IUSE//+/} )"

DEPEND=""
RDEPEND=""
dr-diem marked this conversation as resolved.
Show resolved Hide resolved

dr-diem marked this conversation as resolved.
Show resolved Hide resolved
unset DXX_ENGINE

src_install() {
local DXX_ENGINE="${PN:7:1}"
insinto /usr/share/games/d${DXX_ENGINE}x
use opl3-musicpack && doins "${DISTDIR}"/d${DXX_ENGINE}xr-opl3-music.dxa
use sc55-musicpack && doins "${DISTDIR}"/d${DXX_ENGINE}xr-sc55-music.dxa
use l10n_de && doins "${DISTDIR}"/d${DXX_ENGINE}xr-briefings-ger.dxa

# This ebuild is used for both Descent 1 free data and Descent 2
# free data. Only Descent 1 provides alternate textures.
if [[ "${PN}" = descent1-freedata ]] && use textures; then
insinto /usr/share/games/d1x
doins "${DISTDIR}"/d1xr-hires.dxa
fi
}
35 changes: 35 additions & 0 deletions games-action/descent1-freedata/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>games@gentoo.org</email>
<name>Gentoo Games Project</name>
</maintainer>
<maintainer type="person">
<email>iansilvester@fastmail.fm</email>
<name>Ian Silvester</name>
</maintainer>
<longdescription>
Descent 1 is a classic first-person shooter released in 1995
by Interplay and Parallax. Descent 2 released for the PC in
1996. It, along with its predecessor, was one of the first
games with true 3-dimensional graphics, 6 degrees of freedom
in movement, light sourcing, and the capability to join
multiplayer games on-the-fly. D1X-Rebirth and DXX-Rebirth are
modifications of the original Descent 1 and 2 sources that was
released by Parallax (and are based on the D1X and D2X
sources). It offering OpenGL graphics, advanced multiplayer,
new features, and cross-platform compatibility. Now code bases
of D1X-Rebirth and DXX-Rebirth merged and released as
DXX-Rebirth. This package provides the free level data.
</longdescription>
<use>
<flag name="l10n_de">Provides German translations for the game's briefings, robot descriptions, and outro of the original campaign</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">Use high-resolution textures</flag>
</use>
<upstream>
<remote-id type="github">dxx-rebirth/dxx-rebirth</remote-id>
</upstream>
</pkgmetadata>
3 changes: 3 additions & 0 deletions games-action/descent2-freedata/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
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
1 change: 1 addition & 0 deletions games-action/descent2-freedata/descent2-freedata-1.ebuild
34 changes: 34 additions & 0 deletions games-action/descent2-freedata/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>games@gentoo.org</email>
<name>Gentoo Games Project</name>
</maintainer>
<maintainer type="person">
<email>iansilvester@fastmail.fm</email>
<name>Ian Silvester</name>
</maintainer>
<longdescription>
Descent 1 is a classic first-person shooter released in 1995
by Interplay and Parallax. Descent 2 released for the PC in
1996. It, along with its predecessor, was one of the first
games with true 3-dimensional graphics, 6 degrees of freedom
in movement, light sourcing, and the capability to join
multiplayer games on-the-fly. D1X-Rebirth and DXX-Rebirth are
modifications of the original Descent 1 and 2 sources that was
released by Parallax (and are based on the D1X and D2X
sources). It offering OpenGL graphics, advanced multiplayer,
new features, and cross-platform compatibility. Now code bases
of D1X-Rebirth and DXX-Rebirth merged and released as
DXX-Rebirth. This package provides the free level data.
</longdescription>
<use>
<flag name="l10n_de">Provides German translations for the game's briefings, robot descriptions, and outro of the original campaign</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>
</use>
<upstream>
<remote-id type="github">dxx-rebirth/dxx-rebirth</remote-id>
</upstream>
</pkgmetadata>
1 change: 1 addition & 0 deletions games-action/dxx-rebirth/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -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_pre20190720.tar.gz 1923603 BLAKE2B 8af193cda0938f71e28ff02cc15719e6bbd73c958b71c330061ae8b1320fad24e2f5302dcfb413b339e6e092ede305a078b40d445bba875a78669d1c121ef364 SHA512 3dbe599d3d2208c070729eb42be66146d625c250ab326f9b4ecd6514e32937af53358b753f55cb684978daff2bbd10848617f68d695aec7eea747219ce81eff7
DIST dxx-rebirth_v0.59.100-src.tar.gz 1809614 BLAKE2B 6826380312fa23dbc99459db9272cf7ffb5a00a14cfdd777339633fbd943a288af00f182692ebc3078e4c39bf6b6cc9fb05cc6a533ec126b8c881eb22c465868 SHA512 dc9b7ad263e189e779756b62613d4bc62371cb5fec2176a4013395fc18c9d03ab0c9ddc5ccf2668b87e4a77b25d500bdef373126f176bfce49f73b5a98de23d7
217 changes: 217 additions & 0 deletions games-action/dxx-rebirth/dxx-rebirth-0.61.0_pre20190720.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
# Copyright 1999-2019 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=6

inherit eutils scons-utils toolchain-funcs xdg
dr-diem marked this conversation as resolved.
Show resolved Hide resolved
if [[ "$PV" = 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/dxx-rebirth/dxx-rebirth"
else
MY_COMMIT='a17792c89fd49dd12fdf5981670dd7f64b42850f'
S="$WORKDIR/$PN-$MY_COMMIT"
SRC_URI="https://github.com/dxx-rebirth/dxx-rebirth/archive/$MY_COMMIT.tar.gz -> $PN-$PVR.tar.gz"
unset MY_COMMIT
fi

DESCRIPTION="Descent Rebirth - enhanced Descent 1 & 2 engine"
HOMEPAGE="https://www.dxx-rebirth.com/"

LICENSE="DXX-Rebirth GPL-3"
SLOT="0"
# 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"
# Default to building both game engines. The total size is relatively
# small.
IUSE="+d1x +d2x debug editor +flac ipv6 +joystick l10n_de +midi +mp3 +music +opengl opl3-musicpack +png sc55-musicpack sdl2 tracker +vorbis"

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.
#
# Require 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
|| (
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]
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

# 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," )
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
}