pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

raze: update to raze-1.8.1



Module Name:	pkgsrc-wip
Committed By:	Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By:	yhardy
Date:		Sun Nov 26 13:45:43 2023 +0200
Changeset:	427cded8fb6a316e0477dbf249c4f1e73d72a8f8

Modified Files:
	raze/Makefile
	raze/PLIST
	raze/distinfo
	raze/patches/patch-source_core_gameconfigfile.cpp
	raze/patches/patch-source_games_blood_src_nnexts.cpp
Added Files:
	raze/hacks.mk
	raze/patches/patch-source_CMakeLists.txt
	raze/patches/patch-source_common_audio_music_i__music.h
	raze/patches/patch-source_common_engine_palettecontainer.cpp
	raze/patches/patch-source_common_objects_autosegs.cpp
	raze/patches/patch-source_common_objects_autosegs.h
	raze/patches/patch-source_common_textures_bitmap.h
	raze/patches/patch-source_common_utility_engineerrors.cpp
	raze/patches/patch-source_common_utility_palette.cpp
Removed Files:
	raze/patches/patch-source_common_console_c__console.h
	raze/patches/patch-source_common_platform_posix_sdl_i__system.cpp

Log Message:
raze: update to raze-1.8.1

pkgsrc changes:

 * make the dependency on openal explicit, and compile against
   pkgsrc header files
 * add hacks.mk to workaround a segmentation fault on startup
   for some games

Raze-1.8.1

This is a hotfix correcting the bad zmusic DLL name in 1.8.0.
No other changes were made.

