aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authornemysis <nemysis@FreeBSD.org>2014-03-31 03:07:09 +0800
committernemysis <nemysis@FreeBSD.org>2014-03-31 03:07:09 +0800
commit988691085def4e8a5f4124f3856e841f84709c4f (patch)
tree20793705c5976192091c9162a444cf626d82e39d /games
parent64d000d2319fb8eb88cc1fae507be80e2c1b45dd (diff)
downloadfreebsd-ports-gnome-988691085def4e8a5f4124f3856e841f84709c4f.tar.gz
freebsd-ports-gnome-988691085def4e8a5f4124f3856e841f84709c4f.tar.zst
freebsd-ports-gnome-988691085def4e8a5f4124f3856e841f84709c4f.zip
- Don't silence warnings
- Remove TODO from DOCS - Add patches, fix bad C++ and GTK code - Change pkg-plist, proper use @group and @mode
Diffstat (limited to 'games')
-rw-r--r--games/gtkballs/Makefile7
-rw-r--r--games/gtkballs/files/patch-src__game.c44
-rw-r--r--games/gtkballs/files/patch-src__gtkballs.c2
-rw-r--r--games/gtkballs/files/patch-src__gtkutils.c19
-rw-r--r--games/gtkballs/files/patch-src__savegame.c11
-rw-r--r--games/gtkballs/pkg-plist4
6 files changed, 79 insertions, 8 deletions
diff --git a/games/gtkballs/Makefile b/games/gtkballs/Makefile
index b85c5d91e0d9..de8871f5cc8a 100644
--- a/games/gtkballs/Makefile
+++ b/games/gtkballs/Makefile
@@ -17,10 +17,10 @@ USE_GNOME= gtk20
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --localstatedir=${DATADIR}
-CPPFLAGS+= -I${LOCALBASE}/include -w
+CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-PORTDOCS= AUTHORS ChangeLog NEWS README README.russian TODO
+PORTDOCS= AUTHORS ChangeLog NEWS README README.russian
OPTIONS_DEFINE= DOCS NLS
OPTIONS_SUB= yes
@@ -35,9 +35,6 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/gnome-gtkballs.png \
${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
- ${CHMOD} 664 ${STAGEDIR}${DATADIR}/gtkballs-scores
- ${CHOWN} root:games ${STAGEDIR}${DATADIR}/gtkballs-scores
-
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
diff --git a/games/gtkballs/files/patch-src__game.c b/games/gtkballs/files/patch-src__game.c
index 78ac25e7553f..e3bea5246afe 100644
--- a/games/gtkballs/files/patch-src__game.c
+++ b/games/gtkballs/files/patch-src__game.c
@@ -1,6 +1,46 @@
--- ./src/game.c.orig 2004-10-06 13:06:46.000000000 +0200
-+++ ./src/game.c 2014-02-01 20:44:28.000000000 +0100
-@@ -495,8 +495,8 @@
++++ ./src/game.c 2014-03-30 20:05:17.338033553 +0200
+@@ -406,7 +406,8 @@
+ for(i = 1;
+ i < rules_get_width() - x &&
+ board_get_at_xy(x + i, y) == board_get_at_xy(x, y);
+- i++);
++ i++)
++ ;
+ if(i >= rules_get_destroy()) {
+ have_del = 1;
+ for(j = 0; j < i; j ++) {
+@@ -419,7 +420,8 @@
+ for(i = 1;
+ i < rules_get_height() - y &&
+ board_get_at_xy(x, y + i) == board_get_at_xy(x, y);
+- i++);
++ i++)
++ ;
+ if(i >= rules_get_destroy()) {
+ have_del = 1;
+ for(j = 0; j < i; j ++) {
+@@ -434,7 +436,8 @@
+ i < rules_get_width() - x &&
+ i < rules_get_height() - y &&
+ board_get_at_xy(x + i, y + i) == board_get_at_xy(x, y);
+- i++);
++ i++)
++ ;
+ if(i >= rules_get_destroy()) {
+ have_del = 1;
+ for(j = 0; j < i; j ++) {
+@@ -449,7 +452,8 @@
+ i <= x &&
+ i < rules_get_height() - y &&
+ board_get_at_xy(x - i, y + i) == board_get_at_xy(x, y);
+- i++);
++ i++)
++ ;
+ if(i >= rules_get_destroy()) {
+ have_del = 1;
+ for(j = 0; j < i; j ++) {
+@@ -495,8 +499,8 @@
lock_actions(1);
draw_board();
for(animtime = 0, i = 0; i < animcadres;) {
diff --git a/games/gtkballs/files/patch-src__gtkballs.c b/games/gtkballs/files/patch-src__gtkballs.c
index c0151ea08496..ec80167af98e 100644
--- a/games/gtkballs/files/patch-src__gtkballs.c
+++ b/games/gtkballs/files/patch-src__gtkballs.c
@@ -1,5 +1,5 @@
--- ./src/gtkballs.c.orig 2004-02-06 14:51:54.000000000 +0100
-+++ ./src/gtkballs.c 2014-02-01 20:44:28.000000000 +0100
++++ ./src/gtkballs.c 2014-03-30 20:05:17.338033553 +0200
@@ -123,7 +123,7 @@
#ifdef ENABLE_NLS
bindtextdomain (PACKAGE, LOCALEDIR);
diff --git a/games/gtkballs/files/patch-src__gtkutils.c b/games/gtkballs/files/patch-src__gtkutils.c
new file mode 100644
index 000000000000..d8dabeb35be2
--- /dev/null
+++ b/games/gtkballs/files/patch-src__gtkutils.c
@@ -0,0 +1,19 @@
+--- ./src/gtkutils.c.orig 2003-05-26 15:34:38.000000000 +0200
++++ ./src/gtkutils.c 2014-03-30 20:05:17.338033553 +0200
+@@ -112,14 +112,14 @@
+
+ /* shows simple message box */
+ void ut_simple_message_box(gchar *message) {
+- GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, message);
++ GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, "%s", message);
+ gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
+ }
+
+ /* shows simple message box */
+ void ut_simple_message_box_with_title(gchar *message, gchar *title) {
+- GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, message);
++ GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, "%s", message);
+ gtk_window_set_title(GTK_WINDOW(dialog), title);
+ gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_widget_destroy(dialog);
diff --git a/games/gtkballs/files/patch-src__savegame.c b/games/gtkballs/files/patch-src__savegame.c
new file mode 100644
index 000000000000..e1ad7bc3d890
--- /dev/null
+++ b/games/gtkballs/files/patch-src__savegame.c
@@ -0,0 +1,11 @@
+--- ./src/savegame.c.orig 2003-05-21 18:06:05.000000000 +0200
++++ ./src/savegame.c 2014-03-30 20:05:17.338033553 +0200
+@@ -166,7 +166,7 @@
+ if((f = fopen(fname, "w")) != NULL) {
+ chmod(fname, 0600);
+ /* TODO: check for errors ! */
+- fprintf(f, rules);
++ fprintf(f, "%s", rules);
+ fprintf(f, "%010d", score);
+ for(i = 0; i < rules_get_width() * rules_get_height(); i++) {
+ fprintf(f, "%02d", board[i]);
diff --git a/games/gtkballs/pkg-plist b/games/gtkballs/pkg-plist
index 9b2f8149892d..8901b59818c5 100644
--- a/games/gtkballs/pkg-plist
+++ b/games/gtkballs/pkg-plist
@@ -2,7 +2,11 @@ bin/gtkballs
man/man6/gtkballs.6x.gz
%%DATADIR%%/COPYING
%%DATADIR%%/gtkballs-logo.png
+@group games
+@mode 664
%%DATADIR%%/gtkballs-scores
+@mode
+@group
%%DATADIR%%/gtkballs_16x16.png
%%DATADIR%%/themes/5balls-Big/blue.xpm
%%DATADIR%%/themes/5balls-Big/blue_destroy1.xpm