Add thedarkmod.
The Dark Mod is free and open-source software first-person stealth video game, inspired by the Thief series by Looking Glass Studios. The game provides the basic framework and tools – engine, assets, models, an editor – for more than 100 fan-made missions, including several multi-mission campaigns.
This commit is contained in:
parent
cc2912b820
commit
23e73581f2
1
Makefile
1
Makefile
|
@ -4627,6 +4627,7 @@ SUBDIR+= thabit-ttf
|
|||
SUBDIR+= thawab
|
||||
SUBDIR+= thcrut
|
||||
SUBDIR+= theama
|
||||
SUBDIR+= thedarkmod
|
||||
SUBDIR+= thepeg
|
||||
SUBDIR+= threadingbuildingblocks
|
||||
SUBDIR+= thrift
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
# $NetBSD$
|
||||
|
||||
PKGNAME= thedarkmod-2.07
|
||||
DISTNAME= thedarkmod.${PKGVERSION_NOREV}.src
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= http://www.thedarkmod.com/sources/
|
||||
EXTRACT_SUFX= .7z
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= http://www.thedarkmod.com/main/
|
||||
COMMENT= First-person stealth video game inspired by the Thief series
|
||||
LICENSE= gnu-gpl-v3
|
||||
|
||||
WRKSRC= ${WRKDIR}
|
||||
|
||||
USE_LANGUAGES= c c++
|
||||
|
||||
GCC_REQD+= 8.0
|
||||
PYTHON_VERSIONS_ACCEPTED= 27
|
||||
|
||||
CXXFLAGS+= -Wfatal-errors
|
||||
|
||||
.include "../../mk/bsd.prefs.mk"
|
||||
|
||||
CXXFLAGS+= -DUSE_FILE32API
|
||||
|
||||
SCONS_ARGS+= ${_MAKE_JOBS}
|
||||
|
||||
.if ${MACHINE_ARCH} == "x86_64"
|
||||
SCONS_ARGS+= TARGET_ARCH="x64"
|
||||
.elif ${MACHINE_ARCH} == "i386"
|
||||
SCONS_ARGS+= TARGET_ARCH="x86"
|
||||
.endif
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONSBIN} ${SCONS_ARGS} \
|
||||
CC=${CC:Q} CXX=${CXX:Q} CFLAGS=${CFLAGS:Q} CXXFLAGS=${CXXFLAGS:Q} \
|
||||
LINKFLAGS=${LDFLAGS:Q} CPPPATH=${INCL_PATH:Q} VERBOSE=1 BUILD="release"
|
||||
|
||||
do-install:
|
||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONSBIN} ${SCONS_ARGS} \
|
||||
CC=${CC:Q} CXX=${CXX:Q} CFLAGS=${CFLAGS:Q} CXXFLAGS=${CXXFLAGS:Q} \
|
||||
LINKFLAGS=${LDFLAGS:Q} CPPPATH=${INCL_PATH:Q} \
|
||||
--prefix=${DESTDIR}${PREFIX} install
|
||||
|
||||
.include "../../audio/openal-soft/buildlink3.mk"
|
||||
.include "../../devel/scons/buildlink3.mk"
|
||||
.include "../../graphics/MesaLib/buildlink3.mk"
|
||||
.include "../../multimedia/ffmpeg4/buildlink3.mk"
|
||||
.include "../../www/curl/buildlink3.mk"
|
||||
.include "../../x11/libX11/buildlink3.mk"
|
||||
.include "../../x11/libXext/buildlink3.mk"
|
||||
.include "../../x11/libXxf86vm/buildlink3.mk"
|
||||
.include "../../mk/dlopen.buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
|
@ -0,0 +1,6 @@
|
|||
do-install.
|
||||
Include the data files from the mirrors. (http://mirrors.thedarkmod.com/)
|
||||
Not versioned. Probably get installed to ~/thedarkmod, fetch them with a script.
|
||||
Or mirror them for pkgsrc.
|
||||
Change to this directory in a shell script before launching the executable.
|
||||
Document the patches.
|
|
@ -0,0 +1,22 @@
|
|||
$NetBSD$
|
||||
|
||||
SHA1 (thedarkmod.2.07.src.7z) = e615af9e67990ed48cee98eb218d389d4b095b4c
|
||||
RMD160 (thedarkmod.2.07.src.7z) = 94ded62dcb4a5b0e0b9bcc24e40131ecd4c58b19
|
||||
SHA512 (thedarkmod.2.07.src.7z) = e76aba85722af0e496b604a20fb9f33a44867f0179187d018a6f4dcde5a28987913ead473e86aa0810d2b37c198bfaba48c9f5ccc895af0dfc5863baf15e6db4
|
||||
Size (thedarkmod.2.07.src.7z) = 52411631 bytes
|
||||
SHA1 (patch-SConstruct) = 26e4aef4b00a2bb4f989323952b637ed71ead301
|
||||
SHA1 (patch-TypeInfo_main.cpp) = ad58a4917b961c48858af61f25c8565dcb50d54f
|
||||
SHA1 (patch-game_anim_Anim__Blend.cpp) = 326457af38817439b623dd20679be67779aca3d4
|
||||
SHA1 (patch-idlib_bv_Frustum.cpp) = 29ab03477c8689820d0c0543f3a00956557b1c5b
|
||||
SHA1 (patch-idlib_math_Simd.cpp) = 54553c575f2f0bcdbb7ab9e6be42adbc874c8333
|
||||
SHA1 (patch-idlib_math_Simd.h) = a93f686511f8b10c63a5fd29bbebaf3a901e91da
|
||||
SHA1 (patch-idlib_math_Simd__AVX.h) = 8a9347d797a3a53e47b4df4ef721873e01b23da3
|
||||
SHA1 (patch-idlib_math_Simd__AVX2.h) = e88cb5d26d53a13f04ab817ae9cc1480555d75bd
|
||||
SHA1 (patch-renderer_qgl.h) = 4ec1b4b233046987874a8f366830fd5cfc2c564f
|
||||
SHA1 (patch-sys_gllog_gl__extensions.cpp.m4) = eeb4961c611e86b8e7ebbe333667ff9e561c4cad
|
||||
SHA1 (patch-sys_linux_main.cpp) = 2f15b1c3b635fc5f32fccbbc7f6ba39da17d8327
|
||||
SHA1 (patch-sys_osx_DOOMController.mm) = 492c6555fb0550e6eb41617176574b8c616ff48d
|
||||
SHA1 (patch-sys_scons_SConscript.darkmod) = 076e5663f2b16b88892b49d10ec11278d9be98f5
|
||||
SHA1 (patch-sys_sys__local.cpp) = 265e7f1c8c42d33264272ff079778355da89184b
|
||||
SHA1 (patch-sys_sys__local.h) = 20eb3286e84c1be82fc67d51c3ef79612c3d119e
|
||||
SHA1 (patch-sys_sys__public.h) = 5549b99eb433a543d5f086e2ae9432ba3f08d714
|
|
@ -0,0 +1,28 @@
|
|||
$NetBSD$
|
||||
|
||||
--- SConstruct.orig 2019-02-02 17:51:46.000000000 +0000
|
||||
+++ SConstruct
|
||||
@@ -12,7 +12,8 @@ import scons_utils
|
||||
conf_filename='site.conf'
|
||||
# choose configuration variables which should be saved between runs
|
||||
# ( we handle all those as strings )
|
||||
-serialized=['CC', 'CXX', 'JOBS', 'BUILD', 'GL_HARDLINK',
|
||||
+serialized=['CC', 'CXX', 'CFLAGS', 'CXXFLAGS', 'LINKFLAGS',
|
||||
+ 'JOBS', 'BUILD', 'GL_HARDLINK',
|
||||
'DEBUG_MEMORY', 'LIBC_MALLOC', 'ID_MCHECK', 'NOCURL',
|
||||
'BUILD_ROOT', 'BASEFLAGS', 'SILENT', 'NO_GCH', 'OPENMP',
|
||||
'TARGET_ARCH' ]
|
||||
@@ -214,11 +215,11 @@ LINK = CXX
|
||||
# BASE + GAME + OPT for game
|
||||
# _noopt versions of the environements are built without the OPT
|
||||
|
||||
-BASECPPFLAGS = [ ]
|
||||
+BASECPPFLAGS = [ CFLAGS.split(" "), CXXFLAGS.split(" ") ]
|
||||
CORECPPPATH = [ ]
|
||||
CORELIBPATH = [ ]
|
||||
CORECPPFLAGS = [ ]
|
||||
-BASELINKFLAGS = [ ]
|
||||
+BASELINKFLAGS = [ LINKFLAGS.split(" ") ]
|
||||
CORELINKFLAGS = [ ]
|
||||
|
||||
# for release build, further optimisations that may not work on all files
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- TypeInfo/main.cpp.orig 2019-02-02 17:51:39.000000000 +0000
|
||||
+++ TypeInfo/main.cpp
|
||||
@@ -221,7 +221,7 @@ void idSysLocal::DebugVPrintf( const c
|
||||
|
||||
double idSysLocal::GetClockTicks( void ) { return 0.0; }
|
||||
double idSysLocal::ClockTicksPerSecond( void ) { return 1.0; }
|
||||
-cpuid_t idSysLocal::GetProcessorId( void ) { return (cpuid_t)0; }
|
||||
+id_cpuid_t idSysLocal::GetProcessorId( void ) { return (cpuid_t)0; }
|
||||
const char * idSysLocal::GetProcessorString( void ) { return ""; }
|
||||
void idSysLocal::FPU_SetFTZ( bool enable ) {}
|
||||
void idSysLocal::FPU_SetDAZ( bool enable ) {}
|
|
@ -0,0 +1,16 @@
|
|||
$NetBSD$
|
||||
|
||||
--- game/anim/Anim_Blend.cpp.orig 2019-02-02 17:51:30.000000000 +0000
|
||||
+++ game/anim/Anim_Blend.cpp
|
||||
@@ -3666,11 +3666,7 @@ bool idDeclModelDef::Parse( const char *
|
||||
}
|
||||
|
||||
for( i = ANIMCHANNEL_ALL + 1; i < ANIM_NumAnimChannels; i++ ) {
|
||||
-#if MACOS_X || __linux__
|
||||
if ( !strcasecmp( channelNames[ i ], token2.c_str() ) )
|
||||
-#else
|
||||
- if ( !stricmp( channelNames[ i ], token2.c_str() ) )
|
||||
-#endif
|
||||
{
|
||||
break;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- idlib/bv/Frustum.cpp.orig 2019-02-02 17:51:35.000000000 +0000
|
||||
+++ idlib/bv/Frustum.cpp
|
||||
@@ -2033,7 +2033,7 @@ bool idFrustum::ProjectionBounds( const
|
||||
return ProjectionBounds( idBox( bounds, vec3_origin, mat3_identity ), projectionBounds );
|
||||
}
|
||||
|
||||
-#if !defined(__linux__) && !defined(MACOS_X)
|
||||
+#if !defined(unix) && !defined(__unix__) && !defined(__unix)
|
||||
|
||||
/*
|
||||
============
|
|
@ -0,0 +1,31 @@
|
|||
$NetBSD$
|
||||
|
||||
--- idlib/math/Simd.cpp.orig 2019-02-02 17:51:35.000000000 +0000
|
||||
+++ idlib/math/Simd.cpp
|
||||
@@ -56,7 +56,7 @@ idSIMD::InitProcessor
|
||||
void idSIMD::InitProcessor( const char *module, bool forceGeneric ) {
|
||||
idSIMDProcessor *newProcessor;
|
||||
|
||||
- cpuid_t cpuid = idLib::sys->GetProcessorId();
|
||||
+ id_cpuid_t cpuid = idLib::sys->GetProcessorId();
|
||||
|
||||
/*
|
||||
* Tels: Bug #2413: Under Linux, cpuid_t is 0, so use inline assembly to get
|
||||
@@ -103,7 +103,7 @@ void idSIMD::InitProcessor( const char *
|
||||
}
|
||||
|
||||
//idLib::common->Printf( "cpuid result is %i (c = %i d = %i)\n", result, c, d);
|
||||
- cpuid = ( cpuid_t )result;
|
||||
+ cpuid = ( id_cpuid_t )result;
|
||||
#endif
|
||||
|
||||
// Print what we found to console
|
||||
@@ -3986,7 +3986,7 @@ void idSIMD::Test_f( const idCmdArgs &ar
|
||||
p_generic = generic;
|
||||
|
||||
if ( idStr::Length( args.Argv( 1 ) ) != 0 ) {
|
||||
- cpuid_t cpuid = idLib::sys->GetProcessorId();
|
||||
+ id_cpuid_t cpuid = idLib::sys->GetProcessorId();
|
||||
idStr argString = args.Args();
|
||||
|
||||
argString.Remove( ' ' );
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- idlib/math/Simd.h.orig 2019-02-02 17:51:35.000000000 +0000
|
||||
+++ idlib/math/Simd.h
|
||||
@@ -91,7 +91,7 @@ class idSIMDProcessor {
|
||||
public:
|
||||
idSIMDProcessor( void ) { cpuid = CPUID_NONE; }
|
||||
|
||||
- cpuid_t cpuid;
|
||||
+ id_cpuid_t cpuid;
|
||||
|
||||
virtual const char * VPCALL GetName( void ) const = 0;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
$NetBSD$
|
||||
|
||||
--- idlib/math/Simd_AVX.h.orig 2019-02-02 17:51:35.000000000 +0000
|
||||
+++ idlib/math/Simd_AVX.h
|
||||
@@ -23,17 +23,11 @@
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
-#ifdef __linux__
|
||||
#define ALLOW_AVX __attribute__ ((__target__ ("avx")))
|
||||
-#else
|
||||
-#define ALLOW_AVX
|
||||
-#endif
|
||||
-
|
||||
-
|
||||
|
||||
class idSIMD_AVX : public idSIMD_SSE3 {
|
||||
public:
|
||||
virtual const char * VPCALL GetName( void ) const;
|
||||
virtual void VPCALL CullByFrustum( idDrawVert *verts, const int numVerts, const idPlane frustum[6], byte *pointCull, float epsilon ) ALLOW_AVX;
|
||||
virtual void VPCALL CullByFrustum2( idDrawVert *verts, const int numVerts, const idPlane frustum[6], unsigned short *pointCull, float epsilon ) ALLOW_AVX;
|
||||
-};
|
||||
\ No newline at end of file
|
||||
+};
|
|
@ -0,0 +1,18 @@
|
|||
$NetBSD$
|
||||
|
||||
--- idlib/math/Simd_AVX2.h.orig 2019-02-02 17:51:35.000000000 +0000
|
||||
+++ idlib/math/Simd_AVX2.h
|
||||
@@ -23,13 +23,7 @@
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
-#ifdef __linux__
|
||||
#define ALLOW_AVX2 __attribute__ ((__target__ ("avx2"))) __attribute__ ((__target__ ("fma")))
|
||||
-#else
|
||||
-#define ALLOW_AVX2
|
||||
-#endif
|
||||
-
|
||||
-
|
||||
|
||||
class idSIMD_AVX2 : public idSIMD_AVX {
|
||||
public:
|
|
@ -0,0 +1,45 @@
|
|||
$NetBSD$
|
||||
|
||||
Use GL/gl.h on !linux...
|
||||
|
||||
--- renderer/qgl.h.orig 2019-02-02 17:51:32.000000000 +0000
|
||||
+++ renderer/qgl.h
|
||||
@@ -29,19 +29,13 @@
|
||||
#define GL_GLEXT_LEGACY
|
||||
#include <OpenGL/gl.h>
|
||||
|
||||
-#elif defined( __linux__ )
|
||||
-
|
||||
+#else
|
||||
// using our local glext.h
|
||||
// http://oss.sgi.com/projects/ogl-sample/ABI/
|
||||
#define GL_GLEXT_LEGACY
|
||||
#define GLX_GLXEXT_LEGACY
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glx.h>
|
||||
-
|
||||
-#else
|
||||
-
|
||||
-#include <gl.h>
|
||||
-
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRY
|
||||
@@ -507,8 +501,6 @@ extern BOOL ( WINAPI * qwglSwapLayerBuff
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
-#if defined( __linux__ )
|
||||
-
|
||||
//GLX Functions
|
||||
extern XVisualInfo * (*qglXChooseVisual)( Display *dpy, int screen, int *attribList );
|
||||
extern GLXContext (*qglXCreateContext)( Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct );
|
||||
@@ -523,8 +515,6 @@ extern GLExtension_t (*qglXGetProcAddres
|
||||
#include "../sys/linux/qgl_enforce.h"
|
||||
#endif
|
||||
|
||||
-#endif // __linux__
|
||||
-
|
||||
#endif // hardlinlk vs dlopen
|
||||
|
||||
#endif
|
|
@ -0,0 +1,21 @@
|
|||
$NetBSD$
|
||||
|
||||
--- sys/gllog/gl_extensions.cpp.m4.orig 2019-02-02 17:51:38.000000000 +0000
|
||||
+++ sys/gllog/gl_extensions.cpp.m4
|
||||
@@ -46,16 +46,12 @@ GLExtension_t GLimp_ExtensionPointer( co
|
||||
}
|
||||
#endif
|
||||
GLExtension_t ret;
|
||||
- #if defined(__linux__)
|
||||
// for some reason glXGetProcAddressARB doesn't work on RH9?
|
||||
ret = qglXGetProcAddressARB((const GLubyte *) name);
|
||||
if ( !ret ) {
|
||||
common->Printf("glXGetProcAddressARB failed: \"%s\"\n", name);
|
||||
return StubFunction;
|
||||
}
|
||||
- #else
|
||||
- #error Need OS define
|
||||
- #endif
|
||||
return ret;
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- sys/linux/main.cpp.orig 2019-02-02 17:51:37.000000000 +0000
|
||||
+++ sys/linux/main.cpp
|
||||
@@ -246,7 +246,7 @@ void Sys_Shutdown( void ) {
|
||||
Sys_GetProcessorId
|
||||
===============
|
||||
*/
|
||||
-cpuid_t Sys_GetProcessorId( void ) {
|
||||
+id_cpuid_t Sys_GetProcessorId( void ) {
|
||||
return CPUID_GENERIC;
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
$NetBSD$
|
||||
|
||||
--- sys/osx/DOOMController.mm.orig 2019-02-02 17:51:38.000000000 +0000
|
||||
+++ sys/osx/DOOMController.mm
|
||||
@@ -459,8 +459,8 @@ void Sys_Shutdown( void ) {
|
||||
Sys_GetProcessorId
|
||||
===============
|
||||
*/
|
||||
-cpuid_t Sys_GetProcessorId( void ) {
|
||||
- cpuid_t cpuid = CPUID_GENERIC;
|
||||
+id_cpuid_t Sys_GetProcessorId( void ) {
|
||||
+ id_cpuid_t cpuid = CPUID_GENERIC;
|
||||
#if defined(__ppc__)
|
||||
cpuid |= CPUID_ALTIVEC;
|
||||
#elif defined(__i386__)
|
|
@ -0,0 +1,43 @@
|
|||
$NetBSD$
|
||||
|
||||
--- sys/scons/SConscript.darkmod.orig 2019-02-02 17:51:38.000000000 +0000
|
||||
+++ sys/scons/SConscript.darkmod
|
||||
@@ -47,32 +47,24 @@ local_env = g_env_game.Clone()
|
||||
# greebo: Add all custom-built libraries
|
||||
if (TARGET_ARCH == 'x86'):
|
||||
local_env.Append(LIBS = [
|
||||
- File('#/linux/libcurl/libcurl.a'),
|
||||
File('#/linux/polarssl/libpolarssl.a'),
|
||||
- File('#/linux/ffmpeg/libavformat.a'),
|
||||
- File('#/linux/ffmpeg/libavcodec.a'),
|
||||
- File('#/linux/ffmpeg/libavutil.a'),
|
||||
- File('#/linux/ffmpeg/libswscale.a'),
|
||||
- File('#/linux/ffmpeg/libswresample.a')
|
||||
])
|
||||
if (TARGET_ARCH == 'x64'):
|
||||
local_env.Append(LIBS = [
|
||||
- File('#/linux/libcurl/lib64/libcurl.a'),
|
||||
File('#/linux/polarssl/lib64/libpolarssl.a'),
|
||||
- File('#/linux/ffmpeg/lib64/libavformat.a'),
|
||||
- File('#/linux/ffmpeg/lib64/libavcodec.a'),
|
||||
- File('#/linux/ffmpeg/lib64/libavutil.a'),
|
||||
- File('#/linux/ffmpeg/lib64/libswscale.a'),
|
||||
- File('#/linux/ffmpeg/lib64/libswresample.a')
|
||||
])
|
||||
|
||||
# Add all standard libraries (taken from system)
|
||||
local_env.Append( LIBS = [ 'X11', 'Xext', 'Xxf86vm' ] ) # 'Xxf86dga',
|
||||
#local_env.Append( LIBPATH = [ '/usr/X11R6/lib' ] )
|
||||
-local_env.Append( LIBPATH = [ '/usr/lib/i386-linux-gnu' ] )
|
||||
+local_env.Append( LIBS = [ 'curl' ] )
|
||||
local_env.Append( LIBS = [ 'openal' ] )
|
||||
-local_env.Append( LIBS = [ 'dl' ] )
|
||||
local_env.Append( LIBS = [ 'pthread' ] )
|
||||
+local_env.Append( LIBS = [ 'avformat' ] )
|
||||
+local_env.Append( LIBS = [ 'avcodec' ] )
|
||||
+local_env.Append( LIBS = [ 'avutil' ] )
|
||||
+local_env.Append( LIBS = [ 'swscale' ] )
|
||||
+local_env.Append( LIBS = [ 'swresample' ] )
|
||||
local_env.Append( LIBS = [ 'stdc++fs' ] )
|
||||
|
||||
thedarkmod = local_env.Program( target = 'thedarkmod', source = source_list )
|
|
@ -0,0 +1,29 @@
|
|||
$NetBSD$
|
||||
|
||||
--- sys/sys_local.cpp.orig 2019-02-02 17:51:38.000000000 +0000
|
||||
+++ sys/sys_local.cpp
|
||||
@@ -44,7 +44,7 @@ double idSysLocal::ClockTicksPerSecond(
|
||||
return Sys_ClockTicksPerSecond();
|
||||
}
|
||||
|
||||
-cpuid_t idSysLocal::GetProcessorId( void ) {
|
||||
+id_cpuid_t idSysLocal::GetProcessorId( void ) {
|
||||
return Sys_GetProcessorId();
|
||||
}
|
||||
|
||||
@@ -84,13 +84,11 @@ void idSysLocal::DLL_GetFileName( const
|
||||
#ifdef _WIN32
|
||||
// e.g. gamex64.dll
|
||||
idStr::snPrintf(dllName, maxLength, "%s%s.dll", baseName, CPUSTRING);
|
||||
-#elif defined( __linux__ )
|
||||
- // e.g. gamex64.so
|
||||
- idStr::snPrintf(dllName, maxLength, "%s%s.so", baseName, CPUSTRING);
|
||||
#elif defined( MACOS_X )
|
||||
idStr::snPrintf( dllName, maxLength, "%s" ".dylib", baseName );
|
||||
#else
|
||||
-#error OS define is required
|
||||
+ // e.g. gamex64.so
|
||||
+ idStr::snPrintf(dllName, maxLength, "%s%s.so", baseName, CPUSTRING);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
$NetBSD$
|
||||
|
||||
--- sys/sys_local.h.orig 2019-02-02 17:51:38.000000000 +0000
|
||||
+++ sys/sys_local.h
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
|
||||
virtual double GetClockTicks( void );
|
||||
virtual double ClockTicksPerSecond( void );
|
||||
- virtual cpuid_t GetProcessorId( void );
|
||||
+ virtual id_cpuid_t GetProcessorId( void );
|
||||
virtual const char * GetProcessorString( void );
|
||||
virtual void FPU_SetFTZ( bool enable );
|
||||
virtual void FPU_SetDAZ( bool enable );
|
|
@ -0,0 +1,75 @@
|
|||
$NetBSD$
|
||||
|
||||
--- sys/sys_public.h.orig 2019-02-02 17:51:38.000000000 +0000
|
||||
+++ sys/sys_public.h
|
||||
@@ -16,6 +16,9 @@
|
||||
#ifndef __SYS_PUBLIC__
|
||||
#define __SYS_PUBLIC__
|
||||
|
||||
+#include <stdarg.h>
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
@@ -137,21 +140,18 @@
|
||||
#endif
|
||||
|
||||
|
||||
-// Linux
|
||||
-#ifdef __linux__
|
||||
-
|
||||
#define BUILD_OS_ID 2
|
||||
|
||||
#ifdef __i386__
|
||||
- #define BUILD_STRING "linux-x86"
|
||||
+ #define BUILD_STRING "unix-x86"
|
||||
#define CPUSTRING "x86"
|
||||
#define CPU_EASYARGS 1
|
||||
#elif defined(__x86_64__)
|
||||
- #define BUILD_STRING "linux-x86_64"
|
||||
+ #define BUILD_STRING "unix-x86_64"
|
||||
#define CPUSTRING "x64"
|
||||
#define CPU_EASYARGS 0
|
||||
#elif defined(__ppc__)
|
||||
- #define BUILD_STRING "linux-ppc"
|
||||
+ #define BUILD_STRING "unix-ppc"
|
||||
#define CPUSTRING "ppc"
|
||||
#define CPU_EASYARGS 0
|
||||
#endif
|
||||
@@ -177,8 +177,6 @@
|
||||
|
||||
#define THREAD_RETURN_TYPE void *
|
||||
|
||||
-#endif
|
||||
-
|
||||
#if !defined(ID_LITTLE_ENDIAN) && !defined(ID_BIG_ENDIAN)
|
||||
#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__)
|
||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
@@ -225,7 +223,7 @@ typedef enum {
|
||||
// CPUID_CMOV = 0x02000, // Conditional Move (CMOV) and fast floating point comparison (FCOMI) instructions
|
||||
CPUID_FTZ = 0x04000, // Flush-To-Zero mode (denormal results are flushed to zero)
|
||||
CPUID_DAZ = 0x08000 // Denormals-Are-Zero mode (denormal source operands are set to zero)
|
||||
-} cpuid_t;
|
||||
+} id_cpuid_t;
|
||||
|
||||
typedef enum {
|
||||
FPU_ROUNDING_TO_NEAREST = 0,
|
||||
@@ -316,7 +314,7 @@ double Sys_ClockTicksPerSecond( void )
|
||||
uint64_t Sys_GetTimeMicroseconds( void );
|
||||
|
||||
// returns a selection of the CPUID_* flags
|
||||
-cpuid_t Sys_GetProcessorId( void );
|
||||
+id_cpuid_t Sys_GetProcessorId( void );
|
||||
const char * Sys_GetProcessorString( void );
|
||||
|
||||
// sets the FPU precision to double
|
||||
@@ -570,7 +568,7 @@ public:
|
||||
|
||||
virtual double GetClockTicks( void ) = 0;
|
||||
virtual double ClockTicksPerSecond( void ) = 0;
|
||||
- virtual cpuid_t GetProcessorId( void ) = 0;
|
||||
+ virtual id_cpuid_t GetProcessorId( void ) = 0;
|
||||
virtual const char * GetProcessorString( void ) = 0;
|
||||
virtual void FPU_SetFTZ( bool enable ) = 0;
|
||||
virtual void FPU_SetDAZ( bool enable ) = 0;
|
Loading…
Reference in New Issue