svn commit: r372532 - head/lang/pypy/files
David Naylor
dbn at FreeBSD.org
Thu Nov 13 17:34:16 UTC 2014
Author: dbn
Date: Thu Nov 13 17:34:15 2014
New Revision: 372532
URL: https://svnweb.freebsd.org/changeset/ports/372532
QAT: https://qat.redports.org/buildarchive/r372532/
Log:
Add missing patch from r372531.
Added:
head/lang/pypy/files/patch-rpython__config__support.py (contents, props changed)
Added: head/lang/pypy/files/patch-rpython__config__support.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/lang/pypy/files/patch-rpython__config__support.py Thu Nov 13 17:34:15 2014 (r372532)
@@ -0,0 +1,28 @@
+--- ./rpython/config/support.py~ 2013-12-16 12:34:17.000000000 +0200
++++ ./rpython/config/support.py 2013-12-16 12:33:52.000000000 +0200
+@@ -8,7 +8,9 @@
+ if os.environ.get('MAKEFLAGS'):
+ return 1 # don't override MAKEFLAGS. This will call 'make' without any '-j' option
+ if sys.platform == 'darwin':
+- return darwin_get_cpu_count()
++ return sysctl_get_cpu_count('/usr/sbin/sysctl')
++ elif sys.platform.startswith('freebsd'):
++ return sysctl_get_cpu_count('/sbin/sysctl')
+ elif not sys.platform.startswith('linux'):
+ return 1 # implement me
+ try:
+@@ -26,11 +28,10 @@
+ except:
+ return 1 # we really don't want to explode here, at worst we have 1
+
+-def darwin_get_cpu_count(cmd = "/usr/sbin/sysctl hw.ncpu"):
++def sysctl_get_cpu_count(cmd, name='hw.ncpu'):
+ try:
+- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
+- # 'hw.ncpu: 20'
+- count = proc.communicate()[0].rstrip()[8:]
++ proc = subprocess.Popen([cmd, '-n', name], stdout=subprocess.PIPE)
++ count = proc.communicate()[0]
+ return int(count)
+ except (OSError, ValueError):
+ return 1
More information about the svn-ports-head
mailing list