public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: games-fps/worldofpadman/files/, games-fps/worldofpadman/
@ 2025-08-13 17:56 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2025-08-13 17:56 UTC (permalink / raw
  To: gentoo-commits

commit:     4142c39268e870f6dba983fa74dbba28c70efbe1
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 13 17:55:20 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Aug 13 17:55:49 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4142c392

games-fps/worldofpadman: Fix build w/ clang

Closes: https://bugs.gentoo.org/739246
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/worldofpadman-1.6-clang.patch            | 152 +++++++++++++++++++++
 .../worldofpadman/worldofpadman-1.6-r4.ebuild      |   1 +
 2 files changed, 153 insertions(+)

diff --git a/games-fps/worldofpadman/files/worldofpadman-1.6-clang.patch b/games-fps/worldofpadman/files/worldofpadman-1.6-clang.patch
new file mode 100644
index 000000000000..101ac5d257a0
--- /dev/null
+++ b/games-fps/worldofpadman/files/worldofpadman-1.6-clang.patch
@@ -0,0 +1,152 @@
+From 675e7a641a67eae2a27e5754e876d08d395c5da8 Mon Sep 17 00:00:00 2001
+From: Tim Angus <tim@ngus.net>
+Date: Fri, 21 Oct 2011 22:48:53 +0000
+Subject: [PATCH] * clang support
+
+---
+ Makefile                     | 2 +-
+ code/asm/snapvector.c        | 6 +++---
+ code/botlib/be_ai_chat.c     | 2 +-
+ code/qcommon/common.c        | 3 +++
+ code/qcommon/q_platform.h    | 5 +++++
+ code/qcommon/unzip.c         | 2 +-
+ code/renderer/tr_model_iqm.c | 9 +++------
+ code/renderer/tr_scene.c     | 2 +-
+ 9 files changed, 19 insertions(+), 14 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 3bec57714..d0d3ba939 100644
+--- a/Makefile
++++ b/Makefile
+@@ -276,7 +276,7 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu"))
+   endif
+ 
+   BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+-    -pipe -DUSE_ICON
++    -Wno-self-assign -pipe -DUSE_ICON
+   CLIENT_CFLAGS += $(SDL_CFLAGS)
+ 
+   OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer
+diff --git a/code/asm/snapvector.c b/code/asm/snapvector.c
+index a70a1069c..2ba248dfe 100644
+--- a/code/asm/snapvector.c
++++ b/code/asm/snapvector.c
+@@ -55,9 +55,9 @@ void qsnapvectorsse(vec3_t vec)
+ 
+ #define QROUNDX87(src) \
+ 	"flds " src "\n" \
+-	"fistp " src "\n" \
+-	"fild " src "\n" \
+-	"fstp " src "\n"	
++	"fistpl " src "\n" \
++	"fildl " src "\n" \
++	"fstpl " src "\n"	
+ 
+ void qsnapvectorx87(vec3_t vec)
+ {
+diff --git a/code/botlib/be_ai_chat.c b/code/botlib/be_ai_chat.c
+index 10950e9d8..cc489d557 100644
+--- a/code/botlib/be_ai_chat.c
++++ b/code/botlib/be_ai_chat.c
+@@ -1173,7 +1173,7 @@ bot_matchpiece_t *BotLoadMatchPieces(source_t *source, char *endtoken)
+ 	{
+ 		if (token.type == TT_NUMBER && (token.subtype & TT_INTEGER))
+ 		{
+-			if (token.intvalue < 0 || token.intvalue >= MAX_MATCHVARIABLES)
++			if (token.intvalue >= MAX_MATCHVARIABLES)
+ 			{
+ 				SourceError(source, "can't have more than %d match variables\n", MAX_MATCHVARIABLES);
+ 				FreeSource(source);
+diff --git a/code/qcommon/common.c b/code/qcommon/common.c
+index 2e39731c0..4f9abfcac 100644
+--- a/code/qcommon/common.c
++++ b/code/qcommon/common.c
+@@ -2329,7 +2329,10 @@ A way to force a bus error for development reasons
+ =================
+ */
+ static void Com_Crash_f( void ) {
++#pragma clang diagnostic push
++#pragma clang diagnostic ignored "-Wnull-dereference"
+ 	* ( int * ) 0 = 0x12345678;
++#pragma clang diagnostic pop
+ }
+ 
+ /*
+diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h
+index 8bc2984ca..f2baf1c75 100644
+--- a/code/qcommon/q_platform.h
++++ b/code/qcommon/q_platform.h
+@@ -179,7 +179,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ #define OS_STRING "kFreeBSD"
+ #endif
+ 
++#ifdef __clang__
++#define ID_INLINE static inline
++#else
+ #define ID_INLINE inline
++#endif
++
+ #define PATH_SEP '/'
+ 
+ #if defined __i386__
+diff --git a/code/qcommon/unzip.c b/code/qcommon/unzip.c
+index b307e98d4..128502ce0 100644
+--- a/code/qcommon/unzip.c
++++ b/code/qcommon/unzip.c
+@@ -1250,7 +1250,7 @@ extern int ZEXPORT unzReadCurrentFile  (file, buf, len)
+         return UNZ_PARAMERROR;
+ 
+ 
+-    if ((pfile_in_zip_read_info->read_buffer == NULL))
++    if (pfile_in_zip_read_info->read_buffer == NULL)
+         return UNZ_END_OF_LIST_OF_FILE;
+     if (len==0)
+         return 0;
+diff --git a/code/renderer/tr_model_iqm.c b/code/renderer/tr_model_iqm.c
+index cad3aa6fd..98517d559 100644
+--- a/code/renderer/tr_model_iqm.c
++++ b/code/renderer/tr_model_iqm.c
+@@ -284,9 +284,9 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na
+ 		LL( triangle->vertex[1] );
+ 		LL( triangle->vertex[2] );
+ 		
+-		if( triangle->vertex[0] < 0 || triangle->vertex[0] > header->num_vertexes ||
+-		    triangle->vertex[1] < 0 || triangle->vertex[1] > header->num_vertexes ||
+-		    triangle->vertex[2] < 0 || triangle->vertex[2] > header->num_vertexes ) {
++		if( triangle->vertex[0] > header->num_vertexes ||
++		    triangle->vertex[1] > header->num_vertexes ||
++		    triangle->vertex[2] > header->num_vertexes ) {
+ 			return qfalse;
+ 		}
+ 	}
+@@ -323,9 +323,7 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na
+ 		    mesh->first_vertex + mesh->num_vertexes > header->num_vertexes ||
+ 		    mesh->first_triangle >= header->num_triangles ||
+ 		    mesh->first_triangle + mesh->num_triangles > header->num_triangles ||
+-		    mesh->name < 0 ||
+ 		    mesh->name >= header->num_text ||
+-		    mesh->material < 0 ||
+ 		    mesh->material >= header->num_text ) {
+ 			return qfalse;
+ 		}
+@@ -354,7 +352,6 @@ qboolean R_LoadIQM( model_t *mod, void *buffer, int filesize, const char *mod_na
+ 
+ 		if( joint->parent < -1 ||
+ 		    joint->parent >= (int)header->num_joints ||
+-		    joint->name < 0 ||
+ 		    joint->name >= (int)header->num_text ) {
+ 			return qfalse;
+ 		}
+diff --git a/code/renderer/tr_scene.c b/code/renderer/tr_scene.c
+index 34e4141d3..94910d611 100644
+--- a/code/renderer/tr_scene.c
++++ b/code/renderer/tr_scene.c
+@@ -219,7 +219,7 @@ void RE_AddRefEntityToScene( const refEntity_t *ent ) {
+ 		}
+ 		return;
+ 	}
+-	if ( ent->reType < 0 || ent->reType >= RT_MAX_REF_ENTITY_TYPE ) {
++	if ( (int)ent->reType < 0 || ent->reType >= RT_MAX_REF_ENTITY_TYPE ) {
+ 		ri.Error( ERR_DROP, "RE_AddRefEntityToScene: bad reType %i", ent->reType );
+ 	}
+ 

diff --git a/games-fps/worldofpadman/worldofpadman-1.6-r4.ebuild b/games-fps/worldofpadman/worldofpadman-1.6-r4.ebuild
index f3d6af6b0180..973ac1ea60eb 100644
--- a/games-fps/worldofpadman/worldofpadman-1.6-r4.ebuild
+++ b/games-fps/worldofpadman/worldofpadman-1.6-r4.ebuild
@@ -43,6 +43,7 @@ DOCS=( id-readme.txt IOQ3-README voip-readme.txt ../XTRAS/{changelog.txt,sounds_
 PATCHES=(
 	"${FILESDIR}"/${P}-gentoo.patch
 	"${WORKDIR}"/${P}-bison-3.patch # bug 921029, in 1.6.1
+	"${FILESDIR}"/${P}-clang.patch # bug 944329, in 1.6.0
 	"${FILESDIR}"/${P}-c23.patch # bug 944329, git main
 )
 


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

* [gentoo-commits] repo/gentoo:master commit in: games-fps/worldofpadman/files/, games-fps/worldofpadman/
@ 2025-09-19 16:30 Kenton Groombridge
  0 siblings, 0 replies; 2+ messages in thread
From: Kenton Groombridge @ 2025-09-19 16:30 UTC (permalink / raw
  To: gentoo-commits

commit:     e78d181b4c8003d1a1b3eae4d7f305b53aad608a
Author:     Kenton Groombridge <concord <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 29 22:50:43 2025 +0000
Commit:     Kenton Groombridge <concord <AT> gentoo <DOT> org>
CommitDate: Fri Sep 19 16:27:41 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e78d181b

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 <AT> 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 <AT> gentoo.org>

 games-fps/worldofpadman/Manifest                   |  2 +
 .../files/worldofpadman-1.7-c23.patch              | 75 +++++++++++++++++++
 games-fps/worldofpadman/worldofpadman-1.7.0.ebuild | 86 ++++++++++++++++++++++
 3 files changed, 163 insertions(+)

diff --git a/games-fps/worldofpadman/Manifest b/games-fps/worldofpadman/Manifest
index 180e0ba9fd81..4f16022def78 100644
--- a/games-fps/worldofpadman/Manifest
+++ b/games-fps/worldofpadman/Manifest
@@ -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

diff --git a/games-fps/worldofpadman/files/worldofpadman-1.7-c23.patch b/games-fps/worldofpadman/files/worldofpadman-1.7-c23.patch
new file mode 100644
index 000000000000..4acc672d1e6c
--- /dev/null
+++ b/games-fps/worldofpadman/files/worldofpadman-1.7-c23.patch
@@ -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++;

diff --git a/games-fps/worldofpadman/worldofpadman-1.7.0.ebuild b/games-fps/worldofpadman/worldofpadman-1.7.0.ebuild
new file mode 100644
index 000000000000..75259eeda716
--- /dev/null
+++ b/games-fps/worldofpadman/worldofpadman-1.7.0.ebuild
@@ -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
+}


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

end of thread, other threads:[~2025-09-19 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-19 16:30 [gentoo-commits] repo/gentoo:master commit in: games-fps/worldofpadman/files/, games-fps/worldofpadman/ Kenton Groombridge
  -- strict thread matches above, loose matches on Subject: below --
2025-08-13 17:56 Andreas Sturmlechner

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