public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-fps/sauerbraten/files/, games-fps/sauerbraten/
@ 2016-01-16  4:40 Michael Sterrett
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Sterrett @ 2016-01-16  4:40 UTC (permalink / raw
  To: gentoo-commits

commit:     488a1a1054d7868a155381da4143a5d909716e94
Author:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 16 04:31:38 2016 +0000
Commit:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
CommitDate: Sat Jan 16 04:32:04 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=488a1a10

games-fps/sauerbraten: version bump

Package-Manager: portage-2.2.26

 games-fps/sauerbraten/Manifest                     |   1 +
 .../files/sauerbraten-2013.02.03-QA.patch          |  50 +++++++++
 .../files/sauerbraten-2013.02.03-system-enet.patch |  64 +++++++++++
 .../sauerbraten/sauerbraten-2013.02.03.ebuild      | 124 +++++++++++++++++++++
 4 files changed, 239 insertions(+)

diff --git a/games-fps/sauerbraten/Manifest b/games-fps/sauerbraten/Manifest
index 743dd09..b55ec84 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 0000000..21f1b13
--- /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 0000000..e87b280
--- /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 0000000..bdde508
--- /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
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-fps/sauerbraten/files/, games-fps/sauerbraten/
@ 2016-03-20 20:51 Michael Sterrett
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Sterrett @ 2016-03-20 20:51 UTC (permalink / raw
  To: gentoo-commits

commit:     84e670cbc4e2e88fb56dd880e614be989e98e19d
Author:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 20 20:49:45 2016 +0000
Commit:     Michael Sterrett <mr_bones_ <AT> gentoo <DOT> org>
CommitDate: Sun Mar 20 20:51:19 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84e670cb

games-fps/sauerbraten: clean old

Package-Manager: portage-2.2.26

 games-fps/sauerbraten/Manifest                     |   1 -
 .../files/sauerbraten-2013.01.04-QA.patch          |  50 ----
 .../files/sauerbraten-2013.01.04-master.patch      | 323 ---------------------
 .../files/sauerbraten-2013.01.04-system-enet.patch |  64 ----
 games-fps/sauerbraten/files/sauerbraten_unix.patch |  19 --
 .../sauerbraten/sauerbraten-2013.01.04.ebuild      | 127 --------
 6 files changed, 584 deletions(-)

diff --git a/games-fps/sauerbraten/Manifest b/games-fps/sauerbraten/Manifest
index b55ec84..9d42bde 100644
--- a/games-fps/sauerbraten/Manifest
+++ b/games-fps/sauerbraten/Manifest
@@ -1,2 +1 @@
-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.01.04-QA.patch b/games-fps/sauerbraten/files/sauerbraten-2013.01.04-QA.patch
deleted file mode 100644
index 21f1b13..0000000
--- a/games-fps/sauerbraten/files/sauerbraten-2013.01.04-QA.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-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.01.04-master.patch b/games-fps/sauerbraten/files/sauerbraten-2013.01.04-master.patch
deleted file mode 100644
index 730a69a..0000000
--- a/games-fps/sauerbraten/files/sauerbraten-2013.01.04-master.patch
+++ /dev/null
@@ -1,323 +0,0 @@
-http://sourceforge.net/p/sauerbraten/code/4699/
-
---- a/src/shared/iengine.h
-+++ b/src/shared/iengine.h
-@@ -415,23 +415,6 @@
- extern int getservermtu();
- extern int getnumclients();
- extern uint getclientip(int n);
--extern void putint(ucharbuf &p, int n);
--extern void putint(packetbuf &p, int n);
--extern void putint(vector<uchar> &p, int n);
--extern int getint(ucharbuf &p);
--extern void putuint(ucharbuf &p, int n);
--extern void putuint(packetbuf &p, int n);
--extern void putuint(vector<uchar> &p, int n);
--extern int getuint(ucharbuf &p);
--extern void putfloat(ucharbuf &p, float f);
--extern void putfloat(packetbuf &p, float f);
--extern void putfloat(vector<uchar> &p, float f);
--extern float getfloat(ucharbuf &p);
--extern void sendstring(const char *t, ucharbuf &p);
--extern void sendstring(const char *t, packetbuf &p);
--extern void sendstring(const char *t, vector<uchar> &p);
--extern void getstring(char *t, ucharbuf &p, int len = MAXTRANS);
--extern void filtertext(char *dst, const char *src, bool whitespace = true, int len = sizeof(string)-1);
- extern void localconnect();
- extern const char *disconnectreason(int reason);
- extern void disconnect_client(int n, int reason);
---- a/src/engine/server.cpp
-+++ b/src/engine/server.cpp
-@@ -99,125 +99,6 @@
-     va_end(args);
- }
- #endif
--
--// all network traffic is in 32bit ints, which are then compressed using the following simple scheme (assumes that most values are small).
--
--template<class T>
--static inline void putint_(T &p, int n)
--{
--    if(n<128 && n>-127) p.put(n);
--    else if(n<0x8000 && n>=-0x8000) { p.put(0x80); p.put(n); p.put(n>>8); }
--    else { p.put(0x81); p.put(n); p.put(n>>8); p.put(n>>16); p.put(n>>24); }
--}
--void putint(ucharbuf &p, int n) { putint_(p, n); }
--void putint(packetbuf &p, int n) { putint_(p, n); }
--void putint(vector<uchar> &p, int n) { putint_(p, n); }
--
--int getint(ucharbuf &p)
--{
--    int c = (char)p.get();
--    if(c==-128) { int n = p.get(); n |= char(p.get())<<8; return n; }
--    else if(c==-127) { int n = p.get(); n |= p.get()<<8; n |= p.get()<<16; return n|(p.get()<<24); } 
--    else return c;
--}
--
--// much smaller encoding for unsigned integers up to 28 bits, but can handle signed
--template<class T>
--static inline void putuint_(T &p, int n)
--{
--    if(n < 0 || n >= (1<<21))
--    {
--        p.put(0x80 | (n & 0x7F));
--        p.put(0x80 | ((n >> 7) & 0x7F));
--        p.put(0x80 | ((n >> 14) & 0x7F));
--        p.put(n >> 21);
--    }
--    else if(n < (1<<7)) p.put(n);
--    else if(n < (1<<14))
--    {
--        p.put(0x80 | (n & 0x7F));
--        p.put(n >> 7);
--    }
--    else 
--    { 
--        p.put(0x80 | (n & 0x7F)); 
--        p.put(0x80 | ((n >> 7) & 0x7F));
--        p.put(n >> 14); 
--    }
--}
--void putuint(ucharbuf &p, int n) { putuint_(p, n); }
--void putuint(packetbuf &p, int n) { putuint_(p, n); }
--void putuint(vector<uchar> &p, int n) { putuint_(p, n); }
--
--int getuint(ucharbuf &p)
--{
--    int n = p.get();
--    if(n & 0x80)
--    {
--        n += (p.get() << 7) - 0x80;
--        if(n & (1<<14)) n += (p.get() << 14) - (1<<14);
--        if(n & (1<<21)) n += (p.get() << 21) - (1<<21);
--        if(n & (1<<28)) n |= -1<<28;
--    }
--    return n;
--}
--
--template<class T>
--static inline void putfloat_(T &p, float f)
--{
--    lilswap(&f, 1);
--    p.put((uchar *)&f, sizeof(float));
--}
--void putfloat(ucharbuf &p, float f) { putfloat_(p, f); }
--void putfloat(packetbuf &p, float f) { putfloat_(p, f); }
--void putfloat(vector<uchar> &p, float f) { putfloat_(p, f); }
--
--float getfloat(ucharbuf &p)
--{
--    float f;
--    p.get((uchar *)&f, sizeof(float));
--    return lilswap(f);
--}
--
--template<class T>
--static inline void sendstring_(const char *t, T &p)
--{
--    while(*t) putint(p, *t++);
--    putint(p, 0);
--}
--void sendstring(const char *t, ucharbuf &p) { sendstring_(t, p); }
--void sendstring(const char *t, packetbuf &p) { sendstring_(t, p); }
--void sendstring(const char *t, vector<uchar> &p) { sendstring_(t, p); }
--
--void getstring(char *text, ucharbuf &p, int len)
--{
--    char *t = text;
--    do
--    {
--        if(t>=&text[len]) { text[len-1] = 0; return; }
--        if(!p.remaining()) { *t = 0; return; } 
--        *t = getint(p);
--    }
--    while(*t++);
--}
--
--void filtertext(char *dst, const char *src, bool whitespace, int len)
--{
--    for(int c = uchar(*src); c; c = uchar(*++src))
--    {
--        if(c == '\f')
--        {
--            if(!*++src) break;
--            continue;
--        }
--        if(iscubeprint(c) || (iscubespace(c) && whitespace))
--        {
--            *dst++ = c;
--            if(!--len) break;
--        }
--    }
--    *dst = '\0';
--}
- 
- enum { ST_EMPTY, ST_LOCAL, ST_TCPIP };
- 
---- a/src/shared/tools.h
-+++ b/src/shared/tools.h
-@@ -1178,5 +1178,24 @@
- extern uint randomMT();
- extern int guessnumcpus();
- 
--#endif
--
-+extern void putint(ucharbuf &p, int n);
-+extern void putint(packetbuf &p, int n);
-+extern void putint(vector<uchar> &p, int n);
-+extern int getint(ucharbuf &p);
-+extern void putuint(ucharbuf &p, int n);
-+extern void putuint(packetbuf &p, int n);
-+extern void putuint(vector<uchar> &p, int n);
-+extern int getuint(ucharbuf &p);
-+extern void putfloat(ucharbuf &p, float f);
-+extern void putfloat(packetbuf &p, float f);
-+extern void putfloat(vector<uchar> &p, float f);
-+extern float getfloat(ucharbuf &p);
-+extern void sendstring(const char *t, ucharbuf &p);
-+extern void sendstring(const char *t, packetbuf &p);
-+extern void sendstring(const char *t, vector<uchar> &p);
-+extern void getstring(char *t, ucharbuf &p, int len);
-+template<class T, size_t N> static inline void getstring(T (&t)[N], ucharbuf &p) { getstring(t, p, N); } 
-+extern void filtertext(char *dst, const char *src, bool whitespace = true, int len = sizeof(string)-1);
-+
-+#endif
-+
---- a/src/engine/master.cpp
-+++ b/src/engine/master.cpp
-@@ -514,7 +514,7 @@
-     authreq &a = c.authreqs.add();
-     a.reqtime = servtime;
-     a.id = id;
--    uint seed[3] = { starttime, servtime, randomMT() };
-+    uint seed[3] = { uint(starttime), servtime, randomMT() };
-     static vector<char> buf;
-     buf.setsize(0);
-     a.answer = genchallenge(u->pubkey, seed, sizeof(seed), buf);
---- a/src/shared/tools.cpp
-+++ b/src/shared/tools.cpp
-@@ -53,3 +53,124 @@
-     return y;
- }
- 
-+///////////////////////// network ///////////////////////
-+
-+// all network traffic is in 32bit ints, which are then compressed using the following simple scheme (assumes that most values are small).
-+
-+template<class T>
-+static inline void putint_(T &p, int n)
-+{
-+    if(n<128 && n>-127) p.put(n);
-+    else if(n<0x8000 && n>=-0x8000) { p.put(0x80); p.put(n); p.put(n>>8); }
-+    else { p.put(0x81); p.put(n); p.put(n>>8); p.put(n>>16); p.put(n>>24); }
-+}
-+void putint(ucharbuf &p, int n) { putint_(p, n); }
-+void putint(packetbuf &p, int n) { putint_(p, n); }
-+void putint(vector<uchar> &p, int n) { putint_(p, n); }
-+
-+int getint(ucharbuf &p)
-+{
-+    int c = (char)p.get();
-+    if(c==-128) { int n = p.get(); n |= char(p.get())<<8; return n; }
-+    else if(c==-127) { int n = p.get(); n |= p.get()<<8; n |= p.get()<<16; return n|(p.get()<<24); }
-+    else return c;
-+}
-+
-+// much smaller encoding for unsigned integers up to 28 bits, but can handle signed
-+template<class T>
-+static inline void putuint_(T &p, int n)
-+{
-+    if(n < 0 || n >= (1<<21))
-+    {
-+        p.put(0x80 | (n & 0x7F));
-+        p.put(0x80 | ((n >> 7) & 0x7F));
-+        p.put(0x80 | ((n >> 14) & 0x7F));
-+        p.put(n >> 21);
-+    }
-+    else if(n < (1<<7)) p.put(n);
-+    else if(n < (1<<14))
-+    {
-+        p.put(0x80 | (n & 0x7F));
-+        p.put(n >> 7);
-+    }
-+    else
-+    {
-+        p.put(0x80 | (n & 0x7F));
-+        p.put(0x80 | ((n >> 7) & 0x7F));
-+        p.put(n >> 14);
-+    }
-+}
-+void putuint(ucharbuf &p, int n) { putuint_(p, n); }
-+void putuint(packetbuf &p, int n) { putuint_(p, n); }
-+void putuint(vector<uchar> &p, int n) { putuint_(p, n); }
-+
-+int getuint(ucharbuf &p)
-+{
-+    int n = p.get();
-+    if(n & 0x80)
-+    {
-+        n += (p.get() << 7) - 0x80;
-+        if(n & (1<<14)) n += (p.get() << 14) - (1<<14);
-+        if(n & (1<<21)) n += (p.get() << 21) - (1<<21);
-+        if(n & (1<<28)) n |= -1<<28;
-+    }
-+    return n;
-+}
-+
-+template<class T>
-+static inline void putfloat_(T &p, float f)
-+{
-+    lilswap(&f, 1);
-+    p.put((uchar *)&f, sizeof(float));
-+}
-+void putfloat(ucharbuf &p, float f) { putfloat_(p, f); }
-+void putfloat(packetbuf &p, float f) { putfloat_(p, f); }
-+void putfloat(vector<uchar> &p, float f) { putfloat_(p, f); }
-+
-+float getfloat(ucharbuf &p)
-+{
-+    float f;
-+    p.get((uchar *)&f, sizeof(float));
-+    return lilswap(f);
-+}
-+
-+template<class T>
-+static inline void sendstring_(const char *t, T &p)
-+{
-+    while(*t) putint(p, *t++);
-+    putint(p, 0);
-+}
-+void sendstring(const char *t, ucharbuf &p) { sendstring_(t, p); }
-+void sendstring(const char *t, packetbuf &p) { sendstring_(t, p); }
-+void sendstring(const char *t, vector<uchar> &p) { sendstring_(t, p); }
-+
-+void getstring(char *text, ucharbuf &p, int len)
-+{
-+    char *t = text;
-+    do
-+    {
-+        if(t>=&text[len]) { text[len-1] = 0; return; }
-+        if(!p.remaining()) { *t = 0; return; }
-+        *t = getint(p);
-+    }
-+    while(*t++);
-+}
-+
-+void filtertext(char *dst, const char *src, bool whitespace, int len)
-+{
-+    for(int c = uchar(*src); c; c = uchar(*++src))
-+    {
-+        if(c == '\f')
-+        {
-+            if(!*++src) break;
-+            continue;
-+        }
-+        if(iscubeprint(c) || (iscubespace(c) && whitespace))
-+        {
-+            *dst++ = c;
-+            if(!--len) break;
-+        }
-+    }
-+    *dst = '\0';
-+}
-+

