Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Dec 2013 14:54:12 +0000 (UTC)
From:      Pawel Pekala <pawel@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r337419 - in head/games/znibbles: . files
Message-ID:  <201312251454.rBPEsCFC068458@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pawel
Date: Wed Dec 25 14:54:11 2013
New Revision: 337419
URL: http://svnweb.freebsd.org/changeset/ports/337419

Log:
  - Fix build with clang
  - Rephrase pkg-descr
  
  PR:		ports/184861
  Submitted by:	KATO Tsuguru <tkato432@yahoo.com>

Added:
  head/games/znibbles/files/patch-src__Motif__MotifInterface.C   (contents, props changed)
  head/games/znibbles/files/patch-src__Motif__textarea.C   (contents, props changed)
Modified:
  head/games/znibbles/Makefile
  head/games/znibbles/pkg-descr   (contents, props changed)

Modified: head/games/znibbles/Makefile
==============================================================================
--- head/games/znibbles/Makefile	Wed Dec 25 14:25:22 2013	(r337418)
+++ head/games/znibbles/Makefile	Wed Dec 25 14:54:11 2013	(r337419)
@@ -11,14 +11,12 @@ MASTER_SITES=	http://old.koalateam.com/f
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Multi-player networked nibbles game
 
-LICENSE=	GPLv2 GPLv3
-LICENSE_COMB=	dual
+LICENSE=	GPLv2 # (or later)
 
 OPTIONS_DEFINE=	GTK1
 OPTIONS_DEFAULT=	GTK1
 
 USES=		motif
-WANT_GNOME=	yes
 GNU_CONFIGURE=	yes
 
 PLIST_FILES=	bin/nibbles bin/znibbles bin/znibblesX \
@@ -26,14 +24,11 @@ PLIST_FILES=	bin/nibbles bin/znibbles bi
 		man/man6/znibblesX.6.gz
 
 GTK1_USE=		GNOME=gtk12
-GTK1_PLIST_FILES=	man/man6/gznibbles.6.gz bin/gznibbles
+GTK1_PLIST_FILES=	bin/gznibbles man/man6/gznibbles.6.gz
 GTK1_CONFIGURE_ENABLE=	gtk
 
-.include <bsd.port.options.mk>
-
 post-extract:
 	@${RM} -f ${WRKSRC}/src/getopt.h
-#	@${LN} -sf /usr/include/getopt.h ${WRKSRC}/src
 
 post-patch:
 	@${REINPLACE_CMD} -e \
@@ -48,11 +43,7 @@ post-patch:
 .endfor
 
 post-install:
-	${INSTALL_MAN} ${WRKSRC}/doc/nibbles.6 ${STAGEDIR}${MAN6PREFIX}/man/man6
-	${INSTALL_MAN} ${WRKSRC}/doc/znibbles.6 ${STAGEDIR}${MAN6PREFIX}/man/man6
-	${INSTALL_MAN} ${WRKSRC}/doc/znibblesX.6 ${STAGEDIR}${MAN6PREFIX}/man/man6
-.if ${PORT_OPTIONS:MGTK1}
-	${INSTALL_MAN} ${WRKSRC}/doc/gznibbles.6 ${STAGEDIR}${MAN6PREFIX}/man/man6
-.endif
+	(cd ${WRKSRC}/doc && ${INSTALL_MAN} nibbles.6 znibbles.6 znibblesX.6 \
+		gznibbles.6 ${STAGEDIR}${MAN6PREFIX}/man/man6)
 
 .include <bsd.port.mk>

