diff options
author | Sam James <sam@gentoo.org> | 2021-04-07 10:57:07 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-04-07 11:18:17 +0100 |
commit | 6c6c98e88139fd84916f1b514182395f29e33fc2 (patch) | |
tree | 10773cb55e02b4db81edb155519e8e40d1b2e9b3 /games-fps | |
parent | games-arcade/barbarian-bin: port to EAPI 7, games.eclass-- (diff) | |
download | gentoo-6c6c98e88139fd84916f1b514182395f29e33fc2.tar.gz gentoo-6c6c98e88139fd84916f1b514182395f29e33fc2.tar.bz2 gentoo-6c6c98e88139fd84916f1b514182395f29e33fc2.zip |
games-fps/ut2003-bonuspack-cm: port to EAPI 7, games.eclass--
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-fps')
-rw-r--r-- | games-fps/ut2003-bonuspack-cm/ut2003-bonuspack-cm-1.ebuild | 47 |
1 files changed, 31 insertions, 16 deletions
diff --git a/games-fps/ut2003-bonuspack-cm/ut2003-bonuspack-cm-1.ebuild b/games-fps/ut2003-bonuspack-cm/ut2003-bonuspack-cm-1.ebuild index d42bd801c5ed..a40e978c7e73 100644 --- a/games-fps/ut2003-bonuspack-cm/ut2003-bonuspack-cm-1.ebuild +++ b/games-fps/ut2003-bonuspack-cm/ut2003-bonuspack-cm-1.ebuild @@ -1,38 +1,53 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 -inherit games unpacker +inherit unpacker DESCRIPTION="Community Bonus Pack for UT2003" HOMEPAGE="https://liandri.beyondunreal.com/Unreal_Tournament_2003" SRC_URI="https://downloads.unrealadmin.org/UT2003/BonusPack/cbp2003.zip" +S="${WORKDIR}" LICENSE="ut2003" SLOT="1" KEYWORDS="~x86" -RESTRICT="bindist mirror strip" +# Needs signup to download +RESTRICT="bindist fetch mirror strip" RDEPEND="games-fps/ut2003" -DEPEND="${RDEPEND} - app-arch/unzip" - -S=${WORKDIR} - -dir=${GAMES_PREFIX_OPT}/ut2003 -Ddir=${D}/${dir} +DEPEND="${RDEPEND}" +BDEPEND="app-arch/unzip" src_unpack() { unpack_zip "${DISTDIR}"/${A} } src_install() { - for i in Animations Help Music Maps StaticMeshes Textures System - do + # Inlined from games.eclass + local dir="${EPREFIX}"/opt/ut2003 + local Ddir="${D}${dir}" + + # Inlined from games.eclass + _games_umod_unpack() { + local umod=${1} + + mkdir -p "${Ddir}"/System || die + cp "${dir}"/System/{ucc-bin,Manifest.ini,{Engine,Core,zlib,ogg,vorbis}.so,{Engine,Core}.int} "${Ddir}"/System || die + # Don't die here (for now) in case Default.ini, DefUser.ini are missing + cp "${dir}"/System/Def{ault,User}.ini "${Ddir}"/System &> /dev/null + + cd "${Ddir}"/System || die + UT_DATA_PATH="${Ddir}"/System ./ucc-bin umodunpack -x "${S}/${umod}" -nohomedir &> /dev/null || die "uncompressing file ${umod}" + rm -f "${Ddir}"/System/{ucc-bin,{Manifest,Def{ault,User},User,UT200{3,4}}.ini,{Engine,Core,zlib,ogg,vorbis}.so,{Engine,Core}.int,ucc.log &>/dev/null || die "Removing temporary files" + } + + for i in Animations Help Music Maps StaticMeshes Textures System; do mkdir -p "${Ddir}"/${i} || die done - games_umod_unpack CBP2003.ut2mod - rm "${Ddir}/Readme.txt" "${Ddir}/cbp installer logo1.bmp" - prepgamesdirs + + _games_umod_unpack CBP2003.ut2mod + + rm "${Ddir}"/Readme.txt "${Ddir}/cbp installer logo1.bmp" || die } |