Although it calls ftime() only on WIN32, games/csmash uses struct timeb
internally to pass around time values.  I've copied our definition of
timeb into the central header file.  Acceptable?

Other cleanup:
* Don't patch away the SDL header subdirectory and then add it
  back to the include path.
* Sync WANTLIB.

ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/games/csmash/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile    11 Mar 2013 11:07:38 -0000      1.11
+++ Makefile    6 Dec 2013 20:13:35 -0000
@@ -3,7 +3,7 @@
 COMMENT=       Cannon Smash 3D table tennis
 
 DISTNAME=      csmash-0.6.6
-REVISION=      5
+REVISION=      6
 CATEGORIES=    games
 HOMEPAGE=      http://cannonsmash.sourceforge.net/
 
@@ -23,15 +23,14 @@ LIB_DEPENDS=        devel/sdl-image \
                x11/gtk+2
 
 WANTLIB+=      GL GLU ICE Xcomposite Xcursor Xdamage Xfixes \
-               Xi Xinerama Xmu Xrandr Xrender Xt atk-1.0 c cairo expat \
+               Xi Xinerama Xmu Xrandr Xrender Xt atk-1.0 c cairo \
                fontconfig freetype gio-2.0 glib-2.0 \
-               gobject-2.0 pango-1.0 pangocairo-1.0 pangoft2-1.0 pixman-1 \
-               png pthread pthread-stubs stdc++ xcb z X11 Xext m SDL \
-               gdk_pixbuf-2.0 SDL_image SDL_mixer gdk-x11-2.0 gtk-x11-2.0 \
-               xcb-render xcb-shm
+               gobject-2.0 pango-1.0 pangocairo-1.0 pangoft2-1.0 \
+               pthread stdc++ z X11 Xext m SDL \
+               gdk_pixbuf-2.0 SDL_image SDL_mixer gdk-x11-2.0 gtk-x11-2.0
 
 CONFIGURE_STYLE= gnu
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/SDL" \
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
                LDFLAGS="-L${LOCALBASE}/lib"
 
 pre-configure:
Index: patches/patch-Network_cpp
===================================================================
RCS file: /cvs/ports/games/csmash/patches/patch-Network_cpp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-Network_cpp
--- patches/patch-Network_cpp   6 Jul 2008 20:43:20 -0000       1.1.1.1
+++ patches/patch-Network_cpp   6 Dec 2013 20:13:35 -0000
@@ -1,7 +1,7 @@
 $OpenBSD: patch-Network_cpp,v 1.1.1.1 2008/07/06 20:43:20 jdixon Exp $
---- Network.cpp.orig   Sun Aug 17 07:43:03 2003
-+++ Network.cpp        Fri Jul  4 22:09:25 2008
-@@ -169,7 +171,6 @@ ReadTime( int sd, struct timeb* tb ) {
+--- Network.cpp.orig   Sun Aug 17 13:43:03 2003
++++ Network.cpp        Fri Dec  6 20:49:25 2013
+@@ -169,7 +169,6 @@ ReadTime( int sd, struct timeb* tb ) {
  
    char *b = buf;
    long millitm;
Index: patches/patch-ttinc_h
===================================================================
RCS file: /cvs/ports/games/csmash/patches/patch-ttinc_h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 patch-ttinc_h
--- patches/patch-ttinc_h       6 Jul 2008 20:43:20 -0000       1.1.1.1
+++ patches/patch-ttinc_h       6 Dec 2013 20:13:35 -0000
@@ -1,20 +1,29 @@
 $OpenBSD: patch-ttinc_h,v 1.1.1.1 2008/07/06 20:43:20 jdixon Exp $
---- ttinc.h.orig       Sun Aug 10 05:55:00 2003
-+++ ttinc.h    Fri Jul  4 22:09:54 2008
-@@ -204,12 +204,12 @@ typedef int socklen_t;           /* mimic Penguin's 
socklen typ
- #include <GL/gl.h>
- #include <GL/glu.h>
+--- ttinc.h.orig       Sun Aug 10 11:55:00 2003
++++ ttinc.h    Fri Dec  6 21:04:59 2013
+@@ -174,7 +174,6 @@ enum mode  {GAME_5PTS, GAME_11PTS, GAME_21PTS};
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+-#include <sys/timeb.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <string.h>
+@@ -216,6 +215,17 @@ typedef int socklen_t;            /* mimic Penguin's 
socklen typ
+ #define  gettext_noop(String)  (String)
+ #define _(String) gettext (String)
+ #define N_(String) gettext_noop (String)
++
++#ifdef WIN32
++#include <sys/timeb.h>
++#else
++struct timeb {
++      time_t  time;                   /* seconds since the Epoch */
++      unsigned short millitm;         /* + milliseconds since the Epoch */
++      short   timezone;               /* minutes west of UTC */
++      short   dstflag;                /* DST == non-zero */
++};
++#endif
  
--#include <SDL/SDL.h>
--#include <SDL/SDL_image.h>
--#include <SDL/SDL_thread.h>
-+#include <SDL.h>
-+#include <SDL_image.h>
-+#include <SDL_thread.h>
+ #endif /* MKDEP_IGN_SYSINC */
  
- #ifdef HAVE_LIBSDL_MIXER
--#include <SDL/SDL_mixer.h>
-+#include <SDL_mixer.h>
- #endif
- 
- #include <libintl.h>
-- 
Christian "naddy" Weisgerber                          na...@mips.inka.de

Reply via email to