summaryrefslogtreecommitdiff
path: root/games-action/teeworlds
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
commitbfd9c39e4712ebdb442d4ca0673061faed1e70e1 (patch)
tree0d7a74b4463ee387f9cf9368ceb1b757f694f72a /games-action/teeworlds
parentf716a9fe6455d39eef01e718aae68dae61c19704 (diff)
downloadbaldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.gz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.xz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.zip
Revert "Adding metadata"
This reverts commit f716a9fe6455d39eef01e718aae68dae61c19704.
Diffstat (limited to 'games-action/teeworlds')
-rw-r--r--games-action/teeworlds/Manifest2
-rw-r--r--games-action/teeworlds/files/teeworlds-0.7.5-cmake4.patch10
-rw-r--r--games-action/teeworlds/files/teeworlds-init.d40
-rw-r--r--games-action/teeworlds/files/teeworlds_srv.cfg7
-rw-r--r--games-action/teeworlds/metadata.xml11
-rw-r--r--games-action/teeworlds/teeworlds-0.7.5-r3.ebuild69
6 files changed, 139 insertions, 0 deletions
diff --git a/games-action/teeworlds/Manifest b/games-action/teeworlds/Manifest
new file mode 100644
index 000000000000..dc7d42a72fc9
--- /dev/null
+++ b/games-action/teeworlds/Manifest
@@ -0,0 +1,2 @@
+DIST teeworlds-0.7.5-src.tar.gz 8935505 BLAKE2B 40cf14e4f6d811df29a98cd51adc773021083e3474cc768998923fb6746e65b17c502d80af8e5613716dd3f12cf1e7cf840ec44b19ad8d214bd2cfa71f1871f3 SHA512 f0c55489b99b06e27298ac42adcf31e1130e7eace6f8672836e50c66c27ab0ccce5b8680c7181a2adc59e1f5808564001b5f0bc8ac7ab355ad8db71328ea7a76
+DIST teeworlds.png 3111 BLAKE2B c0b287b50d2155b556a227d4169656c886a47c6641ac15a40ca398ab9d4d0b0d7bf61c93037d4ad6d19ad9e638204975c5913d88928fee7333b6e360578c3692 SHA512 e3dd4754e14b4a6a6bf616b5f74c1f1c1a87b01522c8e5f9e33855f6f13c4ef65b17ef27015f97f303d00faa38b1441a73a7fe19f7be4541dee3f1a4810acb27
diff --git a/games-action/teeworlds/files/teeworlds-0.7.5-cmake4.patch b/games-action/teeworlds/files/teeworlds-0.7.5-cmake4.patch
new file mode 100644
index 000000000000..039f9304a102
--- /dev/null
+++ b/games-action/teeworlds/files/teeworlds-0.7.5-cmake4.patch
@@ -0,0 +1,10 @@
+Upstream had several cmake version-related changes like [1] but staying
+conservative in this old release for [2].
+
+[1] https://github.com/teeworlds/teeworlds/commit/15dbf346
+[2] https://bugs.gentoo.org/957687
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1 +1 @@
+-cmake_minimum_required(VERSION 2.8)
++cmake_minimum_required(VERSION 2.8...3.16)
diff --git a/games-action/teeworlds/files/teeworlds-init.d b/games-action/teeworlds/files/teeworlds-init.d
new file mode 100644
index 000000000000..eb24a7441e2d
--- /dev/null
+++ b/games-action/teeworlds/files/teeworlds-init.d
@@ -0,0 +1,40 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+PIDFILE=/var/run/teeworlds.pid
+GAME_DIRECTORY=/usr/bin
+CONFIG=/etc/teeworlds/teeworlds_srv.cfg
+
+depend() {
+ use dns logger net
+}
+
+checkconfig() {
+ if [ ! -e ${CONFIG} ] ; then
+ eerror "You need an ${CONFIG} config file to run TeeWorlds"
+ return 1
+ fi
+}
+
+start() {
+ ebegin "Starting TeeWorlds"
+ start-stop-daemon --start --background --pidfile "${PIDFILE}" \
+ --make-pidfile -d ${GAME_DIRECTORY} --user games \
+ --exec ${GAME_DIRECTORY}/teeworlds_srv -- -f ${CONFIG}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading TeeWorlds configs and restarting processes"
+ start-stop-daemon --stop --oknodo --user games \
+ --pidfile "${PIDFILE}" --signal HUP \
+ --exec ${GAME_DIRECTORY}/teeworlds_srv -- -f ${CONFIG}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping TeeWorlds"
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+ eend $?
+}
diff --git a/games-action/teeworlds/files/teeworlds_srv.cfg b/games-action/teeworlds/files/teeworlds_srv.cfg
new file mode 100644
index 000000000000..dc675622c78b
--- /dev/null
+++ b/games-action/teeworlds/files/teeworlds_srv.cfg
@@ -0,0 +1,7 @@
+# sample Teeworlds server config file
+# see http://www.teeworlds.com/?page=docs&wiki=ServerSettings for details
+sv_gametype dm
+sv_map dm1
+sv_name gentoo-teeworlds
+sv_register 1
+sv_scorelimit 20 \ No newline at end of file
diff --git a/games-action/teeworlds/metadata.xml b/games-action/teeworlds/metadata.xml
new file mode 100644
index 000000000000..2f84e0df3663
--- /dev/null
+++ b/games-action/teeworlds/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">teeworlds/teeworlds</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/games-action/teeworlds/teeworlds-0.7.5-r3.ebuild b/games-action/teeworlds/teeworlds-0.7.5-r3.ebuild
new file mode 100644
index 000000000000..d38f319b1341
--- /dev/null
+++ b/games-action/teeworlds/teeworlds-0.7.5-r3.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{13..14} )
+inherit cmake desktop flag-o-matic python-any-r1
+
+DESCRIPTION="Online multi-player platform 2D shooter"
+HOMEPAGE="https://www.teeworlds.com/"
+SRC_URI="
+ https://github.com/teeworlds/teeworlds/releases/download/${PV}/teeworlds-${PV}-src.tar.gz
+ https://distfiles.gentoo.org/pub/dev/ionen@gentoo.org/${PN}.png
+"
+S=${WORKDIR}/${P}-src
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="dedicated test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ !dedicated? (
+ media-libs/freetype
+ media-libs/libglvnd[X]
+ media-libs/libsdl2[sound,opengl,video]
+ media-libs/pnglite
+ media-sound/wavpack
+ )
+ dev-libs/openssl:=
+ virtual/zlib:=
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ ${PYTHON_DEPS}
+ test? ( dev-cpp/gtest )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-cmake4.patch
+)
+
+src_configure() {
+ append-flags -fno-strict-aliasing #858524
+
+ local mycmakeargs=(
+ -DCLIENT=$(usex !dedicated)
+ -DCMAKE_DISABLE_FIND_PACKAGE_X11=yes # unused
+ )
+
+ cmake_src_configure
+}
+
+src_test() {
+ cmake_build run_tests
+}
+
+src_install() {
+ cmake_src_install
+
+ doicon "${DISTDIR}"/${PN}.png
+ domenu other/teeworlds.desktop
+
+ newinitd "${FILESDIR}"/${PN}-init.d ${PN}
+
+ insinto /etc/${PN}
+ doins "${FILESDIR}"/teeworlds_srv.cfg
+}