1 |
commit: 8c0d06600ffb416e0a23b288c82dd08bf054e84b |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 20 21:57:18 2019 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 27 23:47:27 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c0d0660 |
7 |
|
8 |
games-fps/ut2004: Port to EAPI 7 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/601402 |
11 |
Package-Manager: Portage-2.3.77, Repoman-2.3.17 |
12 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
13 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
14 |
|
15 |
...04-3369.3-r1.ebuild => ut2004-3369.3-r2.ebuild} | 62 +++++++++++----------- |
16 |
1 file changed, 32 insertions(+), 30 deletions(-) |
17 |
|
18 |
diff --git a/games-fps/ut2004/ut2004-3369.3-r1.ebuild b/games-fps/ut2004/ut2004-3369.3-r2.ebuild |
19 |
similarity index 72% |
20 |
rename from games-fps/ut2004/ut2004-3369.3-r1.ebuild |
21 |
rename to games-fps/ut2004/ut2004-3369.3-r2.ebuild |
22 |
index 1daedb39a99..9a5ffa68ae7 100644 |
23 |
--- a/games-fps/ut2004/ut2004-3369.3-r1.ebuild |
24 |
+++ b/games-fps/ut2004/ut2004-3369.3-r2.ebuild |
25 |
@@ -1,14 +1,16 @@ |
26 |
# Copyright 1999-2019 Gentoo Authors |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
|
29 |
-EAPI=5 |
30 |
-inherit eutils multilib games |
31 |
+EAPI=7 |
32 |
+ |
33 |
+inherit desktop eutils |
34 |
+ |
35 |
+MY_P="${PN}-lnxpatch${PV%.*}-2.tar.bz2" |
36 |
|
37 |
-MY_P="ut2004-lnxpatch${PV%.*}-2.tar.bz2" |
38 |
DESCRIPTION="Editor's Choice Edition plus Mega Pack for the well-known first-person shooter" |
39 |
HOMEPAGE="http://www.unrealtournament2004.com/" |
40 |
SRC_URI=" |
41 |
- http://treefort.icculus.org/${PN}/${MY_P} |
42 |
+ http://ut2004.ut-files.com/index.php?dir=Patches/Linux/&file=${MY_P} -> ${MY_P} |
43 |
http://storage.guntoo.de/downs/downloads/Patch/ut2004-v${PV/./-}-linux-dedicated.7z |
44 |
mirror://gentoo/ut2004-v${PV/./-}-linux-dedicated.7z" |
45 |
|
46 |
@@ -18,7 +20,8 @@ KEYWORDS="~amd64 ~x86" |
47 |
IUSE="dedicated opengl" |
48 |
RESTRICT="bindist mirror strip" |
49 |
|
50 |
-UIDEPEND="=virtual/libstdc++-3.3 |
51 |
+UIDEPEND=" |
52 |
+ ~virtual/libstdc++-3.3 |
53 |
virtual/opengl |
54 |
x11-libs/libXext |
55 |
x11-libs/libX11 |
56 |
@@ -26,24 +29,27 @@ UIDEPEND="=virtual/libstdc++-3.3 |
57 |
x11-libs/libXdmcp |
58 |
media-libs/libsdl |
59 |
media-libs/openal" |
60 |
-RDEPEND="sys-libs/glibc |
61 |
+RDEPEND=" |
62 |
+ sys-libs/glibc |
63 |
games-fps/ut2004-data |
64 |
games-fps/ut2004-bonuspack-ece |
65 |
games-fps/ut2004-bonuspack-mega |
66 |
dedicated? ( !games-server/ut2004-ded ) |
67 |
opengl? ( ${UIDEPEND} ) |
68 |
!dedicated? ( !opengl? ( ${UIDEPEND} ) )" |
69 |
-DEPEND="app-arch/p7zip" |
70 |
+BDEPEND="app-arch/p7zip" |
71 |
|
72 |
-S=${WORKDIR}/UT2004-Patch |
73 |
-dir=${GAMES_PREFIX_OPT}/${PN} |
74 |
+S="${WORKDIR}/${PN^^}-Patch" |
75 |
|
76 |
# The executable pages are required #114733 |
77 |
-QA_PREBUILT="${dir:1}/System/ut2004-bin |
78 |
- ${dir:1}/System/ucc-bin" |
79 |
+QA_PREBUILT=" |
80 |
+ /opt/${PN}/System/ut2004-bin |
81 |
+ /opt/${PN}/System/ucc-bin" |
82 |
|
83 |
src_prepare() { |
84 |
- cd "${S}"/System |
85 |
+ default |
86 |
+ |
87 |
+ cd System || die |
88 |
|
89 |
# These files are owned by ut2004-bonuspack-mega |
90 |
rm -f Manifest.in{i,t} Packages.md5 ucc-bin* || die |
91 |
@@ -54,7 +60,7 @@ src_prepare() { |
92 |
rm -f ut2004-bin-linux-amd64 || die |
93 |
fi |
94 |
|
95 |
- cd "${WORKDIR}"/ut2004-ucc-bin-09192008 |
96 |
+ cd "${WORKDIR}"/ut2004-ucc-bin-09192008 || die |
97 |
if use amd64 ; then |
98 |
mv -f ucc-bin-linux-amd64 "${S}"/System/ucc-bin || die |
99 |
else |
100 |
@@ -67,34 +73,30 @@ src_prepare() { |
101 |
} |
102 |
|
103 |
src_install() { |
104 |
- insinto "${dir}" |
105 |
- doins -r * |
106 |
- fperms +x "${dir}"/System/ucc-bin |
107 |
+ insinto /opt/${PN} |
108 |
+ doins -r . |
109 |
+ fperms +x /opt/${PN}/System/ucc-bin |
110 |
|
111 |
if use opengl || ! use dedicated ; then |
112 |
- fperms +x "${dir}"/System/ut2004-bin |
113 |
+ fperms +x /opt/${PN}/System/ut2004-bin |
114 |
|
115 |
- dosym /usr/$(get_libdir)/libopenal.so "${dir}"/System/openal.so |
116 |
- dosym /usr/$(get_libdir)/libSDL-1.2.so.0 "${dir}"/System/libSDL-1.2.so.0 |
117 |
+ dosym ../../../usr/$(get_libdir)/libopenal.so /opt/${PN}/System/openal.so |
118 |
+ dosym ../../../usr/$(get_libdir)/libSDL-1.2.so.0 /opt/${PN}/System/libSDL-1.2.so.0 |
119 |
|
120 |
- games_make_wrapper ut2004 ./ut2004 "${dir}" "${dir}" |
121 |
+ make_wrapper ut2004 ./ut2004 /opt/${PN} /opt/${PN} |
122 |
make_desktop_entry ut2004 "Unreal Tournament 2004" |
123 |
fi |
124 |
|
125 |
if use dedicated ; then |
126 |
- games_make_wrapper ut2004-ded "./ucc-bin server" "${dir}"/System |
127 |
+ make_wrapper ut2004-ded "./ucc-bin server" /opt/${PN}/System |
128 |
fi |
129 |
- |
130 |
- prepgamesdirs |
131 |
} |
132 |
|
133 |
pkg_postinst() { |
134 |
- games_pkg_postinst |
135 |
- |
136 |
# Here is where we check for the existence of a cdkey... |
137 |
# If we don't find one, we ask the user for it |
138 |
- if [[ -f ${dir}/System/cdkey ]] ; then |
139 |
- einfo "A cdkey file is already present in ${dir}/System" |
140 |
+ if [[ -f "${EROOT}"/opt/${PN}/System/cdkey ]] ; then |
141 |
+ einfo "A cdkey file is already present in /opt/${PN}/System" |
142 |
else |
143 |
ewarn "You MUST run this before playing the game:" |
144 |
ewarn "emerge --config =${CATEGORY}/${PF}" |
145 |
@@ -110,7 +112,7 @@ pkg_postinst() { |
146 |
} |
147 |
|
148 |
pkg_postrm() { |
149 |
- ewarn "This package leaves a cdkey file in ${dir}/System that you need" |
150 |
+ ewarn "This package leaves a cdkey file in ${EROOT}/opt/${PN}/System that you need" |
151 |
ewarn "to remove to completely get rid of this game's files." |
152 |
} |
153 |
|
154 |
@@ -118,7 +120,7 @@ pkg_config() { |
155 |
ewarn "Your CD key is NOT checked for validity here so" |
156 |
ewarn "make sure you type it in correctly." |
157 |
ewarn "If you CTRL+C out of this, the game will not run!" |
158 |
- echo |
159 |
+ ewarn |
160 |
einfo "CD key format is: XXXXX-XXXXX-XXXXX-XXXXX" |
161 |
while true ; do |
162 |
einfo "Please enter your CD key:" |
163 |
@@ -129,7 +131,7 @@ pkg_config() { |
164 |
echo "You entered a blank CD key. Try again." |
165 |
else |
166 |
if [[ ${CDKEY1} == ${CDKEY2} ]] ; then |
167 |
- echo "${CDKEY1}" | tr [:lower:] [:upper:] > "${dir}"/System/cdkey |
168 |
+ echo "${CDKEY1}" | tr [:lower:] [:upper:] > "${EROOT}"/opt/${PN}/System/cdkey || die |
169 |
einfo "Thank you!" |
170 |
break |
171 |
else |