summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2012-02-08 02:01:36 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2012-02-08 02:01:36 +0000
commit259f0ba6a2fdfed0ec96c0a00c030e163fb4f13e (patch)
tree3f25148f6a0dba3ee2703514173516eaa3b65abf /games-fps/sauerbraten
parentStable for HPPA (bug #402147). (diff)
downloadhistorical-259f0ba6a2fdfed0ec96c0a00c030e163fb4f13e.tar.gz
historical-259f0ba6a2fdfed0ec96c0a00c030e163fb4f13e.tar.bz2
historical-259f0ba6a2fdfed0ec96c0a00c030e163fb4f13e.zip
version bump (bug #366321) with contributions from at least Jon Severinsson, Petr Pisar, Tomáš Chvátal, and Paul Hartman (bug #111566)
Package-Manager: portage-2.1.10.44/cvs/Linux i686
Diffstat (limited to 'games-fps/sauerbraten')
-rw-r--r--games-fps/sauerbraten/ChangeLog13
-rw-r--r--games-fps/sauerbraten/Manifest7
-rw-r--r--games-fps/sauerbraten/files/sauerbraten-2010.07.28-system-enet.patch64
-rw-r--r--games-fps/sauerbraten/files/sauerbraten.conf28
-rw-r--r--games-fps/sauerbraten/files/sauerbraten.init74
-rw-r--r--games-fps/sauerbraten/sauerbraten-2010.07.28.ebuild122
6 files changed, 305 insertions, 3 deletions
diff --git a/games-fps/sauerbraten/ChangeLog b/games-fps/sauerbraten/ChangeLog
index d7f5e6391da8..78bf6f908a32 100644
--- a/games-fps/sauerbraten/ChangeLog
+++ b/games-fps/sauerbraten/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for games-fps/sauerbraten
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-fps/sauerbraten/ChangeLog,v 1.11 2009/03/09 18:33:04 scarabeus Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/games-fps/sauerbraten/ChangeLog,v 1.12 2012/02/08 02:01:36 mr_bones_ Exp $
+
+*sauerbraten-2010.07.28 (08 Feb 2012)
+
+ 08 Feb 2012; Michael Sterrett <mr_bones_@gentoo.org>
+ +sauerbraten-2010.07.28.ebuild,
+ +files/sauerbraten-2010.07.28-system-enet.patch, +files/sauerbraten.conf,
+ +files/sauerbraten.init:
+ version bump (bug #366321) with contributions from at least Jon
+ Severinsson, Petr Pisar, Tomáš Chvátal, and Paul Hartman (bug #111566)
09 Mar 2009; Tomas Chvatal <scarabeus@gentoo.org>
+files/sauerbraten_unix.patch, -files/wrapper,
diff --git a/games-fps/sauerbraten/Manifest b/games-fps/sauerbraten/Manifest
index b94262cea571..29811e646aef 100644
--- a/games-fps/sauerbraten/Manifest
+++ b/games-fps/sauerbraten/Manifest
@@ -1,5 +1,10 @@
+AUX sauerbraten-2010.07.28-system-enet.patch 1947 RMD160 5458e250b7c84c619b340fe009339b1fe5369884 SHA1 918cc2fd491b1d2135a683abd68f4b8b793c4ff3 SHA256 862ffc81548e6c4a9c0daf273e133ba8143f20fcda3359237e95f79b8c4ccab5
+AUX sauerbraten.conf 605 RMD160 445e6ac9901a5a53a6d0e8b59a9e3de9c230aa98 SHA1 9eed8a4c3422c01db34fcaa4b3aa735459a99edb SHA256 6e0694718370b126034bc569229d91b63cbfbd87f86af0a03d20e08833069811
+AUX sauerbraten.init 1952 RMD160 48d8bea5d2c06d216e581f4f16b31f076d01d5b3 SHA1 699bb25595fc4e090a6d9e28d08af9009ada3f8c SHA256 7bd7d733fa0f7b747f2ee9ce115e76f7b374a0afdcaef459722184c66a9283b7
AUX sauerbraten_unix.patch 644 RMD160 bcb380a16ffe1da5e077dff76f732edc9215890d SHA1 887442110e36a71b535d8b11fe1b541bd885a872 SHA256 0198017bd3c88d06ad0b0f369b7f0c71ff2451bf82345eb8869fdd34a5b81c79
DIST sauerbraten_2008_06_17_ctf_edition_linux.tar.bz2 314942420 RMD160 3cb4661494618610eb0149b402ecc5b6bdfd879f SHA1 9e34f4d15b861a58645b6378fc27bb0e7a835605 SHA256 9ea0ce8b4978c7d506c3f53d4a8fe0bc7e50dad34740964562bce170295e1270
+DIST sauerbraten_2010_07_28_justice_edition_linux.tar.bz2 464652953 RMD160 288f9ea5783b7acfba6f6526da53bfa6086fbfd0 SHA1 9c837b36196a1fabf5a5b897ef3c590344e680b2 SHA256 185e5dbf41a4426af5f692e49afa69237e23976ef3b368f43ec6aa19fb3cc86c
EBUILD sauerbraten-2008.06.17.ebuild 1664 RMD160 4be3ea9a7cc4a92a4a6f91053ec28a33231cc14b SHA1 3359df1a1ccb0ece79614f47dd6dff58cb2844bf SHA256 d3d564d6cb007a6817042e046abe8cb2982a1a3d15d8ea19c9872068d05e200a
-MISC ChangeLog 1973 RMD160 7fd2d62edb389fcccceb3dad0b597ed9c76addf5 SHA1 b80bfc00663de793cc3a1a369705438bbbf15743 SHA256 be99c298832757892b3e87dbf961eac651dea0e582af7068b9b96313c51ec75b
+EBUILD sauerbraten-2010.07.28.ebuild 3423 RMD160 f9ed16f3c099adfcd2af82b0cb350f3a56be30ce SHA1 a1888dcb0f73f648fae7496d133e07ebd8d1d982 SHA256 993eda55586ccc510ff74532130668807c6e815cdd08a7fb1cd8e5d2cd71a1f7
+MISC ChangeLog 2347 RMD160 21cf879b579be7b7a03af88054c5d771b774a6b4 SHA1 80022fbabd7ba69331bf3a824c2b7949c0453bb7 SHA256 eb8d56b846504b608dc2d737004d40ce356f8c42c0d067405b97b19f228f6e11
MISC metadata.xml 158 RMD160 cbd9984bb6b426c8c9cee5022fe0a26261612fea SHA1 be5251fa1dacef5c41b74761bb1c8c54fb633b9e SHA256 1423a4fdd4a79b1728a2056d9e300f7e1074253095d82726218d9e9b953888a3
diff --git a/games-fps/sauerbraten/files/sauerbraten-2010.07.28-system-enet.patch b/games-fps/sauerbraten/files/sauerbraten-2010.07.28-system-enet.patch
new file mode 100644
index 000000000000..e3521613071e
--- /dev/null
+++ b/games-fps/sauerbraten/files/sauerbraten-2010.07.28-system-enet.patch
@@ -0,0 +1,64 @@
+--- sauerbraten/src/Makefile
++++ sauerbraten/src/Makefile
+@@ -4,7 +4,7 @@ override CXXFLAGS+= -Wall -fsigned-char
+ PLATFORM= $(shell uname -s)
+ PLATFORM_PREFIX= native
+
+-INCLUDES= -Ishared -Iengine -Ifpsgame -Ienet/include
++INCLUDES= -Ishared -Iengine -Ifpsgame
+
+ STRIP=
+ ifeq (,$(findstring -g,$(CXXFLAGS)))
+@@ -20,8 +20,8 @@ WINDRES= windres
+ CLIENT_INCLUDES= $(INCLUDES) -Iinclude
+ CLIENT_LIBS= -mwindows -Llib -lSDL -lSDL_image -lSDL_mixer -lzdll -lopengl32 -lenet -lws2_32 -lwinmm
+ else
+-CLIENT_INCLUDES= $(INCLUDES) -I/usr/X11R6/include `sdl-config --cflags`
+-CLIENT_LIBS= -Lenet/.libs -lenet -L/usr/X11R6/lib `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL
++CLIENT_INCLUDES= $(INCLUDES) `sdl-config --cflags`
++CLIENT_LIBS= -lenet `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL
+ endif
+ ifeq ($(PLATFORM),Linux)
+ CLIENT_LIBS+= -lrt
+@@ -91,7 +91,7 @@ SERVER_INCLUDES= -DSTANDALONE $(INCLUDES
+ SERVER_LIBS= -Llib -lzdll -lenet -lws2_32 -lwinmm
+ else
+ SERVER_INCLUDES= -DSTANDALONE $(INCLUDES)
+-SERVER_LIBS= -Lenet/.libs -lenet -lz
++SERVER_LIBS= -lenet -lz
+ endif
+ SERVER_OBJS= \
+ shared/crypto-standalone.o \
+@@ -116,15 +116,6 @@ default: all
+
+ all: client server
+
+-enet/Makefile:
+- cd enet; ./configure --enable-shared=no --enable-static=yes
+-
+-libenet: enet/Makefile
+- $(MAKE) -C enet/ all
+-
+-clean-enet: enet/Makefile
+- $(MAKE) -C enet/ clean
+-
+ clean:
+ -$(RM) $(CLIENT_PCH) $(CLIENT_OBJS) $(SERVER_OBJS) $(MASTER_OBJS) sauer_client sauer_server sauer_master
+
+@@ -159,13 +150,13 @@ master: $(MASTER_OBJS)
+
+ install: all
+ else
+-client: libenet $(CLIENT_OBJS)
++client: $(CLIENT_OBJS)
+ $(CXX) $(CXXFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS)
+
+-server: libenet $(SERVER_OBJS)
++server: $(SERVER_OBJS)
+ $(CXX) $(CXXFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS)
+
+-master: libenet $(MASTER_OBJS)
++master: $(MASTER_OBJS)
+ $(CXX) $(CXXFLAGS) -o sauer_master $(MASTER_OBJS) $(SERVER_LIBS)
+
+ install: all
diff --git a/games-fps/sauerbraten/files/sauerbraten.conf b/games-fps/sauerbraten/files/sauerbraten.conf
new file mode 100644
index 000000000000..8d93bf62b788
--- /dev/null
+++ b/games-fps/sauerbraten/files/sauerbraten.conf
@@ -0,0 +1,28 @@
+# Config file for /etc/init.d/sauerbraten
+
+# Owner of Sauerbraten server processes (must be existing)
+USER="%GAMES_USER_DED%"
+GROUP="%GAMES_GROUP%"
+
+
+# Whether to run the dedicated server
+RUNSERVER="Yes"
+
+# Location of the dedicated server config directory
+SERVERCONFIG="%SYSCONFDIR%"
+
+# Additional command line arguments to the dedicated server
+SERVERARGS=""
+
+
+# Whether to run the master server
+RUNMASTER="No"
+
+# Location of the master server config directory
+MASTERCONFIG="%SYSCONFDIR%"
+
+# What port should the masterserver use
+MASTERPORT="28787"
+
+# What ip should the masterserver bind to
+MASTERIP=""
diff --git a/games-fps/sauerbraten/files/sauerbraten.init b/games-fps/sauerbraten/files/sauerbraten.init
new file mode 100644
index 000000000000..5aa2356cbeaf
--- /dev/null
+++ b/games-fps/sauerbraten/files/sauerbraten.init
@@ -0,0 +1,74 @@
+#!/sbin/runscript
+
+depend() {
+ use net
+}
+
+start() {
+ [ $(echo ${RUNMASTER} | tr '[:upper:]' '[:lower:]') = "yes" ] && start_master
+ [ $(echo ${RUNSERVER} | tr '[:upper:]' '[:lower:]') = "yes" ] && start_server
+ true
+}
+
+start_server() {
+ ebegin "Starting Sauerbraten dedicated server"
+
+ # Make sure necessary parameters are set
+ SERVERCONFIG="${SERVERCONFIG:-%SYSCONFDIR%}"
+
+ if [ ! -d ${SERVERCONFIG} ]; then
+ einfo "No ${SERVERCONFIG} around. Creating new..."
+ mkdir ${SERVERCONFIG}
+ chown ${USER}:${GROUP} ${SERVERCONFIG}
+ fi
+
+ start-stop-daemon \
+ --quiet --start --chuid ${USER}:${GROUP} --chdir ${SERVERCONFIG} \
+ --make-pidfile --pidfile %GAMES_STATEDIR%/run/sauerbraten/server.pid \
+ --background --exec %LIBEXECDIR%/sauer_server -- ${SERVERARGS}
+ eend $?
+}
+
+start_master() {
+ ebegin "Starting Sauerbraten master server"
+
+ # Make sure necessary parameters are set
+ MASTERCONFIG="${MASTERCONFIG:-%SYSCONFDIR%}"
+ [ -n "${MASTERIP}" ] && MASTERPORT="${MASTERPORT:-28787}"
+ MASTERARGS="${MASTERCONFIG}/ ${MASTERPORT} ${MASTERIP}"
+
+ if [ ! -d ${MASTERCONFIG} ]; then
+ einfo "No ${MASTERCONFIG} around. Creating new..."
+ mkdir ${MASTERCONFIG}
+ chown ${USER}:${GROUP} ${MASTERCONFIG}
+ fi
+
+ start-stop-daemon \
+ --quiet --start --chuid ${USER}:${GROUP} \
+ --make-pidfile --pidfile %GAMES_STATEDIR%/run/sauerbraten/master.pid \
+ --background --exec %LIBEXECDIR%/sauer_master -- ${MASTERARGS}
+ eend $?
+}
+
+stop() {
+ [ $(echo ${RUNSERVER} | tr '[:upper:]' '[:lower:]') = "yes" ] && stop_server
+ [ $(echo ${RUNMASTER} | tr '[:upper:]' '[:lower:]') = "yes" ] && stop_master
+ true
+}
+
+stop_server() {
+ ebegin "Stopping Sauerbraten dedicated server"
+ start-stop-daemon --stop --retry 3 --pidfile %GAMES_STATEDIR%/run/sauerbraten/server.pid
+ eend $?
+}
+
+stop_master() {
+ ebegin "Stopping Sauerbraten master server"
+ start-stop-daemon --stop --retry 3 --pidfile %GAMES_STATEDIR%/run/sauerbraten/master.pid
+ eend $?
+}
+
+restart() {
+ svc_stop
+ svc_start
+}
diff --git a/games-fps/sauerbraten/sauerbraten-2010.07.28.ebuild b/games-fps/sauerbraten/sauerbraten-2010.07.28.ebuild
new file mode 100644
index 000000000000..556d1cf18241
--- /dev/null
+++ b/games-fps/sauerbraten/sauerbraten-2010.07.28.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/games-fps/sauerbraten/sauerbraten-2010.07.28.ebuild,v 1.1 2012/02/08 02:01:36 mr_bones_ Exp $
+
+EAPI=2
+inherit eutils flag-o-matic games
+
+EDITION="justice_edition"
+DESCRIPTION="Cube 2: Sauerbraten is an open source game engine (Cube 2) with freeware game data (Sauerbraten)"
+HOMEPAGE="http://sauerbraten.org/"
+SRC_URI="mirror://sourceforge/sauerbraten/2010_07_19/sauerbraten_${PV//./_}_${EDITION}_linux.tar.bz2"
+
+LICENSE="ZLIB freedist"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug dedicated"
+
+DEPEND="
+ sys-libs/zlib
+ net-libs/enet:1.3
+ !dedicated? (
+ media-libs/libsdl[X,opengl]
+ media-libs/sdl-mixer[vorbis]
+ media-libs/sdl-image[png,jpeg]
+ virtual/opengl
+ virtual/glu )"
+
+S=${WORKDIR}/${PN}
+
+src_prepare() {
+ ecvs_clean
+ rm -rf sauerbraten_unix bin_unix src/{include,lib,vcpp}
+
+ # Patch makefile to use system enet instead of bundled
+ epatch "${FILESDIR}"/${P}-system-enet.patch
+
+ # Fix links so they point to the correct directory
+ sed -i \
+ -e 's:docs/::' \
+ README.html \
+ || die "sed failed"
+ # Honor CXXFLAGS and LDFLAGS
+ sed -i \
+ -e 's/[[:space:]]*$//' \
+ -e '/^CXXFLAGS=/d' \
+ -e '/-o .*LIBS/s/$/ $(LDFLAGS)/' \
+ src/Makefile \
+ || die "sed failed"
+}
+
+src_compile() {
+ use debug && append-flags "-D_DEBUG"
+ emake -C src master server $(use dedicated || echo client) \
+ || die "emake failed"
+}
+
+src_install() {
+ local LIBEXECDIR="${GAMES_PREFIX}/lib"
+ local DATADIR="${GAMES_DATADIR}/${PN}"
+ local STATEDIR="${GAMES_STATEDIR}/${PN}"
+
+ if ! use dedicated ; then
+ # Install the game data
+ insinto "${DATADIR}"
+ doins -r data packages || die "doins -r failed"
+
+ # Install the client executable
+ exeinto "${LIBEXECDIR}"
+ doexe src/sauer_client || die "doexe failed"
+
+ # Install the client wrapper
+ games_make_wrapper "${PN}-client" "${LIBEXECDIR}/sauer_client -q\$HOME/.${PN} -r" "${DATADIR}"
+
+ # Create menu entry
+ insinto /usr/share/pixmaps
+ newicon data/cube.png ${PN}.png
+ make_desktop_entry "${PN}-client" "Cube 2: Sauerbraten"
+ fi
+
+ # Install the server config files
+ insinto "${STATEDIR}"
+ doins "server-init.cfg" || die "doins failed"
+
+ # Install the server executables
+ exeinto "${LIBEXECDIR}"
+ doexe src/sauer_{server,master} || die "doexe failed"
+
+ games_make_wrapper "${PN}-server" \
+ "${LIBEXECDIR}/sauer_server -k${DATADIR} -q${STATEDIR}"
+ games_make_wrapper "${PN}-master" \
+ "${LIBEXECDIR}/sauer_master ${STATEDIR}"
+
+ # Install the server init script
+ keepdir "${GAMES_STATEDIR}/run/${PN}"
+ cp "${FILESDIR}"/${PN}.init "${T}"
+ sed -i \
+ -e "s:%SYSCONFDIR%:${SYSCONFDIR}:g" \
+ -e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \
+ -e "s:%GAMES_STATEDIR%:${GAMES_STATEDIR}:g" \
+ "${T}"/${PN}.init || die "sed failed"
+ newinitd "${T}"/${PN}.init ${PN} || die "newinitd failed"
+ cp "${FILESDIR}"/${PN}.conf "${T}"
+ sed -i \
+ -e "s:%SYSCONFDIR%:${SYSCONFDIR}:g" \
+ -e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \
+ -e "s:%GAMES_USER_DED%:${GAMES_USER_DED}:g" \
+ -e "s:%GAMES_GROUP%:${GAMES_GROUP}:g" \
+ "${T}"/${PN}.conf || die "sed failed"
+ newconfd "${T}"/${PN}.conf ${PN} || die "newconfd failed"
+
+ dodoc src/*.txt docs/dev/*.txt
+ dohtml -r README.html docs/*
+
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+
+ elog "If you plan to use map editor feature copy all map data from ${DATADIR}"
+ elog "to corresponding folder in your HOME/.${PN}"
+}