From owner-svn-ports-head@FreeBSD.ORG Sat Apr 13 11:49:03 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0AA034E2; Sat, 13 Apr 2013 11:49:03 +0000 (UTC) (envelope-from crees@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D8D99F59; Sat, 13 Apr 2013 11:49:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3DBn2bo021501; Sat, 13 Apr 2013 11:49:02 GMT (envelope-from crees@svn.freebsd.org) Received: (from crees@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3DBn2GS021497; Sat, 13 Apr 2013 11:49:02 GMT (envelope-from crees@svn.freebsd.org) Message-Id: <201304131149.r3DBn2GS021497@svn.freebsd.org> From: Chris Rees Date: Sat, 13 Apr 2013 11:49:02 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r315794 - in head/sysutils/py-psutil: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Apr 2013 11:49:03 -0000 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 -# +# Created by: Ju Pengfei # $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)