pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/chat/xchat Report the CPU frequency and the number of ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d37e0efa92d0
branches:  trunk
changeset: 545497:d37e0efa92d0
user:      tron <tron%pkgsrc.org@localhost>
date:      Tue Aug 05 20:36:42 2008 +0000

description:
Report the CPU frequency and the number of CPU cores under NetBSD/amd64
and NetBSD/i386 similar to Linux, FreeBSD and Mac OS X.

Bump package revision because of this enhancement.

diffstat:

 chat/xchat/Makefile         |   3 +-
 chat/xchat/distinfo         |   3 +-
 chat/xchat/patches/patch-ab |  57 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 2 deletions(-)

diffs (88 lines):

diff -r 93d52db942e7 -r d37e0efa92d0 chat/xchat/Makefile
--- a/chat/xchat/Makefile       Tue Aug 05 19:06:24 2008 +0000
+++ b/chat/xchat/Makefile       Tue Aug 05 20:36:42 2008 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.57 2008/07/29 13:57:34 tron Exp $
+# $NetBSD: Makefile,v 1.58 2008/08/05 20:36:42 tron Exp $
 
 PKG_DESTDIR_SUPPORT=   user-destdir
 
 .include "Makefile.common"
 
+PKGREVISION=   1
 OWNER=         tron%NetBSD.org@localhost
 COMMENT=       X11 (X Window System) IRC client, using the GTK2 toolkit
 
diff -r 93d52db942e7 -r d37e0efa92d0 chat/xchat/distinfo
--- a/chat/xchat/distinfo       Tue Aug 05 19:06:24 2008 +0000
+++ b/chat/xchat/distinfo       Tue Aug 05 20:36:42 2008 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.35 2008/07/29 13:57:34 tron Exp $
+$NetBSD: distinfo,v 1.36 2008/08/05 20:36:42 tron Exp $
 
 SHA1 (xchat-2.8.6.tar.bz2) = 7a7463e65cb26c680ed70dd96cec98bcc05435a4
 RMD160 (xchat-2.8.6.tar.bz2) = bc199e3b58a9db3dfd9f2af6bac7fb6162c53d6e
 Size (xchat-2.8.6.tar.bz2) = 1423645 bytes
 SHA1 (patch-aa) = 99ec48125bc394745b5e5d0d8ebd8323d1aca4af
+SHA1 (patch-ab) = b9c9a1e94dc5fbe6365c0f7ccd18e79f7c836355
diff -r 93d52db942e7 -r d37e0efa92d0 chat/xchat/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/chat/xchat/patches/patch-ab       Tue Aug 05 20:36:42 2008 +0000
@@ -0,0 +1,57 @@
+$NetBSD: patch-ab,v 1.10 2008/08/05 20:36:42 tron Exp $
+
+--- src/common/util.c.orig     2008-02-24 02:59:48.000000000 +0000
++++ src/common/util.c  2008-08-05 21:23:28.000000000 +0100
+@@ -47,8 +47,16 @@
+ #define WANTSOCKET
+ #include "inet.h"
+ 
++#if defined(__NetBSD__) && (defined(__amd64__) || defined(__i386__))
++#define       USING_NETBSD    /**/
++#endif
++
+ #if defined (USING_FREEBSD) || defined (__APPLE__)
+ #include <sys/sysctl.h>
++#elif defined(USING_NETBSD)
++#define session NetBSD_session
++#include <sys/sysctl.h>
++#undef session
+ #endif
+ #ifdef SOCKS
+ #include <socks.h>
+@@ -510,7 +518,7 @@
+       return len;
+ }
+ 
+-#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__)
++#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__) || defined (USING_NETBSD)
+ 
+ static void
+ get_cpu_info (double *mhz, int *cpus)
+@@ -554,7 +562,7 @@
+               *cpus = 1;
+ 
+ #endif
+-#ifdef USING_FREEBSD
++#if defined(USING_FREEBSD) || defined (USING_NETBSD)
+ 
+       int mib[2], ncpu;
+       u_long freq;
+@@ -656,7 +664,7 @@
+ char *
+ get_cpu_str (void)
+ {
+-#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__)
++#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__) || defined (USING_NETBSD)
+       double mhz;
+ #endif
+       int cpus = 1;
+@@ -670,7 +678,7 @@
+ 
+       uname (&un);
+ 
+-#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__)
++#if defined (USING_LINUX) || defined (USING_FREEBSD) || defined (__APPLE__) || defined (USING_NETBSD)
+       get_cpu_info (&mhz, &cpus);
+       if (mhz)
+       {



Home | Main Index | Thread Index | Old Index