summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--games-puzzle/krystaldrop/ChangeLog6
-rw-r--r--games-puzzle/krystaldrop/files/krystaldrop-0.7.2-gcc43.patch113
-rw-r--r--games-puzzle/krystaldrop/krystaldrop-0.7.2.ebuild3
3 files changed, 120 insertions, 2 deletions
diff --git a/games-puzzle/krystaldrop/ChangeLog b/games-puzzle/krystaldrop/ChangeLog
index 8a3e67f6d9b1..8619730319ab 100644
--- a/games-puzzle/krystaldrop/ChangeLog
+++ b/games-puzzle/krystaldrop/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for games-puzzle/krystaldrop
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-puzzle/krystaldrop/ChangeLog,v 1.7 2008/01/28 21:17:42 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/krystaldrop/ChangeLog,v 1.8 2008/07/31 04:21:55 mr_bones_ Exp $
+
+ 31 Jul 2008; Michael Sterrett <mr_bones_@gentoo.org>
+ +files/krystaldrop-0.7.2-gcc43.patch, krystaldrop-0.7.2.ebuild:
+ patch for building with gcc-4.3 submitted by Jabari R. Roberts via bug #233447
28 Jan 2008; Michael Sterrett <mr_bones_@gentoo.org>
krystaldrop-0.7.2.ebuild:
diff --git a/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-gcc43.patch b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-gcc43.patch
new file mode 100644
index 000000000000..a4130ac31afd
--- /dev/null
+++ b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-gcc43.patch
@@ -0,0 +1,113 @@
+--- krystaldrop/Sources/KDpp/Resources/ArchiveReader.h.old 2008-07-30 22:05:18.000000000 -0500
++++ krystaldrop/Sources/KDpp/Resources/ArchiveReader.h 2008-07-30 22:27:20.000000000 -0500
+@@ -2,7 +2,26 @@
+ #define ArchiveReader_H
+
+ #include <map>
+-#include <string>
++#include <cstring>
++#include <locale>
++
++/*
++ * structs needed for std::transform()
++ * See: http://gcc.gnu.org/onlinedocs/libstdc++/22_locale/howto.html#7
++ */
++struct ToUpper {
++ ToUpper(std::locale const& l) : loc(l) {;}
++ char operator() (char c) const { return std::toupper(c,loc); }
++private:
++ std::locale const& loc;
++};
++
++struct ToLower {
++ ToLower(std::locale const& l) : loc(l) {;}
++ char operator() (char c) const { return std::tolower(c,loc); }
++private:
++ std::locale const& loc;
++};
+
+ /** \c KD_ArchiveReader is a generic abstract class which reads a specific kind of archive
+ (`.zip' for instance)
+--- krystaldrop/Sources/KDpp/Resources/ArchiveManager.cpp.old 2008-07-30 20:53:19.000000000 -0500
++++ krystaldrop/Sources/KDpp/Resources/ArchiveManager.cpp 2008-07-30 22:35:54.000000000 -0500
+@@ -1,10 +1,11 @@
+-#include <assert.h>
++#include <cassert>
++#include <algorithm>
+
+ #include "ArchiveManager.h"
+ #include "../Tools/Logfile.h"
+
+ #ifndef _WIN32
+-#include <ctype.h>
++#include <cctype>
+ #endif
+
+ std::map<std::string,KD_ArchiveReader*> KD_ArchiveManager::opened_archives;
+@@ -25,7 +26,6 @@
+ opened_archives.clear();
+ }
+
+-
+ void KD_ArchiveManager::RegisterArchiveFormat (std::string suffix, T_ArchiveReaderFactory reader_factory)
+ {
+ NormalizeSuffix (suffix);
+@@ -36,9 +36,10 @@
+
+
+ void KD_ArchiveManager::NormalizeSuffix (std::string& suffix)
+-{
++{
++ ToLower __tolower(std::locale::classic());
+ // stores the suffix lower-case
+- transform (suffix.begin(), suffix.end(), suffix.begin(), tolower);
++ transform (suffix.begin(), suffix.end(), suffix.begin(), __tolower);
+
+ // add the dot character `.' if it is missing
+ if (suffix[0]!= '.') suffix= '.'+ suffix;
+--- krystaldrop/Sources/KDpp/Tools/FilePath.cpp.old 2008-07-30 20:55:13.000000000 -0500
++++ krystaldrop/Sources/KDpp/Tools/FilePath.cpp 2008-07-30 22:37:05.000000000 -0500
+@@ -1,12 +1,12 @@
+ #include "FilePath.h"
+
+-#include <stdio.h>
++#include <cstdio>
++#include <algorithm>
+
+ #ifndef _WIN32
+-#include <ctype.h>
++#include <cctype>
+ #endif
+
+-
+ KD_FilePath::KD_FilePath() : fileName("") , filePath(""), archiveName(""), archiveSuffix("")
+ {
+ }
+@@ -165,8 +165,9 @@
+ // (*not* the first one found scanning from left to right)
+
+ // the search is case-insensitive -> lower-casificator in action
++ ToLower __tolower(std::locale::classic());
+ string copy_directory = directory;
+- transform (copy_directory.begin(), copy_directory.end(), copy_directory.begin(), tolower);
++ transform (copy_directory.begin(), copy_directory.end(), copy_directory.begin(), __tolower);
+
+ map<string,T_ArchiveReaderFactory>::iterator suffix_iter=
+ KD_ArchiveManager::known_suffixes.begin();
+@@ -271,6 +272,7 @@
+
+ string KD_FilePath::GetFileExtension() const
+ {
++ ToLower __tolower(std::locale::classic());
+ size_t pos = fileName.rfind('.');
+ if (pos == fileName.npos)
+ return "";
+@@ -280,7 +282,7 @@
+ for (unsigned int i=0; i<ext.size(); i++)
+ ext[i] = tolower(ext[i]);
+ */
+- transform (ext.begin(), ext.end(), ext.begin(), tolower);
++ transform (ext.begin(), ext.end(), ext.begin(), __tolower);
+ return ext;
+ }
+
diff --git a/games-puzzle/krystaldrop/krystaldrop-0.7.2.ebuild b/games-puzzle/krystaldrop/krystaldrop-0.7.2.ebuild
index 2bc109fee088..163ee93eb609 100644
--- a/games-puzzle/krystaldrop/krystaldrop-0.7.2.ebuild
+++ b/games-puzzle/krystaldrop/krystaldrop-0.7.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-puzzle/krystaldrop/krystaldrop-0.7.2.ebuild,v 1.8 2008/01/28 21:17:42 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-puzzle/krystaldrop/krystaldrop-0.7.2.ebuild,v 1.9 2008/07/31 04:21:55 mr_bones_ Exp $
inherit eutils games
@@ -28,6 +28,7 @@ src_unpack() {
cd "${S}"
epatch "${FILESDIR}/krystaldrop-assert.patch" \
"${FILESDIR}/${P}"-gcc41.patch \
+ "${FILESDIR}/${P}"-gcc43.patch \
"${FILESDIR}/${P}"-deps.patch
unpack art_${PV}.tgz