Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jan 2020 15:17:14 +0000 (UTC)
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r524492 - in head: . games games/battletanks games/battletanks/files
Message-ID:  <202001281517.00SFHEJO005121@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: danfe
Date: Tue Jan 28 15:17:14 2020
New Revision: 524492
URL: https://svnweb.freebsd.org/changeset/ports/524492

Log:
  Convert to modern Python and revive `games/battletanks'.

Added:
  head/games/battletanks/
     - copied from r524262, head/games/battletanks/
Modified:
  head/MOVED
  head/games/Makefile
  head/games/battletanks/Makefile
  head/games/battletanks/files/patch-engine-sl08-sl08.py

Modified: head/MOVED
==============================================================================
--- head/MOVED	Tue Jan 28 15:15:53 2020	(r524491)
+++ head/MOVED	Tue Jan 28 15:17:14 2020	(r524492)
@@ -13844,7 +13844,6 @@ finance/mybudget||2020-01-27|Has expired: Unmaintained
 finance/sabernetdcs-client||2020-01-27|Has expired: Unmaintained, uses EOLed python27
 games/4stattack||2020-01-27|Has expired: Unmaintained, uses EOLed python27
 games/barbie_seahorse_adventures||2020-01-27|Has expired: Unmaintained, uses EOLed python27
-games/battletanks||2020-01-27|Has expired: Unmaintained, uses EOLed python27
 games/bombz||2020-01-27|Has expired: Unmaintained, uses EOLed python27
 games/bouncy||2020-01-27|Has expired: Unmaintained, uses EOLed python27
 games/bubbros||2020-01-27|Has expired: Unmaintained, uses EOLed python27

Modified: head/games/Makefile
==============================================================================
--- head/games/Makefile	Tue Jan 28 15:15:53 2020	(r524491)
+++ head/games/Makefile	Tue Jan 28 15:17:14 2020	(r524492)
@@ -77,6 +77,7 @@
     SUBDIR += bass
     SUBDIR += bastet
     SUBDIR += battalion
+    SUBDIR += battletanks
     SUBDIR += belooted
     SUBDIR += beret
     SUBDIR += billardgl

Modified: head/games/battletanks/Makefile
==============================================================================
--- head/games/battletanks/Makefile	Mon Jan 27 15:11:58 2020	(r524262)
+++ head/games/battletanks/Makefile	Tue Jan 28 15:17:14 2020	(r524492)
@@ -10,9 +10,6 @@ MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-source/
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Fast 2D tank arcade game with multiplayer and split-screen modes
 
-DEPRECATED=	Unmaintained, uses EOLed python27
-EXPIRATION_DATE=	2020-01-27
-
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
@@ -22,7 +19,7 @@ LIB_DEPENDS=	libsigc-2.0.so:devel/libsigc++20 \
 		libvorbisfile.so:audio/libvorbis \
 		libsmpeg.so:multimedia/smpeg
 
-USES=		lua:51 openal:al pkgconfig python:2.7,build scons sdl tar:bzip2
+USES=		lua:51 openal:al pkgconfig python:build scons sdl tar:bzip2
 USE_CXXSTD=	gnu++98
 USE_LDCONFIG=	yes
 USE_SDL=	image sdl

Modified: head/games/battletanks/files/patch-engine-sl08-sl08.py
==============================================================================
--- head/games/battletanks/files/patch-engine-sl08-sl08.py	Mon Jan 27 15:11:58 2020	(r524262)
+++ head/games/battletanks/files/patch-engine-sl08-sl08.py	Tue Jan 28 15:17:14 2020	(r524492)
@@ -3,9 +3,81 @@ Bug-Debian: http://bugs.debian.org/624916
 Subject: Fix FTBFS with gcc-4.6
 
 Update: Add missing this->'s to appease Clang
+Update2: Convert to Python 3.x syntax (2020/01/28)
 
---- engine/sl08/sl08.py.orig
+--- engine/sl08/sl08.py.orig	2008-08-13 09:10:45 UTC
 +++ engine/sl08/sl08.py
+@@ -26,7 +26,7 @@ class Generator(object):
+ 		
+ 	def prototype(self, proto):	
+ 		r = '('
+-		for i in xrange(0, self.__n): 
++		for i in range(0, self.__n): 
+ 			if proto: 
+ 				r = r + "arg%d_type " %(i + 1)
+ 			r = r + "a%d" %(i + 1)
+@@ -41,14 +41,14 @@ class Generator(object):
+ 			r = '<typename return_type'
+ 		
+ 		if cname == 'base-signal': 
+-			for i in xrange(0, self.__n): 
++			for i in range(0, self.__n): 
+ 				if not void or i > 0:
+ 					r = r + ", "
+ 				r = r + "typename arg%d_type" %(i + 1)
+ 			r = r + ">"
+ 			return r
+ 		elif cname == 'signal': 
+-			for i in xrange(0, self.__n): 
++			for i in range(0, self.__n): 
+ 				if not void or i > 0:
+ 					r = r + ", "
+ 				r = r + "typename arg%d_type" %(i + 1)
+@@ -61,7 +61,7 @@ class Generator(object):
+ 				r = r + "class validator_type = default_validator<return_type> >"
+ 			return r
+ 		elif cname == 'slot': 
+-			for i in xrange(0, self.__n): 
++			for i in range(0, self.__n): 
+ 				if not void or i > 0:
+ 					r = r + ", "
+ 				r = r + "typename arg%d_type" %(i + 1)
+@@ -70,7 +70,7 @@ class Generator(object):
+ 			r = r + "class object_type>"
+ 			return r
+ 		elif cname == 'base-slot': 
+-			for i in xrange(0, self.__n): 
++			for i in range(0, self.__n): 
+ 				if not void or i > 0:
+ 					r = r + ", "
+ 				r = r + "typename arg%d_type" %(i + 1)
+@@ -86,22 +86,22 @@ class Generator(object):
+ 			r = '<return_type'
+ 		
+ 		if cname == 'base-signal': 
+-			for i in xrange(0, self.__n): 
++			for i in range(0, self.__n): 
+ 				r = r + ", arg%d_type" %(i + 1)
+ 			r = r + ">"
+ 			return r
+ 		elif cname == 'signal': 
+-			for i in xrange(0, self.__n): 
++			for i in range(0, self.__n): 
+ 				r = r + ", arg%d_type" %(i + 1)
+ 			r = r + ", validator_type>"
+ 			return r
+ 		elif cname == 'slot': 
+-			for i in xrange(0, self.__n): 
++			for i in range(0, self.__n): 
+ 				r = r + ", arg%d_type" %(i + 1)
+ 			r = r + ", object_type>"
+ 			return r
+ 		elif cname == 'base-slot': 
+-			for i in xrange(0, self.__n): 
++			for i in range(0, self.__n): 
+ 				r = r + ", arg%d_type" %(i + 1)
+ 			r = r + ">"
+ 			return r
 @@ -152,11 +152,11 @@ class Generator(object):
  			typedef base_signalXXX %s signal_type; 
  			typedef return_type (object_type::*func_t) %s; 
@@ -34,3 +106,24 @@ Update: Add missing this->'s to appease Clang
  	
  			inline void operator() %s const { 
  				(object->*func) %s; 
+@@ -329,11 +329,11 @@ class Generator(object):
+ 		
+ 
+ text = ''
+-for i in xrange(0, 6):
++for i in range(0, 6):
+ 	g = Generator(i)
+ 	text = text + "\n" + g.generate(); 
+ 
+-print """#ifndef BTANKS_SL08_SLOTSANDSIGNALS_H__
++print("""#ifndef BTANKS_SL08_SLOTSANDSIGNALS_H__
+ #define BTANKS_SL08_SLOTSANDSIGNALS_H__
+ 
+ /* sl08 - small slot/signals library
+@@ -387,5 +387,5 @@ namespace sl08 {
+ }
+ 
+ #endif
+-""" %(text);
++""" %(text));
+ 



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