On Fri, Oct 12, 2007 at 10:38:01PM +0200, Steven Mestdagh wrote:
> > snowball.cc:9: error: `long int time' redeclared as different kind of symbol
> > /usr/include/time.h:114: error: previous declaration of `time_t
> > time(time_t*)'
>
> this seems to be due to the new SDL version. time.h gets pulled in via
> the new header SDL_stdinc.h. the simplest fix is probably to just rename
> the time variable.
While here, update it to the newest version. It needs even some
more patches, but with them it works fine for me.
Index: Makefile
===================================================================
RCS file: /cvs/ports/games/toppler/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- Makefile 15 Sep 2007 18:01:03 -0000 1.14
+++ Makefile 14 Oct 2007 12:13:57 -0000
@@ -1,33 +1,31 @@
# $OpenBSD: Makefile,v 1.14 2007/09/15 18:01:03 simon Exp $
-COMMENT= Nebulous rewrite of Tower Toppler
+COMMENT= Nebulous rewrite of Tower Toppler
-VERSION= 0.96
-DISTNAME= toppler-${VERSION}
-PKGNAME= ${DISTNAME}p0
-CATEGORIES= games
+DISTNAME= toppler-1.1.3
+CATEGORIES= games
-HOMEPAGE= http://toppler.sourceforge.net/
+HOMEPAGE= http://toppler.sourceforge.net/
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
-WANTLIB= SDL X11 Xext c m pthread stdc++ usbhid
+WANTLIB= SDL X11 Xau Xdmcp Xext Xrandr Xrender c iconv m \
+ mikmod ogg pthread smpeg stdc++ usbhid vorbis \
+ vorbisfile z
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=toppler/}
-LIB_DEPENDS= SDL_mixer::devel/sdl-mixer
+LIB_DEPENDS= SDL_mixer::devel/sdl-mixer
+RUN_DEPENDS= :desktop-file-utils-*:devel/desktop-file-utils
-AUTOCONF_VERSION=2.13
-CONFIGURE_STYLE= autoconf no-autoheader
-MAKE_FLAGS= scoredir=/var/games
+CONFIGURE_STYLE= gnu
+CONFIGURE_ARGS= --localstatedir=/var/games
-USE_X11= Yes
+USE_X11= Yes
post-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/toppler
- ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/toppler
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/toppler
${INSTALL_DATA} /dev/null ${PREFIX}/share/examples/toppler/toppler.hsc
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/toppler/distinfo,v
retrieving revision 1.3
diff -u -p -r1.3 distinfo
--- distinfo 5 Apr 2007 15:38:12 -0000 1.3
+++ distinfo 14 Oct 2007 12:13:57 -0000
@@ -1,5 +1,5 @@
-MD5 (toppler-0.96.tar.gz) = 19/WeNYsSjXOyPHB//nKYg==
-RMD160 (toppler-0.96.tar.gz) = FHCdLAQu8ssAc50fAr9UlnoIm6M=
-SHA1 (toppler-0.96.tar.gz) = /5nPieImjeRhUPoPZCoumJ5nWbA=
-SHA256 (toppler-0.96.tar.gz) = +1FXDvRxPFZz98v5s3x815gteGmksqYQ/M4l0jogVOI=
-SIZE (toppler-0.96.tar.gz) = 429477
+MD5 (toppler-1.1.3.tar.gz) = Fe5ECU5qTipPX5tmHz+2Fw==
+RMD160 (toppler-1.1.3.tar.gz) = vhSsqpEm1HslQx7nBR5VapLHLXQ=
+SHA1 (toppler-1.1.3.tar.gz) = Vjg5zuxEYmV0/LEPZ30quPgtuik=
+SHA256 (toppler-1.1.3.tar.gz) = XbnP8/45AH6agMOyes+4ZpJkHysN4RjvHV4k69NdQ4s=
+SIZE (toppler-1.1.3.tar.gz) = 2085343
Index: patches/patch-Makefile_am
===================================================================
RCS file: patches/patch-Makefile_am
diff -N patches/patch-Makefile_am
--- patches/patch-Makefile_am 8 Apr 2002 23:21:33 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-Makefile_am,v 1.1 2002/04/08 23:21:33 naddy Exp $
---- Makefile.am.orig Thu Jan 31 21:59:09 2002
-+++ Makefile.am Tue Apr 9 01:11:14 2002
-@@ -18,7 +18,10 @@ pkgdata_DATA = $(datafiles)
- EXTRA_DIST = $(datafiles) $(headerfiles) VERSION
-
- install-exec-hook:
-- -(chgrp games $(bindir)/$$p; chmod g+s $(bindir)/$$p)
-- install -d $(scoredir)
-- touch $(scorefile)
-- -(chgrp games $(scorefile); chmod g+rw $(scorefile))
-+ [EMAIL PROTECTED]'$(bin_PROGRAMS)'; for p in $$list; do \
-+ chgrp games $(DESTDIR)$(bindir)/$$p; \
-+ chmod g+s $(DESTDIR)$(bindir)/$$p; \
-+ done
-+ install -d $(DESTDIR)$(scoredir)
-+ touch $(DESTDIR)$(scorefile)
-+ -(chgrp games $(DESTDIR)$(scorefile); chmod g+rw $(DESTDIR)$(scorefile))
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- patches/patch-Makefile_in 8 Apr 2002 23:21:33 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-Makefile_in,v 1.1 2002/04/08 23:21:33 naddy Exp $
---- Makefile.in.orig Wed Feb 20 18:28:42 2002
-+++ Makefile.in Tue Apr 9 01:10:47 2002
-@@ -379,10 +379,13 @@ maintainer-clean-generic clean mostlycle
-
-
- install-exec-hook:
-- -(chgrp games $(bindir)/$$p; chmod g+s $(bindir)/$$p)
-- install -d $(scoredir)
-- touch $(scorefile)
-- -(chgrp games $(scorefile); chmod g+rw $(scorefile))
-+ [EMAIL PROTECTED]'$(bin_PROGRAMS)'; for p in $$list; do \
-+ chgrp games $(DESTDIR)$(bindir)/$$p; \
-+ chmod g+s $(DESTDIR)$(bindir)/$$p; \
-+ done
-+ install -d $(DESTDIR)$(scoredir)
-+ touch $(DESTDIR)$(scorefile)
-+ -(chgrp games $(DESTDIR)$(scorefile); chmod g+rw $(DESTDIR)$(scorefile))
-
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
Index: patches/patch-bonus_cc
===================================================================
RCS file: patches/patch-bonus_cc
diff -N patches/patch-bonus_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-bonus_cc 14 Oct 2007 12:13:57 -0000
@@ -0,0 +1,78 @@
+$OpenBSD$
+--- bonus.cc.orig Thu Jul 19 16:26:35 2007
++++ bonus.cc Sat Oct 13 21:58:11 2007
+@@ -42,13 +42,13 @@ static struct {
+ } fish[fishcnt];
+
+ /* position of the submarine and the torpedo,
+- * the state is taken from time
++ * the state is taken from currenttime
+ */
+ static Sint32 torpedox, torpedoy, subposx, subposy;
+
+ /* current game time
+ */
+-static Sint32 time;
++static Sint32 currenttime;
+
+ /* current xposition, this is ongoing from tower to
+ * tower so that you continue where you've left of in
+@@ -62,10 +62,10 @@ static void show() {
+ /* lets first calc the position of the tower on the screen */
+ Sint32 towerpos;
+
+- if (time < gametime/2)
+- towerpos = -(4*time);
++ if (currenttime < gametime/2)
++ towerpos = -(4*currenttime);
+ else
+- towerpos = gametime * scrollerspeed - 4*time + SCREENWID +
(SPR_SLICEWID*2);
++ towerpos = gametime * scrollerspeed - 4*currenttime + SCREENWID +
(SPR_SLICEWID*2);
+
+ /* draw the background layers */
+ scr_draw_bonus1(xpos, towerpos);
+@@ -75,7 +75,7 @@ static void show() {
+ scr_draw_torpedo(torpedoy, torpedox);
+
+ /* output the submarine */
+- scr_draw_submarine(subposy - 20, subposx, time % 9);
++ scr_draw_submarine(subposy - 20, subposx, currenttime % 9);
+
+ /* and the fishes */
+ for (int b = 0; b < fishcnt; b++)
+@@ -137,7 +137,7 @@ bool bns_game(void) {
+ torpedox = -1;
+
+ /* restart timer */
+- time = 0;
++ currenttime = 0;
+
+ key_readkey();
+
+@@ -254,22 +254,22 @@ bool bns_game(void) {
+ }
+
+ /* change towercolor in the middle of the game */
+- if ((time > gametime/2) && !newtowercol) {
++ if ((currenttime > gametime/2) && !newtowercol) {
+ scr_settowercolor(lev_towercol_red(), lev_towercol_green(),
lev_towercol_blue());
+ newtowercol = true;
+ }
+
+ /* end of game, switch to automatic, stop scrolling */
+- if (time == gametime) {
++ if (currenttime == gametime) {
+ automatic = true;
+ if ((subposx == SUBM_TARGET_X) && (subposy == SUBM_TARGET_Y)) break;
+ } else {
+ xpos +=4;
+ xpos_ofs += 4;
+- time++;
++ currenttime++;
+ }
+
+- if (!((time + 20) & 0x3f)) ttsounds::instance()->startsound(SND_SONAR);
++ if (!((currenttime + 20) & 0x3f))
ttsounds::instance()->startsound(SND_SONAR);
+
+ /* display screen and wait */
+ show();
Index: patches/patch-level_cc
===================================================================
RCS file: patches/patch-level_cc
diff -N patches/patch-level_cc
--- patches/patch-level_cc 9 Oct 2002 12:21:43 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-level_cc,v 1.1 2002/10/09 12:21:43 naddy Exp $
---- level.cc.orig Wed Oct 9 13:34:28 2002
-+++ level.cc Wed Oct 9 13:41:42 2002
-@@ -75,7 +75,7 @@ typedef struct mission_node {
-
- mission_node * missions;
-
--static int missionfiles (const struct dirent *file)
-+static int missionfiles (struct dirent *file)
- {
- int len = strlen(file->d_name);
-
Index: patches/patch-main_cc
===================================================================
RCS file: patches/patch-main_cc
diff -N patches/patch-main_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-main_cc 14 Oct 2007 12:13:57 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+--- main.cc.orig Thu Jul 19 16:26:35 2007
++++ main.cc Sat Oct 13 23:24:31 2007
+@@ -96,7 +96,8 @@ int main(int argc, char *argv[]) {
+
+ DIR *dir = opendir("locale");
+ bindtextdomain("toppler", dir == NULL ? LOCALEDIR : "locale");
+- closedir(dir);
++ if (dir != NULL)
++ closedir(dir);
+ textdomain("toppler");
+ #endif
+
Index: patches/patch-screen_cc
===================================================================
RCS file: patches/patch-screen_cc
diff -N patches/patch-screen_cc
--- patches/patch-screen_cc 9 Oct 2002 12:21:43 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-screen_cc,v 1.1 2002/10/09 12:21:43 naddy Exp $
---- screen.cc.orig Wed Oct 9 13:43:55 2002
-+++ screen.cc Wed Oct 9 13:44:10 2002
-@@ -540,7 +540,7 @@ void scr_writetext(long x, long y, const
- }
- }
-
--void scr_putbar(int x, int y, int br, int h, unsigned char col = 0) {
-+void scr_putbar(int x, int y, int br, int h, unsigned char col) {
- SDL_Rect r;
- r.w = br;
- r.h = h;
Index: patches/patch-snowball_cc
===================================================================
RCS file: patches/patch-snowball_cc
diff -N patches/patch-snowball_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-snowball_cc 14 Oct 2007 12:13:57 -0000
@@ -0,0 +1,65 @@
+$OpenBSD$
+--- snowball.cc.orig Thu Jul 19 16:26:35 2007
++++ snowball.cc Sat Oct 13 22:00:52 2007
+@@ -24,10 +24,10 @@
+ static int an;
+ static long subKind;
+ static long ve;
+-static long time;
++static long snb_time;
+
+ void snb_init(void) {
+- time = -1;
++ snb_time = -1;
+ }
+
+ /* move the snowball and check if it hits something */
+@@ -40,19 +40,19 @@ void snb_movesnowball(void) {
+
+ int nr;
+
+- if (time < 0) return;
++ if (snb_time < 0) return;
+
+- if (time == 12) {
+- time = -1;
++ if (snb_time == 12) {
++ snb_time = -1;
+ return;
+ }
+
+- time++;
++ snb_time++;
+ an = (an + subKind * 2) & 0x7f;
+- ve += schusshoch[time - 1];
++ ve += schusshoch[snb_time - 1];
+
+ if (!lev_testfigure(an, ve, -1, 0, 2, 2, 5)) {
+- time = -1;
++ snb_time = -1;
+ return;
+ }
+
+@@ -63,11 +63,11 @@ void snb_movesnowball(void) {
+ else {
+ ttsounds::instance()->startsound(SND_HIT);
+ pts_add(rob_gothit(nr));
+- time = -1;
++ snb_time = -1;
+ }
+ }
+
+-bool snb_exists(void) { return time != -1; }
++bool snb_exists(void) { return snb_time != -1; }
+
+ void snb_start(int verticalpos, int anglepos, bool look_left) {
+
+@@ -80,7 +80,7 @@ void snb_start(int verticalpos, int anglepos, bool loo
+ subKind = 1;
+ }
+ an &= 0x7f;
+- time = 0;
++ snb_time = 0;
+ }
+
+ int snb_verticalpos(void) { return ve; }
Index: patches/patch-toppler_desktop_in
===================================================================
RCS file: patches/patch-toppler_desktop_in
diff -N patches/patch-toppler_desktop_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-toppler_desktop_in 14 Oct 2007 12:13:57 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- toppler.desktop.in.orig Thu Jul 19 16:26:35 2007
++++ toppler.desktop.in Sun Oct 14 13:49:12 2007
+@@ -6,7 +6,7 @@ [EMAIL PROTECTED]@
+ Comment=A clone of the 'Nebulus' game on old 8 and 16 bit machines.
+ Comment[de]=Klon des alten Spiels 'Nebulus'
+ Comment[cs]=Klon hry 'Nebulus' z dob 8 a 16 bitovÃÅch poÃÂÃÂtaÃÂÃ
¯.
[EMAIL PROTECTED]@/pixmaps/@[EMAIL PROTECTED]
[EMAIL PROTECTED]@/share/pixmaps/@[EMAIL PROTECTED]
+ [EMAIL PROTECTED]@/bin/toppler
+ Terminal=0
+ Type=Application
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/toppler/pkg/PLIST,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST
--- pkg/PLIST 10 Nov 2006 22:51:34 -0000 1.5
+++ pkg/PLIST 14 Oct 2007 12:13:57 -0000
@@ -4,7 +4,14 @@
bin/toppler
@mode
@group
[EMAIL PROTECTED] man/man6/toppler.6
+share/applications/
+share/applications/toppler.desktop
share/doc/toppler/
+share/doc/toppler/AUTHORS
+share/doc/toppler/COPYING
+share/doc/toppler/ChangeLog
+share/doc/toppler/NEWS
share/doc/toppler/README
share/examples/toppler/
share/examples/toppler/toppler.hsc
@@ -13,27 +20,43 @@ share/examples/toppler/toppler.hsc
@sample /var/games/toppler.hsc
@mode
@group
+share/locale/
+share/locale/cz/
+share/locale/cz/LC_MESSAGES/
+share/locale/cz/LC_MESSAGES/toppler.mo
+share/locale/de/
+share/locale/de/LC_MESSAGES/
+share/locale/de/LC_MESSAGES/toppler.mo
+share/locale/eu/
+share/locale/eu/LC_MESSAGES/
+share/locale/eu/LC_MESSAGES/toppler.mo
+share/locale/fi/
+share/locale/fi/LC_MESSAGES/
+share/locale/fi/LC_MESSAGES/toppler.mo
+share/locale/fr/
+share/locale/fr/LC_MESSAGES/
+share/locale/fr/LC_MESSAGES/toppler.mo
+share/locale/pt/
+share/locale/pt/LC_MESSAGES/
+share/locale/pt/LC_MESSAGES/toppler.mo
+share/locale/ro/
+share/locale/ro/LC_MESSAGES/
+share/locale/ro/LC_MESSAGES/toppler.mo
+share/locale/sv/
+share/locale/sv/LC_MESSAGES/
+share/locale/sv/LC_MESSAGES/toppler.mo
+share/pixmaps/
+share/pixmaps/toppler.xpm
share/toppler/
-share/toppler/alarm.wav
-share/toppler/boing.wav
-share/toppler/bubbles.wav
-share/toppler/fanfare.wav
-share/toppler/hit.wav
-share/toppler/honk.wav
-share/toppler/layer1.tga
-share/toppler/layer2.tga
-share/toppler/layer3.tga
+share/toppler/abc.ttm
+share/toppler/ball1.ttm
+share/toppler/ball2.ttm
+share/toppler/ball3.ttm
+share/toppler/david1.ttm
share/toppler/m1.ttm
share/toppler/m2.ttm
-share/toppler/rumble.wav
-share/toppler/score.wav
-share/toppler/splash.wav
-share/toppler/swoosh.wav
-share/toppler/tap.wav
-share/toppler/tick.wav
-share/toppler/toppler.6
+share/toppler/pasi2.ttm
share/toppler/toppler.dat
-share/toppler/water.wav
[EMAIL PROTECTED] var/
[EMAIL PROTECTED] var/toppler/
[EMAIL PROTECTED] var/toppler/toppler.hsc
+share/toppler/toppler.ogg
[EMAIL PROTECTED] %D/bin/update-desktop-database
[EMAIL PROTECTED] %D/bin/update-desktop-database