1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-07 06:40:06 +00:00

games/yquake2: new port had been added (Yamagi Quake II)

Yamagi Quake II is advanced port of Icculus Quake II.  It uses SDL2
and therefore can be run in Wayland without any additional tweaks.

PR:	245770 (modified)
This commit is contained in:
Alexey Dokuchaev 2022-03-25 12:44:18 +00:00
parent 95b8644d59
commit 37eb44cc9b
8 changed files with 131 additions and 0 deletions

View File

@ -1157,6 +1157,7 @@
SUBDIR += xzip
SUBDIR += yadex
SUBDIR += yahtzee
SUBDIR += yquake2
SUBDIR += zangband
SUBDIR += zatacka
SUBDIR += zaz

45
games/yquake2/Makefile Normal file
View File

@ -0,0 +1,45 @@
# Created by: Vasily Postnicov <shamaz.mazum@gmail.com>
PORTNAME= yquake2
PORTVERSION= 8.01
CATEGORIES= games
MASTER_SITES= https://deponie.yamagi.org/quake2/
DISTNAME= quake2-${PORTVERSION}
MAINTAINER= shamaz.mazum@gmail.com
COMMENT= Improved version of Icculus Quake II
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
# Quake II loads optional libraries via dlopen(3)
BUILD_DEPENDS= ${LOCALBASE}/include/curl/curl.h:ftp/curl
RUN_DEPENDS= ${LOCALBASE}/lib/libcurl.so:ftp/curl
USES= gmake openal gl sdl tar:xz
USE_GL= gl
USE_SDL= sdl2
MAKE_ARGS= VERBOSE=1 WITH_SYSTEMWIDE=yes \
WITH_SYSTEMDATADIR="${Q2DIR}" \
WITH_SYSTEMLIBDIR="${PREFIX}/lib/${PORTNAME}"
OPTIONS_DEFINE= DOCS
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/release/q2ded \
${STAGEDIR}${PREFIX}/bin/yq2ded
${INSTALL_PROGRAM} ${WRKSRC}/release/quake2 \
${STAGEDIR}${PREFIX}/bin/${PORTNAME}
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/baseq2
${INSTALL_LIB} ${WRKSRC}/release/baseq2/game.so \
${STAGEDIR}${PREFIX}/lib/${PORTNAME}/baseq2
${INSTALL_LIB} ${WRKSRC}/release/ref_*.so \
${STAGEDIR}${PREFIX}/lib/${PORTNAME}
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/CHANGELOG ${WRKSRC}/doc/*.md \
${STAGEDIR}${DOCSDIR}
.include "${.CURDIR}/../quake2-data/Makefile.include"
.include <bsd.port.mk>

3
games/yquake2/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1642841575
SHA256 (quake2-8.01.tar.xz) = 132889a6976dd7c75bf94a4ca49c76ff09cf843d66541872320d7a02a25a622c
SIZE (quake2-8.01.tar.xz) = 2109408

View File

@ -0,0 +1,28 @@
--- Makefile.orig 2022-01-22 08:51:28 UTC
+++ Makefile
@@ -251,10 +251,13 @@ endif
# Systemwide installation.
ifeq ($(WITH_SYSTEMWIDE),yes)
override CFLAGS += -DSYSTEMWIDE
-ifneq ($(WITH_SYSTEMDIR),"")
-override CFLAGS += -DSYSTEMDIR=\"$(WITH_SYSTEMDIR)\"
+ifneq ($(WITH_SYSTEMDATADIR),"")
+override CFLAGS += -DSYSTEMDATADIR=\"$(WITH_SYSTEMDATADIR)\"
endif
+ifneq ($(WITH_SYSTEMLIBDIR),"")
+override CFLAGS += -DSYSTEMLIBDIR=\"$(WITH_SYSTEMLIBDIR)\"
endif
+endif
# ----------
@@ -405,7 +408,8 @@ config:
@echo "WITH_OPENAL = $(WITH_OPENAL)"
@echo "WITH_RPATH = $(WITH_RPATH)"
@echo "WITH_SYSTEMWIDE = $(WITH_SYSTEMWIDE)"
- @echo "WITH_SYSTEMDIR = $(WITH_SYSTEMDIR)"
+ @echo "WITH_SYSTEMDATADIR = $(WITH_SYSTEMDATADIR)"
+ @echo "WITH_SYSTEMLIBDIR = $(WITH_SYSTEMLIBDIR)"
@echo "============================"
@echo ""

View File

@ -0,0 +1,17 @@
--- src/client/vid/vid.c.orig 2022-01-22 08:51:28 UTC
+++ src/client/vid/vid.c
@@ -318,7 +318,13 @@ const char* lib_ext = "so";
static void
VID_GetRendererLibPath(const char *renderer, char *path, size_t len)
{
- snprintf(path, len, "%sref_%s.%s", Sys_GetBinaryDir(), renderer, lib_ext);
+ char *next_path = NULL;
+
+ while ((next_path = FS_GetNextRawPath (next_path)) != NULL) {
+ snprintf(path, len, "%s/ref_%s.%s", next_path, renderer, lib_ext);
+ if (Sys_IsFile(path))
+ break;
+ }
}
/*

View File

@ -0,0 +1,12 @@
--- src/common/filesystem.c.orig 2022-01-22 08:51:28 UTC
+++ src/common/filesystem.c
@@ -2029,7 +2029,8 @@ void FS_BuildRawPath(void) {
// binary compiled with SYSTEMWIDE (installed from
// packages), but no systemwide game data.
#ifdef SYSTEMWIDE
- FS_AddDirToRawPath(SYSTEMDIR, false, false);
+ FS_AddDirToRawPath(SYSTEMDATADIR, false, false);
+ FS_AddDirToRawPath(SYSTEMLIBDIR, false, false);
#endif
// The CD must be the last directory of the path,

9
games/yquake2/pkg-descr Normal file
View File

@ -0,0 +1,9 @@
Yamagi Quake II is an enhanced client for id Software's Quake II with
focus on offline and cooperative gameplay. Both the gameplay and the
graphics are unchanged, but many bugs in the last official release were
fixed and some nice to have features like widescreen support and a modern
OpenGL 3.2 renderer were added. Unlike most other Quake II source ports
Yamagi Quake II is fully 64-bit clean. It works perfectly on modern
processors and operating systems.
WWW: https://www.yamagi.org/quake2/

16
games/yquake2/pkg-plist Normal file
View File

@ -0,0 +1,16 @@
bin/yq2ded
bin/yquake2
lib/yquake2/baseq2/game.so
lib/yquake2/ref_gl1.so
lib/yquake2/ref_gl3.so
lib/yquake2/ref_soft.so
%%PORTDOCS%%%%DOCSDIR%%/010_index.md
%%PORTDOCS%%%%DOCSDIR%%/020_installation.md
%%PORTDOCS%%%%DOCSDIR%%/030_configuration.md
%%PORTDOCS%%%%DOCSDIR%%/040_cvarlist.md
%%PORTDOCS%%%%DOCSDIR%%/050_commands.md
%%PORTDOCS%%%%DOCSDIR%%/060_multiplayer.md
%%PORTDOCS%%%%DOCSDIR%%/070_packaging.md
%%PORTDOCS%%%%DOCSDIR%%/080_contributing.md
%%PORTDOCS%%%%DOCSDIR%%/090_filelists.md
%%PORTDOCS%%%%DOCSDIR%%/CHANGELOG