diff options
author | bsiegert <bsiegert@pkgsrc.org> | 2020-07-07 19:13:18 +0000 |
---|---|---|
committer | bsiegert <bsiegert@pkgsrc.org> | 2020-07-07 19:13:18 +0000 |
commit | 7b73dc8cfb2d1bccb5f6a2f9739031f95e5bf4aa (patch) | |
tree | 2c2eedb0ffa41988ec41b8b51223ee695cfdca89 /sysutils/xosview | |
parent | 11d832ae7380e0417ebb0f25c030f158dc90b1c1 (diff) | |
download | pkgsrc-7b73dc8cfb2d1bccb5f6a2f9739031f95e5bf4aa.tar.gz |
xosview: do not exit when cpufreq sysctl fails.
I don't know why xosview needs cpu frequency at all when it doesn't display
it. But:
- different architectures use different sysctl names (that's why it's called
machdep)
- what even is the meaning of the "cpu frequency" when you can set frequency
per core
Diffstat (limited to 'sysutils/xosview')
-rw-r--r-- | sysutils/xosview/Makefile | 3 | ||||
-rw-r--r-- | sysutils/xosview/distinfo | 4 | ||||
-rw-r--r-- | sysutils/xosview/patches/patch-bsd_kernel.cc | 11 |
3 files changed, 14 insertions, 4 deletions
diff --git a/sysutils/xosview/Makefile b/sysutils/xosview/Makefile index 24c3186aa0f..b8f034e9326 100644 --- a/sysutils/xosview/Makefile +++ b/sysutils/xosview/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.76 2020/05/24 11:24:19 rillig Exp $ +# $NetBSD: Makefile,v 1.77 2020/07/07 19:13:18 bsiegert Exp $ DISTNAME= xosview-1.22 +PKGREVISION= 1 CATEGORIES= sysutils x11 MASTER_SITES= ${MASTER_SITE_GITHUB:=hills/} diff --git a/sysutils/xosview/distinfo b/sysutils/xosview/distinfo index 6dffb63fbf9..4b552b89a33 100644 --- a/sysutils/xosview/distinfo +++ b/sysutils/xosview/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.31 2020/05/24 11:29:13 rillig Exp $ +$NetBSD: distinfo,v 1.32 2020/07/07 19:13:18 bsiegert Exp $ SHA1 (xosview-1.22.tar.gz) = 47bf5fe6f61ac828bc7707abec0c1e4bb8da9e13 RMD160 (xosview-1.22.tar.gz) = 217ec543afee8b77bb36ad639c872a5af3b660a6 SHA512 (xosview-1.22.tar.gz) = 40e668ff1d142b6986ea5d50475d4c82523c62269d328d2f6001c651808d9b5194ccd6f144fd0ff791110302c91688126aca5762d6645d9dbc3819cd15df343b Size (xosview-1.22.tar.gz) = 147492 bytes -SHA1 (patch-bsd_kernel.cc) = 7406cd7747b67c5bdadc1b779280d458813457e2 +SHA1 (patch-bsd_kernel.cc) = 7a86aab574c2d7cf88fdb03b95a8ab46933d5e48 diff --git a/sysutils/xosview/patches/patch-bsd_kernel.cc b/sysutils/xosview/patches/patch-bsd_kernel.cc index 3d563a6d3b4..88a4ea9f716 100644 --- a/sysutils/xosview/patches/patch-bsd_kernel.cc +++ b/sysutils/xosview/patches/patch-bsd_kernel.cc @@ -1,4 +1,4 @@ -$NetBSD: patch-bsd_kernel.cc,v 1.2 2020/05/24 11:29:13 rillig Exp $ +$NetBSD: patch-bsd_kernel.cc,v 1.3 2020/07/07 19:13:18 bsiegert Exp $ Don't fail for unprivileged users. @@ -19,3 +19,12 @@ https://github.com/hills/xosview/pull/15 // Parenthetical note: FreeBSD kvm_openfiles() uses getbootfile() to get // the correct kernel file if the 1st arg is NULL. As far as I can see, +@@ -276,7 +278,7 @@ BSDGetCPUSpeed() { + size = sizeof(speed); + #if defined(XOSVIEW_NETBSD) + if ( sysctlbyname("machdep.tsc_freq", &speed, &size, NULL, 0) < 0 ) +- err(EX_OSERR, "sysctl machdep.tsc_freq failed"); ++ return 0; + #else /* XOSVIEW_DFBSD */ + if ( sysctlbyname("hw.tsc_frequency", &speed, &size, NULL, 0) < 0 ) + err(EX_OSERR, "sysctl hw.tsc_frequency failed"); |