diff options
Diffstat (limited to 'games')
-rw-r--r-- | games/euchre/Makefile | 27 | ||||
-rw-r--r-- | games/euchre/distinfo | 4 | ||||
-rw-r--r-- | games/euchre/files/patch-cplusplus | 345 | ||||
-rw-r--r-- | games/euchre/files/patch-src::lib::Options.cpp | 35 | ||||
-rw-r--r-- | games/euchre/files/std-namespace.h | 3 |
5 files changed, 15 insertions, 399 deletions
diff --git a/games/euchre/Makefile b/games/euchre/Makefile index b0d1b484f890..f76a4efea833 100644 --- a/games/euchre/Makefile +++ b/games/euchre/Makefile @@ -1,28 +1,27 @@ -# New ports collection Makefile for: euchre -# Date created: 23 July 2002 -# Whom: Frank Laszlo <laszlof@freebsdmatrix.net> -# +# Created by: Frank Laszlo <laszlof@freebsdmatrix.net> # $FreeBSD$ -# PORTNAME= euchre -PORTVERSION= 0.7 -PORTREVISION= 4 +PORTVERSION= 0.8 CATEGORIES= games MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Very popular card game with variable skill levels -PLIST_FILES= bin/euchre -USE_AUTOTOOLS= automake14 autoconf213 -USE_GNOME= gtk12 -CFLAGS+= -include "${FILESDIR}/std-namespace.h" -Werror +LICENSE= GPLv2 # (or later) + +USE_GNOME= gtk20 +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --disable-silent-rules MAKE_JOBS_SAFE= yes +PLIST_FILES= bin/euchre + +DESKTOP_ENTRIES="Euchre" "" "" "${PORTNAME}" "" true + post-patch: - ${REINPLACE_CMD} 's,char,const char,' \ - ${WRKSRC}/src/pixmaps/*.xpm \ - ${WRKSRC}/src/pixmaps/pixmaps.?pp + @${REINPLACE_CMD} -e \ + '/^AM_/s|-Werror||' ${WRKSRC}/configure .include <bsd.port.mk> diff --git a/games/euchre/distinfo b/games/euchre/distinfo index 286e1129a6e7..29884346a0a6 100644 --- a/games/euchre/distinfo +++ b/games/euchre/distinfo @@ -1,2 +1,2 @@ -SHA256 (euchre-0.7.tar.gz) = 65f9324b21f0ca14e4ae42871b1fe56cad52b94aa49f9f4a1643f9377c1e23f4 -SIZE (euchre-0.7.tar.gz) = 181863 +SHA256 (euchre-0.8.tar.gz) = c339d29ea6837f344b98134ecdd7aa52fb958454bd4dd6145430b197752ed78b +SIZE (euchre-0.8.tar.gz) = 213490 diff --git a/games/euchre/files/patch-cplusplus b/games/euchre/files/patch-cplusplus deleted file mode 100644 index faa896ddcd68..000000000000 --- a/games/euchre/files/patch-cplusplus +++ /dev/null @@ -1,345 +0,0 @@ -The bulk of porting to modern C++ is in here. Contents of the -other patch-file, as well as whole-sale s/char/const char/ -substitution in pixmap files is also required for warning-free -compilations. - -Oh, and the `using namespace std', which is provided by a micro- --header std-namespace.h... - - -mi - ---- src/lib/Card.hpp 2002-09-10 21:48:04.000000000 -0400 -+++ src/lib/Card.hpp 2009-04-12 23:15:36.000000000 -0400 -@@ -25,5 +25,5 @@ - #define CARD_HPP - --class ostream; -+#include <ostream> - - class Card { -@@ -63,5 +63,5 @@ - - static char getSuitChar(Suit suit); -- static char* getSuitStr(Suit suit); -+ static const char* getSuitStr(Suit suit); - static char getNumberChar(Number number); - -@@ -69,5 +69,5 @@ - - char getSuitChar() const; -- char* getSuitStr() const; -+ const char* getSuitStr() const; - Suit getSuit() const; - Suit getAdjSuit() const; ---- src/lib/Round.hpp 2002-09-10 21:48:04.000000000 -0400 -+++ src/lib/Round.hpp 2009-04-12 23:15:36.000000000 -0400 -@@ -25,6 +25,5 @@ - #define ROUND_HPP - --class iostream; -- -+#include <ostream> - #include "Common.hpp" - #include "Card.hpp" -@@ -50,3 +49,2 @@ - - #endif /* ROUND_HPP */ -- ---- src/lib/Card.cpp 2002-09-10 21:48:04.000000000 -0400 -+++ src/lib/Card.cpp 2009-04-12 23:15:36.000000000 -0400 -@@ -22,5 +22,5 @@ - */ - --#include <iostream.h> -+#include <iostream> - - #include "Card.hpp" -@@ -77,9 +77,9 @@ - } - --char* Card::getSuitStr() const { -+const char* Card::getSuitStr() const { - return getSuitStr(itsSuit); - } - --static char* suitStrings[] = { -+static const char* suitStrings[] = { - "Diamonds", - "Clubs", -@@ -89,5 +89,5 @@ - }; - --char* Card::getSuitStr(Card::Suit suit) { -+const char* Card::getSuitStr(Card::Suit suit) { - if (suit < Diamonds || suit > Spades) { - suit = (Suit) (Spades + 1); ---- src/lib/Common.cpp 2002-03-23 21:43:37.000000000 -0500 -+++ src/lib/Common.cpp 2009-04-12 23:15:36.000000000 -0400 -@@ -52,9 +52,9 @@ - } - --static char* PlayerPositionStrings[] = { -+static const char* PlayerPositionStrings[] = { - "North", "East", "South", "West", "None" - }; - --char* Common::getPlayerPositionStr(PlayerPosition pp) { -+const char* Common::getPlayerPositionStr(PlayerPosition pp) { - if (pp < NORTH || pp > WEST) { - pp = (PlayerPosition) (WEST + 1); -@@ -65,9 +65,9 @@ - } - --static char* BidStrings[] = { -+static const char* BidStrings[] = { - "No Bid", "Pass", "Called It", "Loner" - }; - --char* Common::getBidStr(Bid bid) { -+const char* Common::getBidStr(Bid bid) { - if (bid < NOBID || bid > LONER) { - return 0; -@@ -85,3 +85,2 @@ - return trump; - } -- ---- src/lib/ComputerPlayerEasy.cpp 2003-02-04 22:34:51.000000000 -0500 -+++ src/lib/ComputerPlayerEasy.cpp 2009-04-12 23:15:36.000000000 -0400 -@@ -22,6 +22,4 @@ - */ - --#include <iostream.h> -- - #include "Options.hpp" - #include "ComputerPlayerEasy.hpp" ---- src/lib/Common.hpp 2002-09-10 21:48:04.000000000 -0400 -+++ src/lib/Common.hpp 2009-04-12 23:15:36.000000000 -0400 -@@ -54,7 +54,7 @@ - static PlayerPosition getPartner(PlayerPosition pp); - static char getPlayerPositionChar(PlayerPosition pp); -- static char* getPlayerPositionStr(PlayerPosition pp); -+ static const char* getPlayerPositionStr(PlayerPosition pp); - -- static char* getBidStr(Bid bid); -+ static const char* getBidStr(Bid bid); - - static void setTrump(const Card::Suit aTrump); ---- src/lib/Debug.hpp 2002-04-10 20:22:17.000000000 -0400 -+++ src/lib/Debug.hpp 2009-04-12 23:15:36.000000000 -0400 -@@ -25,5 +25,5 @@ - #define EUCHRE_DEBUG_HPP - --#include <iostream.h> -+#include <iostream> - #include <Options.hpp> - ---- src/lib/ComputerPlayerHard.cpp 2003-03-24 06:37:59.000000000 -0500 -+++ src/lib/ComputerPlayerHard.cpp 2009-04-12 23:15:36.000000000 -0400 -@@ -23,5 +23,5 @@ - - #include <string.h> --#include <iomanip.h> -+#include <iomanip> - - #include "Debug.hpp" ---- src/lib/Hand.hpp 2002-09-10 21:48:04.000000000 -0400 -+++ src/lib/Hand.hpp 2009-04-12 23:15:36.000000000 -0400 -@@ -25,5 +25,4 @@ - #define HAND_HPP - --class ostream; - #include "Common.hpp" - #include "Card.hpp" ---- src/lib/Deck.hpp 2002-03-23 21:43:37.000000000 -0500 -+++ src/lib/Deck.hpp 2009-04-12 23:15:36.000000000 -0400 -@@ -25,6 +25,4 @@ - #define DECK_HPP - --class ostream; -- - #include "Card.hpp" - ---- src/lib/Game.cpp 2003-03-24 07:04:46.000000000 -0500 -+++ src/lib/Game.cpp 2009-04-12 23:15:36.000000000 -0400 -@@ -24,6 +24,7 @@ - #include <stdio.h> - #include <unistd.h> --#include <iomanip.h> -+#include <iomanip> - -+using namespace std; - #include "Debug.hpp" - #include "Game.hpp" -@@ -61,5 +62,5 @@ - /* gcc doesn't like conversion from void* to Event so hack around - it */ -- Event ev = (Event) (unsigned int) g_slist_nth_data(itsEventList, 0); -+ Event ev = (Event) (uintptr_t) g_slist_nth_data(itsEventList, 0); - itsEventList = g_slist_remove(itsEventList, (gpointer) ev); - ---- src/lib/Player.hpp 2003-02-04 22:34:51.000000000 -0500 -+++ src/lib/Player.hpp 2009-04-12 23:15:36.000000000 -0400 -@@ -25,5 +25,5 @@ - #define PLAYER_HPP - --class ostream; -+#include <ostream> - #include "Common.hpp" - #include "Hand.hpp" ---- src/lib/Options.hpp 2003-02-04 22:34:51.000000000 -0500 -+++ src/lib/Options.hpp 2009-04-13 01:58:02.000000000 -0400 -@@ -25,5 +25,5 @@ - #define OPTIONS_HPP - --#include <fstream.h> -+#include <fstream> - - #include "Common.hpp" ---- src/gui/GuiGame.cpp 2003-03-24 07:20:41.000000000 -0500 -+++ src/gui/GuiGame.cpp 2009-04-13 01:41:01.000000000 -0400 -@@ -446,5 +446,5 @@ - } - --void GuiGame::updateStatus(char* statusStr) { -+void GuiGame::updateStatus(const char* statusStr) { - strcpy(itsStatusText, statusStr); - updateStatus(); -@@ -595,5 +595,5 @@ - } - --char* GuiGame::getPauseText() { -+const char* GuiGame::getPauseText() { - if (GuiOptions::get()->getDelayMode() == Options::PAUSE) { - return "Click to continue."; -@@ -688,5 +688,5 @@ - const int num_in_mainwin = 10; - -- char* names[num_names] = { -+ const char* names[num_names] = { - "nplayedcard", "eplayedcard", "splayedcard", "wplayedcard", - "pcard0_pix", "pcard1_pix", "pcard2_pix", "pcard3_pix", -@@ -708,5 +708,7 @@ - gdk_pixmap_colormap_create_from_xpm_d(NULL, gdk_c, - &(cardbackBitmaps[i][which]), -- NULL, card_back_pixmap[which]); -+ NULL, -+ /* XXX Drop const-ness */ -+ (gchar **)card_back_pixmap[which]); - } - ---- src/gui/GuiGame.hpp 2003-03-24 06:58:28.000000000 -0500 -+++ src/gui/GuiGame.hpp 2009-04-12 23:25:55.000000000 -0400 -@@ -34,5 +34,5 @@ - virtual void getPlayers(); - virtual void setOptions(); -- virtual void updateStatus(char* statusStr); -+ virtual void updateStatus(const char* statusStr); - - void setCardBack(int which); -@@ -72,5 +72,5 @@ - void updateStatus(); - void hideTopCard(); -- char* getPauseText(); -+ const char* getPauseText(); - void setMainLabelColors(); - void setAuctionLabelColors(); ---- src/gui/callbacks.cpp 2003-03-24 07:08:59.000000000 -0500 -+++ src/gui/callbacks.cpp 2009-04-13 01:42:21.000000000 -0400 -@@ -105,5 +105,5 @@ - gpointer user_data) - { -- LOG("enter on_pcard_clicked with " << (int) user_data << endl); -+ LOG("enter on_pcard_clicked with " << (intptr_t) user_data << endl); - HumanGuiPlayer* p = (HumanGuiPlayer*) theGame->getPlayer(Common::SOUTH); - if (p == NULL) { -@@ -111,5 +111,5 @@ - } - -- p->setSelectedCard((int) user_data); -+ p->setSelectedCard((intptr_t) user_data); - theGame->addEvent(Game::PAUSE_END); - theGame->run(); -@@ -143,5 +143,5 @@ - { - Player* p = theGame->getPlayer(Common::SOUTH); -- p->assignBid((Common::Bid) ((int) user_data)); -+ p->assignBid((Common::Bid) ((intptr_t) user_data)); - - theGame->addEvent(Game::AUCTION_CONT); -@@ -203,7 +203,7 @@ - - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(t))) { -- p->assignBid(Common::LONER, (Card::Suit) (int) user_data); -+ p->assignBid(Common::LONER, (Card::Suit) (intptr_t) user_data); - } else { -- p->assignBid(Common::PICKITUP, (Card::Suit) (int) user_data); -+ p->assignBid(Common::PICKITUP, (Card::Suit) (intptr_t) user_data); - } - ---- src/gui/main.cpp 2003-03-24 07:19:16.000000000 -0500 -+++ src/gui/main.cpp 2009-04-13 01:57:22.000000000 -0400 -@@ -92,5 +92,7 @@ - gdk_pixmap_colormap_create_from_xpm_d(NULL, gdk_c, - &(cardbackSelectBitmaps[i]), -- NULL, card_back_pixmap[i]); -+ NULL, -+ /* Drop const-ness */ -+ (gchar **)card_back_pixmap[i]); - gtk_pixmap_set(GTK_PIXMAP(gtk_w), cardbackSelectPixmaps[i], - cardbackSelectBitmaps[i]); -@@ -168,5 +170,7 @@ - gdk_c = gtk_widget_get_colormap(gtk_w); - gdk_p = gdk_pixmap_colormap_create_from_xpm_d(NULL, gdk_c, &gdk_m, -- NULL, suit_pixmap[s]); -+ NULL, -+ /* Drop const-ness */ -+ (gchar **)suit_pixmap[s]); - - gtk_pixmap_set(GTK_PIXMAP(gtk_w), gdk_p, gdk_m); ---- src/gui/support.cpp 2002-06-27 00:11:51.000000000 -0400 -+++ src/gui/support.cpp 2009-04-13 01:55:08.000000000 -0400 -@@ -63,5 +63,5 @@ - - /* This is a dummy pixmap we use when a pixmap can't be found. */ --static char *dummy_pixmap_xpm[] = { -+static const char *dummy_pixmap_xpm[] = { - /* columns rows colors chars-per-pixel */ - "1 1 1 1", -@@ -113,5 +113,5 @@ - GtkWidget* - create_pixmap_d (GtkWidget *widget, -- gchar **xpm_d) -+ const gchar **xpm_d) - { - GdkColormap *colormap; -@@ -122,5 +122,7 @@ - colormap = gtk_widget_get_colormap (widget); - gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask, -- NULL, xpm_d); -+ NULL, -+ /* Drop const-ness */ -+ (gchar **)xpm_d); - if (gdkpixmap == NULL) - g_error ("Couldn't create replacement pixmap."); ---- src/gui/support.hpp 2002-06-27 00:11:51.000000000 -0400 -+++ src/gui/support.hpp 2009-04-13 01:54:35.000000000 -0400 -@@ -53,5 +53,5 @@ - const gchar *filename); - GtkWidget* create_pixmap_d (GtkWidget *widget, -- gchar **xpm_d); -+ const gchar **xpm_d); - - #ifdef __cplusplus ---- src/gui/HumanGuiPlayer.cpp 2003-03-24 04:28:58.000000000 -0500 -+++ src/gui/HumanGuiPlayer.cpp 2009-04-13 02:02:09.000000000 -0400 -@@ -36,9 +36,8 @@ - Player(myPos), GuiPlayer(myPos), itsState(INIT), itsPartnerLoner(0) { - -- char* formatStr = "pcard%d"; - char pcardStr[100]; - - for (int i = 0; i < (Common::CARDS_PER_HAND+1); i++) { -- sprintf(pcardStr, formatStr, i); -+ sprintf(pcardStr, "pcard%d", i); - itsCards[i] = lookup_widget(mainwin, pcardStr); - diff --git a/games/euchre/files/patch-src::lib::Options.cpp b/games/euchre/files/patch-src::lib::Options.cpp deleted file mode 100644 index 9939408eb1d0..000000000000 --- a/games/euchre/files/patch-src::lib::Options.cpp +++ /dev/null @@ -1,35 +0,0 @@ ---- src/lib/Options.cpp 2003-02-04 22:34:51.000000000 -0500 -+++ src/lib/Options.cpp 2009-04-13 01:59:11.000000000 -0400 -@@ -24,7 +24,10 @@ - #include <stdio.h> - #include <stdlib.h> - #include <unistd.h> --#include <iostream.h> -+#include <iostream> -+#include <sys/types.h> -+#include <sys/stat.h> -+#include <unistd.h> - - #include "Debug.hpp" - #include "Options.hpp" -@@ -90,7 +93,19 @@ - char fullpath[OPTIONS_PATH_SIZE]; - snprintf(fullpath, OPTIONS_PATH_SIZE, "%s/%s", dir, OPTIONS_FILE_NAME); - -- ifstream in(fullpath, ios::nocreate); -+ // We only want to try to open the file if it already exists. -+ // ios::nocreate seems to have disappeared, so we'll use stat instead. -+ -+ struct stat b; -+ -+ if (-1 == stat(fullpath, &b)) -+ { -+ LOG("could not open " << fullpath << endl); -+ return 1; -+ } -+ -+ ifstream in(fullpath); -+ - if (! in) { - LOG("could not open " << fullpath << endl); - return 1; diff --git a/games/euchre/files/std-namespace.h b/games/euchre/files/std-namespace.h deleted file mode 100644 index b4381f0f1a7e..000000000000 --- a/games/euchre/files/std-namespace.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifdef __cplusplus -using namespace std; -#endif |