Raze-1.8.0

  * Exhumed: do raw serialization of FreeListArray.
  * SW: fixed coolie death animation.
  * Blood: fix ammo count for 2 items.
  * Don't inline M_Calloc() calls because GCC is shit.
  * Duke/RR: fixed player dying when falling from great heights
    while god mode being on.
  * Duke: Remove incur_damage() from dispatcher.
  * Duke: Use checkp() in ParseState::parse() to remove some
    duplicated code.
  * gave translations a dedicated scripted type.
  * Exhumed: Return early in movesprite() if the actor's sector
    is null.
  * Exhumed: fix handling of angles for the queen's eggs when
    colliding with a wall.
  * Exhumed: Clean up push factor in runlist_CheckRadialDamage()
    for players.
  * Exhumed: Always perform a range check on a sequence's
    length.
  * Exhumed: fixed radial damage push factor.
  * Exhumed: sanitize stupid implementation of UpdateEnemy and
    fixed bad use of it for the queen's eggs.
  * Consolidate Exhumed's nCamerapos and SW's DSWPlayer::si into
    something inside DCorePlayer.
  * bumped minimum OS version to 10.13 in .plist file
  * Blood: draw the powerup overlay on the alt HUD as well.
  * Duke: fixed breakable ceilings.
  * renamed $conreserve to $resourceid.
  * added some awful hackery to handle the different offsetting
    of Blood's native voxels vs. those imported via .DEF.
  * Make some utilities in vectors.h available as constexpr.
  * Duke: fixed bad loop index in gamevar init code.
  * cleaner handling of SW's panel sprites
  * Base all player structs on a common base class.
  * initial script exports for Blood, including some static data
    tables
  * retrieve time in fillSummary.
  * move kill/secret management into the shared code
  * moved all Is***Sprite function to animatesprite.cpp because
    that's the only place they still get used from.
  * Blood: get rid of the mirror struct and related data. This
    is a relic of Polymost.
  * renamed atfields in gib.cpp
  * took a hint from Blood-RE and replaced that awful
    reconstructed sorting function with the qsort call it most
    likely originally was.
  * consider swvoxfil.txt a known name for SW mods.
  * Duke: Fixed WT fallback for classic sounds in cases the user
    data does not exist.
  * fixed clipping range of artificially split sectors.
  * Exhumed: fixed sprite positioning issues
  * Vulkan backend updated.
  * zlib replaced with miniz.
  * FileReader is now 64 bit capable.
  * jpeg replaced with stb-image.
  * fix incomplete palette generation for paletted rendering.
  * added new Zoom variants of DukeDC and Vacation add ons.
  * added WebP and QUI image support
  * added missing cyrillic у (small U) for Blood's SmallFont
  * fixed broken character fallback for cyrillic T.
  * consolidated the 4 ReadSound functions.
  * controller handling improvements
  * use stb_sprintf.
  * cleanup on the sound init code.
  * macOS version detection overhaul.
  * SW: remove redundant ; in sector object serializer.
  * RRRA: Mama Jackalope's poison cloud did no damage
  * -fixed: tilenum 0 is a valid image for flat and wall
    sprites.
  * Blood: fixed bad scaling in viewBurnTime.
  * RR: spawn the correct player class.
  * remove lots of unneeded SAVE_CODE and SAVE_DATA
    declarations.
  * SW: migrate state functions to the VM.
  * give SW's sounds proper names and move their definition out
    of the EXE.
  * fix crash in RR when dying with an item-less weapon.
  * NOSHADOW flag.
  * fixed missing handling for BADGUYSTAYPUT flag.
  * fixed: The MVE player ignored the initial sound playing
    state.
  * Duke: for camera textures, set display_mirror to 2, not 1.
  * Blood: clear gHitInfo when starting a level.
  * Duke: clear resource ID when setting up the original sounds
    for World Tour.
  * Duke/RR: Use the exact same trajectory for autoaiming and
    the actual attack hitscan for the pistol.
  * Duke: Allow view tilting for RRRA vehicles on separate CVAR.
  * Duke: Convert RRRA's vehicle HUD tilting to a DAngle.
  * Allow roll input through the packet system, giving us 6DOF
    for VR usage, etc.
  * check for NOGRAVITY in 'fall'.
  * only declare the weapon gamevars for WW2GI.
  * made fallspecial game independent and eliminated all the
    wrapping and callback weirdness with fall.
  * clean out RRRA move flags in the CON parser for the other
    games.
  * added map flags to enable RR's special sector types in Duke
    as well.
  * use the symbolic constants for ST_160 and ST_161 in the last
    remaining places where they hadn't been put before.
  * eliminated lots of direct tile references in spawn() calls.
  * Exhumed: Change formula for cl_exviewtilting 2.
  * Exhumed: Move UpdateCreepySounds() into MoveThings() so its
    processing time can be clocked.
  * Exhumed: Move bobangle global into Player struct.
  * Exhumed: Move updatePlayerTarget() call back to main ticker
    loop.
  * Exhumed: Setup detection for Steam version.
  * Exhumed: Sequence refactor
  * Duke: fixed hitscan spread for enemies
  * Add more GOG registry search paths
  * Blood: display the charge meter for the dynamite also on the
    alternative HUD.
  * renamed temp_data[0] to 'counter' and map temp_data[5] to
    the now free temp_data[0].
  * migrate all script related info to the data stored in the
    actor classes.
  * added the action, move and ai properties.
  * got rid of the g_t pointer in the CON interpreter.
  * moved actioncounter and curframe to a dedicated variable.
  * refactored AI storage as well to not use ScriptCode anymore.
  * moved 'move' data out of the ScriptCode array as well.
  * moved actions out of the ScriptCode array and gave them a
    dedicated struct with meaningful member names.
  * Exhumed: don't pass uninitialized data to the sound engine.
  * Duke: fixed pitch calculation for explosion sounds.
  * validate statnum before spawning an actor.
  * Blood: fixed bad damage scaling in ConcussSprite
  * cleaned up Duke's very broken kill count system.
  * fixed swapped language IDs for Norwegian and Dutch.
  * Allow disabling of level start/end cutscenes if a user
    desires.
  * Update player camera angles right before drawing a frame.
  * Move invertmouse CVARs into common code.
  * Blood: Fix missing input bit in
    GameInteface::reapplyInputBits().
  * Duke/RRRA: Fix HUD tilting when reversing motorcycle
    backwards.
  * Ensure GameInput::Clear() clears the entire object.
  * Don't loop through all joystick axes and zero them in
    I_GetAxes().
  * Only scale the mouse input in GameInput::processMovement(),
    where it's needed.
  * Remove GameInterface::getConsoleAngles(), it's not needed
    anymore.
  * Make scaleAdjust a float since it's what's needed anyway.
  * Internalise InputPacket used in movement functions.
  * Move all mouse handling into GameInput class.
  * Initial conversion of game input into class GameInput.
  * Relocate processCrouchToggle().
  * Rearrange bools in processVehicleInput().
  * Move PlayerAngles constants into the class.
  * make RR's ingame thunder effect not depend on having seen
    one specific texture.
  * Exported all of Duke's actors
  * Exhumed: Backup actor location in BuildAnubis().
  * Exhumed: Rename last argument in seq_MoveSequence() to
    nFrame.
  * Duke: Ensure we backup player angles and not just pos when
    loading a save.
  * Blood: Fix potential null actor access in gi->CanSave().
  * Duke: Fix potential null actor access in gi->CanSave().
  * Remove backend crouch toggle solution redeploy with Duke/
    Exhumed/Blood using new ESyncBit bit.
  * Inline the remainder of InputState methods.
  * Move remaining mouse CVARs from inputstate.cpp to
    gameinput.cpp.
  * Move HIDInput struct from inputstate.h to gameinput.h.
  * Use an FVector2 inside HIDInput.
  * Eliminate the duplicate mouse storage since we have things
    in the right spot now.
  * Move all mouse CVARs from inputstate.cpp to gameinput.cpp.
  * Move remaining CCMDs and non-inputstate related items to
    gameinput.cpp.
  * Stop passing inputBuffer around within gameinput.cpp since
    everything's local now.
  * Move ApplyGlobalInput() into gameinput.cpp.
  * Make the turbo turn functions static within gameinput.cpp.
  * Move Duke's vehicle input processor into gameinput.cpp.
  * Duke: Make vehicle input code work generically for possible
    reusage.
  * Duke: Merge vehicle input code into one function.
  * Duke: Move RRRA vehicle tilting out of the input code and
    into the playsim.
  * Remove the mouse input negation out of the event handler.
  * Remove now-unneeded inline wrapper getHidInput().
  * Recover two ESyncBit values for other uses.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=427cded8fb6a316e0477dbf249c4f1e73d72a8f8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 raze/Makefile                                      | 15 ++++++----
 raze/PLIST                                         |  3 --
 raze/distinfo                                      | 19 ++++++++----
 raze/hacks.mk                                      |  3 ++
 raze/patches/patch-source_CMakeLists.txt           | 17 +++++++++++
 .../patch-source_common_audio_music_i__music.h     | 16 ++++++++++
 .../patch-source_common_console_c__console.h       | 13 --------
 ...patch-source_common_engine_palettecontainer.cpp | 14 +++++++++
 .../patch-source_common_objects_autosegs.cpp       | 14 +++++++++
 .../patches/patch-source_common_objects_autosegs.h | 14 +++++++++
 ...-source_common_platform_posix_sdl_i__system.cpp | 33 --------------------
 raze/patches/patch-source_common_textures_bitmap.h | 14 +++++++++
 .../patch-source_common_utility_engineerrors.cpp   | 14 +++++++++
 .../patch-source_common_utility_palette.cpp        | 35 ++++++++++++++++++++++
 raze/patches/patch-source_core_gameconfigfile.cpp  |  7 +++--
 .../patch-source_games_blood_src_nnexts.cpp        |  2 ++
 16 files changed, 170 insertions(+), 63 deletions(-)

