aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-04-08 23:51:44 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-04-08 23:51:44 +0000
commitd6e283ec7263ea194c2d1e4ed850249732636bf4 (patch)
tree5e1015276ad6e04804c41bce3a415f20d90561fe /games
parent635862307ebd3ab54e606a2d53f8a52cd5d675cb (diff)
downloadports-d6e283ec7263ea194c2d1e4ed850249732636bf4.tar.gz
ports-d6e283ec7263ea194c2d1e4ed850249732636bf4.zip
Notes
Diffstat (limited to 'games')
-rw-r--r--games/Makefile1
-rw-r--r--games/marsnomercy/Makefile59
-rw-r--r--games/marsnomercy/distinfo3
-rw-r--r--games/marsnomercy/files/mars-nomercy.in12
-rw-r--r--games/marsnomercy/files/patch-SConstruct37
-rw-r--r--games/marsnomercy/files/patch-src-graphic_Screen.cpp36
-rw-r--r--games/marsnomercy/files/patch-src_mars.cpp48
-rw-r--r--games/marsnomercy/pkg-descr21
-rw-r--r--games/marsnomercy/pkg-message9
9 files changed, 226 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index 743494e99954..4a41a2cd2b13 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -381,6 +381,7 @@
SUBDIR += mangband
SUBDIR += marathon-evil
SUBDIR += marathon2-data
+ SUBDIR += marsnomercy
SUBDIR += meqcc
SUBDIR += merlin
SUBDIR += mindfocus
diff --git a/games/marsnomercy/Makefile b/games/marsnomercy/Makefile
new file mode 100644
index 000000000000..39c21b7f8665
--- /dev/null
+++ b/games/marsnomercy/Makefile
@@ -0,0 +1,59 @@
+# New ports collection makefile for: Mars Land of No Mercy
+# Date created: 2006-03-21
+# Whom: Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
+#
+# $FreeBSD$
+#
+
+PORTNAME= marsnomercy
+PORTVERSION= 0.1.1
+CATEGORIES= games
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= mars
+DISTNAME= mars-${PORTVERSION}-src
+
+MAINTAINER= acardenas@bsd.org.pe
+COMMENT= A turn-based strategy game setting on Mars
+
+BUILD_DEPENDS= scons:${PORTSDIR}/devel/scons
+
+USE_X_PREFIX= yes
+USE_SDL= sdl image ttf
+MAKE_ENV= CC="${CC}" CXX="${CXX}"
+PLIST= ${WRKDIR}/pkg-plist
+PLIST_FILES= bin/mars-nomercy libexec/mars
+PLIST_DIRS= %%DATADIR%%
+WRKSRC= ${WRKDIR}/mars-${PORTVERSION}
+SUB_FILES= mars-nomercy
+
+OPTIONS= DEBUG "With additional debug information" off
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_DEBUG)
+SCONS_ARGS= debug=1
+.else
+SCONS_ARGS= debug=0
+.endif
+
+do-build:
+ @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} scons ${SCONS_ARGS}
+
+pre-install:
+ @${RM} -f ${PLIST}
+ @cd ${WRKSRC}/data && \
+ ${FIND} * -type f | ${SORT} | ${SED} -e 's|^|%%DATADIR%%/|' >> ${PLIST} && \
+ ${FIND} * -type d | ${SORT} -r | ${SED} -e 's|^|@dirrm %%DATADIR%%/|' >> ${PLIST}
+
+do-install:
+ @${MKDIR} ${DATADIR}
+ @cd ${WRKSRC}/data && \
+ ${FIND} * -type d -exec ${MKDIR} "${DATADIR}/{}" \; && \
+ ${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${DATADIR}/{}" \;
+ @${INSTALL_SCRIPT} ${WRKDIR}/mars-nomercy ${PREFIX}/bin
+ @${INSTALL_PROGRAM} ${WRKSRC}/mars ${PREFIX}/libexec
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff --git a/games/marsnomercy/distinfo b/games/marsnomercy/distinfo
new file mode 100644
index 000000000000..7705aa3eeecc
--- /dev/null
+++ b/games/marsnomercy/distinfo
@@ -0,0 +1,3 @@
+MD5 (mars-0.1.1-src.tar.gz) = a5b70e679588775a936ebbf4b83236a6
+SHA256 (mars-0.1.1-src.tar.gz) = 9a68b6a419721ca80fb7963867647a7da10991b15e5647b27d728cea2c9aa489
+SIZE (mars-0.1.1-src.tar.gz) = 2497824
diff --git a/games/marsnomercy/files/mars-nomercy.in b/games/marsnomercy/files/mars-nomercy.in
new file mode 100644
index 000000000000..77318dc2d453
--- /dev/null
+++ b/games/marsnomercy/files/mars-nomercy.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ -d "~/.marsnomercy" ]; then
+ cd ~/.marsomercy || exit 1
+ exec %%PREFIX%%/libexec/mars "$@"
+else
+ cd %%DATADIR%% || exit 1
+ find * -type d -exec mkdir -p ~/.marsnomercy/data/{} \; || exit 1
+ find * -type f -exec ln -s %%DATADIR%%/{} ~/.marsnomercy/data/{} \; 2>/dev/null || exit 1
+ cd ~/.marsnomercy || exit 1
+ exec %%PREFIX%%/libexec/mars "$@"
+fi
diff --git a/games/marsnomercy/files/patch-SConstruct b/games/marsnomercy/files/patch-SConstruct
new file mode 100644
index 000000000000..e9e3b77f6348
--- /dev/null
+++ b/games/marsnomercy/files/patch-SConstruct
@@ -0,0 +1,37 @@
+--- SConstruct Mon Mar 6 16:56:17 2006
++++ SConstruct Tue Mar 21 02:12:54 2006
+@@ -1,3 +1,6 @@
++import os
++import sys
++
+ # create build environment and options
+ env = Environment()
+ opts = Options()
+@@ -38,12 +41,14 @@
+
+ # PLATFORM posix or pure cygwin
+ else:
+-
++ SDL_CONFIG = os.environ['SDL_CONFIG']
+ # determine compiler and linker flags for SDL
+- env.ParseConfig('sdl-config --cflags')
+- env.ParseConfig('sdl-config --libs')
++ env.ParseConfig(SDL_CONFIG + ' --cflags')
++ env.ParseConfig(SDL_CONFIG + ' --libs')
+ # add additional compiler flags
+- env.Append(CCFLAGS = ['-O2'])
++ env.Replace(CC = os.environ['CC'])
++ env.Replace(CXX = os.environ['CXX'])
++ env.Replace(CXXFLAGS = os.environ['CXXFLAGS'] + ' `' + SDL_CONFIG + ' --cflags`')
+ # add additional libraries to link against
+ env.Append(LIBS = ['SDL_image', 'SDL_ttf'])
+
+@@ -71,7 +76,7 @@
+ if not env.GetOption('clean'):
+ print ":: Checking for libs"
+ conf = Configure(env)
+- if not conf.CheckLibWithHeader('libSDL', 'SDL.h', 'c', 'SDL_Init(SDL_INIT_VIDEO);'):
++ if not conf.CheckLibWithHeader('libSDL-1.1', 'SDL.h', 'c', 'SDL_Init(SDL_INIT_VIDEO);'):
+ print 'Did not find libSDL, exiting!'
+ Exit(1)
+ if not conf.CheckLibWithHeader('libSDL_image', 'SDL_image.h', 'c', 'IMG_GetError();'):
diff --git a/games/marsnomercy/files/patch-src-graphic_Screen.cpp b/games/marsnomercy/files/patch-src-graphic_Screen.cpp
new file mode 100644
index 000000000000..e3a787d69ff5
--- /dev/null
+++ b/games/marsnomercy/files/patch-src-graphic_Screen.cpp
@@ -0,0 +1,36 @@
+--- src/graphic/Screen.cpp Mon Mar 6 16:56:16 2006
++++ src/graphic/Screen.cpp Mon Mar 20 10:38:14 2006
+@@ -17,7 +17,16 @@
+
+ // Setting screen mode
+ a_surface = SDL_SetVideoMode(a_rectangle->w, a_rectangle->h, 0, a_flags);
+-
++
++ if(!a_surface)
++ {
++ cout << "Video mode supported" << endl;
++ cout << "* 1024x768" << endl;
++ cout << "* 800x600" << endl;
++ cout << "Try: mars-nomercy <width> <height>" << endl;
++ exit(0);
++ }
++
+ a_backup = NULL;
+ }
+
+@@ -38,6 +47,15 @@
+ if(w != a_rectangle->w || h != a_rectangle->h)
+ {
+ a_surface = SDL_SetVideoMode(w, h, 0, a_flags);
++
++ if(!a_surface)
++ {
++ cout << "Video mode supported" << endl;
++ cout << "* 1024x768" << endl;
++ cout << "* 800x600" << endl;
++ cout << "Try: mars-nomercy <width> <height>" << endl;
++ exit(0);
++ }
+
+ // Setting screen dimensions
+ a_rectangle->w = w;
diff --git a/games/marsnomercy/files/patch-src_mars.cpp b/games/marsnomercy/files/patch-src_mars.cpp
new file mode 100644
index 000000000000..c422006c7239
--- /dev/null
+++ b/games/marsnomercy/files/patch-src_mars.cpp
@@ -0,0 +1,48 @@
+--- src/mars.cpp Mon Mar 6 17:45:01 2006
++++ src/mars.cpp Mon Mar 20 10:33:25 2006
+@@ -96,6 +96,21 @@
+
+ int main(int argc, char **argv)
+ {
++int r_w = 0;
++int r_h = 0;
++
++ switch(argc)
++ {
++ case 1:r_w = 1024;
++ r_h = 768;
++ break;
++ case 3:r_w = atoi(argv[1]);
++ r_h = atoi(argv[2]);
++ break;
++ default: cout << "Use: mars-nomercy or mars-nomercy <width> <height>" <<endl;
++ exit(0);
++ }
++
+ // the system video is initialized
+ SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER);
+ // init SDL_ttf
+@@ -103,9 +118,9 @@
+
+ // when exit, execute SDL_Quit to restore everything
+ atexit(SDL_Quit);
+-
+- Dimension screen_dim = { RIS2_W, RIS2_H };
+-
++
++ Dimension screen_dim = { r_w, r_h };
++
+ // init screen
+ screen = new Screen(screen_dim.w, screen_dim.h, SDL_SWSURFACE|SDL_FULLSCREEN);
+
+@@ -116,8 +131,8 @@
+ Options opt;
+
+ // default res is 1024 x 768
+- opt.ris.w = RIS2_W;
+- opt.ris.h = RIS2_H;
++ opt.ris.w = r_w;
++ opt.ris.h = r_h;
+
+ // start menu
+ menu(opt);
diff --git a/games/marsnomercy/pkg-descr b/games/marsnomercy/pkg-descr
new file mode 100644
index 000000000000..899fe7878b51
--- /dev/null
+++ b/games/marsnomercy/pkg-descr
@@ -0,0 +1,21 @@
+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/
diff --git a/games/marsnomercy/pkg-message b/games/marsnomercy/pkg-message
new file mode 100644
index 000000000000..ca5a44a0b8d1
--- /dev/null
+++ b/games/marsnomercy/pkg-message
@@ -0,0 +1,9 @@
+###############################################################################
+
+1) Run mars:
+
+ # mars-nomercy
+
+2) Enjoy it ;)
+
+###############################################################################