diff --git a/games/vkquake/Makefile b/games/vkquake/Makefile index 807be4298a54..b7599bd930c4 100644 --- a/games/vkquake/Makefile +++ b/games/vkquake/Makefile @@ -1,96 +1,68 @@ PORTNAME= vkquake -DISTVERSION= 1.32.1 -PORTREVISION= 1 +DISTVERSION= 1.32.2 CATEGORIES= games -MAINTAINER= ports@FreeBSD.org -COMMENT= Quake 1 port using Vulkan instead of OpenGL, based on QuakeSpasm +MAINTAINER= agh@riseup.net +COMMENT= Vulkan Quake port based on QuakeSpasm WWW= https://github.com/Novum/vkQuake LICENSE= GPLv2+ -LICENSE_FILE= ${WRKSRC}/../LICENSE.txt +LICENSE_FILE= ${WRKSRC}/LICENSE.txt BUILD_DEPENDS= glslangValidator:graphics/glslang \ vulkan-headers>0:graphics/vulkan-headers LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader -WRKSRC_SUBDIR= Quake - -USES= desktop-file-utils gmake gnome pkgconfig sdl -USE_SDL= sdl2 +USES= desktop-file-utils meson pkgconfig sdl USE_GITHUB= yes GH_ACCOUNT= Novum GH_PROJECT= vkQuake +USE_SDL= sdl2 -MAKE_ENV= prefix=${PREFIX} bindir=${PREFIX}/bin VULKAN_SDK=${LOCALBASE} -MAKE_ARGS= HOST_CC="${CC}" CC="${CC}" -ALL_TARGET= # empty - -.include "${.CURDIR}/../quake-data/Makefile.include" +.include "${.CURDIR}/../quake-data/Makefile.include" CFLAGS+= -DDATADIR='\"${Q1DIR}\"' -Wno-error=atomic-alignment -OPTIONS_DEFINE= USERDIRS WAVE FLAC MP3 VORBIS # OPUS -OPTIONS_RADIO= MODPLAYER -OPTIONS_RADIO_MODPLAYER= MIKMOD XMP MODPLUG -OPTIONS_DEFAULT= USERDIRS WAVE FLAC VORBIS MODPLUG # OPUS MODPLUG - -USERDIRS_DESC= Enable support for loading game files from user directories (~/.vkquake) -WAVE_DESC= Enable support for Wave music -FLAC_DESC= Enable support for FLAC music -MP3_DESC= Enable support for MP3 music -VORBIS_DESC= Enable support for Ogg Vorbis music -# OPUS_DESC= Enable support for Opus music -MIKMOD_DESC= Enable support for tracker module music using MikMod -XMP_DESC= Enable support for tracker module music using XMP -MODPLUG_DESC= Enable support for tracker module music using ModPlug - -USERDIRS_MAKE_ARGS= DO_USERDIRS=1 -USERDIRS_MAKE_ARGS_OFF= DO_USERDIRS=0 +OPTIONS_DEFINE= DEBUG FLAC OPUS USERDIRS VORBIS WAVE +OPTIONS_DEFAULT= FLAC MP3 OPUS USERDIRS VORBIS WAVE +OPTIONS_RADIO= MP3LIBRARY +OPTIONS_RADIO_MP3LIBRARY= MAD MP3 -WAVE_MAKE_ARGS= USE_CODEC_WAVE=1 -WAVE_MAKE_ARGS_OFF= USE_CODEC_WAVE=0 +MP3LIBRARY_DESC= MP3 audio library +USERDIRS_DESC= Support loading game data from user directories (~/.vkquake) +WAVE_DESC= Wave audio support -FLAC_MAKE_ARGS= USE_CODEC_FLAC=1 -FLAC_MAKE_ARGS_OFF= USE_CODEC_FLAC=0 +DEBUG_MESON_ON= --buildtype=debug --optimization=0 +DEBUG_MESON_OFF= --buildtype=plain --optimization=2 FLAC_LIB_DEPENDS= libFLAC.so:audio/flac - -MP3_MAKE_ARGS= USE_CODEC_MP3=1 MP3LIB=mpg123 -MP3_MAKE_ARGS_OFF= USE_CODEC_MP3=0 +FLAC_MESON_ENABLED= use_codec_flac +MAD_LIB_DEPENDS= libmad.so:audio/libmad +MAD_MESON_ARGS= -Duse_codec_mp3=enabled +MAD_MESON_ON= -Dmp3_lib=mad MP3_LIB_DEPENDS= libmpg123.so:audio/mpg123 - -VORBIS_MAKE_ARGS= USE_CODEC_VORBIS=1 VORBISLIB=vorbis -VORBIS_MAKE_ARGS_OFF= USE_CODEC_VORBIS=0 -VORBIS_LIB_DEPENDS= libvorbis.so:audio/libvorbis \ - libvorbisfile.so:audio/libvorbis \ - libogg.so:audio/libogg - -# XXX: crashes on start -# OPUS_MAKE_ARGS= USE_CODEC_OPUS=1 -# OPUS_MAKE_ARGS_OFF= USE_CODEC_OPUS=0 -# OPUS_LIB_DEPENDS= libopus.so:audio/opus \ -# libopusfile.so:audio/opusfile - -MIKMOD_MAKE_ARGS= USE_CODEC_MIKMOD=1 -MIKMOD_MAKE_ARGS_OFF= USE_CODEC_MIKMOD=0 -MIKMOD_LIB_DEPENDS= libmikmod.so:audio/libmikmod - -XMP_MAKE_ARGS= USE_CODEC_XMP=1 -XMP_MAKE_ARGS_OFF= USE_CODEC_XMP=0 -XMP_LIB_DEPENDS= libxmp.so:audio/xmp - -MODPLUG_MAKE_ARGS= USE_CODEC_MODPLUG=1 -MODPLUG_MAKE_ARGS_OFF= USE_CODEC_MODPLUG=0 -MODPLUG_LIB_DEPENDS= libmodplug.so:audio/libmodplug +MP3_MESON_ARGS= -Duse_codec_mp3=enabled +MP3_MESON_ON= -Dmp3_lib=mpg123 +OPUS_LIB_DEPENDS= libopus.so:audio/opus \ + libopusfile.so:audio/opusfile +OPUS_MESON_ENABLED= use_codec_opus +USERDIRS_MESON_ENABLED= do_userdirs +VORBIS_LIB_DEPENDS= libogg.so:audio/libogg \ + libvorbis.so:audio/libvorbis \ + libvorbisfile.so:audio/libvorbis +VORBIS_MESON_ENABLED= use_codec_vorbis +WAVE_MESON_ENABLED= use_codec_wave post-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${MESON_BUILD_DIR}/${PORTNAME} \ + ${STAGEDIR}${PREFIX}/bin ${MKDIR} ${STAGEDIR}${Q1DIR} - ${INSTALL_DATA} ${WRKSRC}/vkquake.pak ${STAGEDIR}${Q1DIR} + ${INSTALL_DATA} ${WRKSRC}/Quake/vkquake.pak \ + ${STAGEDIR}${Q1DIR} ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/256x256/apps ${INSTALL_DATA} ${FILESDIR}/vkquake.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/256x256/apps/vkquake.png ${INSTALL_DATA} ${FILESDIR}/vkquake.desktop \ ${STAGEDIR}${PREFIX}/share/applications .include diff --git a/games/vkquake/distinfo b/games/vkquake/distinfo index dfc46d0d4f56..30664d1e8345 100644 --- a/games/vkquake/distinfo +++ b/games/vkquake/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1745397975 -SHA256 (Novum-vkQuake-1.32.1_GH0.tar.gz) = f6d2f9c708b16e56aa13b29d8dfaf3faab970ec4da18e878997dc627a35731f8 -SIZE (Novum-vkQuake-1.32.1_GH0.tar.gz) = 28240750 +TIMESTAMP = 1748683403 +SHA256 (Novum-vkQuake-1.32.2_GH0.tar.gz) = e3278c329c17087816b95fa8997cb83fd8233393be242e49c97c71f9cc9395ab +SIZE (Novum-vkQuake-1.32.2_GH0.tar.gz) = 28240651 diff --git a/games/vkquake/files/patch-Quake_common.c b/games/vkquake/files/patch-Quake_common.c new file mode 100644 index 000000000000..8e09d95b6ada --- /dev/null +++ b/games/vkquake/files/patch-Quake_common.c @@ -0,0 +1,17 @@ + vkQuake is packaged with .orig files in ${WRKSRC}/Misc/vq_pak/maps, these + files will conflict with the makepatch script in + ${PORTSDIR}/Mk/Scripts/smart_makepatch.sh, which results in a makepatch + process that does not generate this patch. To get around this, remove + ${WRKSRC}/Misc/vq_pak/maps when the patches need to be regenerated. + +--- Quake/common.c.orig 2025-05-01 11:30:09 UTC ++++ Quake/common.c +@@ -2454,7 +2454,7 @@ void COM_InitFilesystem (void) // johnfitz -- modified + if (i && i < com_argc - 1) + q_strlcpy (com_basedir, com_argv[i + 1], sizeof (com_basedir)); + else +- q_strlcpy (com_basedir, host_parms->basedir, sizeof (com_basedir)); ++ q_strlcpy (com_basedir, DATADIR, sizeof (com_basedir)); + + j = strlen (com_basedir); + if (j < 1) diff --git a/games/vkquake/files/patch-Quake_pr__edict.c b/games/vkquake/files/patch-Quake_pr__edict.c new file mode 100644 index 000000000000..d033133a2acc --- /dev/null +++ b/games/vkquake/files/patch-Quake_pr__edict.c @@ -0,0 +1,19 @@ + vkQuake is packaged with .orig files in ${WRKSRC}/Misc/vq_pak/maps, these + files will conflict with the makepatch script in + ${PORTSDIR}/Mk/Scripts/smart_makepatch.sh, which results in a makepatch + process that does not generate this patch. To get around this, remove + ${WRKSRC}/Misc/vq_pak/maps when the patches need to be regenerated. + +--- Quake/pr_edict.c.orig 2025-05-01 11:30:09 UTC ++++ Quake/pr_edict.c +@@ -883,8 +883,8 @@ void ED_PrintEdicts (void) + */ + void ED_PrintEdicts (void) + { +- int free_edicts_count = 0; +- int free_list_count = 0; ++ int free_edicts_count __attribute__((unused)) = 0; ++ int free_list_count __attribute__((unused)) = 0; + + if (!sv.active) + return; diff --git a/games/vkquake/files/patch-common.c b/games/vkquake/files/patch-common.c deleted file mode 100644 index be4140860252..000000000000 --- a/games/vkquake/files/patch-common.c +++ /dev/null @@ -1,11 +0,0 @@ ---- common.c.orig 2022-07-08 05:51:08 UTC -+++ common.c -@@ -2233,7 +2233,7 @@ void COM_InitFilesystem (void) // johnfitz -- modified - if (i && i < com_argc - 1) - q_strlcpy (com_basedir, com_argv[i + 1], sizeof (com_basedir)); - else -- q_strlcpy (com_basedir, host_parms->basedir, sizeof (com_basedir)); -+ q_strlcpy (com_basedir, DATADIR, sizeof (com_basedir)); - - j = strlen (com_basedir); - if (j < 1) diff --git a/games/vkquake/files/patch-pr__edict.c b/games/vkquake/files/patch-pr__edict.c deleted file mode 100644 index bf5d29685b97..000000000000 --- a/games/vkquake/files/patch-pr__edict.c +++ /dev/null @@ -1,13 +0,0 @@ ---- pr_edict.c.orig 2025-04-24 00:38:02 UTC -+++ pr_edict.c -@@ -883,8 +883,8 @@ void ED_PrintEdicts (void) - */ - void ED_PrintEdicts (void) - { -- int free_edicts_count = 0; -- int free_list_count = 0; -+ int free_edicts_count __attribute__((unused)) = 0; -+ int free_list_count __attribute__((unused)) = 0; - - if (!sv.active) - return;