games-fps/worldofpadman: add 1.7.0

- Build system changed to cmake
- Some USE flags were removed due to build options being removed upstream.
- Dropped ~x86 keywords due to the above.

Vulkan support was also added upstream but I could not get the game to
run with it (segfault at launch).

This ebuild needs to pull both the "unified" zip from upstream releases
as well as the source tarball because the former contains the game
assets which are unfortunately stored in Git LFS and are not present in
the latter. Should that be worked around, this ebuild can be easily
adapted to pack the game assets into the required .pk3 files.

Signed-off-by: Kenton Groombridge <concord@gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/42805
Closes: https://github.com/gentoo/gentoo/pull/42805
Signed-off-by: Kenton Groombridge <concord@gentoo.org>
This commit is contained in:
Kenton Groombridge
2025-06-29 18:50:43 -04:00
parent f3bfbb59d1
commit e78d181b4c
3 changed files with 163 additions and 0 deletions

View File

@@ -1,3 +1,5 @@
DIST wop-1.5-unified.zip 947290087 BLAKE2B 5fb87cde661882fc095376012d9aca134d6399b4cedd4f3c78b739dd19e126360070278045d74c3318306e17490338111b8621e1c543b46e6bbecfbcd3658675 SHA512 fea0207efadf15afab7001227e27126aef4a673bd478dccb513c3011d0811074b2788083862f07e2f02f1a80ccb57a45ff64de8de155d8f8f7f1ab53ecf2402b
DIST wop-1.5.x-to-1.6-patch-unified.zip 122204892 BLAKE2B a0f9feb04a15ec04dd64dbacdf5a158738d625651b2293bc8b3740067e849f33cdd144bce6afd11914524d89fe4bcfd48dbcbc455e51017b1216439e9bae484a SHA512 a45018bd79e9e23c57bcaf692fa14c323671103558caad6acb794c2990cc5fe9cc8bdbe6a6c8254c4560d81eb59f5e3b9a6800a61b21a15870c4439f7179d936
DIST worldofpadman-1.6-bison-3.patch.xz 14284 BLAKE2B 9083243d12f59067c796c466e98061f601cf8fd07b9dd12718fd22ff1a9694fb57f2c55e204cddbd035209c9b7526f5b7297e53f742cf01a19a3cd0df491c5a8 SHA512 a8d54ed6041a3907e9d5fa2c61046e33022a1a80e10bf18db2140d8dfab42173f2fbdebcadf707f81d21395a574e68a20829170ca2067f1434874ea5856e4cce
DIST wop-1.7.0-unified.zip 1200906511 BLAKE2B ef8da8d79d28eae3907954a490679bf436cb96e1f5d7480d874acb62c5f9aba204cc6e48b10ca91ffeefeda04f73c6f70cdb80de6bcd9fa77a9a7eb9c280467c SHA512 1c1f2d88d6a4fe31f9f5a0f7884c6660feedb7c9d12c88f2339036041aa38e1ef4be9580489b2b42a93518c676f0ecdc6ee85be518e8a74970eb11a9d53b58a0
DIST worldofpadman-1.7.0.tar.gz 119562391 BLAKE2B ee6d23aef07fcdb36e5eac2c07ff97263c33466b1ba53c0c383285a21554b7b3dc7a268020c35098e3df0f9581f0ab9d4b151f4c24448e3f6b5bbb080a40a78e SHA512 c85053c73326893c61b23a2290e46647d2b58e60fa604004ed909c0a6d0ebae3500a3e2a5922fbf556dd12dddc6b58e8a61d27166ba55cc7ff5aded8697c5f9f

View File

