summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2020-07-17 21:31:24 +0000
committerSam James <sam@gentoo.org>2020-07-17 23:59:59 +0000
commita9e74fa9c10625e66021aa729889d6b418754c9d (patch)
tree3d8d657e55796ed59ec85eaec15a01535a6b41cc /games-action
parentdev-libs/freexl: security cleanup (diff)
downloadgentoo-a9e74fa9c10625e66021aa729889d6b418754c9d.tar.gz
gentoo-a9e74fa9c10625e66021aa729889d6b418754c9d.tar.bz2
gentoo-a9e74fa9c10625e66021aa729889d6b418754c9d.zip
games-action/teeworlds: security cleanup
Bug: https://bugs.gentoo.org/683000 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'games-action')
-rw-r--r--games-action/teeworlds/Manifest1
-rw-r--r--games-action/teeworlds/files/0.6/01-use-system-wavpack.patch101
-rw-r--r--games-action/teeworlds/files/0.6/02-fixed-wavpack-sound-loading.patch109
-rw-r--r--games-action/teeworlds/files/0.6/03-use-system-pnglite.patch160
-rw-r--r--games-action/teeworlds/files/0.6/04-dedicated.patch15
-rw-r--r--games-action/teeworlds/files/0.6/05-cc-cflags.patch18
-rw-r--r--games-action/teeworlds/teeworlds-0.6.4.ebuild118
7 files changed, 0 insertions, 522 deletions
diff --git a/games-action/teeworlds/Manifest b/games-action/teeworlds/Manifest
index 6b9d796adb21..08b8c1c89d4f 100644
--- a/games-action/teeworlds/Manifest
+++ b/games-action/teeworlds/Manifest
@@ -1,4 +1,3 @@
-DIST teeworlds-0.6.4-src.tar.gz 8771622 BLAKE2B 14493fcad458b0e1c749e40bdd6a5a858704bf971d53d11782d52fbe9b5fe2a09235dcac25340e51a3330001d46ee512f2971e8db06eb9f51eec5e6b3cd2a328 SHA512 7546ee358a2126339f6c727bb7b5f49009a8fad0b5e77a796202cba4d8fc5dfcaf79b7e65151d85fead2a70ad61ef3e1888b8c07fe0206f87575d5dd8c9f91ce
DIST teeworlds-0.7.5-maps.tar.gz 151689 BLAKE2B f8ffbb6a024755bb972955a8c7d277709e17021c0554be0e2803e8c1b4848f5dca6d91b9f7f4e0731766745878c1143d27be3fa8aede01ff9cc69ac557ca70a8 SHA512 74084e169c1870cd541f5bb719c209210227055d304b3ce22fbad3d32d24b3356fbdec8d948edf3aa582270a8b0db7dec41e4924401f8398f7d5feba5ded49b3
DIST teeworlds-0.7.5-translation.tar.gz 169121 BLAKE2B 1c649392385abf8e00d8c9e64ca7eaaa5af5848878566081cda83c7d78c417652137e7285d16038f302a6fdf94eb3993c506886d4cc1359694d534c7be5ea925 SHA512 41c69cd9e9290857b44be18f89ab9f3a7ccd6804757332966b973aec3a9e6fd5a40d323696a044a724228b2bb67b097311fa8c24fdec226eecb7a27c2da559dc
DIST teeworlds-0.7.5.tar.gz 8654985 BLAKE2B ebeb9aa1119950e4d78d8c0d6c7be5711894c3212755a6db3b8b8c1f1803dba1e0d2e1a0e294e1a1fffe84a28beab8fac0e55fa0e94c68ed97e8764ac3b742d3 SHA512 673410a5fb5e488229ddc4ea4a1ac9cd8143a6e9499bde9f5535d7f0be5b6c85163065da9580c3de0d240f1cad63e0bc12c10caf1d893c324edb301bc150653b
diff --git a/games-action/teeworlds/files/0.6/01-use-system-wavpack.patch b/games-action/teeworlds/files/0.6/01-use-system-wavpack.patch
deleted file mode 100644
index 4a11a866511d..000000000000
--- a/games-action/teeworlds/files/0.6/01-use-system-wavpack.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-commit 7202b142891ee10771af9f1f3063664d75a38bbc
-Author: hasufell <hasufell@gentoo.org>
-Date: Thu Sep 5 12:28:30 2013 +0200
-
- Use system wavpack. Based on patch from Gentoo Bugzilla
-
- From: Azamat H. Hackimov <azamat.hackimov@gmail.com>
-
- https://bugs.gentoo.org/show_bug.cgi?id=363395
-
-diff --git a/bam.lua b/bam.lua
-index 11ac7b9..35c1d8d 100644
---- a/bam.lua
-+++ b/bam.lua
-@@ -11,6 +11,7 @@ config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-p
- config:Add(OptTestCompileC("minmacosxsdk", "int main(){return 0;}", "-mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk"))
- config:Add(OptTestCompileC("macosxppc", "int main(){return 0;}", "-arch ppc"))
- config:Add(OptLibrary("zlib", "zlib.h", false))
-+config:Add(OptLibrary("wavpack", "wavpack/wavpack.h", false))
- config:Add(SDL.OptFind("sdl", true))
- config:Add(FreeType.OptFind("freetype", true))
- config:Finalize("config.lua")
-@@ -187,7 +188,7 @@ function build(settings)
- end
-
- -- compile zlib if needed
-- if config.zlib.value == 1 then
-+ if config.zlib.value == true then
- settings.link.libs:Add("z")
- if config.zlib.include_path then
- settings.cc.includes:Add(config.zlib.include_path)
-@@ -198,8 +199,18 @@ function build(settings)
- settings.cc.includes:Add("src/engine/external/zlib")
- end
-
-+ if config.wavpack.value == true then
-+ settings.link.libs:Add("wavpack")
-+ if config.wavpack.include_path then
-+ settings.cc.includes:Add(config.wavpack.include_path)
-+ end
-+ wavpack = {}
-+ else
-+ wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c"))
-+ settings.cc.includes:Add("src/engine/external/") --The header is wavpack/wavpack.h so include the external folder
-+ end
-+
- -- build the small libraries
-- wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c"))
- pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c"))
-
- -- build game components
-diff --git a/src/engine/client/sound.cpp b/src/engine/client/sound.cpp
-index 343fa2e..e32cac9 100644
---- a/src/engine/client/sound.cpp
-+++ b/src/engine/client/sound.cpp
-@@ -13,7 +13,7 @@
- #include "sound.h"
-
- extern "C" { // wavpack
-- #include <engine/external/wavpack/wavpack.h>
-+ #include <wavpack/wavpack.h>
- }
- #include <math.h>
-
-@@ -351,19 +351,25 @@ int CSound::LoadWV(const char *pFilename)
- if(!m_pStorage)
- return -1;
-
-+ #ifndef WAVPACK_H
- ms_File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL);
- if(!ms_File)
- {
- dbg_msg("sound/wv", "failed to open file. filename='%s'", pFilename);
- return -1;
- }
-+ #endif
-
- SampleID = AllocID();
- if(SampleID < 0)
- return -1;
- pSample = &m_aSamples[SampleID];
-
-+ #ifndef WAVPACK_H
- pContext = WavpackOpenFileInput(ReadData, aError);
-+ #else
-+ pContext = WavpackOpenFileInput(pFilename, aError, 0, 0);
-+ #endif
- if (pContext)
- {
- int m_aSamples = WavpackGetNumSamples(pContext);
-@@ -419,8 +425,10 @@ int CSound::LoadWV(const char *pFilename)
- dbg_msg("sound/wv", "failed to open %s: %s", pFilename, aError);
- }
-
-+ #ifndef WAVPACK_H
- io_close(ms_File);
- ms_File = NULL;
-+ #endif
-
- if(g_Config.m_Debug)
- dbg_msg("sound/wv", "loaded %s", pFilename);
diff --git a/games-action/teeworlds/files/0.6/02-fixed-wavpack-sound-loading.patch b/games-action/teeworlds/files/0.6/02-fixed-wavpack-sound-loading.patch
deleted file mode 100644
index e207a4a354bf..000000000000
--- a/games-action/teeworlds/files/0.6/02-fixed-wavpack-sound-loading.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-commit b96981f5f23b4269108afb465f29a23abbd32ae2
-Author: hasufell <hasufell@gentoo.org>
-Date: Thu Sep 5 12:31:19 2013 +0200
-
- Fixing wavpack sound loading. Based on Gentoo Bugzilla
-
- From: Azamat H. Hackimov <azamat.hackimov@gmail.com>
-
- https://bugs.gentoo.org/show_bug.cgi?id=363395
-
-diff --git a/src/engine/client/sound.cpp b/src/engine/client/sound.cpp
-index e32cac9..2a4c653 100644
---- a/src/engine/client/sound.cpp
-+++ b/src/engine/client/sound.cpp
-@@ -51,6 +51,55 @@ struct CVoice
- int m_X, m_Y;
- } ;
-
-+#ifdef WAVPACK_H
-+static int32_t ReadBytes(void *pFile, void *pBuffer, int32_t Size)
-+{
-+ return (int32_t)io_read((IOHANDLE)pFile, pBuffer, Size);
-+}
-+static uint32_t GetPos(void *pFile)
-+{
-+ return (uint32_t)io_tell((IOHANDLE)pFile);
-+}
-+static int SetPosAbs(void *pFile, uint32_t Offset)
-+{
-+ return io_seek((IOHANDLE)pFile, Offset, IOSEEK_START);
-+}
-+static int SetPosRel(void *pFile, int32_t Offset, int Mode)
-+{
-+ switch(Mode)
-+ {
-+ case SEEK_SET:
-+ Mode = IOSEEK_START;
-+ break;
-+ case SEEK_CUR:
-+ Mode = IOSEEK_CUR;
-+ break;
-+ case SEEK_END:
-+ Mode = IOSEEK_END;
-+ }
-+ return io_seek((IOHANDLE)pFile, Offset, Mode);
-+}
-+
-+//TODO: Fix if 'real' functionality is needed by the wavpack header
-+static int PushBackByte(void *pFile, int Char)
-+{
-+ return io_seek((IOHANDLE)pFile, -1, IOSEEK_CUR);
-+}
-+static uint32_t GetLength(void *pFile)
-+{
-+ return (uint32_t)io_length((IOHANDLE)pFile);
-+}
-+// Essentially assuming this to always be true, should fix if this isn't the case
-+static int CanSeek(void *pFile)
-+{
-+ return pFile != NULL;
-+}
-+static WavpackStreamReader CWavpackReader = {
-+ ReadBytes, GetPos, SetPosAbs, SetPosRel, PushBackByte, GetLength, CanSeek, 0
-+};
-+#endif
-+
-+
- static CSample m_aSamples[NUM_SAMPLES] = { {0} };
- static CVoice m_aVoices[NUM_VOICES] = { {0} };
- static CChannel m_aChannels[NUM_CHANNELS] = { {255, 0} };
-@@ -351,14 +400,12 @@ int CSound::LoadWV(const char *pFilename)
- if(!m_pStorage)
- return -1;
-
-- #ifndef WAVPACK_H
- ms_File = m_pStorage->OpenFile(pFilename, IOFLAG_READ, IStorage::TYPE_ALL);
- if(!ms_File)
- {
- dbg_msg("sound/wv", "failed to open file. filename='%s'", pFilename);
- return -1;
- }
-- #endif
-
- SampleID = AllocID();
- if(SampleID < 0)
-@@ -368,7 +415,7 @@ int CSound::LoadWV(const char *pFilename)
- #ifndef WAVPACK_H
- pContext = WavpackOpenFileInput(ReadData, aError);
- #else
-- pContext = WavpackOpenFileInput(pFilename, aError, 0, 0);
-+ pContext = WavpackOpenFileInputEx(&CWavpackReader, ms_File, 0, aError, 0, 0);
- #endif
- if (pContext)
- {
-@@ -422,13 +469,11 @@ int CSound::LoadWV(const char *pFilename)
- }
- else
- {
-- dbg_msg("sound/wv", "failed to open %s: %s", pFilename, aError);
-+ dbg_msg("sound/wv", "failed to open '%s': %s", pFilename, aError);
- }
-
-- #ifndef WAVPACK_H
- io_close(ms_File);
- ms_File = NULL;
-- #endif
-
- if(g_Config.m_Debug)
- dbg_msg("sound/wv", "loaded %s", pFilename);
diff --git a/games-action/teeworlds/files/0.6/03-use-system-pnglite.patch b/games-action/teeworlds/files/0.6/03-use-system-pnglite.patch
deleted file mode 100644
index 81c3d915316b..000000000000
--- a/games-action/teeworlds/files/0.6/03-use-system-pnglite.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-commit 291a375000ac8d9cd5548a863ea6b49c46cfb1bb
-Author: hasufell <hasufell@gentoo.org>
-Date: Thu Sep 5 12:36:53 2013 +0200
-
- Use system pnglite. Based on Gentoo Bugzilla
-
- From: Azamat H. Hackimov <azamat.hackimov@gmail.com>
-
- https://bugs.gentoo.org/show_bug.cgi?id=363395
-
-diff --git a/bam.lua b/bam.lua
-index 35c1d8d..7902a2c 100644
---- a/bam.lua
-+++ b/bam.lua
-@@ -11,6 +11,7 @@ config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-p
- config:Add(OptTestCompileC("minmacosxsdk", "int main(){return 0;}", "-mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk"))
- config:Add(OptTestCompileC("macosxppc", "int main(){return 0;}", "-arch ppc"))
- config:Add(OptLibrary("zlib", "zlib.h", false))
-+config:Add(OptLibrary("pnglite", "pnglite.h", false))
- config:Add(OptLibrary("wavpack", "wavpack/wavpack.h", false))
- config:Add(SDL.OptFind("sdl", true))
- config:Add(FreeType.OptFind("freetype", true))
-@@ -199,26 +200,34 @@ function build(settings)
- settings.cc.includes:Add("src/engine/external/zlib")
- end
-
-+ -- build game components
-+ engine_settings = settings:Copy()
-+ server_settings = engine_settings:Copy()
-+ client_settings = engine_settings:Copy()
-+ launcher_settings = engine_settings:Copy()
-+
-+ if config.pnglite.value == true then
-+ client_settings.link.libs:Add("pnglite")
-+ if config.pnglite.include_path then
-+ client_settings.cc.includes:Add(config.pnglite.include_path)
-+ end
-+ pnglite = {}
-+ else
-+ pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c"))
-+ client_settings.cc.includes:Add("src/engine/external/pnglite")
-+ end
-+
- if config.wavpack.value == true then
-- settings.link.libs:Add("wavpack")
-+ client_settings.link.libs:Add("wavpack")
- if config.wavpack.include_path then
-- settings.cc.includes:Add(config.wavpack.include_path)
-+ client_settings.cc.includes:Add(config.wavpack.include_path)
- end
- wavpack = {}
- else
- wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c"))
-- settings.cc.includes:Add("src/engine/external/") --The header is wavpack/wavpack.h so include the external folder
-+ client_settings.cc.includes:Add("src/engine/external/") --The header is wavpack/wavpack.h so include the external folder
- end
-
-- -- build the small libraries
-- pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c"))
--
-- -- build game components
-- engine_settings = settings:Copy()
-- server_settings = engine_settings:Copy()
-- client_settings = engine_settings:Copy()
-- launcher_settings = engine_settings:Copy()
--
- if family == "unix" then
- if platform == "macosx" then
- client_settings.link.frameworks:Add("OpenGL")
-diff --git a/src/engine/client/graphics.cpp b/src/engine/client/graphics.cpp
-index 2e8a855..97e4fd7 100644
---- a/src/engine/client/graphics.cpp
-+++ b/src/engine/client/graphics.cpp
-@@ -9,7 +9,7 @@
- #include "SDL_opengl.h"
-
- #include <base/system.h>
--#include <engine/external/pnglite/pnglite.h>
-+#include <pnglite.h>
-
- #include <engine/shared/config.h>
- #include <engine/graphics.h>
-diff --git a/src/engine/client/graphics_threaded.cpp b/src/engine/client/graphics_threaded.cpp
-index e34b725..60246d1 100644
---- a/src/engine/client/graphics_threaded.cpp
-+++ b/src/engine/client/graphics_threaded.cpp
-@@ -6,7 +6,7 @@
- #include <base/tl/threading.h>
-
- #include <base/system.h>
--#include <engine/external/pnglite/pnglite.h>
-+#include <pnglite.h>
-
- #include <engine/shared/config.h>
- #include <engine/graphics.h>
-diff --git a/src/tools/dilate.cpp b/src/tools/dilate.cpp
-index 55094a5..42a5b83 100644
---- a/src/tools/dilate.cpp
-+++ b/src/tools/dilate.cpp
-@@ -2,7 +2,7 @@
- /* If you are missing that file, acquire a complete release at teeworlds.com. */
- #include <base/system.h>
- #include <base/math.h>
--#include <engine/external/pnglite/pnglite.h>
-+#include <pnglite.h>
-
- typedef struct
- {
-diff --git a/src/tools/tileset_borderadd.cpp b/src/tools/tileset_borderadd.cpp
-index 25e2fa5..88f760a 100644
---- a/src/tools/tileset_borderadd.cpp
-+++ b/src/tools/tileset_borderadd.cpp
-@@ -2,7 +2,7 @@
- /* If you are missing that file, acquire a complete release at teeworlds.com. */
- #include <base/math.h>
- #include <base/system.h>
--#include <engine/external/pnglite/pnglite.h>
-+#include <pnglite.h>
-
- typedef struct
- {
-diff --git a/src/tools/tileset_borderfix.cpp b/src/tools/tileset_borderfix.cpp
-index 0facb9a..ab36292 100644
---- a/src/tools/tileset_borderfix.cpp
-+++ b/src/tools/tileset_borderfix.cpp
-@@ -1,7 +1,7 @@
- /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
- /* If you are missing that file, acquire a complete release at teeworlds.com. */
- #include <base/system.h>
--#include <engine/external/pnglite/pnglite.h>
-+#include <pnglite.h>
-
- typedef struct
- {
-diff --git a/src/tools/tileset_borderrem.cpp b/src/tools/tileset_borderrem.cpp
-index d604ecb..8673e41 100644
---- a/src/tools/tileset_borderrem.cpp
-+++ b/src/tools/tileset_borderrem.cpp
-@@ -2,7 +2,7 @@
- /* If you are missing that file, acquire a complete release at teeworlds.com. */
- #include <base/math.h>
- #include <base/system.h>
--#include <engine/external/pnglite/pnglite.h>
-+#include <pnglite.h>
-
- typedef struct
- {
-diff --git a/src/tools/tileset_borderset.cpp b/src/tools/tileset_borderset.cpp
-index 8b3e299..c762ee2 100644
---- a/src/tools/tileset_borderset.cpp
-+++ b/src/tools/tileset_borderset.cpp
-@@ -2,7 +2,7 @@
- /* If you are missing that file, acquire a complete release at teeworlds.com. */
- #include <base/math.h>
- #include <base/system.h>
--#include <engine/external/pnglite/pnglite.h>
-+#include <pnglite.h>
-
- typedef struct
- {
diff --git a/games-action/teeworlds/files/0.6/04-dedicated.patch b/games-action/teeworlds/files/0.6/04-dedicated.patch
deleted file mode 100644
index fc61b71283b6..000000000000
--- a/games-action/teeworlds/files/0.6/04-dedicated.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-From: Julian Ospald <hasufell@gentoo.org>
-Date: Sun Sep 8 11:05:26 UTC 2013
-Subject: fix DATADIR detection for minimal setups
-
---- a/src/engine/shared/storage.cpp
-+++ b/src/engine/shared/storage.cpp
-@@ -208,7 +208,7 @@
- for (i = 0; i < DirsCount; i++)
- {
- char aBuf[128];
-- str_format(aBuf, sizeof(aBuf), "%s/mapres", aDirs[i]);
-+ str_format(aBuf, sizeof(aBuf), "%s/maps", aDirs[i]);
- if(fs_is_dir(aBuf))
- {
- str_copy(m_aDatadir, aDirs[i], sizeof(m_aDatadir));
diff --git a/games-action/teeworlds/files/0.6/05-cc-cflags.patch b/games-action/teeworlds/files/0.6/05-cc-cflags.patch
deleted file mode 100644
index dec6b8d306fc..000000000000
--- a/games-action/teeworlds/files/0.6/05-cc-cflags.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-From: Julian Ospald <hasufell@gentoo.org>
-Date: Sun Sep 8 12:25:19 UTC 2013
-Subject: respect our gentoo settings
-
- this has to be at this place or later
- otherwise some of our settings would be overwritten
-
---- a/bam.lua
-+++ b/bam.lua
-@@ -168,6 +168,8 @@
- -- set some platform specific settings
- settings.cc.includes:Add("src")
-
-+ dofile("gentoo.lua") addSettings(settings)
-+
- if family == "unix" then
- if platform == "macosx" then
- settings.link.frameworks:Add("Carbon")
diff --git a/games-action/teeworlds/teeworlds-0.6.4.ebuild b/games-action/teeworlds/teeworlds-0.6.4.ebuild
deleted file mode 100644
index e0a278459205..000000000000
--- a/games-action/teeworlds/teeworlds-0.6.4.ebuild
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python2_7 )
-inherit eutils multiprocessing python-any-r1 toolchain-funcs versionator
-
-REVISION="b177-rff25472"
-
-DESCRIPTION="Online multi-player platform 2D shooter"
-HOMEPAGE="https://www.teeworlds.com/"
-SRC_URI="https://downloads.teeworlds.com/${P}-src.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="debug dedicated"
-
-RDEPEND="
- !dedicated? (
- app-arch/bzip2
- media-libs/freetype
- media-libs/libsdl[X,sound,opengl,video]
- media-libs/pnglite
- media-sound/wavpack
- virtual/glu
- virtual/opengl
- x11-libs/libX11 )
- sys-libs/zlib"
-DEPEND="${RDEPEND}
- ${PYTHON_DEPS}
- ~dev-util/bam-0.4.0"
-
-S=${WORKDIR}/${P}-src
-MY_PV=$(get_version_component_range 1-2)
-
-PATCHES=(
- "${FILESDIR}/${MY_PV}/01-use-system-wavpack.patch"
- "${FILESDIR}/${MY_PV}/02-fixed-wavpack-sound-loading.patch"
- "${FILESDIR}/${MY_PV}/03-use-system-pnglite.patch"
- "${FILESDIR}/${MY_PV}/04-dedicated.patch"
- "${FILESDIR}/${MY_PV}/05-cc-cflags.patch"
-)
-
-pkg_setup() {
- python-any-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- rm -r src/engine/external/* || die
-
- cat <<- __EOF__ > "${S}/gentoo.lua"
- function addSettings(settings)
- print("Adding Gentoo settings")
- settings.optimize = 0
- settings.cc.exe_c = "$(tc-getCC)"
- settings.cc.exe_cxx = "$(tc-getCXX)"
- settings.cc.flags_c:Add("${CFLAGS}")
- settings.cc.flags_cxx:Add("${CXXFLAGS}")
- settings.link.exe = "$(tc-getCXX)"
- settings.link.flags:Add("${LDFLAGS}")
- end
- __EOF__
-}
-
-src_configure() {
- bam -v config || die
-}
-
-src_compile() {
- local myopt
-
- if use debug; then
- myopt=" server_debug"
- else
- myopt=" server_release"
- fi
- if ! use dedicated; then
- if use debug; then
- myopt+=" client_debug"
- else
- myopt+=" client_release"
- fi
- fi
-
- bam -v -a -j $(makeopts_jobs) ${myopt} || die
-}
-
-src_install() {
- if use debug; then
- newbin ${PN}_srv_d ${PN}_srv
- else
- dobin ${PN}_srv
- fi
- if ! use dedicated; then
- if use debug; then
- newbin ${PN}_d ${PN}
- else
- dobin ${PN}
- fi
-
- doicon "${FILESDIR}"/${PN}.xpm
- make_desktop_entry ${PN} Teeworlds
-
- insinto /usr/share/${PN}/data
- doins -r data/*
- else
- insinto /usr/share/${PN}/data/maps
- doins -r data/maps/*
- fi
- newinitd "${FILESDIR}"/${PN}-init.d ${PN}
- insinto "/etc/${PN}"
- doins "${FILESDIR}"/teeworlds_srv.cfg
-
- dodoc readme.txt
-}