Bug 180514 - games/bomberinstinct: Fix build with clang
Summary: games/bomberinstinct: Fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-12 19:10 UTC by tkato432
Modified: 2013-07-15 15:50 UTC (History)
0 users

See Also:


Attachments
games_bomberinstinct.diff (2.48 KB, patch)
2013-07-12 19:10 UTC, tkato432
no flags Details | Diff
file.dat (215 bytes, text/plain; charset="us-ascii")
2013-07-15 15:48 UTC, dfilter service
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-07-12 19:10:05 UTC
- Fix build with clang

New file:
files/patch-src__main.c
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-07-12 19:11:29 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 Martin Wilke freebsd_committer freebsd_triage 2013-07-15 15:48:36 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-07-15 15:48:43 UTC
Author: miwi
Date: Mon Jul 15 14:48:34 2013
New Revision: 323043
URL: http://svnweb.freebsd.org/changeset/ports/323043

Log:
  - Unbreak with clang
  
  PR:		180514
  Submitted by:	Ports Fury

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

Modified: head/games/bomberinstinct/Makefile
==============================================================================
--- head/games/bomberinstinct/Makefile	Mon Jul 15 14:47:53 2013	(r323042)
+++ head/games/bomberinstinct/Makefile	Mon Jul 15 14:48:34 2013	(r323043)
@@ -1,9 +1,5 @@
-# New ports collection makefile for:	bomberinstinct
-# Date created:				28 September 2000
-# Whom:					Maxim Sobolev <sobomax@FreeBSD.org>
-#
+# Created by: Maxim Sobolev <sobomax@FreeBSD.org>
 # $FreeBSD$
-#
 
 PORTNAME=	bomberinstinct
 PORTVERSION=	0.8.9
@@ -13,20 +9,19 @@ MASTER_SITES=	SF/${PORTNAME}/Bomber%20In
 DISTNAME=	BomberInstinct-${PORTVERSION}
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	A nice Bomberman-like multiplayer game
+COMMENT=	Bomberman-like multiplayer game
 
 WRKSRC=		${WRKDIR}/${DISTNAME}
 
+USES=		gettext gmake
 USE_SDL=	mixer sdl
-USES=		gettext
-USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
-USE_PERL5_BUILD=yes
-CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS}
-LDFLAGS+=	-L${LOCALBASE}/lib ${PTHREAD_LIBS} -lintl
-
-pre-patch:
-	@${FIND} ${WRKSRC} -name "*.[ch]" | \
-		${XARGS} ${PERL} -pi -e 's|<SDL/|<|g'
+
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib -lintl -pthread
+
+post-patch:
+	@${FIND} ${WRKSRC} -name "*.[ch]" | ${XARGS} ${REINPLACE_CMD} -e \
+		's|<SDL/|<|g'
 
 .include <bsd.port.mk>

Added: head/games/bomberinstinct/files/patch-src__main.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/bomberinstinct/files/patch-src__main.c	Mon Jul 15 14:48:34 2013	(r323043)
@@ -0,0 +1,52 @@
+--- src/main.c.orig
++++ src/main.c
+@@ -341,6 +341,24 @@
+ }
+ 
+ 
++/*--Rafraichir l'écran (à chaque frame), suivant le mode--*/
++void rafraichit(void)
++ {
++  if (dblebuf) {
++    SDL_Flip(ecran);
++    nrsrect=0;
++    nrs=!nrs;
++  }
++  else {
++    SDL_UpdateRects(ecran, nrsrect, rsrect);
++    nrsrect=0;
++    nrs=0;
++  }
++
++  return;
++}
++
++
+ /*--Affiche des informations, pose une question--*/
+ void dialogue(char * texte, int estunequestion)
+ {
+@@ -1176,24 +1194,6 @@
+ }
+ 
+ 
+-/*--Rafraichir l'écran (à chaque frame), suivant le mode--*/
+-int rafraichit(void)
+-{
+-  if (dblebuf) {
+-    SDL_Flip(ecran);
+-    nrsrect=0;
+-    nrs=!nrs;
+-  }
+-  else {
+-    SDL_UpdateRects(ecran, nrsrect, rsrect);
+-    nrsrect=0;
+-    nrs=0;
+-  }
+-
+-  return;
+-}
+-
+-
+ /*--Dessine la jauge d'énergie du joueur n à droite de l'écran--*/
+ void jauge(int n)
+ {