aboutsummaryrefslogtreecommitdiff
path: root/games/gtkpool
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2005-08-01 11:06:03 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2005-08-01 11:06:03 +0000
commitbd5884d67dcb6227d3d3131a15870bfa477d255d (patch)
tree7e5ceef1d3ed17839a348769772666c843f654c3 /games/gtkpool
parentbb8429b73eee8c73288987a4a2ae335f69f6a268 (diff)
downloadports-bd5884d67dcb6227d3d3131a15870bfa477d255d.tar.gz
ports-bd5884d67dcb6227d3d3131a15870bfa477d255d.zip
Notes
Diffstat (limited to 'games/gtkpool')
-rw-r--r--games/gtkpool/Makefile26
-rw-r--r--games/gtkpool/distinfo2
-rw-r--r--games/gtkpool/files/patch-gtkpool_application.cpp37
-rw-r--r--games/gtkpool/files/patch-gtkpool_ball.cpp20
-rw-r--r--games/gtkpool/files/patch-gtkpool_ball.h11
-rw-r--r--games/gtkpool/files/patch-gtkpool_game.h25
-rw-r--r--games/gtkpool/files/patch-gtkpool_sound.cpp11
-rw-r--r--games/gtkpool/pkg-descr6
-rw-r--r--games/gtkpool/pkg-plist45
9 files changed, 183 insertions, 0 deletions
diff --git a/games/gtkpool/Makefile b/games/gtkpool/Makefile
new file mode 100644
index 000000000000..41e1d7d834ec
--- /dev/null
+++ b/games/gtkpool/Makefile
@@ -0,0 +1,26 @@
+# New ports collection makefile for: GTKPool
+# Date created: 31 Jul 2005
+# Whom: Alexey Dokuchaev <danfe@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= gtkpool
+PORTVERSION= 0.5.0
+CATEGORIES= games
+MASTER_SITES= http://gtkpool.seul.org/
+
+MAINTAINER= danfe@FreeBSD.org
+COMMENT= A 2D pool game using the GTK+ toolkit
+
+GNU_CONFIGURE= yes
+USE_GNOME= gtk12
+USE_REINPLACE= yes
+USE_X_PREFIX= yes
+MAKE_ARGS= CXX="${CXX}" CXXFLAGS="${CXXFLAGS} -DHAVE_CONFIG_H -I. -I.. `gtk-config --cflags` `gtk-config --libs`"
+
+post-patch:
+ @${REINPLACE_CMD} -e 's,/usr/local/share/gtkpool,${DATADIR},' \
+ ${WRKSRC}/gtkpool/application.cpp ${WRKSRC}/gtkpool/options.cpp
+
+.include <bsd.port.mk>
diff --git a/games/gtkpool/distinfo b/games/gtkpool/distinfo
new file mode 100644
index 000000000000..addf38adc7b0
--- /dev/null
+++ b/games/gtkpool/distinfo
@@ -0,0 +1,2 @@
+MD5 (gtkpool-0.5.0.tar.gz) = 4d878374ab0cb25358d94d627e7f4062
+SIZE (gtkpool-0.5.0.tar.gz) = 636226
diff --git a/games/gtkpool/files/patch-gtkpool_application.cpp b/games/gtkpool/files/patch-gtkpool_application.cpp
new file mode 100644
index 000000000000..70dcaa98885e
--- /dev/null
+++ b/games/gtkpool/files/patch-gtkpool_application.cpp
@@ -0,0 +1,37 @@
+--- gtkpool/application.cpp.orig Tue Aug 6 11:02:45 2002
++++ gtkpool/application.cpp Mon Aug 1 16:01:35 2005
+@@ -67,11 +67,11 @@
+ message_colours[14] = new GdkColor;
+
+ buf_pixmap = NULL;
+- table_pixmaps = new (GdkPixmap *)[4];
+- balls_pixmaps = new (GdkPixmap *)[NUM_BALLS];
+- balls_pixmap_masks = new (GdkBitmap *)[NUM_BALLS];
+- balls_big_pixmaps = new (GdkPixmap *)[NUM_BALLS];
+- balls_big_pixmap_masks = new (GdkBitmap *)[NUM_BALLS];
++ table_pixmaps = new GdkPixmap *[4];
++ balls_pixmaps = new GdkPixmap *[NUM_BALLS];
++ balls_pixmap_masks = new GdkBitmap *[NUM_BALLS];
++ balls_big_pixmaps = new GdkPixmap *[NUM_BALLS];
++ balls_big_pixmap_masks = new GdkBitmap *[NUM_BALLS];
+ running = true; placing_cue = false;
+ sunk_tf = collide_tf = bounce_tf = false;
+ connected = false;
+@@ -530,7 +530,7 @@
+ bb = find_if(balls.begin(), balls.end(), pointer_selects( x, y, hit_moving));
+ if(bb != balls.end())
+ {
+-#if _CPP_CSTDLIB == 1
++#if _CPP_CSTDLIB == 1 || _GLIBCXX_CSTDLIB == 1
+ // FIXME: horrible, non-portable, converting a vector iterator
+ // to a pointer using g++ 3.0 private interface :-(
+ // -- Philip Martin <philip_martin@ntlworld.com>
+@@ -815,7 +815,7 @@
+ load_sounds();
+ }
+
+-void Application::print_message(const char *message, int colour = 0)
++void Application::print_message(const char *message, int colour)
+ {
+ if (colour > 4)
+ colour = 14;
diff --git a/games/gtkpool/files/patch-gtkpool_ball.cpp b/games/gtkpool/files/patch-gtkpool_ball.cpp
new file mode 100644
index 000000000000..ea9a2559e774
--- /dev/null
+++ b/games/gtkpool/files/patch-gtkpool_ball.cpp
@@ -0,0 +1,20 @@
+--- gtkpool/ball.cpp.orig Thu Aug 15 00:04:33 2002
++++ gtkpool/ball.cpp Fri Jul 29 19:06:23 2005
+@@ -53,7 +53,7 @@
+ radius = diam = 0;
+ }
+
+-Ball::Ball (double x, double y, int d, GdkColor *c, int cat = other, bool isq = false, bool ise = false, bool isn = false, bool isso = false, bool isst = false) : Point2D(x, y), vel(0, 0), bnc(0, 0), tvec(0, 0) {
++Ball::Ball (double x, double y, int d, GdkColor *c, int cat, bool isq, bool ise, bool isn, bool isso, bool isst) : Point2D(x, y), vel(0, 0), bnc(0, 0), tvec(0, 0) {
+ radius = (diam = d) / 2;
+ clr = c;
+ is_cue = isq; is_eight = ise; is_nine = isn;
+@@ -63,7 +63,7 @@
+ ball_num = 15;
+ }
+
+-Ball::Ball (double x, double y, int d, int bn, GdkPixmap *pixmap, GdkBitmap *c_bmp, GdkPixmap *b_pixmap, GdkBitmap *b_clip_bmp, int cat = other, bool isq = false, bool ise = false, bool isn = false, bool isso = false, bool isst = false) : Point2D(x, y), vel(0, 0), bnc(0, 0), tvec(0, 0) {
++Ball::Ball (double x, double y, int d, int bn, GdkPixmap *pixmap, GdkBitmap *c_bmp, GdkPixmap *b_pixmap, GdkBitmap *b_clip_bmp, int cat, bool isq, bool ise, bool isn, bool isso, bool isst) : Point2D(x, y), vel(0, 0), bnc(0, 0), tvec(0, 0) {
+ radius = (diam = d) / 2;
+ clr = (GdkColor *)NULL;
+ is_cue = isq; is_eight = ise; is_nine = isn;
diff --git a/games/gtkpool/files/patch-gtkpool_ball.h b/games/gtkpool/files/patch-gtkpool_ball.h
new file mode 100644
index 000000000000..f4f8854a5c03
--- /dev/null
+++ b/games/gtkpool/files/patch-gtkpool_ball.h
@@ -0,0 +1,11 @@
+--- gtkpool/ball.h.orig Mon Jul 29 08:02:15 2002
++++ gtkpool/ball.h Fri Jul 29 18:58:49 2005
+@@ -80,7 +80,7 @@
+ GdkColor *clr;
+
+ Ball(void);
+- Ball (double x, double y, int d, GdkColor *c, int cat, bool isq = false, bool ise = false, bool isn = false, bool isso = false, bool isst = false);
++ Ball (double x, double y, int d, GdkColor *c, int cat = other, bool isq = false, bool ise = false, bool isn = false, bool isso = false, bool isst = false);
+ Ball (double x, double y, int d, int bn, GdkPixmap *pixmap, GdkBitmap *c_bmp, GdkPixmap *b_pixmap, GdkBitmap *b_clip_bmp, int cat, bool isq = false, bool ise = false, bool isn = false, bool isso = false, bool isst = false);
+ bool moving ();
+ void decel (double val);
diff --git a/games/gtkpool/files/patch-gtkpool_game.h b/games/gtkpool/files/patch-gtkpool_game.h
new file mode 100644
index 000000000000..75e7ccefc3a9
--- /dev/null
+++ b/games/gtkpool/files/patch-gtkpool_game.h
@@ -0,0 +1,25 @@
+--- gtkpool/game.h.orig Mon Aug 1 17:17:05 2005
++++ gtkpool/game.h Mon Aug 1 17:17:41 2005
+@@ -19,10 +19,6 @@
+ #define GAME_H
+ #include <gtk/gtk.h>
+ #include <vector>
+-#include "ball.h"
+-#include "check_pocket.h"
+-#include "move_balls.h"
+-#include "moving.h"
+
+ /**
+ *@author Brian Ashe
+@@ -34,6 +30,11 @@
+ enum catagories { stripes, solids, other }; // What are they shooting at
+ enum player_types { human, computer, remote }; // What type of player (future use)
+ enum game_types { eight_ball, nine_ball, rotation, snooker, continuous14_1, no_rules };
++
++#include "ball.h"
++#include "check_pocket.h"
++#include "move_balls.h"
++#include "moving.h"
+
+ struct player {
+ char player_name [30]; // Player's name
diff --git a/games/gtkpool/files/patch-gtkpool_sound.cpp b/games/gtkpool/files/patch-gtkpool_sound.cpp
new file mode 100644
index 000000000000..634186038cac
--- /dev/null
+++ b/games/gtkpool/files/patch-gtkpool_sound.cpp
@@ -0,0 +1,11 @@
+--- gtkpool/sound.cpp.orig Mon Jul 29 04:57:41 2002
++++ gtkpool/sound.cpp Fri Jul 29 19:06:47 2005
+@@ -26,7 +26,7 @@
+ #include <errno.h>
+ #include "sound.h"
+
+-SoundError::SoundError(char *desc, int c, int r = 0, int g = 0){
++SoundError::SoundError(char *desc, int c, int r, int g){
+ description = strdup(desc);
+ code = c;
+ requested = r;
diff --git a/games/gtkpool/pkg-descr b/games/gtkpool/pkg-descr
new file mode 100644
index 000000000000..a345089600e5
--- /dev/null
+++ b/games/gtkpool/pkg-descr
@@ -0,0 +1,6 @@
+GTKPool is a 2D pool game using the GTK+ toolkit. It currently supports
+playing 8-ball, 9-ball and Rotation as well as a "No Rules" option for
+practice/just messing around. It supports many options and features
+configurable physics so you can do almost anything.
+
+WWW: http://gtkpool.seul.org/
diff --git a/games/gtkpool/pkg-plist b/games/gtkpool/pkg-plist
new file mode 100644
index 000000000000..fb215457e660
--- /dev/null
+++ b/games/gtkpool/pkg-plist
@@ -0,0 +1,45 @@
+bin/gtkpool
+%%DATADIR%%/ball_10_lg.xpm
+%%DATADIR%%/ball_10_sm.xpm
+%%DATADIR%%/ball_11_lg.xpm
+%%DATADIR%%/ball_11_sm.xpm
+%%DATADIR%%/ball_12_lg.xpm
+%%DATADIR%%/ball_12_sm.xpm
+%%DATADIR%%/ball_13_lg.xpm
+%%DATADIR%%/ball_13_sm.xpm
+%%DATADIR%%/ball_14_lg.xpm
+%%DATADIR%%/ball_14_sm.xpm
+%%DATADIR%%/ball_15_lg.xpm
+%%DATADIR%%/ball_15_sm.xpm
+%%DATADIR%%/ball_1_lg.xpm
+%%DATADIR%%/ball_1_sm.xpm
+%%DATADIR%%/ball_2_lg.xpm
+%%DATADIR%%/ball_2_sm.xpm
+%%DATADIR%%/ball_3_lg.xpm
+%%DATADIR%%/ball_3_sm.xpm
+%%DATADIR%%/ball_4_lg.xpm
+%%DATADIR%%/ball_4_sm.xpm
+%%DATADIR%%/ball_5_lg.xpm
+%%DATADIR%%/ball_5_sm.xpm
+%%DATADIR%%/ball_6_lg.xpm
+%%DATADIR%%/ball_6_sm.xpm
+%%DATADIR%%/ball_7_lg.xpm
+%%DATADIR%%/ball_7_sm.xpm
+%%DATADIR%%/ball_8_lg.xpm
+%%DATADIR%%/ball_8_sm.xpm
+%%DATADIR%%/ball_9_lg.xpm
+%%DATADIR%%/ball_9_sm.xpm
+%%DATADIR%%/ball_cue_lg.xpm
+%%DATADIR%%/ball_cue_sm.xpm
+%%DATADIR%%/bllq-icon.xpm
+%%DATADIR%%/blpl-icon.xpm
+%%DATADIR%%/mabl-icon.xpm
+%%DATADIR%%/maho-icon.xpm
+%%DATADIR%%/pool_table_black-laquer.xpm
+%%DATADIR%%/pool_table_black-pearl.xpm
+%%DATADIR%%/pool_table_mahogany.xpm
+%%DATADIR%%/ball_drop.raw
+%%DATADIR%%/pool_table_maple-burl.xpm
+%%DATADIR%%/ball_hit.raw
+@dirrm %%DATADIR%%
+share/icons/gtkpool.png