diff --git a/contrib/gentoo/games-action/d1x-rebirth/d1x-rebirth-0.59.100.ebuild b/contrib/gentoo/games-action/d1x-rebirth/d1x-rebirth-0.59.100.ebuild index 8b9063c1d..394965e6b 100644 --- a/contrib/gentoo/games-action/d1x-rebirth/d1x-rebirth-0.59.100.ebuild +++ b/contrib/gentoo/games-action/d1x-rebirth/d1x-rebirth-0.59.100.ebuild @@ -16,7 +16,7 @@ DESCRIPTION="Descent Rebirth - enhanced Descent $MY_ENGINE engine" HOMEPAGE="http://www.dxx-rebirth.com/" SRC_URI="" -LICENSE="D1X GPL-3" +LICENSE="DXX-Rebirth GPL-3" SLOT="0" KEYWORDS="amd64 x86" IUSE="debug editor ipv6 +opengl timidity tracker" diff --git a/contrib/gentoo/games-action/descent1-freedata/descent1-freedata-1.ebuild b/contrib/gentoo/games-action/descent1-freedata/descent1-freedata-1.ebuild new file mode 100644 index 000000000..52598e172 --- /dev/null +++ b/contrib/gentoo/games-action/descent1-freedata/descent1-freedata-1.ebuild @@ -0,0 +1,48 @@ +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DXX_ENGINE="${PN:7:1}" +DESCRIPTION="Free content for games-action/d${DXX_ENGINE}x-rebirth" +HOMEPAGE="http://www.dxx-rebirth.com/" +IUSE="l10n_de opl3-musicpack sc55-musicpack" +SRC_URI=" + l10n_de? ( http://www.dxx-rebirth.com/download/dxx/res/d${DXX_ENGINE}xr-briefings-ger.dxa ) + opl3-musicpack? ( http://www.dxx-rebirth.com/download/dxx/res/d${DXX_ENGINE}xr-opl3-music.dxa ) + sc55-musicpack? ( http://www.dxx-rebirth.com/download/dxx/res/d${DXX_ENGINE}xr-sc55-music.dxa ) +" + +if [[ "${PN}" = descent1-freedata ]]; then + IUSE+=" +textures" + SRC_URI+=" + textures? ( http://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="" + +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 +} diff --git a/contrib/gentoo/games-action/descent2-freedata/descent2-freedata-1.ebuild b/contrib/gentoo/games-action/descent2-freedata/descent2-freedata-1.ebuild new file mode 120000 index 000000000..d0873bf0b --- /dev/null +++ b/contrib/gentoo/games-action/descent2-freedata/descent2-freedata-1.ebuild @@ -0,0 +1 @@ +../descent1-freedata/descent1-freedata-1.ebuild \ No newline at end of file diff --git a/contrib/gentoo/games-action/dxx-rebirth/dxx-rebirth-9999.ebuild b/contrib/gentoo/games-action/dxx-rebirth/dxx-rebirth-9999.ebuild index 29bf58492..803ada14f 100644 --- a/contrib/gentoo/games-action/dxx-rebirth/dxx-rebirth-9999.ebuild +++ b/contrib/gentoo/games-action/dxx-rebirth/dxx-rebirth-9999.ebuild @@ -1,3 +1,5 @@ +# Distributed under the terms of the GNU General Public License v2 +# # After release 0.58.1 and before beta release 0.59.100, upstream # combined the source for the Descent 1 and Descent 2 engines into a # single tree. The combined tree builds common code into a static @@ -8,7 +10,7 @@ EAPI=6 -inherit eutils scons-utils toolchain-funcs +inherit eutils scons-utils toolchain-funcs xdg if [[ "$PV" = 9999 ]]; then inherit git-r3 EGIT_REPO_URI="https://github.com/dxx-rebirth/dxx-rebirth" @@ -20,10 +22,10 @@ else RESTRICT='mirror' fi -DESCRIPTION="Descent Rebirth - enhanced Descent engines" +DESCRIPTION="Descent Rebirth - enhanced Descent 1 & 2 engine" HOMEPAGE="http://www.dxx-rebirth.com/" -LICENSE="D1X GPL-3" +LICENSE="DXX-Rebirth GPL-3" SLOT="0" # Other architectures are reported to work, but not tested regularly by # the core team. @@ -35,50 +37,122 @@ SLOT="0" KEYWORDS="amd64 x86" # Default to building both game engines. The total size is relatively # small. -IUSE="+d1x +d2x debug editor ipv6 +opengl timidity tracker" +IUSE="+d1x +d2x debug editor +flac ipv6 +joystick l10n_de +midi +mp3 +music +opengl opl3-musicpack sc55-musicpack tracker +vorbis" -DEPEND="opengl? ( virtual/opengl virtual/glu ) - dev-games/physfs[hog,mvl,zip] - media-libs/libsdl[sound,opengl?,video] - media-libs/sdl-mixer[timidity?]" +DEPEND="dev-games/physfs[hog,mvl,zip] + media-libs/libsdl[joystick?,opengl?,sound,video] + music? ( media-libs/sdl-mixer ) + opengl? ( + virtual/opengl + virtual/glu )" + +# 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? ( + !