diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2016-01-15 23:31:38 -0500 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2016-01-15 23:32:04 -0500 |
commit | 488a1a1054d7868a155381da4143a5d909716e94 (patch) | |
tree | 220f1cef8e4bfc5f8b50334ba320039c645d6ce1 /games-fps/sauerbraten | |
parent | Merge remote-tracking branch 'remotes/atlaua/aranea/nethack' (diff) | |
download | gentoo-488a1a1054d7868a155381da4143a5d909716e94.tar.gz gentoo-488a1a1054d7868a155381da4143a5d909716e94.tar.bz2 gentoo-488a1a1054d7868a155381da4143a5d909716e94.zip |
games-fps/sauerbraten: version bump
Package-Manager: portage-2.2.26
Diffstat (limited to 'games-fps/sauerbraten')
4 files changed, 239 insertions, 0 deletions
diff --git a/games-fps/sauerbraten/Manifest b/games-fps/sauerbraten/Manifest index 743dd098398b..b55ec8496c0e 100644 --- a/games-fps/sauerbraten/Manifest +++ b/games-fps/sauerbraten/Manifest @@ -1 +1,2 @@ DIST sauerbraten_2013_01_04_collect_edition_linux.tar.bz2 589939261 SHA256 3ecc27c318125883763130e45805eb7ba3a426234e5766ab0d00522f4a437bd1 SHA512 f89c9e69bb69596829661f551e4b63b2f2af96a01f075cb94a80e2bfae4f8664b7dab8f4850b91499817240e0311b64b049ea985c761ff7bb6d39ed75e6198cd WHIRLPOOL d10e354942180064ab44a2f8c8b13819240fde3537825908768d1ddda24f600971641b8a9cee4abee9539ec912bf265cb1771c001ad81a33e287c99e0f6906b8 +DIST sauerbraten_2013_02_03_collect_edition_linux.tar.bz2 589941180 SHA256 45c20521e3e56374490b2d9112a211538e801cf0161197f35476b30b7b58a78e SHA512 7864e346cc2bc86d78973db1b341fd8256cc2e1953be51263ef91a5374f9ec00276ba2940850e6d5bba7a57c71190b670dc7ba97021be2935c31f8694fed4897 WHIRLPOOL 47a21e233dc90b5284027dbe47d13e891a434e0e550c6102a456e6300e6d5f9daba23c27fc100428161641ba276fa13faac12b935ac590a108c516b9b7987f4e diff --git a/games-fps/sauerbraten/files/sauerbraten-2013.02.03-QA.patch b/games-fps/sauerbraten/files/sauerbraten-2013.02.03-QA.patch new file mode 100644 index 000000000000..21f1b13c7a2a --- /dev/null +++ b/games-fps/sauerbraten/files/sauerbraten-2013.02.03-QA.patch @@ -0,0 +1,50 @@ +applied on top of sauerbraten-2013.01.04-system-enet.patch + +respect LDFLAGS, CXXFLAGS and CPPFLAGS +--- sauerbraten/src/Makefile ++++ sauerbraten/src/Makefile +@@ -1,4 +1,4 @@ +-CXXFLAGS= -O3 -fomit-frame-pointer ++CXXFLAGS ?= -O3 -fomit-frame-pointer + override CXXFLAGS+= -Wall -fsigned-char -fno-exceptions -fno-rtti + + PLATFORM= $(shell uname -s) +@@ -139,11 +139,11 @@ + -$(RM) $(CLIENT_PCH) $(CLIENT_OBJS) $(SERVER_OBJS) $(MASTER_OBJS) sauer_client sauer_server sauer_master + + %.h.gch: %.h +- $(CXX) $(CXXFLAGS) -o $(subst .h.gch,.tmp.h.gch,$@) $(subst .h.gch,.h,$@) ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $(subst .h.gch,.tmp.h.gch,$@) $(subst .h.gch,.h,$@) + $(MV) $(subst .h.gch,.tmp.h.gch,$@) $@ + + %-standalone.o: %.cpp +- $(CXX) $(CXXFLAGS) -c -o $@ $(subst -standalone.o,.cpp,$@) ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $(subst -standalone.o,.cpp,$@) + + $(CLIENT_OBJS): CXXFLAGS += $(CLIENT_INCLUDES) + $(filter shared/%,$(CLIENT_OBJS)): $(filter shared/%,$(CLIENT_PCH)) +@@ -168,19 +168,19 @@ + install: all + else + client: $(CLIENT_OBJS) +- $(CXX) $(CXXFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS) ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_client $(CLIENT_OBJS) $(CLIENT_LIBS) + + server: $(SERVER_OBJS) +- $(CXX) $(CXXFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS) ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_server $(SERVER_OBJS) $(SERVER_LIBS) + + master: $(MASTER_OBJS) +- $(CXX) $(CXXFLAGS) -o sauer_master $(MASTER_OBJS) $(MASTER_LIBS) ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o sauer_master $(MASTER_OBJS) $(MASTER_LIBS) + + shared/cube2font.o: shared/cube2font.c +- $(CXX) $(CXXFLAGS) -c -o $@ $< `freetype-config --cflags` ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< `freetype-config --cflags` + + cube2font: shared/cube2font.o +- $(CXX) $(CXXFLAGS) -o cube2font shared/cube2font.o `freetype-config --libs` -lz ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o cube2font shared/cube2font.o `freetype-config --libs` -lz + + install: all + cp sauer_client ../bin_unix/$(PLATFORM_PREFIX)_client diff --git a/games-fps/sauerbraten/files/sauerbraten-2013.02.03-system-enet.patch b/games-fps/sauerbraten/files/sauerbraten-2013.02.03-system-enet.patch new file mode 100644 index 000000000000..e87b280ba0c1 --- /dev/null +++ b/games-fps/sauerbraten/files/sauerbraten-2013.02.03-system-enet.patch @@ -0,0 +1,64 @@ +--- sauerbraten/src/Makefile ++++ sauerbraten/src/Makefile +@@ -4,7 +4,7 @@ + PLATFORM= $(shell uname -s) + PLATFORM_PREFIX= native + +-INCLUDES= -Ishared -Iengine -Ifpsgame -Ienet/include ++INCLUDES= -Ishared -Iengine -Ifpsgame + + STRIP= + ifeq (,$(findstring -g,$(CXXFLAGS))) +@@ -36,8 +36,8 @@ + endif + CLIENT_LIBS= -mwindows $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lSDL -lSDL_image -lSDL_mixer -lzlib1 -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 -lX11 `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL ++CLIENT_INCLUDES= $(INCLUDES) `sdl-config --cflags` ++CLIENT_LIBS= -lenet -lX11 `sdl-config --libs` -lSDL_image -lSDL_mixer -lz -lGL + endif + ifeq ($(PLATFORM),Linux) + CLIENT_LIBS+= -lrt +@@ -106,7 +106,7 @@ + MASTER_LIBS= $(STD_LIBS) -L$(WINBIN) -L$(WINLIB) -lzlib1 -lenet -lws2_32 -lwinmm + else + SERVER_INCLUDES= -DSTANDALONE $(INCLUDES) +-SERVER_LIBS= -Lenet/.libs -lenet -lz ++SERVER_LIBS= -lenet -lz + MASTER_LIBS= $(SERVER_LIBS) + endif + SERVER_OBJS= \ +@@ -135,15 +135,6 @@ + + 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 + +@@ -176,13 +167,13 @@ + + 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) $(MASTER_LIBS) + + shared/cube2font.o: shared/cube2font.c diff --git a/games-fps/sauerbraten/sauerbraten-2013.02.03.ebuild b/games-fps/sauerbraten/sauerbraten-2013.02.03.ebuild new file mode 100644 index 000000000000..bdde5080cbc8 --- /dev/null +++ b/games-fps/sauerbraten/sauerbraten-2013.02.03.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils flag-o-matic gnome2-utils games + +EDITION="collect_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/sauerbraten/2013_02_03/sauerbraten_${PV//./_}_${EDITION}_linux.tar.bz2" + +LICENSE="ZLIB freedist" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug dedicated server" + +RDEPEND=" + sys-libs/zlib + >=net-libs/enet-1.3.6:1.3 + !dedicated? ( + media-libs/libsdl[X,opengl] + media-libs/sdl-mixer[vorbis] + media-libs/sdl-image[png,jpeg] + virtual/opengl + virtual/glu + x11-libs/libX11 )" +DEPEND="${RDEPEND}" + +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 + # respect CXXFLAGS, LDFLAGS + epatch "${FILESDIR}"/${P}-{system-enet,QA}.patch + + # Fix links so they point to the correct directory + sed -i -e 's:docs/::' README.html || die +} + +src_compile() { + use debug && append-cppflags -D_DEBUG + emake -C src master $(usex dedicated "server" "$(usex server "server client" "client")") +} + +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 + + # Install the client executable + exeinto "${LIBEXECDIR}" + doexe src/sauer_client + + # Install the client wrapper + games_make_wrapper "${PN}-client" "${LIBEXECDIR}/sauer_client -q\$HOME/.${PN} -r" "${DATADIR}" + + # Create menu entry + newicon -s 256 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" + + # Install the server executables + exeinto "${LIBEXECDIR}" + doexe src/sauer_master + use dedicated || use server && doexe src/sauer_server + + 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}" || die + sed -i \ + -e "s:%SYSCONFDIR%:${STATEDIR}:g" \ + -e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \ + -e "s:%GAMES_STATEDIR%:${GAMES_STATEDIR}:g" \ + "${T}"/${PN}.init || die + newinitd "${T}"/${PN}.init ${PN} + cp "${FILESDIR}"/${PN}.conf "${T}" || die + sed -i \ + -e "s:%SYSCONFDIR%:${STATEDIR}: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 + newconfd "${T}"/${PN}.conf ${PN} + + dodoc src/*.txt docs/dev/*.txt + dohtml -r README.html docs/* + + prepgamesdirs +} + +pkg_preinst() { + games_pkg_preinst + gnome2_icon_savelist +} + +pkg_postinst() { + games_pkg_postinst + gnome2_icon_cache_update + + elog "If you plan to use map editor feature copy all map data from ${DATADIR}" + elog "to corresponding folder in your HOME/.${PN}" +} + +pkg_postrm() { + gnome2_icon_cache_update +} |