diffs:
diff --git a/raze/Makefile b/raze/Makefile
index 41406bef5b..1144f4f9b8 100644
--- a/raze/Makefile
+++ b/raze/Makefile
@@ -5,7 +5,7 @@ PKGNAME=	raze-${DISTNAME}
 CATEGORIES=	games
 MASTER_SITES=	${MASTER_SITE_GITHUB:=ZDoom/}
 GITHUB_PROJECT=	Raze
-GITHUB_TAG=	1.7.1
+GITHUB_TAG=	1.8.1
 DIST_SUBDIR=	${GITHUB_PROJECT}
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
@@ -13,19 +13,24 @@ HOMEPAGE=	https://raze.zdoom.org/
 COMMENT=	Fork of the Build engine backed by GZDoom tech
 #LICENSE=	build AND gnu-gpl-v2
 
-WRKSRC=		${WRKDIR}/Raze-${GITHUB_TAG}
-USE_CMAKE=	yes
-USE_TOOLS+=	pkg-config
-USE_LANGUAGES=	c c++
+WRKSRC=			${WRKDIR}/Raze-${GITHUB_TAG}
+USE_CMAKE=		yes
+USE_TOOLS+=		pkg-config
+USE_LANGUAGES=		c c++
+USE_CXX_FEATURES=	c++17
 
 CMAKE_ARGS+=	-DINSTALL_PK3_PATH=share/games/raze
