aboutsummaryrefslogtreecommitdiff
path: root/games/solarconquest
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2006-05-31 13:30:16 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2006-05-31 13:30:16 +0000
commit9715677bb7f0fbb8342ec5d19fb4b4deb670aae7 (patch)
tree2a434a570c1d171a81d4f598c79d3a2572b8cd78 /games/solarconquest
parent16ef18761fcebeb5b9aa52482c8ef5d603aaab53 (diff)
downloadports-9715677bb7f0fbb8342ec5d19fb4b4deb670aae7.tar.gz
ports-9715677bb7f0fbb8342ec5d19fb4b4deb670aae7.zip
Notes
Diffstat (limited to 'games/solarconquest')
-rw-r--r--games/solarconquest/Makefile40
-rw-r--r--games/solarconquest/distinfo3
-rw-r--r--games/solarconquest/files/patch-makefile11
-rw-r--r--games/solarconquest/files/patch-source-MenuScreen.h38
-rw-r--r--games/solarconquest/files/patch-source-main.cpp19
-rw-r--r--games/solarconquest/pkg-descr12
-rw-r--r--games/solarconquest/pkg-plist23
7 files changed, 146 insertions, 0 deletions
diff --git a/games/solarconquest/Makefile b/games/solarconquest/Makefile
new file mode 100644
index 000000000000..1c783b66076a
--- /dev/null
+++ b/games/solarconquest/Makefile
@@ -0,0 +1,40 @@
+# New ports collection makefile for: solarconquest
+# Date created: 06 Apr 2006
+# Whom: Dmitry Marakasov <amdmi3@mail.ru>
+#
+# $FreeBSD$
+#
+
+PORTNAME= solarconquest
+PORTVERSION= 0.2
+CATEGORIES= games
+MASTER_SITES= http://games.sajthelper.com/
+DISTNAME= SolarConquest
+
+MAINTAINER= amdmi3@mail.ru
+COMMENT= Space 2D action game with plenty of shooting
+
+USE_SDL= sdl mixer image
+USE_GL= yes
+USE_DOS2UNIX= makefile source/MenuScreen.h source/main.cpp
+
+MAKEFILE= makefile
+MAKE_ENV= CXX="${CXX}"
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|images/|${DATADIR}/images/|' \
+ ${WRKSRC}/source/main.cpp
+ @${REINPLACE_CMD} -e 's|shapes/|${DATADIR}/shapes/|' \
+ ${WRKSRC}/source/main.cpp
+ @${REINPLACE_CMD} -e 's|settings.dat|.solarconquest.rc|' \
+ ${WRKSRC}/source/Common.h
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/solar ${PREFIX}/bin/${PORTNAME}
+ ${MKDIR} ${DATADIR}/shapes
+ ${INSTALL_DATA} ${WRKSRC}/shapes/* ${DATADIR}/shapes
+ ${MKDIR} ${DATADIR}/images/fonts
+ ${INSTALL_DATA} ${WRKSRC}/images/*.png ${DATADIR}/images
+ ${INSTALL_DATA} ${WRKSRC}/images/fonts/* ${DATADIR}/images/fonts
+
+.include <bsd.port.mk>
diff --git a/games/solarconquest/distinfo b/games/solarconquest/distinfo
new file mode 100644
index 000000000000..39b8de0650d3
--- /dev/null
+++ b/games/solarconquest/distinfo
@@ -0,0 +1,3 @@
+MD5 (SolarConquest.tar.gz) = 107c89fe58feb2d8f4044c4280f98b08
+SHA256 (SolarConquest.tar.gz) = 4282c12c01d02990ca6f7e4ba1d068964a633ec86df06b4c7723bb089ec4b38a
+SIZE (SolarConquest.tar.gz) = 181241
diff --git a/games/solarconquest/files/patch-makefile b/games/solarconquest/files/patch-makefile
new file mode 100644
index 000000000000..349e95e25db3
--- /dev/null
+++ b/games/solarconquest/files/patch-makefile
@@ -0,0 +1,11 @@
+--- makefile.orig Sun Mar 6 16:36:47 2005
++++ makefile Thu Apr 6 02:54:20 2006
+@@ -1,5 +1,5 @@
+-LIBRARIES = `sdl-config --libs` -L/usr/X11R6/lib -lSDL_mixer -lSDL_image -lGL -lGLU -lpng -ljpeg
+-CFLAGS = -w -O3 -I/usr/include/GL `sdl-config --cflags`
++LIBRARIES = `${SDL_CONFIG} --libs` -L${X11BASE}/lib -lSDL_mixer -lSDL_image -lGL -lGLU -lpng -ljpeg
++CXXFLAGS += `${SDL_CONFIG} --cflags` -I${X11BASE}/include
+
+ all:
+- g++ $(CFLAGS) -o solar ./source/main.cpp $(LIBRARIES)
++ ${CXX} ${CXXFLAGS} -o solar ./source/main.cpp ${LIBRARIES}
diff --git a/games/solarconquest/files/patch-source-MenuScreen.h b/games/solarconquest/files/patch-source-MenuScreen.h
new file mode 100644
index 000000000000..503a8b9e9e31
--- /dev/null
+++ b/games/solarconquest/files/patch-source-MenuScreen.h
@@ -0,0 +1,38 @@
+--- source/MenuScreen.h.orig Thu Apr 6 03:11:27 2006
++++ source/MenuScreen.h Thu Apr 6 03:11:27 2006
+@@ -646,10 +646,7 @@
+ if (text)
+ {
+ char txt[MAX_STRING_SIZE];
+- char num[MAX_STRING_SIZE];
+- gcvt(g_gameSpeed,2,num);
+- strcpy(txt,"Speed: ");
+- strncat(txt,num,3);
++ sprintf(txt, "Speed: %.2f", g_gameSpeed);
+ text->SetText(txt);
+ }
+ }
+@@ -751,10 +748,7 @@
+ g_gameSpeed = 0.1;
+
+ char txt[MAX_STRING_SIZE];
+- char num[MAX_STRING_SIZE];
+- gcvt(g_gameSpeed,2,num);
+- strcpy(txt,"Speed: ");
+- strncat(txt,num,3);
++ sprintf(txt, "Speed: %.2f", g_gameSpeed);
+
+ CTextItem* text = (CTextItem*)g_optionsMenuScreen->FindItem(103);
+ if (text)
+@@ -768,10 +762,7 @@
+ g_gameSpeed = 2.0;
+
+ char txt[MAX_STRING_SIZE];
+- char num[MAX_STRING_SIZE];
+- gcvt(g_gameSpeed,2,num);
+- strcpy(txt,"Speed: ");
+- strncat(txt,num,3);
++ sprintf(txt, "Speed: %.2f", g_gameSpeed);
+
+ CTextItem* text = (CTextItem*)g_optionsMenuScreen->FindItem(103);
+ if (text)
diff --git a/games/solarconquest/files/patch-source-main.cpp b/games/solarconquest/files/patch-source-main.cpp
new file mode 100644
index 000000000000..356516b876e2
--- /dev/null
+++ b/games/solarconquest/files/patch-source-main.cpp
@@ -0,0 +1,19 @@
+--- source/main.cpp.orig Thu Apr 6 04:19:16 2006
++++ source/main.cpp Thu Apr 6 04:19:38 2006
+@@ -19,6 +19,8 @@
+
+ //#include "stdafx.h"
+
++#include <unistd.h>
++#include <string.h>
+ #include <SDL.h>
+ #include <SDL_opengl.h>
+ #include <vorbis/vorbisfile.h>
+@@ -1354,6 +1356,7 @@
+
+ int main(int argc, char **argv)
+ {
++ chdir(getenv("HOME"));
+ #ifdef NO_SOUND
+ if (SDL_Init(SDL_INIT_VIDEO) < 0)
+ #else
diff --git a/games/solarconquest/pkg-descr b/games/solarconquest/pkg-descr
new file mode 100644
index 000000000000..1d818b6577b0
--- /dev/null
+++ b/games/solarconquest/pkg-descr
@@ -0,0 +1,12 @@
+An expedition to another solar system was supposed to be the biggest event in
+mankind's history. While it achieved such glory, it also caused a corrupt
+Admrial to gain new territory.
+
+You are part of a small rebel force. Your task is to keep Admrial Moretti's
+forces at bay, until the Earth Space Forces can send a rescue team.
+
+Solar Conquest is a 2D action game that takes place in space. You pilot a
+fighter and fight alongside dozens of allies. Battles can range from just a
+dozen a team, or up to all out war with hundreds of ships per team.
+
+WWW: http://games.sajthelper.com/
diff --git a/games/solarconquest/pkg-plist b/games/solarconquest/pkg-plist
new file mode 100644
index 000000000000..60d704852e1c
--- /dev/null
+++ b/games/solarconquest/pkg-plist
@@ -0,0 +1,23 @@
+bin/solarconquest
+%%DATADIR%%/images/explosion.png
+%%DATADIR%%/images/explosion_detailed.png
+%%DATADIR%%/images/fonts/glowfont_template.bmp
+%%DATADIR%%/images/fonts/smallfont.bmp
+%%DATADIR%%/shapes/advancedbomber.txt
+%%DATADIR%%/shapes/advancedbomber_source.txt
+%%DATADIR%%/shapes/advancedfighter.txt
+%%DATADIR%%/shapes/advancedfighter_source.txt
+%%DATADIR%%/shapes/aircraftcarrier.txt
+%%DATADIR%%/shapes/aircraftcarrier_source.txt
+%%DATADIR%%/shapes/destroyer.txt
+%%DATADIR%%/shapes/destroyer_source.txt
+%%DATADIR%%/shapes/laserturret.txt
+%%DATADIR%%/shapes/laserturret_source.txt
+%%DATADIR%%/shapes/spacestation.txt
+%%DATADIR%%/shapes/spacestation_source.txt
+%%DATADIR%%/shapes/turretstation.txt
+%%DATADIR%%/shapes/turretstation_source.txt
+@dirrm %%DATADIR%%/images/fonts
+@dirrm %%DATADIR%%/images
+@dirrm %%DATADIR%%/shapes
+@dirrm %%DATADIR%%