diff options
author | Chris Rees <crees@FreeBSD.org> | 2013-04-13 11:49:01 +0000 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2013-04-13 11:49:01 +0000 |
commit | 1127d1da5e67b283a155deb73160d88e51f09902 (patch) | |
tree | 7a8f82c6e1d8728f3909c246fc4306a4dd4fb825 /sysutils/py-psutil | |
parent | cc5032cfbb8f997f8f7a870872864cec4f988676 (diff) | |
download | ports-1127d1da5e67b283a155deb73160d88e51f09902.tar.gz ports-1127d1da5e67b283a155deb73160d88e51f09902.zip |
Notes
Diffstat (limited to 'sysutils/py-psutil')
-rw-r--r-- | sysutils/py-psutil/Makefile | 7 | ||||
-rw-r--r-- | sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c | 30 |
2 files changed, 32 insertions, 5 deletions
diff --git a/sysutils/py-psutil/Makefile b/sysutils/py-psutil/Makefile index 43d990bee5c4..8939a729f31e 100644 --- a/sysutils/py-psutil/Makefile +++ b/sysutils/py-psutil/Makefile @@ -1,12 +1,9 @@ -# New ports collection makefile for: py-psutil -# Date created: 04 May 2010 -# Whom: Ju Pengfei <jupengfei@gmail.com> -# +# Created by: Ju Pengfei <jupengfei@gmail.com> # $FreeBSD$ -# PORTNAME= psutil PORTVERSION= 0.6.1 +PORTREVISION= 1 CATEGORIES= sysutils python MASTER_SITES= GOOGLE_CODE PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c b/sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c index bb6cee507339..11b01ee3bfc2 100644 --- a/sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c +++ b/sysutils/py-psutil/files/patch-psutil-_psutil_bsd.c @@ -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) |