+CMAKE_ARGS+=	-DDYN_OPENAL=Off
+CXXFLAGS+=	-D PKGSRC_RAZE_PATH='"${PREFIX}/share/games/raze"'
 
 .include "../../archivers/bzip2/buildlink3.mk"
 .include "../../audio/fluidsynth/buildlink3.mk"
+.include "../../audio/openal-soft/buildlink3.mk"
 .include "../../devel/SDL2/buildlink3.mk"
 .include "../../devel/libexecinfo/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../graphics/libwebp/buildlink3.mk"
 .include "../../mk/dlopen.buildlink3.mk"
 .include "../../mk/jpeg.buildlink3.mk"
 .include "../../multimedia/libvpx/buildlink3.mk"
diff --git a/raze/PLIST b/raze/PLIST
index 40a56be982..e041438157 100644
--- a/raze/PLIST
+++ b/raze/PLIST
@@ -1,6 +1,3 @@
 @comment $NetBSD$
 bin/raze
-include/discord_register.h
-include/discord_rpc.h
-lib/libdiscord-rpc.a
 share/games/raze/raze.pk3
diff --git a/raze/distinfo b/raze/distinfo
index 5826fb837f..e007306c19 100644
--- a/raze/distinfo
+++ b/raze/distinfo
@@ -1,9 +1,16 @@
 $NetBSD$
 
-BLAKE2s (Raze/1.7.1.tar.gz) = da763806144771cdc20c55e253613de3e66f195b30d9f99bfda8ca3478832e89
-SHA512 (Raze/1.7.1.tar.gz) = 379148c2aee9ca37ddba70b75233e6db05f46c1fc99624c65adada399858dbd3141b1f5240cec2cf86e731eaa44d283136af791d4eefc9421c9fb244be084b4d
-Size (Raze/1.7.1.tar.gz) = 18722339 bytes
+BLAKE2s (Raze/1.8.1.tar.gz) = 8abfa0b3e59a7f761a5b06710a31ccba73d7a77497465e95195f2a604b3a17fc
+SHA512 (Raze/1.8.1.tar.gz) = 60e9f2499d4605bda30a6328fee0fdbcb9e543f9601a62a24fea21dcd2f6a601ffbaf972efd4af7103717af006a2dff3aae3b5fa522542867d8c187c16fd91de
+Size (Raze/1.8.1.tar.gz) = 18326513 bytes
 SHA1 (patch-libraries_ZVulkan_CMakeLists.txt) = 7600c20a8a421686bceeb3ad0623ac1a7c329bb3