diff --git a/games-fps/sauerbraten/files/sauerbraten-2013.01.04-system-enet.patch b/games-fps/sauerbraten/files/sauerbraten-2013.01.04-system-enet.patch
deleted file mode 100644
index e87b280..0000000
--- a/games-fps/sauerbraten/files/sauerbraten-2013.01.04-system-enet.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- 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/files/sauerbraten_unix.patch b/games-fps/sauerbraten/files/sauerbraten_unix.patch
deleted file mode 100644
index db2a032..0000000
--- a/games-fps/sauerbraten/files/sauerbraten_unix.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- sauerbraten_unix.orig	2008-08-15 20:05:44.000000000 +0200
-+++ sauerbraten_unix	2008-08-15 22:49:47.000000000 +0200
-@@ -3,6 +3,7 @@
- #SAUER_DIR=~/sauerbraten
- #SAUER_DIR=/usr/local/sauerbraten
- SAUER_DIR=.
-+SAUER_DATADIR=.
- 
- # SAUER_OPTIONS contains any command line options you would like to start Sauerbraten with.
- #SAUER_OPTIONS="-f"
-@@ -46,7 +47,7 @@
- 
- if [ -x ${SAUER_DIR}/bin_unix/${MACHINE_NAME}${SYSTEM_NAME}client ]
- then
--  cd ${SAUER_DIR}
-+  cd ${SAUER_DATADIR}
-   exec ${SAUER_DIR}/bin_unix/${MACHINE_NAME}${SYSTEM_NAME}client ${SAUER_OPTIONS} $@
- else
-   echo "Your platform does not have a pre-compiled Sauerbraten client."