Added: head/games/znibbles/files/patch-src__Motif__MotifInterface.C
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/znibbles/files/patch-src__Motif__MotifInterface.C	Wed Dec 25 14:54:11 2013	(r337419)
@@ -0,0 +1,214 @@
+--- src/Motif/MotifInterface.C.orig
++++ src/Motif/MotifInterface.C
+@@ -32,7 +32,7 @@
+ # include <config.h>
+ #endif
+ 
+-#include <iostream.h>
++#include <iostream>
+ 
+ #include <unistd.h>
+ #include <stdlib.h>
+@@ -131,7 +131,7 @@
+   display_version();
+ 
+   if (two_key)
+-    cout << "Two-key mode enabled" << endl;
++    std::cout << "Two-key mode enabled" << std::endl;
+ 
+   
+   // connect pipe_handler to SIGPIPE signal
+@@ -147,8 +147,8 @@
+     exit(2); 
+   }
+ 
+-  cout << "Connecting to ZNibbles server:  " \
+-       << options.get_host_name() << ":" << options.get_port() << "... " << endl;
++  std::cout << "Connecting to ZNibbles server:  " \
++       << options.get_host_name() << ":" << options.get_port() << "... " << std::endl;
+   
+   // create and bind socket to any port 
+   port = 0;
+@@ -158,7 +158,7 @@
+   } 
+ 
+   if (debug)
+-    cout << "Client socket created on port: " << ntohs(client_address.sin_port) << endl;
++    std::cout << "Client socket created on port: " << ntohs(client_address.sin_port) << std::endl;
+   
+   // Build server address 
+   server_address.sin_family = AF_INET;
+@@ -175,7 +175,7 @@
+ 
+   display_play_help();
+ 
+-  cout << "Connection accepted\n" << endl;
++  std::cout << "Connection accepted\n" << std::endl;
+ 
+   hack_socket_client = socket_client; // hack for signal handling
+   action.sa_handler = stop_handler;
+@@ -185,7 +185,7 @@
+ 
+   init_messages(options.get_message_file());
+ 
+-  cout << "initializing interface..." << endl;
++  std::cout << "initializing interface..." << std::endl;
+   make(argc, argv);
+ }
+ 
+@@ -262,54 +262,54 @@
+ 
+ void MotifInterface::display_version() 
+ {
+-  cerr << "ZNibbles v" VERSION " - A little silly game - "
++  std::cerr << "ZNibbles v" VERSION " - A little silly game - "
+        << "(c) Vincent Mallet 1997, 1998, 1999 - vmallet@enst.fr" 
+-       << endl << endl;
++       << std::endl << std::endl;
+ }
+ 
+ void MotifInterface::display_version_short()
+ {
+-  cout << "ZNibbles Motif Client " VERSION << endl;
++  std::cout << "ZNibbles Motif Client " VERSION << std::endl;
+ }
+ 
+ void MotifInterface::display_help(char *name)
+ {
+-  cout << "Usage: " << name << " [OPTION].. PLAYERNAME" << endl;
+-  cout << endl;
+-  cout << "Start a ZNibbles Motif client and connect to the specified nibbles server." << endl;
+-  cout << endl;
+-  cout << "  -n, --host-name=HOST     connect to server HOST [default is localhost]" << endl;
+-  cout << "  -p, --port=NUM           connect to port NUM of server [default is 5051]" << endl;
+-  cout << "  -m, --message-file=FILE  load predefined messages from file FILE" << endl;
+-  cout << "  -t, --twokey             control worm with only two keys, LEFT and RIGHT" << endl;
+-  cout << "  -i, --enable-stdin       enable standard input for sending messages" << endl;
+-  cout << "  -d, --debug              enable debug output" << endl;
+-  cout << "  -V, --version            print version number, then exit" << endl;
+-  cout << "  -h, --help               show this message and exit" << endl;
+-  cout << endl;
+-  cout << "Report bugs to <vmallet@enst.fr>." << endl;
++  std::cout << "Usage: " << name << " [OPTION].. PLAYERNAME" << std::endl;
++  std::cout << std::endl;
++  std::cout << "Start a ZNibbles Motif client and connect to the specified nibbles server." << std::endl;
++  std::cout << std::endl;
++  std::cout << "  -n, --host-name=HOST     connect to server HOST [default is localhost]" << std::endl;
++  std::cout << "  -p, --port=NUM           connect to port NUM of server [default is 5051]" << std::endl;
++  std::cout << "  -m, --message-file=FILE  load predefined messages from file FILE" << std::endl;
++  std::cout << "  -t, --twokey             control worm with only two keys, LEFT and RIGHT" << std::endl;
++  std::cout << "  -i, --enable-stdin       enable standard input for sending messages" << std::endl;
++  std::cout << "  -d, --debug              enable debug output" << std::endl;
++  std::cout << "  -V, --version            print version number, then exit" << std::endl;
++  std::cout << "  -h, --help               show this message and exit" << std::endl;
++  std::cout << std::endl;
++  std::cout << "Report bugs to <vmallet@enst.fr>." << std::endl;
+ }
+ 
+ 
+ 
+ void MotifInterface::display_play_help()
+ {
+-  cout << endl;
+-  cout << "Welcome to ZNibbles!" << endl;
+-  cout << endl;
+-  cout << "Valid keys while playing:" << endl
+-       << endl
+-       << "     Up, Down, Left, Right:   move worm 1" << endl
+-       << endl
+-       << "     p/u                  :   pause/unpause game" << endl
+-       << endl
+-       << "     P/U                  :   pause/unpause _your_ worm" << endl
+-       << endl
+-       << "     1, 2, ... 0          :   send predefined messages to other players" << endl
+-       << endl
+-       << "     Ctrl+Q               :   quit game" << endl
+-       << endl
+-       << " Have fun!" << endl;
++  std::cout << std::endl;
++  std::cout << "Welcome to ZNibbles!" << std::endl;
++  std::cout << std::endl;
++  std::cout << "Valid keys while playing:" << std::endl
++       << std::endl
++       << "     Up, Down, Left, Right:   move worm 1" << std::endl
++       << std::endl
++       << "     p/u                  :   pause/unpause game" << std::endl
++       << std::endl
++       << "     P/U                  :   pause/unpause _your_ worm" << std::endl
++       << std::endl
++       << "     1, 2, ... 0          :   send predefined messages to other players" << std::endl
++       << std::endl
++       << "     Ctrl+Q               :   quit game" << std::endl
++       << std::endl
++       << " Have fun!" << std::endl;
+ }
+ 
+ 
+@@ -318,7 +318,7 @@
+ 
+ void MotifInterface::pipe_handler(int sig)
+ {
+-  cerr << "--- Lost Server Connection! ---" << endl;
++  std::cerr << "--- Lost Server Connection! ---" << std::endl;
+   sig++; // warnings..
+   dead_server = 1;
+ }
+@@ -326,7 +326,7 @@
+ 
+ void MotifInterface::stop_handler(int sig)
+ {
+-  cerr << "--- Quitting game! ---" << endl;
++  std::cerr << "--- Quitting game! ---" << std::endl;
+ 
+   if (hack_socket_client) {
+     struct timeval tv;
+@@ -391,11 +391,11 @@
+   char buf[300];
+   
+   if (priv) {
+-    //    cout << "Got  *private*  Message: '" << msg << "'" << endl;
++    //    std::cout << "Got  *private*  Message: '" << msg << "'" << std::endl;
+     sprintf(buf, "[Private] %s> %s\n", from.get_name(), msg);
+   }
+   else {
+-    //    cout << "Message: " << from.name << "> " << msg << endl;
++    //    std::cout << "Message: " << from.name << "> " << msg << std::endl;
+     sprintf(buf, "%s> %s\n", from.get_name(), msg);
+   }
+   textarea.add_line(buf);
+@@ -545,7 +545,7 @@
+       case VOID_TRAME:
+ 	{
+ 	  if (mythis.debug)
+-	    cout << "got VOID_TRAME " << endl;
++	    std::cout << "got VOID_TRAME " << std::endl;
+ 	  mt.get_char();
+ 	  char *p = mt.get_string();
+ 	  if (p && strcmp(p, "w") == 0)
+@@ -595,14 +595,14 @@
+       
+       case QUIT_GAME:
+ 	if (mythis.debug)
+-	  cout << "Got QUIT_GAME" << endl;
+-	cout << "Client shutting down.... " << endl;
++	  std::cout << "Got QUIT_GAME" << std::endl;
++	std::cout << "Client shutting down.... " << std::endl;
+ 	done = 1;
+ 	break;
+ 	
+       default:
+ 	if (mythis.debug)
+-	  cout << "got unknown frame type: " << (int) mt.peek_char() << endl;
++	  std::cout << "got unknown frame type: " << (int) mt.peek_char() << std::endl;
+ 	break;
+       }
+     }
+@@ -661,7 +661,7 @@
+ void MotifInterface::join_game()
+ {
+   if (debug)
+-    cout << "Sending welcome message..." << endl;
++    std::cout << "Sending welcome message..." << std::endl;
+   
+   t.put_char(JOIN_GAME);
+   t.put_string(own_name);

Added: head/games/znibbles/files/patch-src__Motif__textarea.C
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/znibbles/files/patch-src__Motif__textarea.C	Wed Dec 25 14:54:11 2013	(r337419)
@@ -0,0 +1,20 @@
+--- src/Motif/textarea.C.orig
++++ src/Motif/textarea.C
+@@ -33,7 +33,7 @@
+ #include <Xm/ScrollBar.h>
+ #include <Xm/Text.h>
+ 
+-#include <iostream.h>
++#include <iostream>
+ #include "string.h"
+ 
+ #include "motifutil.H"
+@@ -92,7 +92,7 @@
+   XmTextSetCursorPosition(widget, XmTextGetLastPosition(widget));
+   XmTextShowPosition(widget, XmTextGetLastPosition(widget));
+   if (length > 9500) {
+-    cout << "textarea warning!" << endl;
++    std::cout << "textarea warning!" << std::endl;
+     bbuf[0] = '\0';
+   }
+ }

Modified: head/games/znibbles/pkg-descr
==============================================================================
--- head/games/znibbles/pkg-descr	Wed Dec 25 14:25:22 2013	(r337418)
+++ head/games/znibbles/pkg-descr	Wed Dec 25 14:54:11 2013	(r337419)
@@ -1,14 +1,15 @@
-ZNibbles is a multi-player networked game. It is based on the old nibbles
-game: you've got a worm, eat nibbles and get your worm growing. Several
-players can play together, each of them controlling its own worm on its own
-computer.
+ZNibbles is a multi-player networked game. It is based on the old
+nibbles game: you've got a worm, eat nibbles and get your worm growing.
+Several players can play together, each of them controlling its own worm
+on its own computer.
 
-There is theoretically an unlimited number of simultaneous players, it's more
-a matter of network speed. It has been tested with more than 10 players and it
-was real fun :) ZNibbles is written for unix. It has been tested under Linux,
-SunOS, Solaris and Irix. The game can run either directly on top of X11, use
-the GTK+ toolkit (get it on the GTK+ site) or use the Motif toolkit (get a good
-Motif free implementation called LessTif) 
+There is theoretically an unlimited number of simultaneous players, it's
+more a matter of network speed. It has been tested with more than 10
+players and it was real fun :) ZNibbles is written for unix. It has been
+tested under Linux, SunOS, Solaris and Irix. The game can run either
+directly on top of X11, use the GTK+ toolkit (get it on the GTK+ site)
+or use the Motif toolkit (get a good Motif free implementation called
+LessTif) 
 
 Once compiled, you get the files:
 
@@ -16,6 +17,7 @@ Once compiled, you get the files:
    gznibbles : the ZNibbles GTK+ client
    znibblesX : the ZNibbless X11-only client (poor)
 
-Run "nibbles" first as the ZNibbles server, and then run its clients to play.
+Run "nibbles" first as the ZNibbles server, and then run its clients to
+play.
 
 WWW: http://www.jfouffa.com/vmallet/ZNibbles.html



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312251454.rBPEsCFC068458>