ports/94771: [NEW PORT] games/marslonm: A turn-based strategy game setting on Mars

Jose Alonso Cardenas Marquez acardenas at bsd.org.pe
Wed Mar 22 20:20:21 UTC 2006


The following reply was made to PR ports/94771; it has been noted by GNATS.

From: Jose Alonso Cardenas Marquez <acardenas at bsd.org.pe>
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: ports/94771: [NEW PORT] games/marslonm: A turn-based strategy
 game setting on Mars
Date: Wed, 22 Mar 2006 15:10:25 -0500

 Please rename port to marsnomercy (r).
 
 --- marsnomercy-0.1.1.shar begins here ---
 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #	marsnomercy
 #	marsnomercy/pkg-descr
 #	marsnomercy/Makefile
 #	marsnomercy/distinfo
 #	marsnomercy/files
 #	marsnomercy/files/patch-src_mars.cpp
 #	marsnomercy/files/patch-src-graphic_Screen.cpp
 #	marsnomercy/files/patch-SConstruct
 #	marsnomercy/files/pkg-message.in
 #	marsnomercy/files/mars-nomercy.in
 #
 echo c - marsnomercy
 mkdir -p marsnomercy > /dev/null 2>&1
 echo x - marsnomercy/pkg-descr
 sed 's/^X//' >marsnomercy/pkg-descr << 'END-of-marsnomercy/pkg-descr'
 XMars, Land of No Mercy is a turn-based strategy game setting on Mars during the
 Xearly stages of human colonization.The player embodies the leader of a 
 Xmercenary team, landed on Mars to take advantage of conqueror battles between 
 Xthe Worldwide Colonizer Corporations.
 X
 XThe main purpose is to command his team trying to find them commissions, 
 Xtraining and leading them in battle, while still being aware of financial and 
 Xinstrumental resources by administering them.The Mech is the fundamental craft 
 Xused by mercenaries, but they won't lack of other kind of units, as well as 
 Xtroops.
 X
 XThe game most remarkable point is the incredible liberty given to the player 
 Xand therefore the great strategic side that derives. It is indeed up to the 
 Xplayer to decide how to behave towards the one who recruited him, and the 
 Xenemies of turn.
 X
 XBasically every action leads to a reaction, so it is strongly recommended to 
 Xkeep a good and consistent behavior to achieve confidence from Corporations, 
 Xand avoid being excluded by them.
 X
 XWWW:	http://mars.sourceforge.net/
 END-of-marsnomercy/pkg-descr
 echo x - marsnomercy/Makefile
 sed 's/^X//' >marsnomercy/Makefile << 'END-of-marsnomercy/Makefile'
 X# New ports collection makefile for:	Mars Land of No Mercy
 X# Date created:		2006-03-21
 X# Whom:			Jose Alonso Cardenas Marquez <acardenas at bsd.org.pe>
 X#
 X# $FreeBSD$
 X#
 X
 XPORTNAME=	marsnomercy
 XPORTVERSION=	0.1.1
 XCATEGORIES=	games
 XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 XMASTER_SITE_SUBDIR=	mars
 XDISTNAME=	mars-${PORTVERSION}-src
 X
 XMAINTAINER=	acardenas at bsd.org.pe
 XCOMMENT=	A turn-based strategy game setting on Mars
 X
 XBUILD_DEPENDS=	scons:${PORTSDIR}/devel/scons
 X
 XUSE_X_PREFIX=	yes
 XUSE_SDL=	sdl image ttf
 XMAKE_ENV=	CC="${CC}" CXX="${CXX}"
 XPLIST=	${WRKDIR}/pkg-plist
 XPLIST_FILES=	bin/mars-nomercy libexec/mars
 XPLIST_DIRS=	%%DATADIR%%
 XWRKSRC=	${WRKDIR}/mars-${PORTVERSION}
 XSUB_FILES=	mars-nomercy pkg-message
 X
 XOPTIONS=	DEBUG	"With additional debug information"	off
 X
 X.include <bsd.port.pre.mk>
 X
 X.if defined(WITH_DEBUG)
 XSCONS_ARGS=	debug=1
 X.else
 XSCONS_ARGS=	debug=0
 X.endif
 X
 Xdo-build:
 X	@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} scons ${SCONS_ARGS}
 X
 Xpre-install:
 X	@${RM} -f ${PLIST}
 X	@cd ${WRKSRC}/data && \
 X		${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%DATADIR%%/|' >> ${PLIST} && \
 X		${FIND} * -type d | ${SORT} -r | ${SED} -e 's|^|@dirrm %%DATADIR%%/|' >> ${PLIST}
 X
 Xdo-install:
 X	@${MKDIR} ${DATADIR}
 X	@cd ${WRKSRC}/data && \
 X		${FIND} * -type d -exec ${MKDIR} "${DATADIR}/{}" \; && \
 X			${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${DATADIR}/{}" \;
 X	@${INSTALL_SCRIPT} ${WRKDIR}/mars-nomercy ${PREFIX}/bin
 X	@${INSTALL_PROGRAM} ${WRKSRC}/mars ${PREFIX}/libexec
 X
 Xpost-install:
 X	@${CAT} ${PKGMESSAGE}
 X
 X.include <bsd.port.post.mk>
 END-of-marsnomercy/Makefile
 echo x - marsnomercy/distinfo
 sed 's/^X//' >marsnomercy/distinfo << 'END-of-marsnomercy/distinfo'
 XMD5 (mars-0.1.1-src.tar.gz) = a5b70e679588775a936ebbf4b83236a6
 XSHA256 (mars-0.1.1-src.tar.gz) = 9a68b6a419721ca80fb7963867647a7da10991b15e5647b27d728cea2c9aa489
 XSIZE (mars-0.1.1-src.tar.gz) = 2497824
 END-of-marsnomercy/distinfo
 echo c - marsnomercy/files
 mkdir -p marsnomercy/files > /dev/null 2>&1
 echo x - marsnomercy/files/patch-src_mars.cpp
 sed 's/^X//' >marsnomercy/files/patch-src_mars.cpp << 'END-of-marsnomercy/files/patch-src_mars.cpp'
 X--- src/mars.cpp	Mon Mar  6 17:45:01 2006
 X+++ src/mars.cpp	Mon Mar 20 10:33:25 2006
 X@@ -96,6 +96,21 @@
 X 
 X int main(int argc, char **argv)
 X {
 X+int r_w = 0;
 X+int r_h = 0;
 X+
 X+	switch(argc)
 X+	{
 X+		case 1:r_w = 1024;
 X+	               r_h = 768;
 X+		       break;
 X+		case 3:r_w = atoi(argv[1]);
 X+                       r_h = atoi(argv[2]);
 X+		       break;
 X+		default: cout << "Use: mars-nomercy or mars-nomercy <width> <height>" <<endl;
 X+		       exit(0);
 X+	}
 X+		
 X 	// the system video is initialized
 X     SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER);
 X 	// init SDL_ttf
 X@@ -103,9 +118,9 @@
 X 
 X 	// when exit, execute SDL_Quit to restore everything
 X 	atexit(SDL_Quit);
 X-	
 X-	Dimension screen_dim = { RIS2_W, RIS2_H };	
 X-	
 X+ 
 X+	Dimension screen_dim = { r_w, r_h };
 X+
 X 	// init screen
 X 	screen = new Screen(screen_dim.w, screen_dim.h, SDL_SWSURFACE|SDL_FULLSCREEN);    
 X 	
 X@@ -116,8 +131,8 @@
 X 	Options opt;
 X 	
 X 	// default res is 1024 x 768
 X-	opt.ris.w = RIS2_W;
 X-	opt.ris.h = RIS2_H;
 X+	opt.ris.w = r_w;
 X+	opt.ris.h = r_h;
 X 	
 X 	// start menu
 X 	menu(opt);
 END-of-marsnomercy/files/patch-src_mars.cpp
 echo x - marsnomercy/files/patch-src-graphic_Screen.cpp
 sed 's/^X//' >marsnomercy/files/patch-src-graphic_Screen.cpp << 'END-of-marsnomercy/files/patch-src-graphic_Screen.cpp'
 X--- src/graphic/Screen.cpp	Mon Mar  6 16:56:16 2006
 X+++ src/graphic/Screen.cpp	Mon Mar 20 10:38:14 2006
 X@@ -17,7 +17,16 @@
 X 
 X 	// Setting screen mode
 X 	a_surface = SDL_SetVideoMode(a_rectangle->w, a_rectangle->h, 0, a_flags); 
 X-	
 X+
 X+	if(!a_surface)
 X+	{
 X+		cout << "Video mode supported" << endl;
 X+		cout << "* 1024x768" << endl;
 X+		cout << "* 800x600" << endl;
 X+		cout << "Try: mars-nomercy <width> <height>" << endl;		
 X+		exit(0);
 X+	}
 X+
 X 	a_backup = NULL;
 X }
 X 	
 X@@ -38,6 +47,15 @@
 X 	if(w != a_rectangle->w || h != a_rectangle->h)
 X 	{
 X 		a_surface = SDL_SetVideoMode(w, h, 0, a_flags);
 X+		
 X+		if(!a_surface)
 X+		{
 X+			cout << "Video mode supported" << endl;
 X+			cout << "* 1024x768" << endl;
 X+			cout << "* 800x600" << endl;
 X+			cout << "Try: mars-nomercy <width> <height>" << endl;
 X+			exit(0);
 X+		}
 X 		
 X 		// Setting screen dimensions
 X 		a_rectangle->w = w;
 END-of-marsnomercy/files/patch-src-graphic_Screen.cpp
 echo x - marsnomercy/files/patch-SConstruct
 sed 's/^X//' >marsnomercy/files/patch-SConstruct << 'END-of-marsnomercy/files/patch-SConstruct'
 X--- SConstruct	Mon Mar  6 16:56:17 2006
 X+++ SConstruct	Tue Mar 21 02:12:54 2006
 X@@ -1,3 +1,6 @@
 X+import os
 X+import sys
 X+
 X # create build environment and options
 X env = Environment()
 X opts = Options()
 X@@ -38,12 +41,14 @@
 X 
 X # PLATFORM posix or pure cygwin
 X else:
 X-
 X+	SDL_CONFIG = os.environ['SDL_CONFIG']	
 X 	# determine compiler and linker flags for SDL
 X-	env.ParseConfig('sdl-config --cflags')
 X-	env.ParseConfig('sdl-config --libs')
 X+	env.ParseConfig(SDL_CONFIG + ' --cflags')
 X+	env.ParseConfig(SDL_CONFIG + ' --libs')
 X 	# add additional compiler flags
 X-	env.Append(CCFLAGS = ['-O2'])
 X+        env.Replace(CC = os.environ['CC'])
 X+        env.Replace(CXX = os.environ['CXX'])
 X+        env.Replace(CXXFLAGS = os.environ['CXXFLAGS'] + ' `' + SDL_CONFIG + ' --cflags`')
 X 	# add additional libraries to link against
 X 	env.Append(LIBS = ['SDL_image', 'SDL_ttf'])
 X 
 X@@ -71,7 +76,7 @@
 X if not env.GetOption('clean'):
 X 	print ":: Checking for libs"
 X 	conf = Configure(env)
 X-	if not conf.CheckLibWithHeader('libSDL', 'SDL.h', 'c', 'SDL_Init(SDL_INIT_VIDEO);'):
 X+	if not conf.CheckLibWithHeader('libSDL-1.1', 'SDL.h', 'c', 'SDL_Init(SDL_INIT_VIDEO);'):
 X 		print 'Did not find libSDL, exiting!'
 X 		Exit(1)
 X 	if not conf.CheckLibWithHeader('libSDL_image', 'SDL_image.h', 'c', 'IMG_GetError();'):
 END-of-marsnomercy/files/patch-SConstruct
 echo x - marsnomercy/files/pkg-message.in
 sed 's/^X//' >marsnomercy/files/pkg-message.in << 'END-of-marsnomercy/files/pkg-message.in'
 X###############################################################################
 X
 X1) I renamed this port to marsnomercy (Mars Land of No Mercy), because exist a
 X   port using mars name (cad/mars).
 X
 X2) Run mars:
 X
 X   # mars-nomercy
 X
 X3) Enjoy it ;)
 X
 X###############################################################################
 END-of-marsnomercy/files/pkg-message.in
 echo x - marsnomercy/files/mars-nomercy.in
 sed 's/^X//' >marsnomercy/files/mars-nomercy.in << 'END-of-marsnomercy/files/mars-nomercy.in'
 X#!/bin/sh
 X
 Xif [ -d "~/.marsnomercy" ]; then
 X        cd ~/.marsomercy || exit 1
 X        exec %%PREFIX%%/libexec/mars "$@"
 Xelse
 X        cd %%DATADIR%% || exit 1
 X        find * -type d -exec mkdir -p ~/.marsnomercy/data/{} \; || exit 1
 X        find * -type f -exec ln -s %%DATADIR%%/{} ~/.marsnomercy/data/{} \; 2>/dev/null || exit 1
 X        cd ~/.marsnomercy || exit 1
 X        exec %%PREFIX%%/libexec/mars "$@"
 Xfi
 END-of-marsnomercy/files/mars-nomercy.in
 exit
 --- marsnomercy-0.1.1.shar ends here ---
 
 Greetings
 ACM
 -- 
 Grupo de Usuarios *BSD Peru - BSDPeru
 http://www.bsd.org.pe



More information about the freebsd-ports-bugs mailing list