diff --git a/games-fps/sauerbraten/sauerbraten-2013.01.04.ebuild b/games-fps/sauerbraten/sauerbraten-2013.01.04.ebuild
deleted file mode 100644
index 053d913..0000000
--- a/games-fps/sauerbraten/sauerbraten-2013.01.04.ebuild
+++ /dev/null
@@ -1,127 +0,0 @@
-# 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_01_04/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,master}.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
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-fps/sauerbraten/files/, games-fps/sauerbraten/
@ 2021-09-12 21:12 Ionen Wolkens
  0 siblings, 0 replies; 4+ messages in thread
From: Ionen Wolkens @ 2021-09-12 21:12 UTC (permalink / raw
  To: gentoo-commits

commit:     a4d3875e8b6ffeb9694408b3788fb26616134d41
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 12 20:58:43 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sun Sep 12 21:07:35 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4d3875e

games-fps/sauerbraten: drop 2013.02.03-r2

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 games-fps/sauerbraten/Manifest                     |   1 -
 .../files/sauerbraten-2013.02.03-QA.patch          |  50 --------
 .../files/sauerbraten-2013.02.03-system-enet.patch |  64 ----------
 .../sauerbraten/sauerbraten-2013.02.03-r2.ebuild   | 134 ---------------------
 4 files changed, 249 deletions(-)

diff --git a/games-fps/sauerbraten/Manifest b/games-fps/sauerbraten/Manifest
index 758332c2c9b..71010ab94cf 100644
--- a/games-fps/sauerbraten/Manifest
+++ b/games-fps/sauerbraten/Manifest
@@ -1,2 +1 @@
-DIST sauerbraten_2013_02_03_collect_edition_linux.tar.bz2 589941180 BLAKE2B b8a1c929dcf7a32bc289262fffcbcd4e7bbab3a9030c12bce7d086d63aaddee0c573c5d38f9ac845b3080aeac38d1b548aa9d243b462c3c682b158a379fe8cc2 SHA512 7864e346cc2bc86d78973db1b341fd8256cc2e1953be51263ef91a5374f9ec00276ba2940850e6d5bba7a57c71190b670dc7ba97021be2935c31f8694fed4897
 DIST sauerbraten_2020_12_27_linux.tar.bz2 985815649 BLAKE2B 4ec9caf705766aed76153a8631b1990c6432db8c816d579e891263b36adf0e7ed4831d2fee010b7692f6457989c0acea552f72c95e0924e97182d2a03dc947f2 SHA512 60487e0493478b9dd8940a9239834d8f3f6b6ca529f3c5b718f91caf5116073942ca6908d7fff26ab37b7ec590114ab07f24cdcea5c355288d3c2706d626ea28

diff --git a/games-fps/sauerbraten/files/sauerbraten-2013.02.03-QA.patch b/games-fps/sauerbraten/files/sauerbraten-2013.02.03-QA.patch
deleted file mode 100644
index 21f1b13c7a2..00000000000
--- a/games-fps/sauerbraten/files/sauerbraten-2013.02.03-QA.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-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
deleted file mode 100644
index e87b280ba0c..00000000000
--- a/games-fps/sauerbraten/files/sauerbraten-2013.02.03-system-enet.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- 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-r2.ebuild b/games-fps/sauerbraten/sauerbraten-2013.02.03-r2.ebuild
deleted file mode 100644
index c2efbc863d5..00000000000
--- a/games-fps/sauerbraten/sauerbraten-2013.02.03-r2.ebuild
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit desktop flag-o-matic gnome2-utils toolchain-funcs vcs-clean wrapper
-
-EDITION="collect_edition"
-DESCRIPTION="Sauerbraten is a FOSS 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"
-S="${WORKDIR}"/${PN}
-
-LICENSE="ZLIB freedist"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug dedicated server"
-
-DEPEND="
-	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
-	)
-"
-RDEPEND="
-	${DEPEND}
-	acct-group/sauerbraten
-	dedicated? ( acct-user/sauerbraten )
-"
-
-PATCHES=(
-	# Patch makefile to use system enet instead of bundled
-	# respect CXXFLAGS, LDFLAGS
-	"${FILESDIR}"/${P}-{system-enet,QA}.patch
-)
-
-src_prepare() {
-	ecvs_clean
-	rm -rf sauerbraten_unix bin_unix src/{include,lib,vcpp} || die
-
-	default
-
-	# Fix links so they point to the correct directory
-	sed -i -e 's:docs/::' README.html || die
-}
-
-src_compile() {
-	tc-export CXX
-
-	use debug && append-cppflags -D_DEBUG
-	emake -C src master $(usex dedicated "server" "$(usex server "server client" "client")")
-}
-
-src_install() {
-	local LIBEXECDIR="/usr/lib"
-	local DATADIR="/usr/share/${PN}"
-	local STATEDIR="/var/lib/${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
-		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
-
-	make_wrapper "${PN}-server" \
-		"${LIBEXECDIR}/sauer_server -k${DATADIR} -q${STATEDIR}"
-	make_wrapper "${PN}-master" \
-		"${LIBEXECDIR}/sauer_master ${STATEDIR}"
-
-	# Install the server init script
-	keepdir /var/run/${PN}
-	cp "${FILESDIR}"/${PN}.init "${T}" || die
-	sed -i \
-		-e "s:%SYSCONFDIR%:${STATEDIR}:g" \
-		-e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \
-		-e "s:%/var/lib/%:/var/run: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%:sauerbraten:g" \
-		-e "s:%GAMES_GROUP%:sauerbraten:g" \
-		"${T}"/${PN}.conf || die
-	newconfd "${T}"/${PN}.conf ${PN}
-
-	dodoc src/*.txt docs/dev/*.txt
-
-	docinto html
-	dodoc -r README.html docs/*
-}
-
-pkg_preinst() {
-	gnome2_icon_savelist
-}
-
-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
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: games-fps/sauerbraten/files/, games-fps/sauerbraten/
@ 2024-12-01 12:04 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2024-12-01 12:04 UTC (permalink / raw
  To: gentoo-commits

commit:     b92c9b47d01df903203d0a4e8bd0ba5449a6a3af
Author:     Abdelrahman Sarhan <abdulrahmanayman1 <AT> gmail <DOT> com>
AuthorDate: Fri Nov  8 11:34:39 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec  1 11:58:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b92c9b47

games-fps/sauerbraten: add 2020.12.29

Signed-off-by: Abdelrahman Sarhan <abdulrahmanayman1 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-fps/sauerbraten/Manifest                     |   1 +
 .../files/sauerbraten-2020.12.29-includefix.patch  |  39 ++++++
 .../sauerbraten/sauerbraten-2020.12.29.ebuild      | 139 +++++++++++++++++++++
 3 files changed, 179 insertions(+)

diff --git a/games-fps/sauerbraten/Manifest b/games-fps/sauerbraten/Manifest
index 71010ab94cfb..fb486684527d 100644
--- a/games-fps/sauerbraten/Manifest
+++ b/games-fps/sauerbraten/Manifest
@@ -1 +1,2 @@
 DIST sauerbraten_2020_12_27_linux.tar.bz2 985815649 BLAKE2B 4ec9caf705766aed76153a8631b1990c6432db8c816d579e891263b36adf0e7ed4831d2fee010b7692f6457989c0acea552f72c95e0924e97182d2a03dc947f2 SHA512 60487e0493478b9dd8940a9239834d8f3f6b6ca529f3c5b718f91caf5116073942ca6908d7fff26ab37b7ec590114ab07f24cdcea5c355288d3c2706d626ea28
+DIST sauerbraten_2020_12_29_linux.tar.bz2 985823440 BLAKE2B 8d3cb9a26b65fecd6596211af58504cf8a2f5f95486785e15fb2faa8398046d80f7548727dff96683a1d6dcd713ec175bbd9ca47852a8c88d872d954d02ab2c0 SHA512 fd2106e4ed3d48352b5cc2f9d4037933a486e6200ef89bf9e3f31952f4a27ef565f7740d45c32bb9b22da0e17e6542257169134f216bc51a6a465ff311f9bae9

diff --git a/games-fps/sauerbraten/files/sauerbraten-2020.12.29-includefix.patch b/games-fps/sauerbraten/files/sauerbraten-2020.12.29-includefix.patch
new file mode 100644
index 000000000000..422d6b1b3963
--- /dev/null
+++ b/games-fps/sauerbraten/files/sauerbraten-2020.12.29-includefix.patch
@@ -0,0 +1,39 @@
+diff --git a/movie.cpp b/movie.cpp
+index 25cb491..7f7536c 100644
+--- a/src/engine/movie.cpp
++++ b/src/engine/movie.cpp
+@@ -8,7 +8,7 @@
+ //   kino - ok
+ 
+ #include "engine.h"
+-#include "SDL_mixer.h"
++#include <SDL2/SDL_mixer.h>
+ 
+ VAR(dbgmovie, 0, 0, 1);
+ 
+diff --git a/sound.cpp b/sound.cpp
+index 38ff025..a0ed5db 100644
+--- a/src/engine/sound.cpp
++++ b/src/engine/sound.cpp
+@@ -1,7 +1,7 @@
+ // sound.cpp: basic positional sound using sdl_mixer
+ 
+ #include "engine.h"
+-#include "SDL_mixer.h"
++#include <SDL2/SDL_mixer.h>
+ 
+ bool nosound = true;
+ 
+diff --git a/texture.cpp b/texture.cpp
+index 964d39d..f76b9b1 100644
+--- a/src/engine/texture.cpp
++++ b/src/engine/texture.cpp
+@@ -1,7 +1,7 @@
+ // texture.cpp: texture slot management
+ 
+ #include "engine.h"
+-#include "SDL_image.h"
++#include <SDL2/SDL_image.h>
+ 
+ #ifndef SDL_IMAGE_VERSION_ATLEAST
+ #define SDL_IMAGE_VERSION_ATLEAST(X, Y, Z) \

diff --git a/games-fps/sauerbraten/sauerbraten-2020.12.29.ebuild b/games-fps/sauerbraten/sauerbraten-2020.12.29.ebuild
new file mode 100644
index 000000000000..ca0be0265bc5
--- /dev/null
+++ b/games-fps/sauerbraten/sauerbraten-2020.12.29.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit desktop flag-o-matic toolchain-funcs wrapper xdg
+
+DESCRIPTION="Sauerbraten is a FOSS game engine (Cube 2) with freeware game data (Sauerbraten)"
+HOMEPAGE="http://sauerbraten.org/"
+SRC_URI="https://downloads.sourceforge.net/sauerbraten/sauerbraten/2020_11_29/sauerbraten_${PV//./_}_linux.tar.bz2"
+S="${WORKDIR}"/${PN}
+
+LICENSE="ZLIB freedist"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug dedicated server"
+
+DEPEND="
+	>=net-libs/enet-1.3.6:1.3
+	sys-libs/zlib
+	!dedicated? (
+		media-libs/libsdl2[X,opengl]
+		media-libs/sdl2-image
+		media-libs/sdl2-mixer
+		virtual/opengl
+		virtual/glu
+		x11-libs/libX11
+	)
+"
+RDEPEND="
+	${DEPEND}
+	acct-group/sauerbraten
+	dedicated? ( acct-user/sauerbraten )
+"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+	# Respect CXXFLAGS, LDFLAGS
+	"${FILESDIR}"/${PN}-2020.12.27-respect-FLAGS-don-t-strip-symbols.patch
+
+	# Patch Makefile to use system enet instead of bundled
+	"${FILESDIR}"/${PN}-2020.12.27-unbundle-enet.patch
+
+	# Don't use freetype-config, it's obsolete
+	"${FILESDIR}"/${PN}-2020.12.27-use-pkg-config-for-freetype2.patch
+	# More sensible ways of including SDL_mixer and SDL_image. Game doesn't build w/o this.
+	"${FILESDIR}"/${PN}-2020.12.29-includefix.patch
+)
+
+src_prepare() {
+	rm -rf sauerbraten_unix bin_unix src/{include,lib,vcpp} || die
+
+	default
+
+	# Fix links so they point to the correct directory
+	sed -i -e 's:docs/::' README.html || die
+}
+
+src_compile() {
+	tc-export CXX PKG_CONFIG
+
+	if use debug ; then
+		append-cppflags -D_DEBUG
+	fi
+
+	emake -C src \
+		master \
+		$(usex dedicated "server" "$(usex server "server client" "client")")
+}
+
+src_install() {
+	local LIBEXECDIR="/usr/lib"
+	local DATADIR="/usr/share/${PN}"
+	local STATEDIR="/var/lib/${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
+		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
+
+	if use dedicated || use server ; then
+		doexe src/sauer_server
+	fi
+
+	make_wrapper "${PN}-server" \
+		"${LIBEXECDIR}/sauer_server -k${DATADIR} -q${STATEDIR}"
+	make_wrapper "${PN}-master" \
+		"${LIBEXECDIR}/sauer_master ${STATEDIR}"
+
+	# Install the server init script
+	cp "${FILESDIR}"/${PN}.init "${T}" || die
+	sed -i \
+		-e "s:%SYSCONFDIR%:${STATEDIR}:g" \
+		-e "s:%LIBEXECDIR%:${LIBEXECDIR}:g" \
+		-e "s:%/var/lib/%:/var/run: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%:sauerbraten:g" \
+		-e "s:%GAMES_GROUP%:sauerbraten:g" \
+		"${T}"/${PN}.conf || die
+	newconfd "${T}"/${PN}.conf ${PN}
+
+	dodoc src/*.txt docs/dev/*.txt
+
+	docinto html
+	dodoc -r README.html docs/*
+}
+
+pkg_postinst() {
+	xdg_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}"
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-01 12:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-20 20:51 [gentoo-commits] repo/gentoo:master commit in: games-fps/sauerbraten/files/, games-fps/sauerbraten/ Michael Sterrett
  -- strict thread matches above, loose matches on Subject: below --
2024-12-01 12:04 Sam James
2021-09-12 21:12 Ionen Wolkens
2016-01-16  4:40 Michael Sterrett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox