Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Mar 2006 08:03:30 GMT
From:      Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/94771: [NEW PORT] games/marslonm: A turn-based strategy game setting on Mars
Message-ID:  <200603210803.k2L83UNH008502@www.freebsd.org>
Resent-Message-ID: <200603210810.k2L8AHcF078539@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         94771
>Category:       ports
>Synopsis:       [NEW PORT] games/marslonm: A turn-based strategy game setting on Mars
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 21 08:10:16 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Jose Alonso Cardenas Marquez
>Release:        FreeBSD 6.1-PRERELEASE i386
>Organization:
BSDPeru (http://www.bsd.org.pe)
>Environment:
FreeBSD HellFire.BSD.org.pe 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #0: Wed Mar  8 13:14:43 PET
>Description:
- Added two patches, these resolve problem "Segment Failed" of unsupported video modes. I reported it to mars's developers.

Mars, Land of No Mercy is a turn-based strategy game setting on Mars during the early stages of human 
colonization.The player embodies the leader of a mercenary team, landed on Mars to take advantage of 
conqueror battles between the Worldwide Colonizer Corporations.

The main purpose is to command his team trying to find them commissions, training and leading them in battle, 
while still being aware of financial and instrumental resources by administering them.The Mech is the 
fundamental craft used by mercenaries, but they won't lack of other kind of units, as well as troops.

The game most remarkable point is the incredible liberty given to the player and therefore the great strategic 
side that derives. It is indeed up to the player to decide how to behave towards the one who recruited him, 
and the enemies of turn.

Basically every action leads to a reaction, so it is strongly recommended to keep a good and consistent 
behavior to achieve confidence from Corporations, and avoid being excluded by them.

WWW:	http://mars.sourceforge.net/
>How-To-Repeat:

>Fix:
--- marslonm-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:
#
#	marslonm
#	marslonm/pkg-descr
#	marslonm/Makefile
#	marslonm/distinfo
#	marslonm/files
#	marslonm/files/patch-src_mars.cpp
#	marslonm/files/patch-src-graphic_Screen.cpp
#	marslonm/files/patch-SConstruct
#	marslonm/files/marslonm.in
#	marslonm/files/pkg-message.in
#
echo c - marslonm
mkdir -p marslonm > /dev/null 2>&1
echo x - marslonm/pkg-descr
sed 's/^X//' >marslonm/pkg-descr << 'END-of-marslonm/pkg-descr'
XMars, Land of No Mercy is a turn-based strategy game setting on Mars during the early stages of human 
Xcolonization.The player embodies the leader of a mercenary team, landed on Mars to take advantage of 
Xconqueror battles between the Worldwide Colonizer Corporations.
X
XThe main purpose is to command his team trying to find them commissions, training and leading them in battle, 
Xwhile still being aware of financial and instrumental resources by administering them.The Mech is the 
Xfundamental craft used by mercenaries, but they won't lack of other kind of units, as well as troops.
X
XThe game most remarkable point is the incredible liberty given to the player and therefore the great strategic 
Xside that derives. It is indeed up to the player to decide how to behave towards the one who recruited him, 
Xand the enemies of turn.
X
XBasically every action leads to a reaction, so it is strongly recommended to keep a good and consistent 
Xbehavior to achieve confidence from Corporations, and avoid being excluded by them.
X
XWWW:	http://mars.sourceforge.net/
END-of-marslonm/pkg-descr
echo x - marslonm/Makefile
sed 's/^X//' >marslonm/Makefile << 'END-of-marslonm/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@bsd.org.pe>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	marslonm
XPORTVERSION=	0.1.1
XCATEGORIES=	games
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	mars
XDISTNAME=	mars-${PORTVERSION}-src
X
XMAINTAINER=	acardenas@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/${PORTNAME} libexec/mars
XPLIST_DIRS=	%%DATADIR%%
XWRKSRC=	${WRKDIR}/mars-${PORTVERSION}
XSUB_FILES=	marslonm 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}/marslonm ${PREFIX}/bin
X	@${INSTALL_PROGRAM} ${WRKSRC}/mars ${PREFIX}/libexec
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.post.mk>
END-of-marslonm/Makefile
echo x - marslonm/distinfo
sed 's/^X//' >marslonm/distinfo << 'END-of-marslonm/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-marslonm/distinfo
echo c - marslonm/files
mkdir -p marslonm/files > /dev/null 2>&1
echo x - marslonm/files/patch-src_mars.cpp
sed 's/^X//' >marslonm/files/patch-src_mars.cpp << 'END-of-marslonm/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 or mars <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-marslonm/files/patch-src_mars.cpp
echo x - marslonm/files/patch-src-graphic_Screen.cpp
sed 's/^X//' >marslonm/files/patch-src-graphic_Screen.cpp << 'END-of-marslonm/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 <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 <width> <height>" << endl;
X+			exit(0);
X+		}
X 		
X 		// Setting screen dimensions
X 		a_rectangle->w = w;
END-of-marslonm/files/patch-src-graphic_Screen.cpp
echo x - marslonm/files/patch-SConstruct
sed 's/^X//' >marslonm/files/patch-SConstruct << 'END-of-marslonm/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-marslonm/files/patch-SConstruct
echo x - marslonm/files/marslonm.in
sed 's/^X//' >marslonm/files/marslonm.in << 'END-of-marslonm/files/marslonm.in'
X#!/bin/sh
X
Xif [ -d "~/.marslonm" ]; then
X        cd ~/.marslonm || exit 1
X        exec %%PREFIX%%/libexec/mars "$@"
Xelse
X        cd %%DATADIR%% || exit 1
X        find * -type d -exec mkdir -p ~/.marslonm/data/{} \; || exit 1
X        find * -type f -exec ln -s %%DATADIR%%/{} ~/.marslonm/data/{} \; 2>/dev/null || exit 1
X        cd ~/.marslonm || exit 1
X        exec %%PREFIX%%/libexec/mars "$@"
Xfi
END-of-marslonm/files/marslonm.in
echo x - marslonm/files/pkg-message.in
sed 's/^X//' >marslonm/files/pkg-message.in << 'END-of-marslonm/files/pkg-message.in'
X###############################################################################
X
X1) I renamed this port to marslonm (Mars Land of No Mercy), because exist a
X   port using mars name (cad/mars).
X
X2) Run mars:
X
X   # marslonm
X
X3) Enjoy it ;)
X
X###############################################################################
END-of-marslonm/files/pkg-message.in
exit
--- marslonm-0.1.1.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



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