From ec68302f8431a887377c95d166c58cb422fc3b64 Mon Sep 17 00:00:00 2001 From: Matt Jolly Date: Sat, 27 Aug 2022 19:10:38 +1000 Subject: games-fps/alephone: new package, add 9999, 20220115 Closes: https://bugs.gentoo.org/82908 Signed-off-by: Matt Jolly Signed-off-by: Sam James --- games-fps/alephone/Manifest | 1 + games-fps/alephone/alephone-20220115.ebuild | 90 +++++++++++++++++++++++++++++ games-fps/alephone/alephone-9999.ebuild | 90 +++++++++++++++++++++++++++++ games-fps/alephone/files/alephone.sh | 28 +++++++++ games-fps/alephone/metadata.xml | 17 ++++++ 5 files changed, 226 insertions(+) create mode 100644 games-fps/alephone/Manifest create mode 100644 games-fps/alephone/alephone-20220115.ebuild create mode 100644 games-fps/alephone/alephone-9999.ebuild create mode 100644 games-fps/alephone/files/alephone.sh create mode 100644 games-fps/alephone/metadata.xml diff --git a/games-fps/alephone/Manifest b/games-fps/alephone/Manifest new file mode 100644 index 000000000000..56cfbda795a6 --- /dev/null +++ b/games-fps/alephone/Manifest @@ -0,0 +1 @@ +DIST release-20220115.tar.gz 6487243 BLAKE2B 7c304d28e826e2b3b32427661d3e85ff5ec41e6200d98468edeb5ea11a751fbbd333b72e3efe0937bc496088e36560351f810a6471d92cb684b0bf6adceabf68 SHA512 53d9c602af58f56b5236ca9a539ffac47abe8350b3d228345348e63648a5ef343335be9b0a3366a201807b3e3aa013dc360a38c3e7b47f4a6da2a696ec6ea646 diff --git a/games-fps/alephone/alephone-20220115.ebuild b/games-fps/alephone/alephone-20220115.ebuild new file mode 100644 index 000000000000..9bddbbc0d931 --- /dev/null +++ b/games-fps/alephone/alephone-20220115.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools optfeature prefix xdg + +DESCRIPTION="An enhanced version of the game engine from the classic Mac game, Marathon" +HOMEPAGE="http://source.bungie.org/" +if [[ ${PV} = 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Aleph-One-Marathon/alephone/" + EGIT_SUBMODULES=() # Upstream includes game data as submodules, we only want the engine +else + SRC_URI="https://github.com/Aleph-One-Marathon/alephone/archive/refs/tags/release-${PV}.tar.gz" + S="${WORKDIR}/${PN}-release-${PV}" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-3+ BitstreamVera OFL-1.1" +SLOT="0" + +IUSE="alsa curl speex upnp" + +# ffmpeg covers most audio/video use cases and the package doesn't configure with alternatives enabled (media-libs/smpeg) +# When resolved upstream, !ffmpeg ( media-libs/libmad media-libs/libsndfile media-libs/libvorbis media-libs/smpeg ) +# with an appropriate REQUIRED_USE may be added. +# See https://github.com/Aleph-One-Marathon/alephone/issues/85 +RDEPEND=" + dev-libs/boost:= + dev-libs/zziplib:= + media-libs/libpng + media-libs/libsdl2 + media-libs/sdl2-image[png] + media-libs/sdl2-net + media-libs/sdl2-ttf + media-video/ffmpeg:=[mp3,vorbis] + sys-libs/zlib + virtual/opengl + virtual/glu + alsa? ( media-libs/alsa-lib ) + curl? ( net-misc/curl ) + speex? ( media-libs/speex ) + upnp? ( net-libs/miniupnpc ) +" + +DEPEND=" + ${RDEPEND} +" + +BDEPEND=" + virtual/pkgconfig +" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + --enable-lua \ + --enable-opengl \ + --with-ffmpeg \ + --without-mad \ + --without-smpeg \ + --without-sndfile \ + --without-vorbis \ + $(use_with alsa) \ + $(use_with curl) \ + $(use_with speex) \ + $(use_with upnp miniupnpc) +} + +src_install() { + default + prefixify_ro "${FILESDIR}"/${PN}.sh + dobin "${T}"/${PN}.sh + doman docs/${PN}.6 + docinto html/ + dodoc docs/*.html +} + +pkg_postinst() { + xdg_pkg_postinst + optfeature_header "Install game data:" + optfeature "Marathon data files" games-fps/alephone-marathon + optfeature "Marathon 2 Durandal data files" games-fps/alephone-durandal + optfeature "Marathon: Infinity data files" games-fps/alephone-infinity +} diff --git a/games-fps/alephone/alephone-9999.ebuild b/games-fps/alephone/alephone-9999.ebuild new file mode 100644 index 000000000000..9bddbbc0d931 --- /dev/null +++ b/games-fps/alephone/alephone-9999.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools optfeature prefix xdg + +DESCRIPTION="An enhanced version of the game engine from the classic Mac game, Marathon" +HOMEPAGE="http://source.bungie.org/" +if [[ ${PV} = 9999* ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Aleph-One-Marathon/alephone/" + EGIT_SUBMODULES=() # Upstream includes game data as submodules, we only want the engine +else + SRC_URI="https://github.com/Aleph-One-Marathon/alephone/archive/refs/tags/release-${PV}.tar.gz" + S="${WORKDIR}/${PN}-release-${PV}" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-3+ BitstreamVera OFL-1.1" +SLOT="0" + +IUSE="alsa curl speex upnp" + +# ffmpeg covers most audio/video use cases and the package doesn't configure with alternatives enabled (media-libs/smpeg) +# When resolved upstream, !ffmpeg ( media-libs/libmad media-libs/libsndfile media-libs/libvorbis media-libs/smpeg ) +# with an appropriate REQUIRED_USE may be added. +# See https://github.com/Aleph-One-Marathon/alephone/issues/85 +RDEPEND=" + dev-libs/boost:= + dev-libs/zziplib:= + media-libs/libpng + media-libs/libsdl2 + media-libs/sdl2-image[png] + media-libs/sdl2-net + media-libs/sdl2-ttf + media-video/ffmpeg:=[mp3,vorbis] + sys-libs/zlib + virtual/opengl + virtual/glu + alsa? ( media-libs/alsa-lib ) + curl? ( net-misc/curl ) + speex? ( media-libs/speex ) + upnp? ( net-libs/miniupnpc ) +" + +DEPEND=" + ${RDEPEND} +" + +BDEPEND=" + virtual/pkgconfig +" + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + --enable-lua \ + --enable-opengl \ + --with-ffmpeg \ + --without-mad \ + --without-smpeg \ + --without-sndfile \ + --without-vorbis \ + $(use_with alsa) \ + $(use_with curl) \ + $(use_with speex) \ + $(use_with upnp miniupnpc) +} + +src_install() { + default + prefixify_ro "${FILESDIR}"/${PN}.sh + dobin "${T}"/${PN}.sh + doman docs/${PN}.6 + docinto html/ + dodoc docs/*.html +} + +pkg_postinst() { + xdg_pkg_postinst + optfeature_header "Install game data:" + optfeature "Marathon data files" games-fps/alephone-marathon + optfeature "Marathon 2 Durandal data files" games-fps/alephone-durandal + optfeature "Marathon: Infinity data files" games-fps/alephone-infinity +} diff --git a/games-fps/alephone/files/alephone.sh b/games-fps/alephone/files/alephone.sh new file mode 100644 index 000000000000..3bb51c26b67c --- /dev/null +++ b/games-fps/alephone/files/alephone.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +DIR=$(dirname "${0}") +CMD=$(basename "${0}") +ALEPHONE=${CMD%%.sh} + +if [[ -z "${1}" ]] +then + echo "Usage: ${0} SCENARIO FLAGS" + echo "Where SCENARIO is one of:" + for d in @GENTOO_PORTAGE_EPREFIX@/usr/share/alephone-* + do + echo " ${d##*/alephone-}" + done + exit 2 +fi + +DATA="@GENTOO_PORTAGE_EPREFIX@/usr/share/alephone-${1}" + +shift + +# kill ARTS, because we're just that nice +if artsshell terminate 2> /dev/null +then + sleep 2 +fi + +"${DIR}"/"${ALEPHONE}" "$@" "${DATA}" diff --git a/games-fps/alephone/metadata.xml b/games-fps/alephone/metadata.xml new file mode 100644 index 000000000000..62d4b84ac671 --- /dev/null +++ b/games-fps/alephone/metadata.xml @@ -0,0 +1,17 @@ + + + + + games@gentoo.org + Gentoo Games Project + + + Matt.Jolly@footclan.ninja + Matt Jolly + + + Aleph-One-Marathon/alephone + marathon + https://github.com/Aleph-One-Marathon/alephone/issues + + -- cgit v1.2.3-65-gdbad