summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2011-08-14 19:05:03 +0000
committerwiz <wiz@pkgsrc.org>2011-08-14 19:05:03 +0000
commit86794b420a3ed8e5081501ab22916160678a1a02 (patch)
treef03634218fdbdf26bed3ee8ec9dedce723ab408b /games
parent2f38bda9ce63ac73af07148dfadfa74e7e5a18de (diff)
downloadpkgsrc-86794b420a3ed8e5081501ab22916160678a1a02.tar.gz
Fix build with gcc-4.5.
Diffstat (limited to 'games')
-rw-r--r--games/pingus/distinfo5
-rw-r--r--games/pingus/patches/patch-src_system.cpp17
-rw-r--r--games/pingus/patches/patch-src_tinygettext_po__file__reader.cpp42
-rw-r--r--games/pingus/patches/patch-src_tinygettext_po__file__reader.hpp15
4 files changed, 78 insertions, 1 deletions
diff --git a/games/pingus/distinfo b/games/pingus/distinfo
index 7797118fef7..82e3f6f78d1 100644
--- a/games/pingus/distinfo
+++ b/games/pingus/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2011/01/24 16:43:26 wiz Exp $
+$NetBSD: distinfo,v 1.4 2011/08/14 19:13:03 wiz Exp $
SHA1 (pingus-0.7.3.tar.bz2) = ca7fe5cea65fb3392d1e81056a879831925502f2
RMD160 (pingus-0.7.3.tar.bz2) = 664d259a98a172d10480be9aa4ec87a424ecd6f1
@@ -6,3 +6,6 @@ Size (pingus-0.7.3.tar.bz2) = 11127278 bytes
SHA1 (patch-aa) = 7df701ca791e01d7c6fbff558bca906f56fbb643
SHA1 (patch-ab) = 2f897472e0c006e6fa325c17eda34b05d0ba6a01
SHA1 (patch-ac) = f0c357e4b5d5b71eacac243c15792b3a78a146ec
+SHA1 (patch-src_system.cpp) = 20d4522096aa537f60a03e43027b745ecf10b6f3
+SHA1 (patch-src_tinygettext_po__file__reader.cpp) = ab2fe607e943f72ad4cdfa0d0117886119d8593d
+SHA1 (patch-src_tinygettext_po__file__reader.hpp) = a378319caa8a4e2269893c698c2732a4aea1b7a2
diff --git a/games/pingus/patches/patch-src_system.cpp b/games/pingus/patches/patch-src_system.cpp
new file mode 100644
index 00000000000..77ac57071e4
--- /dev/null
+++ b/games/pingus/patches/patch-src_system.cpp
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_system.cpp,v 1.1 2011/08/14 19:13:03 wiz Exp $
+
+Fix build with gcc-4.5.
+
+--- src/system.cpp.orig 2007-10-31 03:16:57.000000000 +0000
++++ src/system.cpp
+@@ -548,8 +548,8 @@ System::realpath(const std::string& path
+ #endif
+ else
+ {
+- char buf[PATH_MAX];
+- if (getcwd(buf, PATH_MAX) == 0)
++ char buf[FILENAME_MAX];
++ if (getcwd(buf, FILENAME_MAX) == 0)
+ {
+ std::cout << "System::realpath: Error: couldn't getcwd()" << std::endl;
+ return pathname;
diff --git a/games/pingus/patches/patch-src_tinygettext_po__file__reader.cpp b/games/pingus/patches/patch-src_tinygettext_po__file__reader.cpp
new file mode 100644
index 00000000000..2de5546dc08
--- /dev/null
+++ b/games/pingus/patches/patch-src_tinygettext_po__file__reader.cpp
@@ -0,0 +1,42 @@
+$NetBSD: patch-src_tinygettext_po__file__reader.cpp,v 1.1 2011/08/14 19:13:03 wiz Exp $
+
+Fix build with gcc-4.5.
+
+--- src/tinygettext/po_file_reader.cpp.orig 2010-03-18 11:52:00.000000000 +0000
++++ src/tinygettext/po_file_reader.cpp
+@@ -169,7 +169,7 @@ POFileReader::tokenize_po(std::istream&
+ int c;
+ Token token;
+
+- while((c = getchar(in)) != EOF)
++ while((c = pgetchar(in)) != EOF)
+ {
+ //std::cout << "Lexing char: '" << char(c) << "' " << c << " state: " << state << std::endl;
+ switch(state)
+@@ -190,7 +190,7 @@ POFileReader::tokenize_po(std::istream&
+
+ do { // Read keyword
+ token.keyword += c;
+- } while((c = getchar(in)) != EOF && !isspace(c));
++ } while((c = pgetchar(in)) != EOF && !isspace(c));
+ in.unget();
+
+ state = READ_CONTENT;
+@@ -198,7 +198,7 @@ POFileReader::tokenize_po(std::istream&
+ break;
+
+ case READ_CONTENT:
+- while((c = getchar(in)) != EOF)
++ while((c = pgetchar(in)) != EOF)
+ {
+ if (c == '"') {
+ // Found start of content
+@@ -217,7 +217,7 @@ POFileReader::tokenize_po(std::istream&
+
+ case READ_CONTENT_IN_STRING:
+ if (c == '\\') {
+- c = getchar(in);
++ c = pgetchar(in);
+ if (c != EOF)
+ {
+ if (c == 'n') token.content += '\n';
diff --git a/games/pingus/patches/patch-src_tinygettext_po__file__reader.hpp b/games/pingus/patches/patch-src_tinygettext_po__file__reader.hpp
new file mode 100644
index 00000000000..8d9a9b3e3a3
--- /dev/null
+++ b/games/pingus/patches/patch-src_tinygettext_po__file__reader.hpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_tinygettext_po__file__reader.hpp,v 1.1 2011/08/14 19:13:03 wiz Exp $
+
+Fix build with gcc-4.5.
+
+--- src/tinygettext/po_file_reader.hpp.orig 2007-08-17 15:39:18.000000000 +0000
++++ src/tinygettext/po_file_reader.hpp
+@@ -52,7 +52,7 @@ public:
+ void add_token(const Token& token);
+ void tokenize_po(std::istream& in);
+
+- inline int getchar(std::istream& in)
++ inline int pgetchar(std::istream& in)
+ {
+ int c = in.get();
+ if (c == '\n')