summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2004-02-25 10:24:30 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2004-02-25 10:24:30 +0000
commit9d97eb00b871f12f0dc689a70bef9fd64a44673a (patch)
tree6e6cfc95c22c810f5f0c696aaff0fc2d9ff83fcc /games-board
parentFix fPIC issues. (Manifest recommit) (diff)
downloadgentoo-2-9d97eb00b871f12f0dc689a70bef9fd64a44673a.tar.gz
gentoo-2-9d97eb00b871f12f0dc689a70bef9fd64a44673a.tar.bz2
gentoo-2-9d97eb00b871f12f0dc689a70bef9fd64a44673a.zip
initial commit; bug #41713
Diffstat (limited to 'games-board')
-rw-r--r--games-board/xfreecell/ChangeLog10
-rw-r--r--games-board/xfreecell/Manifest3
-rw-r--r--games-board/xfreecell/files/digest-xfreecell-1.0.5b2
-rw-r--r--games-board/xfreecell/files/xfreecell-1.0.5b-gentoo.patch349
-rw-r--r--games-board/xfreecell/metadata.xml9
-rw-r--r--games-board/xfreecell/xfreecell-1.0.5b.ebuild33
6 files changed, 406 insertions, 0 deletions
diff --git a/games-board/xfreecell/ChangeLog b/games-board/xfreecell/ChangeLog
new file mode 100644
index 000000000000..e3ba1061aaa6
--- /dev/null
+++ b/games-board/xfreecell/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for games-board/xfreecell
+# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-board/xfreecell/ChangeLog,v 1.1 2004/02/25 10:24:30 mr_bones_ Exp $
+
+*xfreecell-1.0.5b (25 Feb 2004)
+
+ 25 Feb 2004; Michael Sterrett <mr_bones_@gentoo.org> metadata.xml,
+ xfreecell-1.0.5b.ebuild, files/xfreecell-1.0.5b-gentoo.patch:
+ initial commit; ebuild and patch supplied by bartron via bug #41713
+
diff --git a/games-board/xfreecell/Manifest b/games-board/xfreecell/Manifest
new file mode 100644
index 000000000000..fc754ac81c93
--- /dev/null
+++ b/games-board/xfreecell/Manifest
@@ -0,0 +1,3 @@
+MD5 7711a77007c4357dd12ff9b9f9b55fb6 xfreecell-1.0.5b.ebuild 882
+MD5 51a8fae46811047f83a26319fbb01ec8 files/digest-xfreecell-1.0.5b 122
+MD5 7017bfae6e22894f57b92088888acb43 files/xfreecell-1.0.5b-gentoo.diff 10843
diff --git a/games-board/xfreecell/files/digest-xfreecell-1.0.5b b/games-board/xfreecell/files/digest-xfreecell-1.0.5b
new file mode 100644
index 000000000000..479baacaf0fb
--- /dev/null
+++ b/games-board/xfreecell/files/digest-xfreecell-1.0.5b
@@ -0,0 +1,2 @@
+MD5 acadd4f304f59eff7b7518226746e55c xfreecell-1.0.5b.tgz 49367
+MD5 55bd7bd64d56e575061060bae5213f02 MSNumbers.gz 1212278
diff --git a/games-board/xfreecell/files/xfreecell-1.0.5b-gentoo.patch b/games-board/xfreecell/files/xfreecell-1.0.5b-gentoo.patch
new file mode 100644
index 000000000000..f000eb7347d5
--- /dev/null
+++ b/games-board/xfreecell/files/xfreecell-1.0.5b-gentoo.patch
@@ -0,0 +1,349 @@
+diff -ru xfreecell.orig/card.cpp xfreecell/card.cpp
+--- xfreecell.orig/card.cpp 1999-03-27 05:36:28.000000000 -0800
++++ xfreecell/card.cpp 2004-02-25 02:17:24.000000000 -0800
+@@ -119,7 +119,7 @@
+ int oldy = y();
+ int newx = dest_x;
+ int newy = dest_y;
+- int steps = max(abs(oldx - newx), abs(oldy - newy)) / Option::speedup();
++ int steps = std::max(abs(oldx - newx), abs(oldy - newy)) / Option::speedup();
+ float curx = (float) oldx;
+ float cury = (float) oldy;
+
+diff -ru xfreecell.orig/freecell.cpp xfreecell/freecell.cpp
+--- xfreecell.orig/freecell.cpp 1999-07-27 07:15:27.000000000 -0700
++++ xfreecell/freecell.cpp 2004-02-25 02:18:13.000000000 -0800
+@@ -64,7 +64,7 @@
+ static GameNumberManager* gnManager;
+ static const int PathLength = 256;
+ static char msNumbersPath[PathLength] = "\0";;
+-static const char defaultMSNumbersPath[] = "/usr/local/lib/xfreecell/MSNumbers";
++static const char defaultMSNumbersPath[] = "/usr/share/games/xfreecell/MSNumbers";
+
+ // ##### Functions declarations #####
+ static void adjustSubwindow(NSWindow*);
+@@ -603,7 +603,7 @@
+ void readMSNumbersPath()
+ {
+ char* home = getenv("HOME");
+- string saveFile;
++ std::string saveFile;
+
+ if (home == NULL) {
+ fprintf(stderr, "Cannot get $HOME. Assuming I am at home directory now.\n");
+diff -ru xfreecell.orig/gnmanager.cpp xfreecell/gnmanager.cpp
+--- xfreecell.orig/gnmanager.cpp 1999-07-27 07:18:05.000000000 -0700
++++ xfreecell/gnmanager.cpp 2004-02-25 02:17:24.000000000 -0800
+@@ -16,7 +16,7 @@
+ GameNumberManager::GameNumberManager()
+ {
+ char* home = getenv("HOME");
+- string directory;
++ std::string directory;
+
+ if (home == NULL) {
+ fprintf(stderr, "Cannot get $HOME. Assuming I am at home directory now.\n");
+@@ -143,7 +143,7 @@
+ readFile(msLostGameFile, &msLostGames);
+ }
+
+-void GameNumberManager::readFile(const string& file, hash_set<int>* hs)
++void GameNumberManager::readFile(const std::string& file, hash_set<int>* hs)
+ {
+ FILE* fp = fopen(file.c_str(), "r");
+ char line[lineLength];
+@@ -169,7 +169,7 @@
+ writeFile(msLostGameFile, &msLostGames);
+ }
+
+-void GameNumberManager::writeFile(const string& file, hash_set<int>* hs)
++void GameNumberManager::writeFile(const std::string& file, hash_set<int>* hs)
+ {
+ FILE* fp = fopen(file.c_str(), "w+");
+
+diff -ru xfreecell.orig/gnmanager.h xfreecell/gnmanager.h
+--- xfreecell.orig/gnmanager.h 1999-03-29 05:07:19.000000000 -0800
++++ xfreecell/gnmanager.h 2004-02-25 02:17:24.000000000 -0800
+@@ -2,7 +2,13 @@
+ #define GNManager_H
+
+ #include <string>
++
++#if __GNUG__ < 3
+ #include <hash_set>
++#else
++#include <ext/hash_set>
++using __gnu_cxx::hash_set;
++#endif
+
+ class GameNumberManager {
+ public:
+@@ -20,15 +26,15 @@
+ bool alreadyLost(int);
+
+ void readFiles();
+- void readFile(const string&, hash_set<int>*);
+- void writeFile(const string&, hash_set<int>*);
++ void readFile(const std::string&, hash_set<int>*);
++ void writeFile(const std::string&, hash_set<int>*);
+
+- string lostGameFile, wonGameFile;
++ std::string lostGameFile, wonGameFile;
+
+ hash_set<int> wonGames;
+ hash_set<int> lostGames;
+
+- string msLostGameFile, msWonGameFile;
++ std::string msLostGameFile, msWonGameFile;
+
+ hash_set<int> msWonGames;
+ hash_set<int> msLostGames;
+diff -ru xfreecell.orig/makefile xfreecell/makefile
+--- xfreecell.orig/makefile 1999-04-03 05:42:49.000000000 -0800
++++ xfreecell/makefile 2004-02-25 02:17:48.000000000 -0800
+@@ -1,16 +1,15 @@
+ OBJECTS=card.o freecell.o option.o stack.o subwindows.o undo.o util.o gnmanager.o random.o
+-CC=g++
+-CFLAGS=-g -Wall -DSHAPE -DBOGUSRANDOM
++CFLAGS=$(CXXFLAGS) -DSHAPE -DBOGUSRANDOM
+ LIBS=-lm -L. -lns -L/usr/X11R6/lib -lXext -lX11
+ STATICDIR=xfreecell-static
+ DOCS=README CHANGES mshuffle.txt xfreecell.6
+ LIBDIR=/usr/local/lib/xfreecell
+
+ all: $(OBJECTS) lib
+- $(CC) -o xfreecell $(CFLAGS) $(OBJECTS) $(LIBS)
++ $(CXX) -o xfreecell $(LDFLAGS) $(OBJECTS) $(LIBS)
+
+ static: $(OBJECTS) lib
+- $(CC) -o xfreecell -static $(CFLAGS) $(OBJECTS) $(LIBS)
++ $(CXX) -o xfreecell -static $(CFLAGS) $(OBJECTS) $(LIBS)
+
+ static-release: static
+ mkdir $(STATICDIR)
+@@ -21,17 +20,17 @@
+ rm -rf $(STATICDIR)
+
+ %.o: %.cpp
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CFLAGS) $<
+
+ clean:
+ rm -f *~ *.o a.out xfreecell libns.a
+- make -C widget clean
++ $(MAKE) -C widget clean
+
+ lib:
+- make -C widget lib
++ $(MAKE) -C widget lib
+
+ install: all
+- install xfreecell $(DESTDIR)/usr/local/bin
+- install xfreecell.6 $(DESTDIR)/usr/local/man/man6
++ install xfreecell $(DESTDIR)/usr/bin
++ install xfreecell.6 $(DESTDIR)/usr/share/man/man6
+ # install -d $(LIBDIR)
+-# install ms-compatible/MSNumbers $(DESTDIR)/usr/local/lib/xfreecell
+\ No newline at end of file
++# install ms-compatible/MSNumbers $(DESTDIR)/usr/share/xfreecell
+diff -ru xfreecell.orig/option.h xfreecell/option.h
+--- xfreecell.orig/option.h 1999-03-27 11:39:17.000000000 -0800
++++ xfreecell/option.h 2004-02-25 02:17:24.000000000 -0800
+@@ -22,7 +22,7 @@
+ void readPrefs();
+ void writePrefs();
+
+- string saveFile;
++ std::string saveFile;
+
+ static int _speedup;
+ static bool _queryWindow;
+diff -ru xfreecell.orig/stack.h xfreecell/stack.h
+--- xfreecell.orig/stack.h 1999-03-02 10:20:02.000000000 -0800
++++ xfreecell/stack.h 2004-02-25 02:17:24.000000000 -0800
+@@ -28,7 +28,7 @@
+ int _next_x, _next_y;
+
+ private:
+- vector<Card*> _cards;
++ std::vector<Card*> _cards;
+ };
+
+ class PlayStack : public Stack {
+diff -ru xfreecell.orig/subwindows.h xfreecell/subwindows.h
+--- xfreecell.orig/subwindows.h 1999-03-15 15:09:49.000000000 -0800
++++ xfreecell/subwindows.h 2004-02-25 02:17:24.000000000 -0800
+@@ -76,7 +76,7 @@
+ int _undos;
+ int _totalScore;
+
+- string saveFile;
++ std::string saveFile;
+
+ bool exitPressed;
+
+diff -ru xfreecell.orig/undo.cpp xfreecell/undo.cpp
+--- xfreecell.orig/undo.cpp 1999-03-25 07:48:40.000000000 -0800
++++ xfreecell/undo.cpp 2004-02-25 02:17:24.000000000 -0800
+@@ -22,7 +22,7 @@
+ c->moveToStack(from, false, false);
+ }
+
+-stack<Move> moves;
++std::stack<Move> moves;
+
+ void undoClearMoves()
+ {
+diff -ru xfreecell.orig/widget/container.cpp xfreecell/widget/container.cpp
+--- xfreecell.orig/widget/container.cpp 1999-03-03 09:34:52.000000000 -0800
++++ xfreecell/widget/container.cpp 2004-02-25 02:17:24.000000000 -0800
+@@ -61,18 +61,18 @@
+
+ void NSContainer::remove(NSComponent* nsc)
+ {
+- vector<NSComponent*>::iterator iter;
++ std::vector<NSComponent*>::iterator iter;
+ for (iter = nscVec.begin(); iter != nscVec.end(); iter++)
+ if (*iter == nsc) nscVec.erase(iter);
+ }
+
+ void NSContainer::hremove(NSComponent* nsc)
+ {
+- vector<NSComponent*>::iterator iter;
++ std::vector<NSComponent*>::iterator iter;
+ for (iter = nscVec.begin(); iter != nscVec.end(); iter++) {
+ if (*iter == nsc) {
+ int w = (*iter)->width() + _neighborGap;
+- vector<NSComponent*>::iterator iter2 = iter + 1;
++ std::vector<NSComponent*>::iterator iter2 = iter + 1;
+ if (nscVec.size() == 0) {
+ _width = 0; _height = 0;
+ } else {
+@@ -87,11 +87,11 @@
+
+ void NSContainer::vremove(NSComponent* nsc)
+ {
+- vector<NSComponent*>::iterator iter;
++ std::vector<NSComponent*>::iterator iter;
+ for (iter = nscVec.begin(); iter != nscVec.end(); iter++) {
+ if (*iter == nsc) {
+ int h = (*iter)->height() + _neighborGap;
+- vector<NSComponent*>::iterator iter2 = iter + 1;
++ std::vector<NSComponent*>::iterator iter2 = iter + 1;
+ if (nscVec.size() == 0) {
+ _width = 0; _height = 0;
+ } else {
+diff -ru xfreecell.orig/widget/makefile xfreecell/widget/makefile
+--- xfreecell.orig/widget/makefile 1999-03-17 21:54:57.000000000 -0800
++++ xfreecell/widget/makefile 2004-02-25 02:17:59.000000000 -0800
+@@ -1,15 +1,13 @@
+ OBJECTS=window.o plate.o string.o button.o label.o textfield.o container.o frame.o util.o scrollbar.o font.o main.o
+-#C=/usr/local/gcc-2.8.1/bin/g++
+-CC=g++
+-CFLAGS=-g -Wall
++CFLAGS=$(CXXFLAGS) -Wall
+ LIBS=-L/usr/X11R6/lib -lX11
+ LIBNAME=libns.a
+
+ all: test.o $(OBJECTS)
+- $(CC) $(CFLAGS) test.o $(OBJECTS) $(LIBS)
++ $(CXX) $(CFLAGS) test.o $(OBJECTS) $(LIBS)
+
+ %.o: %.cpp
+- $(CC) $(CFLAGS) -c $<
++ $(CXX) $(CFLAGS) -c $<
+
+ clean:
+ rm -f *.o *~ a.out .nfs* dummy
+diff -ru xfreecell.orig/widget/textfield.cpp xfreecell/widget/textfield.cpp
+--- xfreecell.orig/widget/textfield.cpp 1999-03-03 09:34:52.000000000 -0800
++++ xfreecell/widget/textfield.cpp 2004-02-25 02:17:24.000000000 -0800
+@@ -1,3 +1,4 @@
++#include <cctype>
+ #include "widget.h"
+
+ GC NSTextField::gc;
+diff -ru xfreecell.orig/widget/widget.h xfreecell/widget/widget.h
+--- xfreecell.orig/widget/widget.h 1999-03-15 08:29:32.000000000 -0800
++++ xfreecell/widget/widget.h 2004-02-25 02:17:24.000000000 -0800
+@@ -114,7 +114,7 @@
+ Elt(NSWindow* nw, Window w) { nswindow = nw; window = w; }
+ };
+
+- static vector<Elt> eltVector;
++ static std::vector<Elt> eltVector;
+ static void eraseWindow(Window);
+ static void registerWindow(NSWindow*, Window);
+ };
+@@ -171,7 +171,7 @@
+ void fontWindowHeight(unsigned int);
+ void resizable(bool arg) { _resizable = arg; }
+
+- string _label;
++ std::string _label;
+ private:
+ static const int fontGap = 4;
+ static XFontStruct* fontStruct;
+@@ -272,7 +272,7 @@
+ static unsigned int charWidth, charHeight;
+
+ unsigned int maxCharNum;
+- string _str;
++ std::string _str;
+ unsigned int cursorPos;
+ unsigned int strStart;
+ bool cursorOnTF;
+@@ -327,7 +327,7 @@
+ unsigned int _vGap, _hGap, _neighborGap;
+ Window _parentWindow;
+
+- vector<NSComponent*> nscVec;
++ std::vector<NSComponent*> nscVec;
+ };
+
+ // ##### NSHContainer #####
+diff -ru xfreecell.orig/widget/window.cpp xfreecell/widget/window.cpp
+--- xfreecell.orig/widget/window.cpp 1999-03-03 09:34:52.000000000 -0800
++++ xfreecell/widget/window.cpp 2004-02-25 02:17:24.000000000 -0800
+@@ -2,7 +2,7 @@
+
+ bool NSWindow::windowInitialized = false;
+ Window NSWindow::_root;
+-vector<NSWindow::Elt> NSWindow::eltVector;
++std::vector<NSWindow::Elt> NSWindow::eltVector;
+
+ NSWindow::NSWindow(bool create, Window w, int x, int y, unsigned int width, unsigned int height,
+ unsigned int borderWidth, unsigned long border, unsigned long bg)
+@@ -86,8 +86,8 @@
+
+ void NSWindow::registerWindow(NSWindow* nsw, Window w)
+ {
+- vector<Elt>::iterator begin = eltVector.begin();
+- vector<Elt>::iterator end = eltVector.end();
++ std::vector<Elt>::iterator begin = eltVector.begin();
++ std::vector<Elt>::iterator end = eltVector.end();
+ Elt elt(nsw, w);
+
+ if (eltVector.size() == 0 || w > eltVector.back().window) {
+@@ -95,7 +95,7 @@
+ return;
+ }
+
+- for (vector<Elt>::iterator iter = begin; iter != end; iter++)
++ for (std::vector<Elt>::iterator iter = begin; iter != end; iter++)
+ if ((*iter).window > w)
+ eltVector.insert(iter, elt);
+
+@@ -104,9 +104,9 @@
+
+ void NSWindow::eraseWindow(Window w)
+ {
+- vector<Elt>::iterator begin = eltVector.begin();
+- vector<Elt>::iterator end = eltVector.end();
+- vector<Elt>::iterator iter;
++ std::vector<Elt>::iterator begin = eltVector.begin();
++ std::vector<Elt>::iterator end = eltVector.end();
++ std::vector<Elt>::iterator iter;
+
+ for (iter = begin; iter != end; iter++) {
+ if ((*iter).window == w) eltVector.erase(iter);
diff --git a/games-board/xfreecell/metadata.xml b/games-board/xfreecell/metadata.xml
new file mode 100644
index 000000000000..1cef6e243af3
--- /dev/null
+++ b/games-board/xfreecell/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<maintainer>
+<email>games@gentoo.org</email>
+<name>Games Team</name>
+</maintainer>
+</pkgmetadata>
diff --git a/games-board/xfreecell/xfreecell-1.0.5b.ebuild b/games-board/xfreecell/xfreecell-1.0.5b.ebuild
new file mode 100644
index 000000000000..7f88fcbb8ff1
--- /dev/null
+++ b/games-board/xfreecell/xfreecell-1.0.5b.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-board/xfreecell/xfreecell-1.0.5b.ebuild,v 1.1 2004/02/25 10:24:30 mr_bones_ Exp $
+
+inherit eutils games
+
+S="${WORKDIR}/${PN}"
+DESCRIPTION="A freecell game for X"
+HOMEPAGE="http://www2.giganet.net/~nakayama/"
+SRC_URI="http://www2.giganet.net/~nakayama/${P}.tgz
+ http://www2.giganet.net/~nakayama/MSNumbers.gz"
+
+LICENSE="as-is"
+KEYWORDS="x86"
+SLOT="0"
+IUSE=""
+
+DEPEND="virtual/x11"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+}
+
+src_install() {
+ dogamesbin xfreecell || die "dogamesbin failed"
+ insinto "${GAMES_DATADIR}/${PN}"
+ doins "${WORKDIR}/MSNumbers" || die "doins failed"
+ dodoc CHANGES README mshuffle.txt || die "dodoc failed"
+ doman xfreecell.6 || die "doman failed"
+ prepgamesdirs
+}