summaryrefslogtreecommitdiff
path: root/games-strategy/netpanzer
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-strategy/netpanzer
reinit the tree, so we can have metadata
Diffstat (limited to 'games-strategy/netpanzer')
-rw-r--r--games-strategy/netpanzer/Manifest11
-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.rc33
-rw-r--r--games-strategy/netpanzer/metadata.xml11
-rw-r--r--games-strategy/netpanzer/netpanzer-0.8.2.ebuild70
8 files changed, 293 insertions, 0 deletions
diff --git a/games-strategy/netpanzer/Manifest b/games-strategy/netpanzer/Manifest
new file mode 100644
index 000000000000..44e7cba387a2
--- /dev/null
+++ b/games-strategy/netpanzer/Manifest
@@ -0,0 +1,11 @@
+AUX netpanzer-0.8.2-gcc43.patch 2241 SHA256 b2c150dee78272d317e57b019f491c5ab1a7a29f9708c9da5791f6b68a486b60 SHA512 aeddced38643a38d0bd86d02d4b4c8acb6a7c74f80d6fd0f9697b325b3bd1bd019a9145bfad91c9e658c8d4e267efb83ccb58424efff9a1c63d2e4c617a31fe2 WHIRLPOOL 83780a9bc02212e91c7a069d7ad8782f7fd65356ce61645cb1c9e8945cfb0f521bc5c959f867c82239567a775e7822f8998a10f1d296558c0d93ab256fc4eb99
+AUX netpanzer-0.8.2-gcc47.patch 399 SHA256 4e87a31e473a9273fc96e9362b001704fbcc73131798540564ce8af618af8821 SHA512 d4d62649e33de0f40ae159b07a59e95fa7928ad88d4bfbfc6677d6404c7abd22954e72902ef88d98275ede223c9866dcd361d9dc48969638742f50335e3a562c WHIRLPOOL ae6d92a61d2e3e57ae7633d4b50afcc29640c37246c69bdc2b71ed44680d8025a026aa4597a4c7f87e9a23b21658c44ed4f621df580373708d6f82e0b2c67add
+AUX netpanzer-ded 359 SHA256 4b49ecaa63b76c35532d0eea2825d9d6fa9655772f47407497ce3fabce0e1760 SHA512 0d8c410711627664e41853dc31c73cefece2ed51696713969eae7bfbc6eefe9a4f878e95fbd6584db6ba46c8af76c300281939a3d663cc16bebd2c46040700d1 WHIRLPOOL 9e40138301eb15219e2d22f524ccbc325539d2abe17d5fcc563835f73de6aae27456cce44f5bb804ce2da023a163693dd4f15e2156799e5f21aeb9e2182ebd7b
+AUX netpanzer-ded.ini 1261 SHA256 39ae0151857304a53d62cc6623f3943b492bd9543da4c072a561f9475c0f8f51 SHA512 3d9e8603d717a52b603c1da7b6b734f771b768b8d3f64c27d881af87947b3c816ec07420cd841c728a6a4e9e5d92798e78d910516d8c5fe33d192ac6a6bcabb6 WHIRLPOOL 211cca09183add8b9d6464160375910214a068e85ffbdf0cb33d38c72fc9059aa847b1ff9936d7ab0982c6f8fa912a485af310e96d41cfa1babfb7680cad7b5f
+AUX netpanzer.rc 776 SHA256 0959824a447a4a13d0a76074d939c5008803f77a0d0b6a4a70523cc66cff0d26 SHA512 b82f11ec76e44d2adc7567ee95e564b05d613b96da6fa9218b0a1571f22577259a60748e0b4da486a00e6c65b26fba339ef78a1798d7c9aca89d9edcf4b33055 WHIRLPOOL 2d54b515d037b7ef9a9459a97429575d094b9e8476b52c1c300d80075bc41ec75fd6e98e6f359b5c84cb56ef4a11d8600027295258ad648830edb8415324a73e
+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
+EBUILD netpanzer-0.8.2.ebuild 1638 SHA256 331fc0d6e82d5bdd49d16077f90017b7944962be85b92b677a24cb99b430fe5f SHA512 103be15e702558faa1aac6b25b6955303a99fc8ce13dd4f399e330aa5e402b9158fd3e76179806701802ed4ecbcd14d1e4f43d911ee91860e22c88c54795ec7b WHIRLPOOL 37966db980f5e141964e7b3dc6550d2ed2327f4a0c4fbc92b836e163828cef864fdd409a178fc4e5107d121fca992d9437c00b6223397f4fe8f6e62d720fbc98
+MISC ChangeLog 2713 SHA256 5090264ae27989fa9efb4f155cd40deadbd38ba94cf0d19ab6937dc2ba388ad4 SHA512 7c1afef530d746827a43413a396bbe5793a82d6fa70affe06dc5e1d450af9256fcf5d30bf556153cd3ac97543ef276e04a8e9cd01aa7ca2be458927e1987a4a6 WHIRLPOOL 6f595d9a985450105c6e30ba081fd162ddca30c76c5112f06687defd8f4ee7646367a3309e73936a3f7365edd8131a726e1b3aae3a82f508d0bd1edcee6671af
+MISC ChangeLog-2015 5659 SHA256 55a978b716cfdeda644ba2e0eb0ec9f6b269da8039179b6ddc738a0475b5a0e6 SHA512 107b85c342746ac5d27c138e900de06f2b27296ffd76b3719901b885562324a98c1fc881df25c6609852c5004800539d73e8617fc17bd0e8af6766fcbe08c2f8 WHIRLPOOL 4b55f8db6125c19352323d58d52d782cc53e6cd8910678fb63fb85bbd25b07d99c0285cd980823644044e2157f26f9bf43a2723f9c11f8c48fd3db8201e4351d
+MISC metadata.xml 340 SHA256 3e7d60a75d966cc62351aad77fe59b1db9141af5cd9b18b0adbdf2ca2481e33a SHA512 b4d07a9224bcf6390184655df2a7826b3ecae25e21fa707851d389364366cc5f0e317d8ffc3d6f8abed33ebd4a886bbdbfecb11330e25ca1a2eb6e2045153e76 WHIRLPOOL 008cb9202acd2001ddfc8a7b1c9c43fee4c928205392961f5a33cb61be5b1ea1525d2f52952cc6cfefeebc99ed0c354194686fcff11af17f748fb4895aa52b4d
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 000000000000..cf73ba4c2252
--- /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 000000000000..432f40a9f9aa
--- /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 000000000000..d6dd85193641
--- /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 000000000000..903fb3b493b3
--- /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 000000000000..b1d29df5be33
--- /dev/null
+++ b/games-strategy/netpanzer/files/netpanzer.rc
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 000000000000..6bb77c4ca82c
--- /dev/null
+++ b/games-strategy/netpanzer/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <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 000000000000..4667cc74d26e
--- /dev/null
+++ b/games-strategy/netpanzer/netpanzer-0.8.2.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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="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
+}