diff options
author | Dave Cottlehuber <dch@FreeBSD.org> | 2022-04-04 12:50:50 +0000 |
---|---|---|
committer | Dave Cottlehuber <dch@FreeBSD.org> | 2022-04-04 12:50:50 +0000 |
commit | b7fb34791d44a5b8313444b01b758f9ef2e18b55 (patch) | |
tree | e01f2f1238ed2e40c8e29406ec57bc28a6539f01 | |
parent | 73ee63cede813ed4e756c1880648649fa4f1b5f6 (diff) | |
download | ports-b7fb34791d44a5b8313444b01b758f9ef2e18b55.tar.gz ports-b7fb34791d44a5b8313444b01b758f9ef2e18b55.zip |
-rw-r--r-- | games/ezquake/Makefile | 2 | ||||
-rw-r--r-- | games/ezquake/files/patch-host.c | 17 |
2 files changed, 15 insertions, 4 deletions
diff --git a/games/ezquake/Makefile b/games/ezquake/Makefile index 2abd0da8d2d6..e035deaab274 100644 --- a/games/ezquake/Makefile +++ b/games/ezquake/Makefile @@ -2,7 +2,7 @@ PORTNAME= ezquake DISTVERSION= 3.2.3 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 2 CATEGORIES= games MASTER_SITES= https://github.com/ezQuake/ezquake-source/archive/ \ diff --git a/games/ezquake/files/patch-host.c b/games/ezquake/files/patch-host.c index 0506eb4589d0..cba197302ad7 100644 --- a/games/ezquake/files/patch-host.c +++ b/games/ezquake/files/patch-host.c @@ -1,9 +1,10 @@ ---- host.c.orig 2020-09-16 22:08:02 UTC +--- host.c.orig +++ host.c -@@ -333,11 +333,19 @@ void SYSINFO_Init(void) +@@ -333,16 +333,30 @@ SYSINFO_processor_description = cpu_model; gettimeofday(&old_tp, NULL); ++#if defined(__powerpc__) || defined(__i386__) || defined(__amd64__) +#ifdef __powerpc__ + __asm__ __volatile__("mfspr %%r3, 268": "=r" (old_tsc)); +#else @@ -20,7 +21,17 @@ SYSINFO_MHz = (int)((tsc_freq - old_tsc) / (tp.tv_sec - old_tp.tv_sec + (tp.tv_usec - old_tp.tv_usec) / 1000000.) / 1000000. + .5); -@@ -351,7 +359,7 @@ void SYSINFO_Init(void) + // VVD: We can use sysctl hw.clockrate, but it don't work on i486 - always 0. + // Must work on Pentium 1/2/3; tested on Pentium 4. And RELENG_4 have no this sysctl. ++#else ++ len = sizeof(val); ++ sysctlbyname("dev.cpu.0.freq", &val, &len, NULL, 0); ++ SYSINFO_MHz = val; ++#endif + + if (gl_renderer && gl_renderer[0]) { + if (SYSINFO_3D_description != NULL) { +@@ -351,7 +365,7 @@ SYSINFO_3D_description = Q_strdup(gl_renderer); } |