summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-strategy/netpanzer')
-rw-r--r--games-strategy/netpanzer/Manifest2
-rw-r--r--games-strategy/netpanzer/files/netpanzer-0.8.2-gcc43.patch62
-rw-r--r--games-strategy/netpanzer/files/netpanzer-0.8.2-gcc47.patch11
-rw-r--r--games-strategy/netpanzer/files/netpanzer-ded15
-rw-r--r--games-strategy/netpanzer/files/netpanzer-ded.ini80
-rw-r--r--games-strategy/netpanzer/files/netpanzer.rc34
-rw-r--r--games-strategy/netpanzer/metadata.xml8
-rw-r--r--games-strategy/netpanzer/netpanzer-0.8.2.ebuild71
8 files changed, 283 insertions, 0 deletions
diff --git a/games-strategy/netpanzer/Manifest b/games-strategy/netpanzer/Manifest
new file mode 100644
index 00000000000..89f785ed939
--- /dev/null
+++ b/games-strategy/netpanzer/Manifest
@@ -0,0 +1,2 @@
+DIST netpanzer-0.8.2.tar.bz2 10416147 SHA256 bc70badec3a846cca8090b6ecda388956c01053b7ea2596b44c730bcc29e3979 SHA512 7d7f5b485b20b2cefc71061412367edd963e59612767f6b69751915eda3f2939eebedfa29cb77ba0986cf4966b0fc12456b1bb6cfc2bd794c47fbce0b5f6f57a WHIRLPOOL cd7fd3ac6d07cc711d3f968e24f07016574aaa1d393e76ef851f439572cc31d1e402cc538e84e7ae80853ec3a5bd97d2d6ddbf6ad811a65227837ed01712e2b8
+DIST netpanzer-data-0.8.tar.bz2 10123751 SHA256 0ed4398f5e0a796422474fcc518934d74ceb056ca7ab624d8d239b749535277b SHA512 9120d8d3a190069206ed327f1d7d2b2d36f40feefa823956cf6db66e8d0622959449b9385d81b08fdfc59b3b44b7e4d6f6ca2c7362f1a857e1110d61e7c08ce6 WHIRLPOOL 8664957ff1bd22acb1efeb3bcfad2106c8c048853a8ab4f238c793f601d6ec9fa31574bcc1d819fcf8593a5b31138bda894fd24fde32e87ec399244d57718285
diff --git a/games-strategy/netpanzer/files/netpanzer-0.8.2-gcc43.patch b/games-strategy/netpanzer/files/netpanzer-0.8.2-gcc43.patch
new file mode 100644
index 00000000000..cf73ba4c225
--- /dev/null
+++ b/games-strategy/netpanzer/files/netpanzer-0.8.2-gcc43.patch
@@ -0,0 +1,62 @@
+Index: netpanzer-0.8.2/src/Lib/2D/ColorTable.cpp
+===================================================================
+--- netpanzer-0.8.2.orig/src/Lib/2D/ColorTable.cpp 2008-02-05 16:36:27.000000000 +0000
++++ netpanzer-0.8.2/src/Lib/2D/ColorTable.cpp 2008-02-05 16:36:39.000000000 +0000
+@@ -17,6 +17,8 @@
+ */
+ #include <config.h>
+
++#include <memory>
++
+ #include "Util/FileSystem.hpp"
+ #include "Util/Log.hpp"
+ #include "Util/Exception.hpp"
+Index: netpanzer-0.8.2/src/Lib/2D/Palette.cpp
+===================================================================
+--- netpanzer-0.8.2.orig/src/Lib/2D/Palette.cpp 2008-02-05 16:36:27.000000000 +0000
++++ netpanzer-0.8.2/src/Lib/2D/Palette.cpp 2008-02-05 16:36:39.000000000 +0000
+@@ -18,6 +18,7 @@
+ #include <config.h>
+
+ #include <math.h>
++#include <memory>
+
+ #include "Palette.hpp"
+ #include "Util/FileSystem.hpp"
+Index: netpanzer-0.8.2/src/NetPanzer/Network/ProxyServer.cpp
+===================================================================
+--- netpanzer-0.8.2.orig/src/NetPanzer/Network/ProxyServer.cpp 2008-02-05 16:36:27.000000000 +0000
++++ netpanzer-0.8.2/src/NetPanzer/Network/ProxyServer.cpp 2008-02-05 16:36:39.000000000 +0000
+@@ -17,6 +17,7 @@
+ */
+ #include <config.h>
+
++#include <cstdlib>
+ #include <string>
+ #include <stdexcept>
+ #include <ctype.h>
+Index: netpanzer-0.8.2/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp
+===================================================================
+--- netpanzer-0.8.2.orig/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp 2008-02-05 16:36:27.000000000 +0000
++++ netpanzer-0.8.2/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp 2008-02-05 16:36:39.000000000 +0000
+@@ -17,6 +17,7 @@
+ */
+ #include <config.h>
+
++#include <memory>
+ #include <vector>
+ #include <string>
+ #include "MapSelectionView.hpp"
+Index: netpanzer-0.8.2/src/Lib/Util/Log.cpp
+===================================================================
+--- netpanzer-0.8.2.orig/src/Lib/Util/Log.cpp 2008-02-05 17:13:36.000000000 +0000
++++ netpanzer-0.8.2/src/Lib/Util/Log.cpp 2008-02-05 17:13:43.000000000 +0000
+@@ -26,6 +26,7 @@
+ #include <vector>
+ #include <exception>
+ #include <iomanip>
++#include <algorithm>
+
+ #include "Exception.hpp"
+ #include "FileSystem.hpp"
+
diff --git a/games-strategy/netpanzer/files/netpanzer-0.8.2-gcc47.patch b/games-strategy/netpanzer/files/netpanzer-0.8.2-gcc47.patch
new file mode 100644
index 00000000000..432f40a9f9a
--- /dev/null
+++ b/games-strategy/netpanzer/files/netpanzer-0.8.2-gcc47.patch
@@ -0,0 +1,11 @@
+--- src/Lib/ArrayUtil/QueueTemplate.hpp.old 2012-10-16 13:57:33.000000000 +0200
++++ src/Lib/ArrayUtil/QueueTemplate.hpp 2012-10-16 13:58:16.000000000 +0200
+@@ -42,7 +42,7 @@
+
+ bool enqueue(const TYPE& object )
+ {
+- add( object, (rear + 1) % this->size );
++ this->add( object, (rear + 1) % this->size );
+ rear = (rear + 1) % this->size;
+
+ if ( front == rear )
diff --git a/games-strategy/netpanzer/files/netpanzer-ded b/games-strategy/netpanzer/files/netpanzer-ded
new file mode 100644
index 00000000000..d6dd8519364
--- /dev/null
+++ b/games-strategy/netpanzer/files/netpanzer-ded
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+running=yes
+while [[ $running = yes ]] ; do
+ /usr/games/bin/netpanzer --game_config=/etc/netpanzer-ded.ini -d $@
+ if [[ $? -ge 128 ]] ; then
+ echo "`date`: Restarting server after crash"
+ # wait a bit to not blow cpu and logfiles on constant crashs
+ sleep 30
+ else
+ #normal exit
+ running=no
+ fi
+done
+
diff --git a/games-strategy/netpanzer/files/netpanzer-ded.ini b/games-strategy/netpanzer/files/netpanzer-ded.ini
new file mode 100644
index 00000000000..903fb3b493b
--- /dev/null
+++ b/games-strategy/netpanzer/files/netpanzer-ded.ini
@@ -0,0 +1,80 @@
+[game]
+
+[interface]
+attacknotificationtime=5
+consoletextdelay=3
+consoletextusage=25
+drawunitdamage=yes
+drawunitflags=yes
+drawunitreload=no
+gameinfoposition_x=0
+gameinfoposition_y=0
+minimapdrawtype=0
+minimapposition_x=0
+minimapposition_y=0
+minimapsize_x=194
+minimapsize_y=194
+playerflag=26
+rankposition_x=0
+rankposition_y=0
+scrollrate=1000
+toolbarposition_x=0
+toolbarposition_y=0
+unitcolor=0
+unitinfodrawlayer=0
+unitselectionmode=1
+vehicleselectioncolor=1
+viewdrawbackgroundmode=0
+
+[player]
+masterservers=81.169.185.36,81.173.119.122
+name=Gentoo NetPanzer Server
+proxyserver=
+proxyserverpass=
+proxyserveruser=
+
+[radar]
+alliedoutpostcolor=11
+alliedunitcolor=11
+displayclouds=no
+enemyoutpostcolor=4
+objectivedrawmode=1
+playeroutpostcolor=1
+playerunitcolor=0
+resizerate=400
+unitsize=0
+
+[server]
+allowallies=yes
+bindaddress=
+cloudcoverage=0
+fraglimit=500
+gametype=0
+logging=yes
+mapcycle=Cramped, Tight Quarters, Two Villages, Cramped
+maxplayers=8
+maxunits=160
+objectivepercentage=75
+powerups=yes
+public=yes
+respawntype=1
+serverport=3030
+timelimit=50
+windspeed=30
+
+[sound]
+effects=yes
+effectsvolume=100
+enable=yes
+music=yes
+musicvolume=80
+
+[visuals]
+blendsmoke=yes
+displayshadows=yes
+fullscreen=yes
+gamma=50
+hardwareDoubleBuffer=yes
+hardwareSurface=yes
+resolution=0
+
diff --git a/games-strategy/netpanzer/files/netpanzer.rc b/games-strategy/netpanzer/files/netpanzer.rc
new file mode 100644
index 00000000000..87ff15f9953
--- /dev/null
+++ b/games-strategy/netpanzer/files/netpanzer.rc
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting netpanzer dedicated server"
+ screen -A -m -d -S netpanzer-ded su - GAMES_USER_DED -c "GENTOO_DIR/netpanzer-ded"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping netpanzer dedicated server"
+ local pid=`screen -list | grep netpanzer-ded | awk -F . '{print $1}' | sed -e s/.//`
+ if [[ -z "${pid}" ]] ; then
+ eend 1 "Lost screen session"
+ else
+ pid=`pstree -p ${pid} | sed -e 's:^.*netpanzer-ded(\([0-9]*\)).*:\1:'`
+ if [[ -z "${pid}" ]] ; then
+ eend 1 "Lost netpanzer-ded session"
+ else
+ kill ${pid}
+ eend $? "Could not kill netpanzer-ded"
+ fi
+ fi
+}
+
+status() {
+ screen -list | grep netpanzer-ded
+}
diff --git a/games-strategy/netpanzer/metadata.xml b/games-strategy/netpanzer/metadata.xml
new file mode 100644
index 00000000000..aea9e2c8753
--- /dev/null
+++ b/games-strategy/netpanzer/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>games</herd>
+ <upstream>
+ <remote-id type="sourceforge">netpanzer.berlios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-strategy/netpanzer/netpanzer-0.8.2.ebuild b/games-strategy/netpanzer/netpanzer-0.8.2.ebuild
new file mode 100644
index 00000000000..2c909c28949
--- /dev/null
+++ b/games-strategy/netpanzer/netpanzer-0.8.2.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils games
+
+DATAVERSION="0.8"
+DESCRIPTION="Fast-action multiplayer strategic network game"
+HOMEPAGE="http://www.netpanzer.info/"
+SRC_URI="mirror://sourceforge/netpanzer.berlios/${P}.tar.bz2
+ mirror://sourceforge/netpanzer.berlios/${PN}-data-${DATAVERSION}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="ppc x86"
+IUSE="dedicated"
+
+RDEPEND="dedicated? ( app-misc/screen )
+ media-libs/libsdl[sound,video]
+ media-libs/sdl-mixer
+ media-libs/sdl-image
+ dev-games/physfs"
+DEPEND="${RDEPEND}
+ dev-util/ftjam"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gcc43.patch \
+ "${FILESDIR}"/${P}-gcc47.patch
+}
+
+src_configure() {
+ egamesconf
+ cd "${WORKDIR}"/${PN}-data-${DATAVERSION} \
+ && egamesconf
+}
+
+src_compile() {
+ AR="${AR} cru" jam -q || die
+
+ cd "${WORKDIR}"/${PN}-data-${DATAVERSION}
+ jam -q || die
+}
+
+src_install() {
+ jam -sDESTDIR="${D}" -sappdocdir=/usr/share/doc/${PF} install || die
+
+ cd "${WORKDIR}"/${PN}-data-${DATAVERSION}
+ jam -sDESTDIR="${D}" -sappdocdir=/usr/share/doc/${PF} install || die
+
+ if use dedicated ; then
+ newinitd "${FILESDIR}"/${PN}.rc ${PN}
+ sed -i \
+ -e "s:GAMES_USER_DED:${GAMES_USER_DED}:" \
+ -e "s:GENTOO_DIR:${GAMES_BINDIR}:" \
+ "${D}"/etc/init.d/${PN} || die
+
+ insinto /etc
+ doins "${FILESDIR}"/${PN}-ded.ini
+ dogamesbin "${FILESDIR}"/${PN}-ded
+ sed -i \
+ -e "s:GENTOO_DIR:${GAMES_BINDIR}:" \
+ "${D}/${GAMES_BINDIR}"/${PN}-ded || die
+ fi
+
+ rm -rf "${D}/${GAMES_DATADIR}"/{applications,pixmaps}
+ doicon "${S}"/${PN}.png
+ make_desktop_entry ${PN} NetPanzer
+ prepgamesdirs
+}