@@ -0,0 +1,75 @@
From 5604ddf69b47e314150191c56a04b7009d885160 Mon Sep 17 00:00:00 2001
From: Tim Angus <tim@ngus.net>
Date: Sat, 8 Mar 2025 13:00:48 +0000
Subject: [PATCH] Rename LCC constexpr function to constantexpr, avoiding C23
keyword clash
fixes #349
---
code/tools/lcc/src/c.h | 2 +-
code/tools/lcc/src/init.c | 2 +-
code/tools/lcc/src/simp.c | 4 ++--
code/tools/lcc/src/stmt.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/code/tools/lcc/src/c.h b/code/tools/lcc/src/c.h
index d8560a020..2260141e3 100644
--- a/code/tools/lcc/src/c.h
+++ b/code/tools/lcc/src/c.h
@@ -529,7 +529,7 @@ extern int process(char *);
extern int findfunc(char *, char *);
extern int findcount(char *, int, int);
-extern Tree constexpr(int);
+extern Tree constantexpr(int);
extern int intexpr(int, int);
extern Tree simplify(int, Type, Tree, Tree);
extern int ispow2(unsigned long u);
diff --git a/code/tools/lcc/src/init.c b/code/tools/lcc/src/init.c
index 64d73d319..972abf530 100644
--- a/code/tools/lcc/src/init.c
+++ b/code/tools/lcc/src/init.c
@@ -190,7 +190,7 @@ static int initstruct(int len, Type ty, int lev) {
return n;
}
-/* initializer - constexpr | { constexpr ( , constexpr )* [ , ] } */
+/* initializer - constantexpr | { constantexpr ( , constantexpr )* [ , ] } */
Type initializer(Type ty, int lev) {
int n = 0;
Tree e;
diff --git a/code/tools/lcc/src/simp.c b/code/tools/lcc/src/simp.c
index 9f4e3ecc3..50e83e484 100644
--- a/code/tools/lcc/src/simp.c
+++ b/code/tools/lcc/src/simp.c
@@ -167,7 +167,7 @@ static int subi(long x, long y, long min, long max, int needconst) {
static int subd(double x, double y, double min, double max, int needconst) {
return addd(x, -y, min, max, needconst);
}
-Tree constexpr(int tok) {
+Tree constantexpr(int tok) {
Tree p;
needconst++;
@@ -177,7 +177,7 @@ Tree constexpr(int tok) {
}
int intexpr(int tok, int n) {
- Tree p = constexpr(tok);
+ Tree p = constantexpr(tok);
needconst++;
if (p->op == CNST + I || p->op == CNST + U)
diff --git a/code/tools/lcc/src/stmt.c b/code/tools/lcc/src/stmt.c
index fe83e21f8..a65efc0ec 100644
--- a/code/tools/lcc/src/stmt.c
+++ b/code/tools/lcc/src/stmt.c
@@ -128,7 +128,7 @@
static char stop[] = {IF, ID, 0};
Tree p;
t = gettok();
- p = constexpr(0);
+ p = constantexpr(0);
if (generic(p->op) == CNST && isint(p->type)) {
if (swp) {
needconst++;

View File

@@ -0,0 +1,86 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake desktop
DESCRIPTION="Cartoon style multiplayer first-person shooter"
HOMEPAGE="https://worldofpadman.net/"
SRC_URI="https://github.com/PadWorld-Entertainment/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://github.com/PadWorld-Entertainment/${PN}/releases/download/v${PV}/wop-${PV}-unified.zip"
LICENSE="GPL-2 worldofpadman"
SLOT="0"
KEYWORDS="~amd64"
IUSE="dedicated +opengl"
RDEPEND="
sys-libs/zlib
!dedicated? (
media-libs/libjpeg-turbo:=
media-libs/libsdl[joystick,video,X]
media-libs/libtheora
media-libs/libogg
media-libs/libvorbis
media-libs/openal
net-misc/curl
virtual/glu
opengl? (
media-libs/libsdl[opengl]
virtual/opengl
)
)
"
DEPEND="${RDEPEND}"
BDEPEND="app-arch/unzip"
DOCS=( docs/id-readme.txt docs/ioq3-readme.md docs/voip-readme.txt CHANGELOG.md )
PATCHES=(
"${FILESDIR}"/${PN}-1.7-c23.patch # bug 944329, git main
)
src_configure() {
local arch
if use amd64 ; then
arch=x86_64
elif use x86 ; then
arch=i386
fi
local mycmakeargs=(
-DCMAKE_INSTALL_PREFIX=/usr/share/${PN}
-DCMAKE_INSTALL_RPATH=/usr/share/${PN}
-DARCH=${arch}
-DBUILD_CLIENT=$(usex dedicated OFF ON)
-DBUILD_RENDERER_OPENGL2=$(usex opengl)
-DBUILD_RENDERER_VULKAN=OFF
-DUSE_CURL_DLOPEN=OFF
-DUSE_OPENAL_DLOPEN=OFF
-DUSE_RENDERER_DLOPEN=OFF
)
cmake_src_configure
}
src_install() {
cmake_src_install
mkdir -p "${ED}"/usr/bin || die
mv "${ED}"/usr/share/${PN}/wopded.* "${ED}"/usr/bin/${PN}-ded || die
if ! use dedicated ; then
mv "${ED}"/usr/share/${PN}/wop.* "${ED}"/usr/bin/${PN} || die
newicon misc/wop.svg ${PN}.svg
make_desktop_entry ${PN} "World of Padman"
fi
insinto /usr/share/${PN}/wop
doins "${WORKDIR}"/wop/*.pk3
doins "${WORKDIR}"/wop/*.cfg
local HTML_DOCS=( XTRAS/{readme,readme.html} )
einstalldocs
}