1 |
commit: b69f495805f2091dba11763c90751028ada44e8b |
2 |
Author: Christian Schmitt <chris <AT> ilovelinux <DOT> de> |
3 |
AuthorDate: Thu Jun 2 07:51:44 2011 +0000 |
4 |
Commit: Christian Schmitt <chris <AT> ilovelinux <DOT> de> |
5 |
CommitDate: Thu Jun 2 07:58:57 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gamerlay.git;a=commit;h=b69f4958 |
7 |
|
8 |
[games-util/terragear-cs] new "remove limits" patch |
9 |
|
10 |
--- |
11 |
.../files/terragear-cs-setrlimit.patch | 34 ++++++++++++++++++++ |
12 |
games-util/terragear-cs/terragear-cs-9999.ebuild | 1 + |
13 |
2 files changed, 35 insertions(+), 0 deletions(-) |
14 |
|
15 |
diff --git a/games-util/terragear-cs/files/terragear-cs-setrlimit.patch b/games-util/terragear-cs/files/terragear-cs-setrlimit.patch |
16 |
new file mode 100644 |
17 |
index 0000000..42561a9 |
18 |
--- /dev/null |
19 |
+++ b/games-util/terragear-cs/files/terragear-cs-setrlimit.patch |
20 |
@@ -0,0 +1,34 @@ |
21 |
+diff --git a/src/BuildTiles/Main/main.cxx b/src/BuildTiles/Main/main.cxx |
22 |
+index f666187..f4c0579 100644 |
23 |
+--- a/src/BuildTiles/Main/main.cxx |
24 |
++++ b/src/BuildTiles/Main/main.cxx |
25 |
+@@ -1166,12 +1166,12 @@ int main(int argc, char **argv) { |
26 |
+ // routine can blow up and allocate memory forever. We'd like |
27 |
+ // this process to die before things get out of hand so we can try |
28 |
+ // again with a smaller interior angle limit. |
29 |
++#if 0 |
30 |
+ int result; |
31 |
+ struct rlimit limit; |
32 |
+ limit.rlim_cur = 40000000; |
33 |
+ limit.rlim_max = 40000000; |
34 |
+ |
35 |
+-#if 0 |
36 |
+ result = setrlimit( RLIMIT_DATA, &limit ); |
37 |
+ cout << "result of setting mem limit = " << result << endl; |
38 |
+ result = setrlimit( RLIMIT_STACK, &limit ); |
39 |
+@@ -1180,7 +1180,6 @@ int main(int argc, char **argv) { |
40 |
+ cout << "result of setting mem limit = " << result << endl; |
41 |
+ result = setrlimit( RLIMIT_RSS, &limit ); |
42 |
+ cout << "result of setting mem limit = " << result << endl; |
43 |
+-#endif |
44 |
+ |
45 |
+ // cpu time limit since occassionally the triangulator can go into |
46 |
+ // an infinite loop. |
47 |
+@@ -1188,6 +1187,7 @@ int main(int argc, char **argv) { |
48 |
+ limit.rlim_max = 300; // seconds |
49 |
+ result = setrlimit( RLIMIT_CPU, &limit ); |
50 |
+ cout << "result of setting mem limit = " << result << endl; |
51 |
++#endif |
52 |
+ #endif // end of stuff that crashes Cygwin |
53 |
+ |
54 |
+ // main construction data management class |
55 |
|
56 |
diff --git a/games-util/terragear-cs/terragear-cs-9999.ebuild b/games-util/terragear-cs/terragear-cs-9999.ebuild |
57 |
index 4a4f569..9657e07 100644 |
58 |
--- a/games-util/terragear-cs/terragear-cs-9999.ebuild |
59 |
+++ b/games-util/terragear-cs/terragear-cs-9999.ebuild |
60 |
@@ -25,6 +25,7 @@ DEPEND="dev-games/simgear |
61 |
RDEPEND="${DEPEND}" |
62 |
|
63 |
src_prepare() { |
64 |
+ epatch ${FILESDIR}/"${PN}"-setrlimit.patch |
65 |
epatch ${FILESDIR}/"${PN}"-use-agg.patch |
66 |
eautoreconf |
67 |
} |