svn commit: r315794 - in head/sysutils/py-psutil: . files
Chris Rees
crees at FreeBSD.org
Sat Apr 13 11:49:03 UTC 2013
Author: crees
Date: Sat Apr 13 11:49:01 2013
New Revision: 315794
URL: http://svnweb.freebsd.org/changeset/ports/315794
Log:
Fix on FreeBSD 8+
PR: ports/172803
Submitted by: Jan Beich
Approved by: maintainer timeout (sunpoet, ~6 months)
Approved by: portmgr (decke)
Modified:
head/sysutils/py-psutil/Makefile
head/sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c
Modified: head/sysutils/py-psutil/Makefile
==============================================================================
--- head/sysutils/py-psutil/Makefile Sat Apr 13 09:41:06 2013 (r315793)
+++ head/sysutils/py-psutil/Makefile Sat Apr 13 11:49:01 2013 (r315794)
@@ -1,12 +1,9 @@
-# New ports collection makefile for: py-psutil
-# Date created: 04 May 2010
-# Whom: Ju Pengfei <jupengfei at gmail.com>
-#
+# Created by: Ju Pengfei <jupengfei at gmail.com>
# $FreeBSD$
-#
PORTNAME= psutil
PORTVERSION= 0.6.1
+PORTREVISION= 1
CATEGORIES= sysutils python
MASTER_SITES= GOOGLE_CODE
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Modified: head/sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c
==============================================================================
--- head/sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c Sat Apr 13 09:41:06 2013 (r315793)
+++ head/sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c Sat Apr 13 11:49:01 2013 (r315794)
@@ -1,5 +1,35 @@
--- psutil/_psutil_bsd.c.orig 2012-08-16 23:07:37.000000000 +0800
+++ psutil/_psutil_bsd.c 2012-09-27 14:50:20.843763756 +0800
+@@ -576,12 +576,19 @@ get_process_memory_info(PyObject* self,
+ static PyObject*
+ get_virtual_mem(PyObject* self, PyObject* args)
+ {
+- unsigned int total, active, inactive, wired, cached, free, buffers;
++ unsigned int total, active, inactive, wired, cached, free;
+ size_t size = sizeof(total);
+ struct vmtotal vm;
+ int mib[] = {CTL_VM, VM_METER};
+ long pagesize = getpagesize();
+
++#if __FreeBSD_version > 702101
++ long buffers;
++#else
++ int buffers;
++#endif
++ size_t buffers_size = sizeof(buffers);
++
+ if (sysctlbyname("vm.stats.vm.v_page_count", &total, &size, NULL, 0))
+ goto error;
+ if (sysctlbyname("vm.stats.vm.v_active_count", &active, &size, NULL, 0))
+@@ -594,7 +601,7 @@ get_virtual_mem(PyObject* self, PyObject
+ goto error;
+ if (sysctlbyname("vm.stats.vm.v_free_count", &free, &size, NULL, 0))
+ goto error;
+- if (sysctlbyname("vfs.bufspace", &buffers, &size, NULL, 0))
++ if (sysctlbyname("vfs.bufspace", &buffers, &buffers_size, NULL, 0))
+ goto error;
+
+ size = sizeof(vm);
@@ -1376,8 +1376,10 @@
strlcat(opts, ",noclusterr", sizeof(opts));
if (flags & MNT_NOCLUSTERW)
More information about the svn-ports-all
mailing list