Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Sep 2013 17:57:39 +0000 (UTC)
From:      Rusmir Dusko <nemysis@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r328506 - in head/games/twind: . files
Message-ID:  <201309271757.r8RHvdbK053749@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nemysis
Date: Fri Sep 27 17:57:38 2013
New Revision: 328506
URL: http://svnweb.freebsd.org/changeset/ports/328506

Log:
  - Change Makefile header
  - Change maintainer email to @FreeBSD.org
  - Change Desktop entry file
  - Support STAGEDIR
  - Mute dir install
  - Add patch, fix build with Clang
  
  Approved by:	wg/pawel (mentors)

Added:
  head/games/twind/files/
  head/games/twind/files/patch-twind.c   (contents, props changed)
Modified:
  head/games/twind/Makefile

Modified: head/games/twind/Makefile
==============================================================================
--- head/games/twind/Makefile	Fri Sep 27 17:53:02 2013	(r328505)
+++ head/games/twind/Makefile	Fri Sep 27 17:57:38 2013	(r328506)
@@ -1,4 +1,4 @@
-# Created by: nemysis@gmx.ch
+# Created by: nemysis <nemysis@gmx.ch>
 # $FreeBSD$
 
 PORTNAME=	twind
@@ -7,7 +7,7 @@ PORTREVISION=	3
 CATEGORIES=	games
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTVERSION}
 
-MAINTAINER=	nemysis@gmx.ch
+MAINTAINER=	nemysis@FreeBSD.org
 COMMENT=	Match and remove all of the blocks before time runs out
 
 LICENSE=	GPLv2
@@ -17,9 +17,8 @@ USE_SDL=	sdl image mixer
 PORTDOCS=	AUTHORS CREDITS ChangeLog NEWS README TODO
 
 DESKTOP_ENTRIES="Twin Distress" "${COMMENT}" "${PORTNAME}" \
-		"${PORTNAME}" "Game;ArcadeGame;" ${FALSE}
+		"${PORTNAME}" "Game;ArcadeGame;" false
 
-NO_STAGE=	yes
 .include <bsd.port.options.mk>
 
 do-build:
@@ -27,15 +26,13 @@ do-build:
 		-DDATA_PREFIX=\"${DATADIR}/\" -DAUDIO -DLINUX \
 		-lm `${SDL_CONFIG} --cflags --libs` -lSDL_mixer -lSDL_image twind.c
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
-	${MKDIR} ${DATADIR}
-	@(cd ${WRKSRC} && ${COPYTREE_SHARE} "graphics music sound" ${DATADIR})
-
-	${INSTALL_DATA} ${WRKSRC}/graphics/${PORTNAME}.png ${PREFIX}/share/pixmaps
-
-.if ${PORT_OPTIONS:MDOCS}
-	${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
-.endif
+	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
+	@(cd ${WRKSRC} && ${COPYTREE_SHARE} "graphics music sound" ${STAGEDIR}${DATADIR})
+
+	${INSTALL_DATA} ${WRKSRC}/graphics/${PORTNAME}.png \
+		${STAGEDIR}${PREFIX}/share/pixmaps/
+
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>

Added: head/games/twind/files/patch-twind.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/twind/files/patch-twind.c	Fri Sep 27 17:57:38 2013	(r328506)
@@ -0,0 +1,51 @@
+--- twind.c.orig	2004-07-16 03:44:50.000000000 +0200
++++ twind.c	2013-09-23 12:08:21.000000000 +0200
+@@ -674,10 +674,10 @@
+                     if (event.button.x >= MENULX && event.button.x < MENURX && event.button.y >= starty && event.button.y < (starty + height)) {
+                         current_menu_high = (event.button.y - starty) / game.font[font].height;
+                         /* re-assign current_menu_high if blank option */
+-                        if (menu_items[game.menu][current_menu_high] == "")
++                        if (*menu_items[game.menu][current_menu_high] == '\0')
+                             current_menu_high = game.last_menu_high;
+                         if (game.last_menu_high != current_menu_high) {
+-                            if (menu_items[game.menu][current_menu_high] != "") {
++                            if (*menu_items[game.menu][current_menu_high] != '\0') {
+                                 #ifndef NOAUDIO
+                                 if (game.audio_enabled) Mix_PlayChannel(MENU_OPTION, game.sound[MENU_OPTION], 0);
+                                 #endif
+@@ -697,7 +697,7 @@
+                         if (event.button.x >= MENULX && event.button.x < MENURX && event.button.y >= starty && event.button.y < (starty + height)) {
+                             current_menu_high = (event.button.y - starty) / game.font[font].height;
+                             /* make sure the option isn't blank */
+-                            if (menu_items[game.menu][current_menu_high] != "") {
++                            if (*menu_items[game.menu][current_menu_high] != '\0') {
+                                 #ifndef NOAUDIO
+                                 if (game.audio_enabled) Mix_PlayChannel(OPTION_CHOICE, game.sound[OPTION_CHOICE], 0);
+                                 #endif
+@@ -917,7 +917,7 @@
+         #endif
+         current_menu_high--;
+         /* if option blank, go to previous */
+-        while (menu_items[game.menu][current_menu_high] == "")
++        while (*menu_items[game.menu][current_menu_high] == '\0')
+             current_menu_high--;
+         /* wrap around to the bottom entry */
+         if (current_menu_high == -1)
+@@ -930,7 +930,7 @@
+         #endif
+         current_menu_high++;
+         /* if option blank, go to next */
+-        while (menu_items[game.menu][current_menu_high] == "")
++        while (*menu_items[game.menu][current_menu_high] == '\0')
+             current_menu_high++;
+         /* wrap around to the top entry */
+         if (current_menu_high == game.menu_item_cnt)
+@@ -1536,7 +1536,7 @@
+             if (level_time && game.stop_timer + game.added_time < game.best_time)
+                 game.best_time = game.stop_timer + game.added_time;
+             /* subtract a set amount of time after level 11 */
+-            if (game.current_level > 11)
++            if (game.current_level >= 11)
+                 game.level_time -= 10;
+             else
+                 game.level_time = times[level_time];



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