1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

- Don't silence warnings

- Remove TODO from DOCS
- Add patches, fix bad C++ and GTK code
- Change pkg-plist, proper use @group and @mode
This commit is contained in:
Rusmir Dusko 2014-03-30 19:07:09 +00:00
parent f77a612f66
commit 1a90e3d6fb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=349666
6 changed files with 79 additions and 8 deletions

View File

@ -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}

View File

@ -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;) {

View File

@ -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);

View File

@ -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);

View File

@ -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]);

View File

@ -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