Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jul 2018 17:16:58 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r473676 - in head/games/scourge: . files
Message-ID:  <201807011716.w61HGwpQ000860@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Sun Jul  1 17:16:58 2018
New Revision: 473676
URL: https://svnweb.freebsd.org/changeset/ports/473676

Log:
  - Switch to USES=localbase
  - Fix build with clang 6
  - Cosmetic fixes

Added:
  head/games/scourge/files/patch-src_equip.cpp   (contents, props changed)
  head/games/scourge/files/patch-src_render_map.cpp   (contents, props changed)
  head/games/scourge/files/patch-src_rpg_character.h   (contents, props changed)
Modified:
  head/games/scourge/Makefile

Modified: head/games/scourge/Makefile
==============================================================================
--- head/games/scourge/Makefile	Sun Jul  1 17:00:10 2018	(r473675)
+++ head/games/scourge/Makefile	Sun Jul  1 17:16:58 2018	(r473676)
@@ -15,13 +15,13 @@ COMMENT=	Rogue-like game
 LIB_DEPENDS=	libfreetype.so:print/freetype2
 RUN_DEPENDS=	${LOCALBASE}/${DATADIR_REL}/config/scourge.cfg:games/scourge-data
 
-USES=		autoreconf gettext gmake
+USES=		autoreconf gettext gmake localbase
+GNU_CONFIGURE=	yes
 USE_GL=		gl
 USE_SDL=	sdl image mixer net ttf
-GNU_CONFIGURE=	yes
-CPPFLAGS+=	-I${LOCALBASE}/include
-LIBS+=		-L${LOCALBASE}/lib
 
+CXXFLAGS+=	-Wno-c++11-narrowing
+
 CONFIGURE_ARGS=	--with-data-dir=${DATADIR}
 
 SUB_FILES=	pkg-message
@@ -33,8 +33,9 @@ DEBUG_CONFIGURE_ENABLE=	debug
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|GLvoid|void|g' ${WRKSRC}/src/sdlhandler.cpp ${WRKSRC}/src/sdlhandler.h
+	@${REINPLACE_CMD} -e 's|\([^a-z_]\)type(|\1squirrel_type(|g' ${WRKSRC}/src/squirrel/*.cpp ${WRKSRC}/src/squirrel/*.h
 
 do-install:
-	@${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
+	${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
 
 .include <bsd.port.mk>

Added: head/games/scourge/files/patch-src_equip.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/scourge/files/patch-src_equip.cpp	Sun Jul  1 17:16:58 2018	(r473676)
@@ -0,0 +1,11 @@
+--- src/equip.cpp.orig	2008-12-22 23:38:10 UTC
++++ src/equip.cpp
+@@ -595,7 +595,7 @@ void Equip::drawCapabilities() {
+ 		}
+ 	}
+ 	if ( !found ) {
+-		specialSkill = false;
++		specialSkill = NULL;
+ 		canvas->setTooltip( "" );
+ 	}
+ 	glDisable( GL_BLEND );

Added: head/games/scourge/files/patch-src_render_map.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/scourge/files/patch-src_render_map.cpp	Sun Jul  1 17:16:58 2018	(r473676)
@@ -0,0 +1,29 @@
+--- src/render/map.cpp.orig	2008-12-22 23:38:10 UTC
++++ src/render/map.cpp
+@@ -3154,7 +3154,7 @@ Shape *Map::isWallBetween( int x1, int y
+ 			if ( shape )
+ 				return shape;
+ 		}
+-		return false;
++		return NULL;
+ 	}
+ 	if ( y1 == y2 ) {
+ 		if ( x1 > x2 ) SWAP( x1, x2 );
+@@ -3163,7 +3163,7 @@ Shape *Map::isWallBetween( int x1, int y
+ 			if ( shape )
+ 				return shape;
+ 		}
+-		return false;
++		return NULL;
+ 	}
+ 
+ 
+@@ -4599,7 +4599,7 @@ Location *MapMemoryManager::newLocation(
+ 	pos->item = NULL;
+ 	pos->creature = NULL;
+ 	pos->outlineColor = NULL;
+-	pos->texIndex = NULL;
++	pos->texIndex = 0;
+ 
+ 	return pos;
+ }

Added: head/games/scourge/files/patch-src_rpg_character.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/scourge/files/patch-src_rpg_character.h	Sun Jul  1 17:16:58 2018	(r473676)
@@ -0,0 +1,11 @@
+--- src/rpg/character.h.orig	2008-12-22 23:38:10 UTC
++++ src/rpg/character.h
+@@ -63,7 +63,7 @@ public:
+ 	static int getRootCount() {
+ 		if ( instance == NULL ) { 
+ 			std::cerr << "*** Characters::getRootCount() Characters uninitialized" << std::endl;
+-			return NULL;
++			return 0;
+ 		}
+ 		return instance->rootCharacters.size();
+ 	}



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