Index: databases/Makefile =================================================================== --- databases/Makefile +++ databases/Makefile @@ -779,6 +779,8 @@ SUBDIR += py-tarantool SUBDIR += py-umemcache SUBDIR += py-whisper + SUBDIR += pypy-gdbm + SUBDIR += pypy-sqlite3 SUBDIR += pydbx SUBDIR += pymongo SUBDIR += pyspatialite Index: databases/pypy-gdbm/Makefile =================================================================== --- databases/pypy-gdbm/Makefile +++ 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: databases/pypy-gdbm/pkg-descr =================================================================== --- databases/pypy-gdbm/pkg-descr +++ databases/pypy-gdbm/pkg-descr @@ -0,0 +1 @@ +PyPy bindings to the GNU dbm library. Index: databases/pypy-sqlite3/Makefile =================================================================== --- databases/pypy-sqlite3/Makefile +++ 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: databases/pypy-sqlite3/pkg-descr =================================================================== --- databases/pypy-sqlite3/pkg-descr +++ 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: lang/pypy/Makefile =================================================================== --- lang/pypy/Makefile +++ lang/pypy/Makefile @@ -12,9 +12,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 +35,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 +USES= 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} +.include ".${CURDIR}/bsd.pypy.mk" .include .if ${PORT_OPTIONS:MPYPY} || defined(PYTHON_CMD) Index: lang/pypy/bsd.pypy.cffi.mk =================================================================== --- lang/pypy/bsd.pypy.cffi.mk +++ lang/pypy/bsd.pypy.cffi.mk @@ -0,0 +1,24 @@ +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.0 +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: lang/pypy/bsd.pypy.mk =================================================================== --- lang/pypy/bsd.pypy.mk +++ lang/pypy/bsd.pypy.mk @@ -0,0 +1,8 @@ +LICENSE= MIT PSFL +LICENSE_COMB= multi + +USES+= compiler:c11 + +PYPY_DIR= pypy${PYPY_VER} +PYPY_VER= ${DISTVERSION:C|([0-9])\.([0-9]).*|\1\2|} +PLIST_SUB+= PYPY_DIR=${PYPY_DIR} PYPY_VER=${PYPY_VER} Index: lang/pypy/pkg-message =================================================================== --- lang/pypy/pkg-message +++ 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: x11-toolkits/Makefile =================================================================== --- x11-toolkits/Makefile +++ x11-toolkits/Makefile @@ -205,6 +205,7 @@ SUBDIR += py-wxPython28-unicode SUBDIR += py-wxPython30 SUBDIR += py-xlib + SUBDIR += pypy-tkinter SUBDIR += qt4-declarative SUBDIR += qt4-gui SUBDIR += qt4pas Index: x11-toolkits/pypy-tkinter/Makefile =================================================================== --- x11-toolkits/pypy-tkinter/Makefile +++ 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: x11-toolkits/pypy-tkinter/pkg-descr =================================================================== --- x11-toolkits/pypy-tkinter/pkg-descr +++ x11-toolkits/pypy-tkinter/pkg-descr @@ -0,0 +1 @@ +PyPy bindings to the Tk widget set.