Index: head/databases/Makefile =================================================================== --- head/databases/Makefile +++ head/databases/Makefile @@ -780,6 +780,8 @@ SUBDIR += py-tarantool SUBDIR += py-umemcache SUBDIR += py-whisper + SUBDIR += pypy-gdbm + SUBDIR += pypy-sqlite3 SUBDIR += pydbx SUBDIR += pymongo SUBDIR += pyspatialite Index: head/databases/pypy-gdbm/Makefile =================================================================== --- head/databases/pypy-gdbm/Makefile +++ head/databases/pypy-gdbm/Makefile @@ -0,0 +1,16 @@ +# Created by: David Naylor +# $FreeBSD$ + +PORTNAME= gdbm +PORTVERSION= ${PYTHON_PORTVERSION} +CATEGORIES= databases python + +MAINTAINER= dbn@FreeBSD.org +COMMENT= PyPy bindings to the GNU dbm library + +LIB_DEPENDS= libgdbm.so:${PORTSDIR}/databases/gdbm + +CFFI_NAME= ffi + +.include "${.CURDIR}/../../lang/pypy/bsd.pypy.cffi.mk" +.include Index: head/databases/pypy-gdbm/pkg-descr =================================================================== --- head/databases/pypy-gdbm/pkg-descr +++ head/databases/pypy-gdbm/pkg-descr @@ -0,0 +1 @@ +PyPy bindings to the GNU dbm library. Index: head/databases/pypy-sqlite3/Makefile =================================================================== --- head/databases/pypy-sqlite3/Makefile +++ head/databases/pypy-sqlite3/Makefile @@ -0,0 +1,16 @@ +# Created by: David Naylor +# $FreeBSD$ + +PORTNAME= sqlite3 +PORTVERSION= ${PYTHON_PORTVERSION} +CATEGORIES= databases python + +MAINTAINER= dbn@FreeBSD.org +COMMENT= Standard PyPy binding to the SQLite3 library + +LIB_DEPENDS= libsqlite3.so:${PORTSDIR}/databases/sqlite3 + +CFFI_NAME= _ffi + +.include "${.CURDIR}/../../lang/pypy/bsd.pypy.cffi.mk" +.include Index: head/databases/pypy-sqlite3/pkg-descr =================================================================== --- head/databases/pypy-sqlite3/pkg-descr +++ head/databases/pypy-sqlite3/pkg-descr @@ -0,0 +1,8 @@ +SQLite is a library that provides a SQL-language database that +stores data in disk files without requiring a separate server +process. pysqlite provides a SQL interface compliant with the DB-API +2.0 specification described by PEP 249. This means that it should +be possible to write the first version of your applications using +SQLite for data storage. If switching to a larger database such as +PostgreSQL or Oracle is later necessary, the switch should be +relatively easy. Index: head/lang/pypy/Makefile =================================================================== --- head/lang/pypy/Makefile +++ head/lang/pypy/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= pypy -PORTVERSION= 2.6.0 -PORTREVISION= 3 +PORTVERSION= 2.6.1 CATEGORIES= lang python MASTER_SITES= https://bitbucket.org/pypy/pypy/get/ LOCAL/dbn/pypy DISTNAME= release-${DISTVERSION} @@ -12,9 +11,6 @@ MAINTAINER= dbn@FreeBSD.org COMMENT= Fast, compliant implementation of the Python language -LICENSE= MIT PSFL -LICENSE_COMB= multi - LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2 \ libffi.so:${PORTSDIR}/devel/libffi @@ -38,12 +34,10 @@ BUILD_WRKSRC= ${WRKDIR}/build/usession-release-${DISTVERSION}-0/testing_1 MAKE_ENV+= PYPY_LOCALBASE=${LOCALBASE} USE_LDCONFIG= ${PREFIX}/${PYPY_DIR}/bin -USES= compiler:c11 gettext-runtime tar:bzip2 -WRKSRC= ${WRKDIR}/pypy-pypy-295ee98b6928 -PYPY_VER= ${DISTVERSION:C|([0-9])\.([0-9]).*|\1\2|} -PYPY_DIR= pypy${PYPY_VER} -PLIST_SUB+= PYPY_VER=${PYPY_VER} PYPY_DIR=${PYPY_DIR} +USES= gettext-runtime tar:bzip2 +WRKSRC= ${WRKDIR}/pypy-pypy-f3ad1e1e1d62 +.include ".${CURDIR}/bsd.pypy.mk" .include .if ${PORT_OPTIONS:MPYPY} || defined(PYTHON_CMD) Index: head/lang/pypy/bsd.pypy.cffi.mk =================================================================== --- head/lang/pypy/bsd.pypy.cffi.mk +++ head/lang/pypy/bsd.pypy.cffi.mk @@ -0,0 +1,26 @@ +# $FreeBSD$ + +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTFILES= + +BUILD_DEPENDS+= pypy:${PORTSDIR}/lang/pypy +RUN_DEPENDS+= pypy:${PORTSDIR}/lang/pypy + +PLIST_FILES= %%PYPY_DIR%%/lib_pypy/${CFFI_MODULE}_cffi.pypy-%%PYPY_VER%%.so + +CFFI_MODULE?= _${PORTNAME} + +PYTHON_PORTVERSION= 2.6.1 +PYTHON_PKGNAMEPREFIX= pypy- +PYTHON_CMD= ${LOCALBASE}/bin/pypy + +.include "${.CURDIR}/../../lang/pypy/bsd.pypy.mk" + +do-build: + ${CP} ${LOCALBASE}/${PYPY_DIR}/lib_pypy/${CFFI_MODULE}_build.py ${WRKDIR}/${PORTNAME}.py + (cd ${WRKDIR}; \ + ${PYTHON_CMD} -c "from ${PORTNAME} import ${CFFI_NAME} as ffi; ffi.compile('${WRKDIR}');") + +do-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib_pypy/`dirname ${CFFI_MODULE}`/ + ${INSTALL_LIB} ${WRKDIR}/${CFFI_MODULE}_cffi.pypy-${PYPY_VER}.so ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib_pypy/`dirname ${CFFI_MODULE}`/ Index: head/lang/pypy/bsd.pypy.mk =================================================================== --- head/lang/pypy/bsd.pypy.mk +++ head/lang/pypy/bsd.pypy.mk @@ -0,0 +1,10 @@ +# $FreeBSD$ + +LICENSE= MIT PSFL +LICENSE_COMB= multi + +USES+= compiler:c11 + +PYPY_DIR= pypy-${PORTVERSION:C|([0-9])\.([0-9]).*|\1.\2|} +PYPY_VER= ${PORTVERSION:C|([0-9])\.([0-9]).*|\1\2|} +PLIST_SUB+= PYPY_DIR=${PYPY_DIR} PYPY_VER=${PYPY_VER} Index: head/lang/pypy/distinfo =================================================================== --- head/lang/pypy/distinfo +++ head/lang/pypy/distinfo @@ -1,2 +1,2 @@ -SHA256 (pypy/release-2.6.0.tar.bz2) = 70c5feff73a6f9002b6a156488fe5e0b3981297da5766464bfd2327290bcd577 -SIZE (pypy/release-2.6.0.tar.bz2) = 16682327 +SHA256 (pypy/release-2.6.1.tar.bz2) = cc80e04957b899fe3c5d1b0b36979a4e80b7baf98f4c660c0fca781b6f148327 +SIZE (pypy/release-2.6.1.tar.bz2) = 16828274 Index: head/lang/pypy/files/patch-pypy_tool_release_package.py =================================================================== --- head/lang/pypy/files/patch-pypy_tool_release_package.py +++ head/lang/pypy/files/patch-pypy_tool_release_package.py @@ -1,11 +0,0 @@ ---- pypy/tool/release/package.py.orig 2015-05-31 07:19:51 UTC -+++ pypy/tool/release/package.py -@@ -135,7 +135,7 @@ def create_package(basedir, options, _fa - 'not find it' % (str(libpypy_c),)) - binaries.append((libpypy_c, libpypy_name)) - # -- builddir = options.builddir -+ builddir = py.path.local(options.builddir) - pypydir = builddir.ensure(name, dir=True) - includedir = basedir.join('include') - # Recursively copy all headers, shutil has only ignore Index: head/lang/pypy/files/patch-rpython_config_support.py =================================================================== --- head/lang/pypy/files/patch-rpython_config_support.py +++ head/lang/pypy/files/patch-rpython_config_support.py @@ -1,28 +0,0 @@ ---- rpython/config/support.py.orig 2015-05-31 07:19:51 UTC -+++ rpython/config/support.py -@@ -8,7 +8,9 @@ def detect_number_of_processors(filename - 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 @@ def detect_number_of_processors(filename - 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 Index: head/lang/pypy/files/patch-rpython_config_test_test__support.py =================================================================== --- head/lang/pypy/files/patch-rpython_config_test_test__support.py +++ head/lang/pypy/files/patch-rpython_config_test_test__support.py @@ -1,44 +0,0 @@ ---- rpython/config/test/test_support.py.orig 2015-05-31 07:19:51 UTC -+++ rpython/config/test/test_support.py -@@ -52,25 +52,30 @@ def test_cpuinfo_linux(): - finally: - os.environ = saved - --def test_cpuinfo_darwin(): -- if sys.platform != 'darwin': -- py.test.skip('mac only') -- saved_func = support.darwin_get_cpu_count -+def test_cpuinfo_sysctl(): -+ if sys.platform != 'darwin' and not sys.platform.startswith('freebsd'): -+ py.test.skip('mac and bsd only') -+ saved_func = support.sysctl_get_cpu_count - saved = os.environ -- def count(): -+ def count(cmd): -+ if sys.platform == 'darwin': -+ assert cmd == '/usr/sbin/sysctl' -+ else: -+ assert cmd == '/sbin/sysctl' - return 42 - try: -- support.darwin_get_cpu_count = count -+ support.sysctl_get_cpu_count = count - os.environ = FakeEnviron(None) - assert support.detect_number_of_processors() == 42 - os.environ = FakeEnviron('-j2') - assert support.detect_number_of_processors() == 1 - finally: - os.environ = saved -- support.darwin_get_cpu_count = saved_func -+ support.sysctl_get_cpu_count = saved_func - --def test_darwin_get_cpu_count(): -- if sys.platform != 'darwin': -+def test_sysctl_get_cpu_count(): -+ if sys.platform != 'darwin' and not sys.platform.startswith('freebsd'): - py.test.skip('mac only') -- assert support.darwin_get_cpu_count() > 0 # hopefully -- assert support.darwin_get_cpu_count("false") == 1 -+ cmd = '/usr/sbin/sysctl' if sys.platform != 'darwin' else '/sbin/sysctl' -+ assert support.sysctl_get_cpu_count(cmd) > 0 # hopefully -+ assert support.sysctl_get_cpu_count(cmd, "false") == 1 Index: head/lang/pypy/files/patch-rpython_jit_backend_detect__cpu.py =================================================================== --- head/lang/pypy/files/patch-rpython_jit_backend_detect__cpu.py +++ head/lang/pypy/files/patch-rpython_jit_backend_detect__cpu.py @@ -1,10 +0,0 @@ ---- rpython/jit/backend/detect_cpu.py.orig 2015-08-11 18:20:39 UTC -+++ rpython/jit/backend/detect_cpu.py -@@ -63,6 +63,7 @@ def detect_model_from_host_platform(): - 'AMD64': MODEL_X86, # win64 - 'armv7l': MODEL_ARM, - 'armv6l': MODEL_ARM, -+ 'arm': MODEL_ARM, # freebsd - }.get(mach) - - if result is None: Index: head/lang/pypy/files/patch-rpython_rtyper_tool_rffi__platform.py =================================================================== --- head/lang/pypy/files/patch-rpython_rtyper_tool_rffi__platform.py +++ head/lang/pypy/files/patch-rpython_rtyper_tool_rffi__platform.py @@ -1,13 +0,0 @@ ---- rpython/rtyper/tool/rffi_platform.py.orig 2015-05-31 07:19:51 UTC -+++ rpython/rtyper/tool/rffi_platform.py -@@ -854,7 +854,9 @@ def configure_boehm(platform=None): - platform = None - else: - library_dir = '' -- libraries = ['gc', 'dl'] -+ libraries = ['gc'] -+ if platform.name != "freebsd": -+ libraries += ['dl'] - includes=['gc/gc.h'] - eci = ExternalCompilationInfo( - platform=platform, Index: head/lang/pypy/pkg-message =================================================================== --- head/lang/pypy/pkg-message +++ head/lang/pypy/pkg-message @@ -0,0 +1,15 @@ +===================================================================== + +Note that some standard Python modules are provided as separate ports +as they require additional dependencies. They are available as: + +gdbm databases/pypy-gdbm +sqlite3 databases/pypy-sqlite3 +tkinter x11-toolkits/pypy-tkinter + +Note that PyPy does not implement the following module that would +have been provided as a separate port: + +bsddb databases/pypy-bsddb + +===================================================================== Index: head/lang/pypy/pkg-plist =================================================================== --- head/lang/pypy/pkg-plist +++ head/lang/pypy/pkg-plist @@ -542,8 +542,8 @@ %%PYPY_DIR%%/lib-python/2.7/encodings/zlib_codec.py %%PYPY_DIR%%/lib-python/2.7/ensurepip/__init__.py %%PYPY_DIR%%/lib-python/2.7/ensurepip/__main__.py -%%PYPY_DIR%%/lib-python/2.7/ensurepip/_bundled/pip-1.5.6-py2.py3-none-any.whl -%%PYPY_DIR%%/lib-python/2.7/ensurepip/_bundled/setuptools-7.0-py2.py3-none-any.whl +%%PYPY_DIR%%/lib-python/2.7/ensurepip/_bundled/pip-6.1.1-py2.py3-none-any.whl +%%PYPY_DIR%%/lib-python/2.7/ensurepip/_bundled/setuptools-15.2-py2.py3-none-any.whl %%PYPY_DIR%%/lib-python/2.7/ensurepip/_uninstall.py %%PYPY_DIR%%/lib-python/2.7/filecmp.py %%PYPY_DIR%%/lib-python/2.7/fileinput.py @@ -663,6 +663,7 @@ %%PYPY_DIR%%/lib-python/2.7/idlelib/idle_test/test_grep.py %%PYPY_DIR%%/lib-python/2.7/idlelib/idle_test/test_hyperparser.py %%PYPY_DIR%%/lib-python/2.7/idlelib/idle_test/test_idlehistory.py +%%PYPY_DIR%%/lib-python/2.7/idlelib/idle_test/test_io.py %%PYPY_DIR%%/lib-python/2.7/idlelib/idle_test/test_parenmatch.py %%PYPY_DIR%%/lib-python/2.7/idlelib/idle_test/test_pathbrowser.py %%PYPY_DIR%%/lib-python/2.7/idlelib/idle_test/test_rstrip.py @@ -678,7 +679,6 @@ %%PYPY_DIR%%/lib-python/2.7/idlelib/rpc.py %%PYPY_DIR%%/lib-python/2.7/idlelib/run.py %%PYPY_DIR%%/lib-python/2.7/idlelib/tabbedpages.py -%%PYPY_DIR%%/lib-python/2.7/idlelib/testcode.py %%PYPY_DIR%%/lib-python/2.7/idlelib/textView.py %%PYPY_DIR%%/lib-python/2.7/ihooks.py %%PYPY_DIR%%/lib-python/2.7/imaplib.py @@ -1451,7 +1451,7 @@ %%PYPY_DIR%%/lib-python/2.7/test/decimaltestdata/tointegral.decTest %%PYPY_DIR%%/lib-python/2.7/test/decimaltestdata/tointegralx.decTest %%PYPY_DIR%%/lib-python/2.7/test/decimaltestdata/xor.decTest -%%PYPY_DIR%%/lib-python/2.7/test/dh512.pem +%%PYPY_DIR%%/lib-python/2.7/test/dh1024.pem %%PYPY_DIR%%/lib-python/2.7/test/doctest_aliases.py %%PYPY_DIR%%/lib-python/2.7/test/double_const.py %%PYPY_DIR%%/lib-python/2.7/test/empty.vbs @@ -1881,6 +1881,7 @@ %%PYPY_DIR%%/lib-python/2.7/test/test_threading_local.py %%PYPY_DIR%%/lib-python/2.7/test/test_threadsignals.py %%PYPY_DIR%%/lib-python/2.7/test/test_time.py +%%PYPY_DIR%%/lib-python/2.7/test/test_timeit.py %%PYPY_DIR%%/lib-python/2.7/test/test_timeout.py %%PYPY_DIR%%/lib-python/2.7/test/test_tk.py %%PYPY_DIR%%/lib-python/2.7/test/test_tokenize.py Index: head/x11-toolkits/Makefile =================================================================== --- head/x11-toolkits/Makefile +++ head/x11-toolkits/Makefile @@ -204,6 +204,7 @@ SUBDIR += py-wxPython28-unicode SUBDIR += py-wxPython30 SUBDIR += py-xlib + SUBDIR += pypy-tkinter SUBDIR += qt4-declarative SUBDIR += qt4-gui SUBDIR += qt4pas Index: head/x11-toolkits/pypy-tkinter/Makefile =================================================================== --- head/x11-toolkits/pypy-tkinter/Makefile +++ head/x11-toolkits/pypy-tkinter/Makefile @@ -0,0 +1,17 @@ +# Created by: David Naylor +# $FreeBSD$ + +PORTNAME= tkinter +PORTVERSION= ${PYTHON_PORTVERSION} +CATEGORIES= x11-toolkits python + +MAINTAINER= dbn@FreeBSD.org +COMMENT= PyPy bindings to the Tk widget set + +USES= tk + +CFFI_MODULE= _tkinter/tklib +CFFI_NAME= tkffi + +.include "${.CURDIR}/../../lang/pypy/bsd.pypy.cffi.mk" +.include Index: head/x11-toolkits/pypy-tkinter/pkg-descr =================================================================== --- head/x11-toolkits/pypy-tkinter/pkg-descr +++ head/x11-toolkits/pypy-tkinter/pkg-descr @@ -0,0 +1 @@ +PyPy bindings to the Tk widget set.