summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2019-10-20 23:57:18 +0200
committerJames Le Cuirot <chewi@gentoo.org>2019-10-27 23:47:27 +0000
commit8c0d06600ffb416e0a23b288c82dd08bf054e84b (patch)
treea5aa5bf57c8be489784b7314c9aa0b92b3788746
parentgames-server/ut2004-ded: EAPI 7, drop games eclass, misc improvements (diff)
downloadgentoo-8c0d0660.tar.gz
gentoo-8c0d0660.tar.bz2
gentoo-8c0d0660.zip
games-fps/ut2004: Port to EAPI 7
Closes: https://bugs.gentoo.org/601402 Package-Manager: Portage-2.3.77, Repoman-2.3.17 Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: James Le Cuirot <chewi@gentoo.org>
-rw-r--r--games-fps/ut2004/ut2004-3369.3-r2.ebuild (renamed from games-fps/ut2004/ut2004-3369.3-r1.ebuild)62
1 files changed, 32 insertions, 30 deletions
diff --git a/games-fps/ut2004/ut2004-3369.3-r1.ebuild b/games-fps/ut2004/ut2004-3369.3-r2.ebuild
index 1daedb39a999..9a5ffa68ae71 100644
--- a/games-fps/ut2004/ut2004-3369.3-r1.ebuild
+++ b/games-fps/ut2004/ut2004-3369.3-r2.ebuild
@@ -1,14 +1,16 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
-inherit eutils multilib games
+EAPI=7
+
+inherit desktop eutils
+
+MY_P="${PN}-lnxpatch${PV%.*}-2.tar.bz2"
-MY_P="ut2004-lnxpatch${PV%.*}-2.tar.bz2"
DESCRIPTION="Editor's Choice Edition plus Mega Pack for the well-known first-person shooter"
HOMEPAGE="http://www.unrealtournament2004.com/"
SRC_URI="
- http://treefort.icculus.org/${PN}/${MY_P}
+ http://ut2004.ut-files.com/index.php?dir=Patches/Linux/&file=${MY_P} -> ${MY_P}
http://storage.guntoo.de/downs/downloads/Patch/ut2004-v${PV/./-}-linux-dedicated.7z
mirror://gentoo/ut2004-v${PV/./-}-linux-dedicated.7z"
@@ -18,7 +20,8 @@ KEYWORDS="~amd64 ~x86"
IUSE="dedicated opengl"
RESTRICT="bindist mirror strip"
-UIDEPEND="=virtual/libstdc++-3.3
+UIDEPEND="
+ ~virtual/libstdc++-3.3
virtual/opengl
x11-libs/libXext
x11-libs/libX11
@@ -26,24 +29,27 @@ UIDEPEND="=virtual/libstdc++-3.3
x11-libs/libXdmcp
media-libs/libsdl
media-libs/openal"
-RDEPEND="sys-libs/glibc
+RDEPEND="
+ sys-libs/glibc
games-fps/ut2004-data
games-fps/ut2004-bonuspack-ece
games-fps/ut2004-bonuspack-mega
dedicated? ( !games-server/ut2004-ded )
opengl? ( ${UIDEPEND} )
!dedicated? ( !opengl? ( ${UIDEPEND} ) )"
-DEPEND="app-arch/p7zip"
+BDEPEND="app-arch/p7zip"
-S=${WORKDIR}/UT2004-Patch
-dir=${GAMES_PREFIX_OPT}/${PN}
+S="${WORKDIR}/${PN^^}-Patch"
# The executable pages are required #114733
-QA_PREBUILT="${dir:1}/System/ut2004-bin
- ${dir:1}/System/ucc-bin"
+QA_PREBUILT="
+ /opt/${PN}/System/ut2004-bin
+ /opt/${PN}/System/ucc-bin"
src_prepare() {
- cd "${S}"/System
+ default
+
+ cd System || die
# These files are owned by ut2004-bonuspack-mega
rm -f Manifest.in{i,t} Packages.md5 ucc-bin* || die
@@ -54,7 +60,7 @@ src_prepare() {
rm -f ut2004-bin-linux-amd64 || die
fi
- cd "${WORKDIR}"/ut2004-ucc-bin-09192008
+ cd "${WORKDIR}"/ut2004-ucc-bin-09192008 || die
if use amd64 ; then
mv -f ucc-bin-linux-amd64 "${S}"/System/ucc-bin || die
else
@@ -67,34 +73,30 @@ src_prepare() {
}
src_install() {
- insinto "${dir}"
- doins -r *
- fperms +x "${dir}"/System/ucc-bin
+ insinto /opt/${PN}
+ doins -r .
+ fperms +x /opt/${PN}/System/ucc-bin
if use opengl || ! use dedicated ; then
- fperms +x "${dir}"/System/ut2004-bin
+ fperms +x /opt/${PN}/System/ut2004-bin
- dosym /usr/$(get_libdir)/libopenal.so "${dir}"/System/openal.so
- dosym /usr/$(get_libdir)/libSDL-1.2.so.0 "${dir}"/System/libSDL-1.2.so.0
+ dosym ../../../usr/$(get_libdir)/libopenal.so /opt/${PN}/System/openal.so
+ dosym ../../../usr/$(get_libdir)/libSDL-1.2.so.0 /opt/${PN}/System/libSDL-1.2.so.0
- games_make_wrapper ut2004 ./ut2004 "${dir}" "${dir}"
+ make_wrapper ut2004 ./ut2004 /opt/${PN} /opt/${PN}
make_desktop_entry ut2004 "Unreal Tournament 2004"
fi
if use dedicated ; then
- games_make_wrapper ut2004-ded "./ucc-bin server" "${dir}"/System
+ make_wrapper ut2004-ded "./ucc-bin server" /opt/${PN}/System
fi
-
- prepgamesdirs
}
pkg_postinst() {
- games_pkg_postinst
-
# Here is where we check for the existence of a cdkey...
# If we don't find one, we ask the user for it
- if [[ -f ${dir}/System/cdkey ]] ; then
- einfo "A cdkey file is already present in ${dir}/System"
+ if [[ -f "${EROOT}"/opt/${PN}/System/cdkey ]] ; then
+ einfo "A cdkey file is already present in /opt/${PN}/System"
else
ewarn "You MUST run this before playing the game:"
ewarn "emerge --config =${CATEGORY}/${PF}"
@@ -110,7 +112,7 @@ pkg_postinst() {
}
pkg_postrm() {
- ewarn "This package leaves a cdkey file in ${dir}/System that you need"
+ ewarn "This package leaves a cdkey file in ${EROOT}/opt/${PN}/System that you need"
ewarn "to remove to completely get rid of this game's files."
}
@@ -118,7 +120,7 @@ pkg_config() {
ewarn "Your CD key is NOT checked for validity here so"
ewarn "make sure you type it in correctly."
ewarn "If you CTRL+C out of this, the game will not run!"
- echo
+ ewarn
einfo "CD key format is: XXXXX-XXXXX-XXXXX-XXXXX"
while true ; do
einfo "Please enter your CD key:"
@@ -129,7 +131,7 @@ pkg_config() {
echo "You entered a blank CD key. Try again."
else
if [[ ${CDKEY1} == ${CDKEY2} ]] ; then
- echo "${CDKEY1}" | tr [:lower:] [:upper:] > "${dir}"/System/cdkey
+ echo "${CDKEY1}" | tr [:lower:] [:upper:] > "${EROOT}"/opt/${PN}/System/cdkey || die
einfo "Thank you!"
break
else