Gentoo Archives: gentoo-commits

From: "Vadim A. Misbakh-Soloviov" <mva@×××.name>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gamerlay:master commit in: games-strategy/glest/, games-strategy/glest/files/
Date: Sun, 04 Feb 2018 06:39:04
Message-Id: 1517726255.46f799ab1e1167af047d75d8ba333e56d8da3a13.mva@gentoo
1 commit: 46f799ab1e1167af047d75d8ba333e56d8da3a13
2 Author: Vadim A. Misbakh-Soloviov <git <AT> mva <DOT> name>
3 AuthorDate: Sun Feb 4 06:34:53 2018 +0000
4 Commit: Vadim A. Misbakh-Soloviov <mva <AT> mva <DOT> name>
5 CommitDate: Sun Feb 4 06:37:35 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/gamerlay.git/commit/?id=46f799ab
7
8 games-strategy/glest: drop due to many problems:
9
10 - Semidead upstream
11 - not compatible with modern GCC
12 - not compatible with modern glibc
13
14 Fixes https://bugs.gentoo.org/616150
15
16 .../glest/files/glest-3.2.2-gentoo.patch | 151 ---------------------
17 .../glest/files/glest-3.2.2-xerces-c.patch | 49 -------
18 games-strategy/glest/glest-3.2.2-r1.ebuild | 85 ------------
19 games-strategy/glest/metadata.xml | 5 -
20 4 files changed, 290 deletions(-)
21
22 diff --git a/games-strategy/glest/files/glest-3.2.2-gentoo.patch b/games-strategy/glest/files/glest-3.2.2-gentoo.patch
23 deleted file mode 100644
24 index 633fe37..0000000
25 --- a/games-strategy/glest/files/glest-3.2.2-gentoo.patch
26 +++ /dev/null
27 @@ -1,151 +0,0 @@
28 -diff -urN glest-source-3.2.2/glest_game/ai/ai_interface.h glest-source-3.2.2_mod/glest_game/ai/ai_interface.h
29 ---- glest-source-3.2.2/glest_game/ai/ai_interface.h 2009-04-15 11:17:19.000000000 +0400
30 -+++ glest-source-3.2.2_mod/glest_game/ai/ai_interface.h 2009-04-15 12:25:04.000000000 +0400
31 -@@ -84,7 +84,11 @@
32 - bool isFreeCells(const Vec2i &pos, int size, Field field);
33 -
34 - private:
35 -- string getLogFilename() const {return "ai"+intToStr(factionIndex)+".log";}
36 -+ string getLogFilename() const {
37 -+ string logfn=getenv("HOME");
38 -+ logfn+="/.glest/ai"+intToStr(factionIndex)+".log";
39 -+ return logfn;
40 -+ }
41 - };
42 -
43 - }}//end namespace
44 -diff -urN glest-source-3.2.2/glest_game/ai/ai_rule.cpp glest-source-3.2.2_mod/glest_game/ai/ai_rule.cpp
45 ---- glest-source-3.2.2/glest_game/ai/ai_rule.cpp 2009-04-15 11:17:19.000000000 +0400
46 -+++ glest-source-3.2.2_mod/glest_game/ai/ai_rule.cpp 2009-04-15 11:19:02.000000000 +0400
47 -@@ -17,6 +17,8 @@
48 - #include "unit.h"
49 - #include "leak_dumper.h"
50 -
51 -+#include <limits.h>
52 -+
53 - using Shared::Graphics::Vec2i;
54 -
55 - namespace Glest{ namespace Game{
56 -diff -urN glest-source-3.2.2/glest_game/game/game.cpp glest-source-3.2.2_mod/glest_game/game/game.cpp
57 ---- glest-source-3.2.2/glest_game/game/game.cpp 2009-04-15 11:17:19.000000000 +0400
58 -+++ glest-source-3.2.2_mod/glest_game/game/game.cpp 2009-04-15 12:21:29.000000000 +0400
59 -@@ -443,7 +443,8 @@
60 - }
61 - else if(key=='E'){
62 - for(int i=0; i<100; ++i){
63 -- string path= "screens/screen" + intToStr(i) + ".tga";
64 -+ string path=getenv("HOME");
65 -+ path+="/.glest/screens/screen" + intToStr(i) + ".tga";
66 -
67 - FILE *f= fopen(path.c_str(), "rb");
68 - if(f==NULL){
69 -diff -urN glest-source-3.2.2/glest_game/main/main.cpp glest-source-3.2.2_mod/glest_game/main/main.cpp
70 ---- glest-source-3.2.2/glest_game/main/main.cpp 2009-04-15 11:17:19.000000000 +0400
71 -+++ glest-source-3.2.2_mod/glest_game/main/main.cpp 2009-04-15 12:32:04.000000000 +0400
72 -@@ -114,6 +114,17 @@
73 - // =====================================================
74 -
75 - int glestMain(int argc, char** argv){
76 -+ if (!getenv("HOME"))
77 -+ throw runtime_error("HOME external variable is not set");
78 -+
79 -+ char path[PATH_MAX];
80 -+ snprintf(path, PATH_MAX, "%s/.glest", getenv("HOME"));
81 -+ mkdir(path, 0750);
82 -+
83 -+ snprintf(path, PATH_MAX, "%s/.glest/screens", getenv("HOME"));
84 -+ mkdir(path, 0750);
85 -+
86 -+ chdir("@GENTOO_DATADIR@");
87 -
88 - MainWindow *mainWindow= NULL;
89 - Program *program= NULL;
90 -diff -urN glest-source-3.2.2/glest_game/main/program.cpp glest-source-3.2.2_mod/glest_game/main/program.cpp
91 ---- glest-source-3.2.2/glest_game/main/program.cpp 2009-04-15 11:17:19.000000000 +0400
92 -+++ glest-source-3.2.2_mod/glest_game/main/program.cpp 2009-04-15 12:11:51.000000000 +0400
93 -@@ -196,9 +196,11 @@
94 - updateTimer.init(GameConstants::updateFps, maxTimes);
95 - updateCameraTimer.init(GameConstants::cameraFps, maxTimes);
96 -
97 -- //log start
98 -- Logger &logger= Logger::getInstance();
99 -- logger.setFile("glest.log");
100 -+ //log start
101 -+ char path[PATH_MAX];
102 -+ snprintf(path, PATH_MAX, "%s/.glest/glest.log", getenv("HOME"));
103 -+ Logger &logger= Logger::getInstance();
104 -+ logger.setFile(path);
105 - logger.clear();
106 -
107 - //lang
108 -diff -urN glest-source-3.2.2/shared_lib/sources/util/leak_dumper.cpp glest-source-3.2.2_mod/shared_lib/sources/util/leak_dumper.cpp
109 ---- glest-source-3.2.2/shared_lib/sources/util/leak_dumper.cpp 2009-04-15 11:17:19.000000000 +0400
110 -+++ glest-source-3.2.2_mod/shared_lib/sources/util/leak_dumper.cpp 2009-04-15 12:04:49.000000000 +0400
111 -@@ -52,7 +52,9 @@
112 - }
113 -
114 - AllocRegistry::~AllocRegistry(){
115 -- dump("leak_dump.log");
116 -+ char path[PATH_MAX];
117 -+ snprintf(path, PATH_MAX, "%s/.glest/leak_dump.log", getenv("HOME"));
118 -+ dump(path);
119 - }
120 -
121 - void AllocRegistry::allocate(AllocInfo info){
122 -diff -urN glest-source-3.2.2/shared_lib/sources/util/profiler.cpp glest-source-3.2.2_mod/shared_lib/sources/util/profiler.cpp
123 ---- glest-source-3.2.2/shared_lib/sources/util/profiler.cpp 2009-04-15 11:17:19.000000000 +0400
124 -+++ glest-source-3.2.2_mod/shared_lib/sources/util/profiler.cpp 2009-04-15 12:01:52.000000000 +0400
125 -@@ -71,9 +71,11 @@
126 - Profiler::~Profiler(){
127 - rootSection->stop();
128 -
129 -- FILE *f= fopen("profiler.log", "w");
130 -+ char path[PATH_MAX];
131 -+ snprintf(path, PATH_MAX, "%s/.glest/profiler.log", getenv("HOME"));
132 -+ FILE *f= fopen(path, "w");
133 - if(f==NULL)
134 -- throw runtime_error("Can not open file: profiler.log");
135 -+ throw runtime_error("Can not open file: %s",path);
136 -
137 - fprintf(f, "Profiler Results\n\n");
138 -
139 -diff -urN glest-source-3.2.2/shared_lib/sources/util/properties.cpp glest-source-3.2.2_mod/shared_lib/sources/util/properties.cpp
140 ---- glest-source-3.2.2/shared_lib/sources/util/properties.cpp 2009-04-15 11:17:19.000000000 +0400
141 -+++ glest-source-3.2.2_mod/shared_lib/sources/util/properties.cpp 2009-04-15 13:09:33.000000000 +0400
142 -@@ -15,6 +15,9 @@
143 - #include <stdexcept>
144 - #include <cstring>
145 -
146 -+#include <limits.h>
147 -+#include <stdlib.h>
148 -+
149 - #include "conversion.h"
150 - #include "leak_dumper.h"
151 -
152 -@@ -34,9 +37,13 @@
153 -
154 - this->path= path;
155 -
156 -- fileStream.open(path.c_str(), ios_base::in);
157 -+ char str[PATH_MAX];
158 -+ snprintf(str, PATH_MAX, "%s/.glest/%s", getenv("HOME"), path.c_str());
159 -+ fileStream.open(str, ios_base::in);
160 - if(fileStream.fail()){
161 -- throw runtime_error("Can't open propertyMap file: " + path);
162 -+ fileStream.open(path.c_str(), ios_base::in); // use defaults
163 -+ if(fileStream.fail())
164 -+ throw runtime_error("Can't open propertyMap file: " + path + " cwd: "+ getenv("PWD"));
165 - }
166 -
167 - propertyMap.clear();
168 -@@ -71,7 +78,9 @@
169 - void Properties::save(const string &path){
170 - ofstream fileStream;
171 -
172 -- fileStream.open(path.c_str(), ios_base::out | ios_base::trunc);
173 -+ char str[PATH_MAX];
174 -+ snprintf(str, PATH_MAX, "%s/.glest/%s", getenv("HOME"), path.c_str());
175 -+ fileStream.open(str, ios_base::out | ios_base::trunc);
176 -
177 - fileStream << "; === propertyMap File === \n";
178 - fileStream << '\n';
179
180 diff --git a/games-strategy/glest/files/glest-3.2.2-xerces-c.patch b/games-strategy/glest/files/glest-3.2.2-xerces-c.patch
181 deleted file mode 100644
182 index 98e9f40..0000000
183 --- a/games-strategy/glest/files/glest-3.2.2-xerces-c.patch
184 +++ /dev/null
185 @@ -1,49 +0,0 @@
186 -diff -urN glest-source-3.2.1/shared_lib/sources/xml/xml_parser.cpp glest-source-3.2.1.mod/shared_lib/sources/xml/xml_parser.cpp
187 ---- glest-source-3.2.1/shared_lib/sources/xml/xml_parser.cpp 2009-02-13 18:52:25.000000000 +0300
188 -+++ glest-source-3.2.1.mod/shared_lib/sources/xml/xml_parser.cpp 2009-04-15 11:13:46.000000000 +0400
189 -@@ -87,10 +87,17 @@
190 -
191 - try{
192 - ErrorHandler errorHandler;
193 -- DOMBuilder *parser= (static_cast<DOMImplementationLS*>(implementation))->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
194 -- parser->setErrorHandler(&errorHandler);
195 -- parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true);
196 -- parser->setFeature(XMLUni::fgDOMValidation, true);
197 -+#if XERCES_VERSION_MAJOR < 3
198 -+ DOMBuilder *parser= (static_cast<DOMImplementationLS*>(implementation))->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
199 -+ parser->setErrorHandler(&errorHandler);
200 -+ parser->setFeature(XMLUni::fgXercesSchemaFullChecking, true);
201 -+ parser->setFeature(XMLUni::fgDOMValidation, true);
202 -+#else
203 -+ DOMLSParser *parser = (static_cast<DOMImplementationLS*>(implementation))->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
204 -+ DOMConfiguration *config = parser->getDomConfig();
205 -+ config->setParameter(XMLUni::fgXercesSchemaFullChecking, true);
206 -+ config->setParameter(XMLUni::fgDOMValidate, true);
207 -+#endif
208 - DOMDocument *document= parser->parseURI(path.c_str());
209 -
210 - if(document==NULL){
211 -@@ -119,9 +126,20 @@
212 - }
213 -
214 - LocalFileFormatTarget file(path.c_str());
215 -- DOMWriter* writer = implementation->createDOMWriter();
216 -- writer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
217 -- writer->writeNode(&file, *document);
218 -+#if XERCES_VERSION_MAJOR < 3
219 -+ DOMWriter* writer = implementation->createDOMWriter();
220 -+ writer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
221 -+ writer->writeNode(&file, *document);
222 -+#else
223 -+ DOMLSSerializer *serializer = implementation->createLSSerializer();
224 -+ DOMLSOutput* output=implementation->createLSOutput();
225 -+ DOMConfiguration* config=serializer->getDomConfig();
226 -+ config->setParameter(XMLUni::fgDOMWRTFormatPrettyPrint,true);
227 -+ output->setByteStream(&file);
228 -+ serializer->write(document,output);
229 -+ output->release();
230 -+ serializer->release();
231 -+#endif
232 - document->release();
233 - }
234 - catch(const DOMException &e){
235
236 diff --git a/games-strategy/glest/glest-3.2.2-r1.ebuild b/games-strategy/glest/glest-3.2.2-r1.ebuild
237 deleted file mode 100644
238 index 654ed74..0000000
239 --- a/games-strategy/glest/glest-3.2.2-r1.ebuild
240 +++ /dev/null
241 @@ -1,85 +0,0 @@
242 -# Copyright 1999-2009 Gentoo Foundation
243 -# Distributed under the terms of the GNU General Public License v2
244 -# $Header: /var/cvsroot/gentoo-x86/games-strategy/glest/glest-3.2.2.ebuild,v 1.1 2009/07/11 00:36:39 mr_bones_ Exp $
245 -
246 -EAPI=2
247 -inherit eutils games
248 -
249 -DESCRIPTION="Cross-platform 3D realtime strategy game"
250 -HOMEPAGE="http://www.glest.org/"
251 -SRC_URI="http://www.titusgames.de/${PN}-source-${PV}.tar.bz2
252 - mirror://sourceforge/glest/${PN}_data_3.2.1.zip"
253 -
254 -LICENSE="GPL-2 glest-data"
255 -SLOT="0"
256 -KEYWORDS="~amd64 -ppc ~x86" # ppc: bug #145478
257 -IUSE="editor"
258 -
259 -RDEPEND="media-libs/libsdl[joystick,video]
260 - media-libs/libogg
261 - media-libs/libvorbis
262 - media-libs/openal
263 - || ( >=dev-libs/xerces-c-3[icu] >=dev-libs/xerces-c-3[-icu,iconv] )
264 - virtual/opengl
265 - virtual/glu
266 - dev-lang/lua
267 - x11-libs/libX11
268 - editor? ( x11-libs/wxGTK )"
269 -DEPEND="${RDEPEND}
270 - app-arch/unzip
271 - dev-util/ftjam"
272 -
273 -S=${WORKDIR}/${PN}-source-${PV}
274 -
275 -src_prepare() {
276 - epatch \
277 - "${FILESDIR}"/${P}-{gentoo,xerces-c}.patch
278 -
279 - sed -i \
280 - -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \
281 - glest_game/main/main.cpp \
282 - || die "sed failed"
283 -
284 - sed -i \
285 - -e '/Lang/s:\.lng::' \
286 - glest.ini \
287 - || die "sed failed"
288 -
289 - sed -i \
290 - -e 's:-O3 -DNDEBUG:-DNDEBUG:' \
291 - Jamrules \
292 - || die "sed failed"
293 -}
294 -
295 -src_configure() {
296 - use editor || NOWX="--with-wx-config=disabled_wx"
297 - egamesconf \
298 - --with-vorbis=/usr \
299 - --with-ogg=/usr \
300 - ${NOWX}
301 -}
302 -
303 -src_compile() {
304 - local jamopts=$(echo "${MAKEOPTS}" | sed -ne "/-j/ { s/.*\(-j[0-9]\+\).*/\1/; p }")
305 - jam -dx -q ${jamopts} || die "jam failed"
306 -}
307 -
308 -src_install() {
309 - dogamesbin glest || die "dogamesbin glest failed"
310 - if use editor ; then
311 - dogamesbin glest_editor || die "dogamesbin glest_editor failed"
312 - fi
313 -
314 - insinto "${GAMES_DATADIR}"/${PN}
315 - doins glest.ini || die "doins glest.ini failed"
316 -
317 - cd "${WORKDIR}"/glest_game
318 - doins -r servers.ini \
319 - data maps scenarios techs tilesets || die "doins data failed"
320 - dodoc docs/readme.txt || die "dodoc docs/readme.txt failed"
321 -
322 - newicon techs/magitech/factions/magic/units/archmage/images/archmage.bmp \
323 - ${PN}.bmp || die "newicon failed"
324 - make_desktop_entry glest Glest /usr/share/pixmaps/${PN}.bmp
325 - prepgamesdirs
326 -}
327
328 diff --git a/games-strategy/glest/metadata.xml b/games-strategy/glest/metadata.xml
329 deleted file mode 100644
330 index 4a5a466..0000000
331 --- a/games-strategy/glest/metadata.xml
332 +++ /dev/null
333 @@ -1,5 +0,0 @@
334 -<?xml version="1.0" encoding="UTF-8"?>
335 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
336 -<pkgmetadata>
337 -<herd>playboys</herd>
338 -</pkgmetadata>