svn commit: r473676 - in head/games/scourge: . files

Dmitry Marakasov amdmi3 at FreeBSD.org
Sun Jul 1 17:17:00 UTC 2018


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();
+ 	}


More information about the svn-ports-all mailing list