diff options
Diffstat (limited to 'games-puzzle/krystaldrop')
11 files changed, 371 insertions, 0 deletions
diff --git a/games-puzzle/krystaldrop/Manifest b/games-puzzle/krystaldrop/Manifest new file mode 100644 index 000000000000..9f5697845002 --- /dev/null +++ b/games-puzzle/krystaldrop/Manifest @@ -0,0 +1,2 @@ +DIST krystaldrop-0.7.2-art.tgz 17079147 SHA256 7cd9dbd1ad12eb7e26e57e2a52b59e7137e20979d4fc8cb21a48faff983f6e27 SHA512 f9cf76007a0c280c450e0fc5a83f0ce01de787382fe12754f4d490a93579db380a3babc1670630fe16f48a1dd6e73c60391ed7c76ce3f7b2fde550ea20c9811a WHIRLPOOL 0eb7f4bb5523c6842523da02f05836b5b212d5e0f3887cc8406b88f285b7e702e0c5d98b63016d67fcd78b02c51bb4f604f2aa9d079372a9c3abc8b0c0bef7aa +DIST krystaldrop-0.7.2-src.tgz 162856 SHA256 d0e42cf05f241e409649de6a48045c026c42417cdabd233c8fef8783096946e5 SHA512 680b311966ae5d766de0c2f173806e34f7d4b6ae8ca37ad90f1abf70256b2e3f909aca71cf1584d09ac0b53e084ebd668167da33431d2ec7d8e27406d48a39e6 WHIRLPOOL e69ab50d8cda6a740096aa8646dd10f592eeb30c430e37a89f548097331aa540b6d21bf53d6405f2ae87c99d4b1676faa033e8d5e78dbe466b82ba9bb9de536e diff --git a/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-as-needed.patch b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-as-needed.patch new file mode 100644 index 000000000000..54eba0e97014 --- /dev/null +++ b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-as-needed.patch @@ -0,0 +1,11 @@ +--- Sources/Makefile.old 2009-02-10 10:03:03.000000000 +0100 ++++ Sources/Makefile 2009-02-10 10:04:21.000000000 +0100 +@@ -186,7 +186,7 @@ + @$(MAKE) -s --no-print-directory -f Makefile.dep $@ + + kdrop: $(OBJ) +- $(LINK) $(LCFLAGS) $(LIBS) -o $@ $(OBJ) ++ $(LINK) $(LDFLAGS) $(LCFLAGS) -o $@ $(OBJ) $(LIBS) + + $(OBJ): %.o: dep/%.d + $(OBJ): %.o: %.cpp diff --git a/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-cxxflags.patch b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-cxxflags.patch new file mode 100644 index 000000000000..7fcb5aac603c --- /dev/null +++ b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-cxxflags.patch @@ -0,0 +1,36 @@ +--- Sources/Makefile.old 2012-11-09 08:04:43.029680861 +0100 ++++ Sources/Makefile 2012-11-09 08:16:02.650491943 +0100 +@@ -35,10 +35,6 @@ + export + VERSION=0_7_2 + +-CC=g++ +-LINK=g++ +-MAKE=make +- + SRC= KrystalDrop/main.cpp \ + KrystalDrop/Names.cpp \ + KrystalDrop/Controller/BackgroundController.cpp \ +@@ -159,7 +155,7 @@ + CCFLAGS:=$(CCFLAGS) -ggdb -DDEBUG -DDEBUG_SANITY_CHECK + endif + ifeq ($(DEBUG_MODE),no) +- CCFLAGS:=$(CCFLAGS) -O2 -DNDEBUG ++ CCFLAGS:=$(CCFLAGS) -DNDEBUG + endif + ifeq ($(DISPLAY_FPS),yes) + CCFLAGS:=$(CCFLAGS) -DDISPLAY_FPS +@@ -186,11 +182,11 @@ + @$(MAKE) -s --no-print-directory -f Makefile.dep $@ + + kdrop: $(OBJ) +- $(LINK) $(LDFLAGS) $(LCFLAGS) -o $@ $(OBJ) $(LIBS) ++ $(CXX) $(LDFLAGS) $(LCFLAGS) -o $@ $(OBJ) $(LIBS) + + $(OBJ): %.o: dep/%.d + $(OBJ): %.o: %.cpp +- $(CC) $(CCFLAGS) -o $@ -c $< ++ $(CXX) $(CCFLAGS) $(CXXFLAGS) -o $@ -c $< + + clean: + find -name "*.o" -exec rm {} ";" diff --git a/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-deps.patch b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-deps.patch new file mode 100644 index 000000000000..07e60a0b71f1 --- /dev/null +++ b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-deps.patch @@ -0,0 +1,26 @@ +Index: krystaldrop/Makefile.dep +=================================================================== +--- krystaldrop.orig/Makefile.dep ++++ krystaldrop/Makefile.dep +@@ -10,7 +10,6 @@ default: + $(DEP): dep/%.d: %.cpp + @test -d dep/$(dir $*) || mkdir -p dep/$(dir $*) + @$(SHELL) -ec '$(CC) $(CCFLAGS) $(DCFLAGS) $< \ +- | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \ +- dep\/$(subst /,\/,$*).d : /g'\'' > $@; \ ++ | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o dep\/$(subst /,\/,$*).d : /g'\'' > $@; \ + [ -s $@ ] || rm -f $@' + +Index: krystaldrop/Sources/Makefile.dep +=================================================================== +--- krystaldrop.orig/Sources/Makefile.dep ++++ krystaldrop/Sources/Makefile.dep +@@ -10,7 +10,6 @@ default: + $(DEP): dep/%.d: %.cpp + @test -d dep/$(dir $*) || mkdir -p dep/$(dir $*) + @$(SHELL) -ec '$(CC) $(CCFLAGS) $(DCFLAGS) $< \ +- | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \ +- dep\/$(subst /,\/,$*).d : /g'\'' > $@; \ ++ | sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o dep\/$(subst /,\/,$*).d : /g'\'' > $@; \ + [ -s $@ ] || rm -f $@' + diff --git a/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-gcc41.patch b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-gcc41.patch new file mode 100644 index 000000000000..c962a2121596 --- /dev/null +++ b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-gcc41.patch @@ -0,0 +1,78 @@ +Index: krystaldrop/Sources/KDpp/Tools/FilePath.h +=================================================================== +--- krystaldrop.orig/Sources/KDpp/Tools/FilePath.h ++++ krystaldrop/Sources/KDpp/Tools/FilePath.h +@@ -75,7 +75,7 @@ public: + /** + Adds a directory before the filePath.... + */ +- void KD_FilePath::PrefixDirectory(const string &path); ++ void PrefixDirectory(const string &path); + + + /** +Index: krystaldrop/Sources/KDpp/Video/Color.h +=================================================================== +--- krystaldrop.orig/Sources/KDpp/Video/Color.h ++++ krystaldrop/Sources/KDpp/Video/Color.h +@@ -38,7 +38,7 @@ public: + KD_Color operator*( float lambda ); + + // Multiply by another color +- KD_Color KD_Color::operator*( const KD_Color &other ); ++ KD_Color operator*( const KD_Color &other ); + + // Sets all the components between 0 and 1 + void normalize(); +Index: krystaldrop/Sources/KrystalDrop/Game/AnimRow.h +=================================================================== +--- krystaldrop.orig/Sources/KrystalDrop/Game/AnimRow.h ++++ krystaldrop/Sources/KrystalDrop/Game/AnimRow.h +@@ -22,7 +22,7 @@ class KD_AnimatedRow: public KD_Row + void UpdateBlocks (unsigned multiplier); /* multiplier is used to catch up when a lag has occured */ + + public: +- KD_AnimatedRow::KD_AnimatedRow (short Height_In_Gems, short x_Offset, ++ KD_AnimatedRow (short Height_In_Gems, short x_Offset, + KD_Hand* Hand, KD_Parameters* Param, KD_Memo* Memo); + ~KD_AnimatedRow(); + +Index: krystaldrop/Sources/KrystalDrop/Game/Table.h +=================================================================== +--- krystaldrop.orig/Sources/KrystalDrop/Game/Table.h ++++ krystaldrop/Sources/KrystalDrop/Game/Table.h +@@ -329,7 +329,7 @@ public: + /** + Sets the sprites for the border of the field. + */ +- void KD_Table::setAllBorders(KD_Sprite *spr[KD_NB_SPRITE_FOR_BORDER]); ++ void setAllBorders(KD_Sprite *spr[KD_NB_SPRITE_FOR_BORDER]); + void setHorizontalBar(KD_Sprite *spr); + void setVerticalBar(KD_Sprite *spr); + void setUpperLeftBar(KD_Sprite *spr); +Index: krystaldrop/Sources/Makefile +=================================================================== +--- krystaldrop.orig/Sources/Makefile ++++ krystaldrop/Sources/Makefile +@@ -35,7 +35,7 @@ ACC_ZLIB_SUPPORT=yes + export + VERSION=0_7_2 + +-CC=g++ -Werror ++CC=g++ + LINK=g++ + MAKE=make + +Index: krystaldrop/Sources/Makefile.lib +=================================================================== +--- krystaldrop.orig/Sources/Makefile.lib ++++ krystaldrop/Sources/Makefile.lib +@@ -30,7 +30,7 @@ STATIC_LIBRARY=no + export + VERSION=0_7 + +-CC=g++ -Werror ++CC=g++ + LINK=g++ + MAKE=make + 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/files/krystaldrop-0.7.2-glibc2.10.patch b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-glibc2.10.patch new file mode 100644 index 000000000000..2e9ab8b76f66 --- /dev/null +++ b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-glibc2.10.patch @@ -0,0 +1,11 @@ +--- Sources/KrystalDrop/Tools/direct.cpp ++++ Sources/KrystalDrop/Tools/direct.cpp +@@ -77,7 +77,7 @@ + assert (f); + assert (*f!= 0); + +- p= strrchr (f, ACC_FNSPLITCHAR); ++ p= strrchr ((char *)f, ACC_FNSPLITCHAR); + if (p!= NULL) + { if (*p== 0) return NULL; // this line should be useless, according to strrchr manpage + if (*(p+ 1)== 0) return NULL; diff --git a/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-icu.patch b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-icu.patch new file mode 100644 index 000000000000..09bcaf613714 --- /dev/null +++ b/games-puzzle/krystaldrop/files/krystaldrop-0.7.2-icu.patch @@ -0,0 +1,14 @@ +--- Sources/KDpp/Tools/XMLConfig.h.old 2011-05-05 11:42:04.117278725 +0200 ++++ Sources/KDpp/Tools/XMLConfig.h 2011-05-05 11:42:28.395026400 +0200 +@@ -3,11 +3,9 @@ + + #include "defines.h" + +-extern "C" { + #include <libxml/xmlmemory.h> + #include <libxml/parser.h> + //#include <libxml/parser.h> +-} + + #include "FilePath.h" + diff --git a/games-puzzle/krystaldrop/files/krystaldrop-assert.patch b/games-puzzle/krystaldrop/files/krystaldrop-assert.patch new file mode 100644 index 000000000000..5aff17ee7dd6 --- /dev/null +++ b/games-puzzle/krystaldrop/files/krystaldrop-assert.patch @@ -0,0 +1,9 @@ +diff -rNu krystaldrop.orig/Sources/KDpp/Resources/ArchiveManager.cpp krystaldrop/Sources/KDpp/Resources/ArchiveManager.cpp +--- krystaldrop.orig/Sources/KDpp/Resources/ArchiveManager.cpp 2003-08-26 15:14:19.000000000 -0400 ++++ krystaldrop/Sources/KDpp/Resources/ArchiveManager.cpp 2004-02-26 20:13:42.000000000 -0500 +@@ -1,3 +1,5 @@ ++#include <assert.h> ++ + #include "ArchiveManager.h" + #include "../Tools/Logfile.h" + diff --git a/games-puzzle/krystaldrop/krystaldrop-0.7.2.ebuild b/games-puzzle/krystaldrop/krystaldrop-0.7.2.ebuild new file mode 100644 index 000000000000..9e173dde092c --- /dev/null +++ b/games-puzzle/krystaldrop/krystaldrop-0.7.2.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +inherit eutils games + +DESCRIPTION="Free clone of an excellent NeoGeo puzzle game, Magical Drop" +HOMEPAGE="http://krystaldrop.sourceforge.net/" +SRC_URI="mirror://sourceforge/krystaldrop/art_${PV}.tgz -> ${P}-art.tgz + mirror://sourceforge/krystaldrop/src_${PV}.tgz -> ${P}-src.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="virtual/opengl + media-libs/libsdl + media-libs/sdl-image + media-libs/sdl-mixer + media-libs/sdl-ttf + dev-libs/libxml2" +RDEPEND="${DEPEND}" + +S=${WORKDIR}/${PN} + +src_prepare() { + mv ../art . + epatch \ + "${FILESDIR}"/krystaldrop-assert.patch \ + "${FILESDIR}"/${P}-gcc41.patch \ + "${FILESDIR}"/${P}-gcc43.patch \ + "${FILESDIR}"/${P}-as-needed.patch \ + "${FILESDIR}"/${P}-deps.patch \ + "${FILESDIR}"/${P}-icu.patch \ + "${FILESDIR}"/${P}-glibc2.10.patch \ + "${FILESDIR}"/${P}-cxxflags.patch + + sed -i \ + -e "/^EXEDIR:=/ s|$|/bin|" \ + -e "/^INSTALL_PREFIX:=/ s|$|${D}|" Makefile \ + || die "sed Makefile failed" + + # fix the high score location + sed -i \ + -e "s:BINDIR:\"${GAMES_STATEDIR}/${PN}\":" \ + Sources/KrystalDrop/Controller/HighScoresController.cpp \ + || die "sed HighScoresController.cpp failed" +} + +src_install() { + default + dodir "${GAMES_STATEDIR}/${PN}" + mv "${D}${GAMES_DATADIR}/${PN}/art/survival.sco" \ + "${D}${GAMES_STATEDIR}/${PN}/" || die "mv failed" + fperms 664 "${GAMES_STATEDIR}/${PN}/survival.sco" + doman doc/kdrop.6 + newicon art/drop.png ${PN}.png + make_desktop_entry kdrop "KrystalDrop" ${PN} + + prepgamesdirs +} diff --git a/games-puzzle/krystaldrop/metadata.xml b/games-puzzle/krystaldrop/metadata.xml new file mode 100644 index 000000000000..29a32c6a06d5 --- /dev/null +++ b/games-puzzle/krystaldrop/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>games</herd> + <upstream> + <remote-id type="sourceforge">krystaldrop</remote-id> + </upstream> +</pkgmetadata> |