-SHA1 (patch-source_common_console_c__console.h) = 08232b557703523e36228592d211fe8ad423b14c
-SHA1 (patch-source_common_platform_posix_sdl_i__system.cpp) = aa7e0edaa0166b2760910ad2f14461e5cd940a69
-SHA1 (patch-source_games_blood_src_nnexts.cpp) = d8c393d104c933944313cbf36ff5bb5d3d24f666
+SHA1 (patch-source_CMakeLists.txt) = 6307c68b08138bddafc5ecfea2f550c1e1c68699
+SHA1 (patch-source_common_audio_music_i__music.h) = bee5cefbc98fff6464ff829223c0d710c5b3207b
+SHA1 (patch-source_common_engine_palettecontainer.cpp) = e9b8a76dae41ab9e5e0f79f56bfe1e783626cd7d
+SHA1 (patch-source_common_objects_autosegs.cpp) = a3d568441d4c13543a36ef43a168153ec9e37c97
+SHA1 (patch-source_common_objects_autosegs.h) = 26b7e4ca2de35d260a10596a421f5bd91bd17565
+SHA1 (patch-source_common_textures_bitmap.h) = 46857773c2ef73c6ce56861e173521d3fcb59c36
+SHA1 (patch-source_common_utility_engineerrors.cpp) = 09e9dc7330094e8584e6d55647ef794f0f865a83
+SHA1 (patch-source_common_utility_palette.cpp) = d9085817ae0a6ffa9e0c9e839a8f569d3de76699
+SHA1 (patch-source_core_gameconfigfile.cpp) = 46ddce26760e50cf90375a66835557b9d33ea0b5
+SHA1 (patch-source_games_blood_src_nnexts.cpp) = 09c29fdae8228dc82555f722b3907355bd1b3106
diff --git a/raze/hacks.mk b/raze/hacks.mk
new file mode 100644
index 0000000000..7111a169ae
--- /dev/null
+++ b/raze/hacks.mk
@@ -0,0 +1,3 @@
+# $NetBSD$
+
+CXXFLAGS+=	-fno-tree-dse
diff --git a/raze/patches/patch-source_CMakeLists.txt b/raze/patches/patch-source_CMakeLists.txt
new file mode 100644
index 0000000000..0c09221412
--- /dev/null
+++ b/raze/patches/patch-source_CMakeLists.txt
@@ -0,0 +1,17 @@
+$NetBSD$
+
+There are many warnings with the pre-compiled headers. Since raze
+sometimes generates a segmentation fault on startup, rather disable
+this optimization. See also hacks.mk.
+
+--- source/CMakeLists.txt.orig	2023-11-12 13:35:34.000000000 +0000
++++ source/CMakeLists.txt
+@@ -1292,7 +1292,7 @@ list( REMOVE_ITEM GAME_NONPCH_SOURCES ${
+ 
+ add_executable( ${PROJECT_NAME} WIN32 MACOSX_BUNDLE ${GAME_SOURCES} )
+ 
+-target_precompile_headers( ${PROJECT_NAME} PRIVATE g_pch.h )
++#target_precompile_headers( ${PROJECT_NAME} PRIVATE g_pch.h )
+ 
+ #set_source_files_properties( ${FASTMATH_SOURCES} PROPERTIES COMPILE_FLAGS ${DEM_FASTMATH_FLAG} )
+ set_source_files_properties( common/engine/sc_man.cpp PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/sc_man_scanner.h" )
diff --git a/raze/patches/patch-source_common_audio_music_i__music.h b/raze/patches/patch-source_common_audio_music_i__music.h
new file mode 100644
index 0000000000..cc2a7b1d1f
--- /dev/null
+++ b/raze/patches/patch-source_common_audio_music_i__music.h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+i_music needs cmath for log10f and powf (exposed by turning
+pre-compiled headers off).
+
+--- source/common/audio/music/i_music.h.orig	2023-11-12 13:35:34.000000000 +0000
++++ source/common/audio/music/i_music.h
+@@ -34,6 +34,8 @@
+ #ifndef __I_MUSIC_H__
+ #define __I_MUSIC_H__
+ 
++#include <cmath>
++
+ //
+ //	MUSIC I/O
+ //
diff --git a/raze/patches/patch-source_common_console_c__console.h b/raze/patches/patch-source_common_console_c__console.h
deleted file mode 100644
index c5595fbcfa..0000000000
--- a/raze/patches/patch-source_common_console_c__console.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- source/common/console/c_console.h.orig	2023-01-07 18:45:29.000000000 +0000
-+++ source/common/console/c_console.h
-@@ -68,6 +68,8 @@ void AddToConsole (int printlevel, const
- int PrintString (int printlevel, const char *string);
- int PrintStringHigh (const char *string);
- int VPrintf (int printlevel, const char *format, va_list parms) GCCFORMAT(2);
-+int Printf (int printlevel, const char *format, ...);
-+int Printf (const char *format, ...);
- 
- void C_DrawConsole ();
- void C_ToggleConsole (void);
diff --git a/raze/patches/patch-source_common_engine_palettecontainer.cpp b/raze/patches/patch-source_common_engine_palettecontainer.cpp
new file mode 100644
index 0000000000..66156bfdf7
--- /dev/null
+++ b/raze/patches/patch-source_common_engine_palettecontainer.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Include cmath for round() (exposed by turning pre-compiled headers off).
+
+--- source/common/engine/palettecontainer.cpp.orig	2023-11-12 13:35:34.000000000 +0000
++++ source/common/engine/palettecontainer.cpp
+@@ -32,6 +32,7 @@
+ **
+ */
+ 
++#include <cmath>
+ #include "palutil.h"
+ #include "sc_man.h"
+ #include "m_crc32.h"
diff --git a/raze/patches/patch-source_common_objects_autosegs.cpp b/raze/patches/patch-source_common_objects_autosegs.cpp
new file mode 100644
index 0000000000..f24f1d8292
--- /dev/null
+++ b/raze/patches/patch-source_common_objects_autosegs.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Include cassert for assert() (exposed by turning pre-compiled headers off).
+
+--- source/common/objects/autosegs.cpp.orig	2023-11-12 13:35:34.000000000 +0000
++++ source/common/objects/autosegs.cpp
+@@ -42,6 +42,7 @@
+ ** compile with something other than Visual C++ or GCC.
+ */
+ 
++#include <cassert>
+ #include "autosegs.h"
+ 
+ #ifdef _WIN32
diff --git a/raze/patches/patch-source_common_objects_autosegs.h b/raze/patches/patch-source_common_objects_autosegs.h
new file mode 100644
index 0000000000..ee8d666771
--- /dev/null
+++ b/raze/patches/patch-source_common_objects_autosegs.h
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Include cstdint fot intptr_t (exposed by turning pre-compiled headers off).
+
+--- source/common/objects/autosegs.h.orig	2023-11-12 13:35:34.000000000 +0000
++++ source/common/objects/autosegs.h
+@@ -35,6 +35,7 @@
+ #ifndef AUTOSEGS_H
+ #define AUTOSEGS_H
+ 
++#include <cstdint>
+ #include <type_traits>
+ 
+ #if defined(__clang__)
diff --git a/raze/patches/patch-source_common_platform_posix_sdl_i__system.cpp b/raze/patches/patch-source_common_platform_posix_sdl_i__system.cpp
deleted file mode 100644
index 2b78ffa233..0000000000
--- a/raze/patches/patch-source_common_platform_posix_sdl_i__system.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD$
-
---- source/common/platform/posix/sdl/i_system.cpp.orig	2023-01-07 18:45:29.000000000 +0000
-+++ source/common/platform/posix/sdl/i_system.cpp
-@@ -62,6 +62,7 @@
- #include "i_sound.h"
- #include "i_interface.h"
- #include "v_font.h"
-+#include "c_console.h"
- #include "c_cvars.h"
- #include "palutil.h"
- #include "st_start.h"
-@@ -408,7 +409,8 @@ FString I_GetFromClipboard (bool use_pri
- 
- FString I_GetCWD()
- {
--	char* curdir = get_current_dir_name();
-+	char* curdir;
-+	curdir = getcwd(NULL, 0);
- 	if (!curdir) 
- 	{
- 		return "";
-@@ -447,8 +449,9 @@ unsigned int I_MakeRNGSeed()
- 
- void I_OpenShellFolder(const char* infolder)
- {
--	char* curdir = get_current_dir_name();
-+	char* curdir;
- 
-+	curdir = getcwd(NULL, 0);
- 	if (!chdir(infolder))
- 	{
- 		Printf("Opening folder: %s\n", infolder);
diff --git a/raze/patches/patch-source_common_textures_bitmap.h b/raze/patches/patch-source_common_textures_bitmap.h
new file mode 100644
index 0000000000..25285da332
--- /dev/null
+++ b/raze/patches/patch-source_common_textures_bitmap.h
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Include cstring for memcpy and memset (exposed by turning pre-compiled headers off).
+
+--- source/common/textures/bitmap.h.orig	2023-11-12 13:35:34.000000000 +0000
++++ source/common/textures/bitmap.h
+@@ -36,6 +36,7 @@
+ #ifndef __BITMAP_H__
+ #define __BITMAP_H__
+ 
++#include <cstring>
+ #include "palentry.h"
+ 
+ struct FCopyInfo;
diff --git a/raze/patches/patch-source_common_utility_engineerrors.cpp b/raze/patches/patch-source_common_utility_engineerrors.cpp
new file mode 100644
index 0000000000..407f5e2497
--- /dev/null
+++ b/raze/patches/patch-source_common_utility_engineerrors.cpp
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Include cstdarg for va_list (exposed by turning pre-compiled headers off).
+
+--- source/common/utility/engineerrors.cpp.orig	2023-11-12 13:35:34.000000000 +0000
++++ source/common/utility/engineerrors.cpp
+@@ -74,6 +74,7 @@ void I_DebugPrintf(const char *fmt,...)
+ }
+ #endif
+ 
++#include <cstdarg>
+ #include "engineerrors.h"
+ 
+ //==========================================================================
diff --git a/raze/patches/patch-source_common_utility_palette.cpp b/raze/patches/patch-source_common_utility_palette.cpp
new file mode 100644
index 0000000000..5e3af0dc31
--- /dev/null
+++ b/raze/patches/patch-source_common_utility_palette.cpp
@@ -0,0 +1,35 @@
+$NetBSD$
+
+Include cmath for abs, floor and pow (exposed by turning pre-compiled headers off).
+Use numeric_limits for epsilon, which is the (portable) C++ way.
+
+--- source/common/utility/palette.cpp.orig	2023-11-12 13:35:34.000000000 +0000
++++ source/common/utility/palette.cpp
+@@ -33,6 +33,8 @@
+ */
+ 
+ #include <algorithm>
++#include <cmath>
++#include <limits>
+ #include "palutil.h"
+ #include "palentry.h"
+ #include "sc_man.h"
+@@ -877,12 +879,12 @@ int AddSpecialColormap(PalEntry *BaseCol
+ 	for (unsigned i = 1; i < SpecialColormaps.Size(); i++)
+ 	{
+ 		// Avoid precision issues here when trying to find a proper match.
+-		if (fabs(SpecialColormaps[i].ColorizeStart[0] - r1) < FLT_EPSILON &&
+-			fabs(SpecialColormaps[i].ColorizeStart[1] - g1) < FLT_EPSILON &&
+-			fabs(SpecialColormaps[i].ColorizeStart[2] - b1) < FLT_EPSILON &&
+-			fabs(SpecialColormaps[i].ColorizeEnd[0] - r2) < FLT_EPSILON &&
+-			fabs(SpecialColormaps[i].ColorizeEnd[1] - g2) < FLT_EPSILON &&
+-			fabs(SpecialColormaps[i].ColorizeEnd[2] - b2) < FLT_EPSILON)
++		if (fabs(SpecialColormaps[i].ColorizeStart[0] - r1) < std::numeric_limits<float>::epsilon() &&
++			fabs(SpecialColormaps[i].ColorizeStart[1] - g1) < std::numeric_limits<float>::epsilon() &&
++			fabs(SpecialColormaps[i].ColorizeStart[2] - b1) < std::numeric_limits<float>::epsilon() &&
++			fabs(SpecialColormaps[i].ColorizeEnd[0] - r2) < std::numeric_limits<float>::epsilon() &&
++			fabs(SpecialColormaps[i].ColorizeEnd[1] - g2) < std::numeric_limits<float>::epsilon() &&
++			fabs(SpecialColormaps[i].ColorizeEnd[2] - b2) < std::numeric_limits<float>::epsilon())
+ 		{
+ 			return i;	// The map already exists
+ 		}
diff --git a/raze/patches/patch-source_core_gameconfigfile.cpp b/raze/patches/patch-source_core_gameconfigfile.cpp
index c92c95e89e..5319f5767e 100644
--- a/raze/patches/patch-source_core_gameconfigfile.cpp
+++ b/raze/patches/patch-source_core_gameconfigfile.cpp
@@ -2,12 +2,13 @@ $NetBSD$
 
 Add the pkgsrc search path for game files.
 
---- source/core/gameconfigfile.cpp.orig	2022-07-20 13:37:09.000000000 +0000
+--- source/core/gameconfigfile.cpp.orig	2023-11-12 13:35:34.000000000 +0000
 +++ source/core/gameconfigfile.cpp
-@@ -142,6 +142,7 @@ FGameConfigFile::FGameConfigFile ()
- 		SetValueForKey ("Path", "/usr/share/games/nblood", true);
+@@ -157,6 +157,8 @@ FGameConfigFile::FGameConfigFile ()
+ 		SetValueForKey ("Path", "/usr/local/share/games/eduke32", true);
  		SetValueForKey ("Path", "/usr/local/share/games/nblood", true);
  #endif
++		// Section "FileSearch.Directories"
 +		SetValueForKey ("Path", PKGSRC_RAZE_PATH, true);
  	}
  
diff --git a/raze/patches/patch-source_games_blood_src_nnexts.cpp b/raze/patches/patch-source_games_blood_src_nnexts.cpp
index 2a1fe5ebc0..1f5b889dfa 100644
--- a/raze/patches/patch-source_games_blood_src_nnexts.cpp
+++ b/raze/patches/patch-source_games_blood_src_nnexts.cpp
@@ -1,5 +1,7 @@
 $NetBSD$
 
+Use namespace std for max.
+
 --- source/games/blood/src/nnexts.cpp.orig	2023-01-07 18:45:29.000000000 +0000
 +++ source/games/blood/src/nnexts.cpp
 @@ -4203,12 +4203,12 @@ bool condCheckSector(DBloodActor* aCond,


Home | Main Index | Thread Index | Old Index