mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-20 20:09:11 +00:00
lang/pypy3: update to 5.2.0-alpha1
Changes to lang/pypy3: - "Rename" from pypy3-devel (functionaly it is a rename, technically pypy3 is a new port and pypy3-devel is deleted). - Make lang/pypy3 a slave port of lang/pypy Changes to lang/pypy: - Use DISTVERSION instead of PORTVERSION (lang/pypy3 is not PORTVERSION clean) - Change PYPY_CFFI_VER to include the 'pypy-' prefix (lang/pypy3 has 'pypy3-' as a prefix) - Only make PYPY_MINMEM the default is ${LOCALBASE}/lang/pypy exists - Fix build depends for PYPY_MINMEM - Allow slave port to have custom patch directory - Remove conflicts (pypy does not conflict with pypy3) - Allow slave port to override the packaging argument (lang/pypy3 has a different syntax to exclude gdbm) - Add ssl as a dependency (pypy picks up Port's openssl if it is installed) - Strip all .so files in lib_pypy - Fix where spaces were used instead of tabs - Use PORTSNAME for binary name (fixes linking to pypy3). Change Log: - Python 3.3.5 support - Missing features include space efficient strings (PEP 393) - Known issues, including performance - ensurepip included (only in CPython 3.4+)
This commit is contained in:
parent
91d70af56a
commit
858030803a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=419600
1
MOVED
1
MOVED
@ -8610,3 +8610,4 @@ net/lam||2016-07-12|Has expired: Broken for more than 6 months
|
||||
java/wildfly82||2016-07-17|Has expired: Fully EOL when version 10.0 was released
|
||||
print/tex|print/texlive-base|2016-07-30|Superceeded by texlive
|
||||
net/tridiavnc|net/tigervnc|2016-08-01|No upstream 2005
|
||||
lang/pypy3-devel|lang/pypy3|2016-08-04|Renamed to lang/pypy3
|
||||
|
@ -2,7 +2,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME?= pypy
|
||||
PORTVERSION?= 5.3.1 # Also update bsd.pypy.cffi.mk
|
||||
DISTVERSION?= 5.3.1 # Also update bsd.pypy.cffi.mk
|
||||
CATEGORIES= lang python
|
||||
MASTER_SITES= https://bitbucket.org/pypy/pypy/downloads/
|
||||
DISTNAME?= ${PORTNAME}2-v${PORTVERSION}-src
|
||||
@ -14,9 +14,9 @@ BROKEN_powerpc64= Does not build
|
||||
|
||||
LIB_DEPENDS= libexpat.so:textproc/expat2 \
|
||||
libffi.so:devel/libffi
|
||||
TEST_DEPENDS= ${PREFIX}/${PYPY_DIR}/lib_pypy/_gdbm_cffi.pypy-${PYPY_CFFI_VER}.so:databases/pypy-gdbm \
|
||||
${PREFIX}/${PYPY_DIR}/lib_pypy/_sqlite3_cffi.pypy-${PYPY_CFFI_VER}.so:databases/pypy-sqlite3 \
|
||||
${PREFIX}/${PYPY_DIR}/lib_pypy/_tkinter/tklib_cffi.pypy-${PYPY_CFFI_VER}.so:x11-toolkits/pypy-tkinter
|
||||
TEST_DEPENDS= ${PREFIX}/${PYPY_DIR}/lib_pypy/_gdbm_cffi.${PYPY_CFFI_VER}.so:databases/pypy-gdbm \
|
||||
${PREFIX}/${PYPY_DIR}/lib_pypy/_sqlite3_cffi.${PYPY_CFFI_VER}.so:databases/pypy-sqlite3 \
|
||||
${PREFIX}/${PYPY_DIR}/lib_pypy/_tkinter/tklib_cffi.${PYPY_CFFI_VER}.so:x11-toolkits/pypy-tkinter
|
||||
|
||||
ONLY_FOR_ARCHS= i386 amd64 armv6 powerpc64
|
||||
ONLY_FOR_ARCHS_REASON= PyPy JIT only supported on these architectures
|
||||
@ -29,23 +29,26 @@ PYPY_MINMEM_DESC= Use PyPy to translate (lowest memory usage)
|
||||
TRANS_DESC= Translation method
|
||||
LOCALBASE?= /usr/local
|
||||
.if exists(${LOCALBASE}/bin/pypy) || ${PORTNAME} != pypy
|
||||
OPTIONS_DEFAULT= PYPY_MINMEM
|
||||
OPTIONS_SINGLE_TRANS+= PYPY PYPY_MINMEM
|
||||
. if exists(${LOCALBASE}/bin/pypy)
|
||||
OPTIONS_DEFAULT= PYPY_MINMEM
|
||||
. else
|
||||
OPTIONS_DEFAULT= PYTHON
|
||||
. endif
|
||||
.else
|
||||
OPTIONS_SLAVE= PYTHON
|
||||
.endif
|
||||
|
||||
CONFLICTS_INSTALL?= pypy3-[0-9]*
|
||||
|
||||
ALL_TARGET= pypy-c
|
||||
BUILD_WRKSRC?= ${WRKDIR}/build/usession-release-pypy2.7-v${PORTVERSION}-0/testing_1
|
||||
MAKE_ENV+= PYPY_LOCALBASE=${LOCALBASE}
|
||||
PACKAGE_ARGS?= --without-gdbm --without-sqlite3 --without-tk
|
||||
USE_LDCONFIG= ${PREFIX}/${PYPY_DIR}/bin
|
||||
USES= gettext-runtime gmake tar:bzip2
|
||||
USES= gettext-runtime gmake ssl tar:bzip2
|
||||
|
||||
.if ${PORTNAME} != pypy
|
||||
PYPY_BUILD_DEPENDS= pypy:lang/pypy
|
||||
PYPY_MINMEM_DEPENDS= pypy:lang/pypy
|
||||
PYPY_MINMEM_BUILD_DEPENDS= pypy:lang/pypy
|
||||
.endif
|
||||
PYPY_VARS= PYTHON_CMD=${LOCALBASE}/bin/pypy
|
||||
PYPY_MINMEM_VARS= PYTHON_CMD="${SETENV} PYPY_GC_MAX_DELTA=200MB ${LOCALBASE}/bin/pypy --jit loop_longevity=300"
|
||||
@ -53,6 +56,7 @@ PYTHON_USES= python:2,build
|
||||
|
||||
DISTINFO_FILE= ${.CURDIR}/distinfo
|
||||
MASTERDIR?= ${.CURDIR}
|
||||
PATCHDIR= ${.CURDIR}/files
|
||||
PLIST= ${.CURDIR}/pkg-plist
|
||||
|
||||
.include "${MASTERDIR}/bsd.pypy.mk"
|
||||
@ -80,12 +84,10 @@ post-build:
|
||||
do-install:
|
||||
${SETENV} TMPDIR=${WRKDIR}/build \
|
||||
${PYTHON_CMD} ${WRKSRC}/pypy/tool/release/package.py --builddir ${WRKDIR}/build --archive-name ${PYPY_DIR} \
|
||||
--without-gdbm --without-sqlite3 --without-tk
|
||||
${PACKAGE_ARGS}
|
||||
${EXTRACT_CMD} -C ${STAGEDIR}${PREFIX} -xf ${WRKDIR}/build/${PYPY_DIR}.tar.bz2
|
||||
${LN} -fs ../${PYPY_DIR}/bin/pypy ${STAGEDIR}${PREFIX}/bin/pypy
|
||||
.for cffi in curses resource audioop syslog pwdgrp
|
||||
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib_pypy/_${cffi}_cffi.pypy-${PYPY_CFFI_VER}.so
|
||||
.endfor
|
||||
${LN} -fs ../${PYPY_DIR}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
|
||||
${FIND} ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib_pypy/ -name '*.so' | ${XARGS} ${STRIP_CMD}
|
||||
|
||||
do-test:
|
||||
# See https://bitbucket.org/pypy/buildbot/src/default/bot2/pypybuildbot/builds.py?at=default#builds.py-386
|
||||
@ -103,16 +105,16 @@ do-test:
|
||||
.endfor
|
||||
(cd ${WRKSRC}/lib-python/2.7/test; \
|
||||
${SETENV} ${MAKE_ENV} TMPDIR=${WRKDIR}/build PYTHONPATH=${WRKSRC} \
|
||||
${WRKSRC}/pypy/goal/pypy-c regrtest.py -vvu all)
|
||||
${WRKSRC}/pypy/goal/pypy-c regrtest.py -vvu all)
|
||||
|
||||
pkg-plist: build
|
||||
${TAR} -tf ${WRKDIR}/build/${PYPY_DIR}.tar.bz2 > ${WRKDIR}/.plist-files-gen
|
||||
${REINPLACE_CMD} -e 's|^${PYPY_DIR}|%%PYPY_DIR%%|g' \
|
||||
-e 's|_${PYPY_BITS}_|_%%PYPY_BITS%%_|g' \
|
||||
-e 's|-${PYPY_CFFI_VER}|-%%PYPY_CFFI_VER%%|g' \
|
||||
-e 's|${PYPY_CFFI_VER}|%%PYPY_CFFI_VER%%|g' \
|
||||
-e '/\/$$/d' \
|
||||
${WRKDIR}/.plist-files-gen
|
||||
${ECHO} bin/pypy > ${WRKDIR}/pkg-plist
|
||||
${ECHO} bin/${PORTNAME} > ${WRKDIR}/pkg-plist
|
||||
${SORT} ${WRKDIR}/.plist-files-gen >> ${WRKDIR}/pkg-plist
|
||||
${CP} ${WRKDIR}/pkg-plist ${.CURDIR}/pkg-plist
|
||||
|
||||
|
@ -6,7 +6,7 @@ DISTFILES=
|
||||
BUILD_DEPENDS+= pypy:lang/pypy
|
||||
RUN_DEPENDS+= pypy:lang/pypy
|
||||
|
||||
PLIST_FILES= %%PYPY_DIR%%/lib_pypy/${CFFI_MODULE}_cffi.pypy-%%PYPY_CFFI_VER%%.so
|
||||
PLIST_FILES= %%PYPY_DIR%%/lib_pypy/${CFFI_MODULE}_cffi.%%PYPY_CFFI_VER%%.so
|
||||
|
||||
CFFI_MODULE?= _${PORTNAME}
|
||||
|
||||
@ -23,4 +23,4 @@ do-build:
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib_pypy/`dirname ${CFFI_MODULE}`/
|
||||
${INSTALL_LIB} ${WRKDIR}/${CFFI_MODULE}_cffi.pypy-${PYPY_CFFI_VER}.so ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib_pypy/`dirname ${CFFI_MODULE}`/
|
||||
${INSTALL_LIB} ${WRKDIR}/${CFFI_MODULE}_cffi.${PYPY_CFFI_VER}.so ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib_pypy/`dirname ${CFFI_MODULE}`/
|
||||
|
@ -8,5 +8,5 @@ LICENSE_COMB= multi
|
||||
USES+= compiler:c11
|
||||
|
||||
PYPY_DIR= pypy-${PORTVERSION:C|([0-9])\.([0-9]).*|\1.\2|}
|
||||
PYPY_CFFI_VER= 41
|
||||
PYPY_CFFI_VER?= pypy-41
|
||||
PLIST_SUB+= PYPY_DIR=${PYPY_DIR} PYPY_CFFI_VER=${PYPY_CFFI_VER}
|
||||
|
@ -1,287 +0,0 @@
|
||||
# Created by: David Naylor <naylor.b.david@gmail.com>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= pypy3
|
||||
DISTVERSION= 2.4.0
|
||||
CATEGORIES= lang python java
|
||||
MASTER_SITES= http://cdn.bitbucket.org/pypy/pypy/downloads/ \
|
||||
https://bitbucket.org/pypy/pypy/downloads/
|
||||
DISTNAME= ${PORTNAME}-${DISTVERSION}-src
|
||||
|
||||
MAINTAINER= dbn@FreeBSD.org
|
||||
COMMENT= Fast, compliant implementation of the Python language
|
||||
|
||||
LICENSE= MIT PSFL
|
||||
LICENSE_COMB= multi
|
||||
|
||||
BROKEN_powerpc64= Does not build
|
||||
|
||||
LIB_DEPENDS= libexpat.so:textproc/expat2 \
|
||||
libffi.so:devel/libffi \
|
||||
libsqlite3.so:databases/sqlite3
|
||||
|
||||
PYTHON_DESC= Use Python-2.7 to translate (slowest)
|
||||
PYPY_DESC= Use PyPy to translate (fastest, highest memory usage)
|
||||
PYPY_MINMEM_DESC= Use PyPy to translate (lowest memory usage)
|
||||
PYINST= PyPy instances
|
||||
SANDBOX_DESC= Translate a sandboxed pypy
|
||||
TRANS_DESC= Translation method
|
||||
.if !defined(PYPY_INST)
|
||||
OPTIONS_GROUP= PYINST
|
||||
OPTIONS_GROUP_PYINST= SANDBOX
|
||||
.endif
|
||||
LOCALBASE?= /usr/local
|
||||
.if exists(${LOCALBASE}/bin/pypy)
|
||||
OPTIONS_SINGLE= TRANS
|
||||
OPTIONS_SINGLE_TRANS= PYTHON PYPY PYPY_MINMEM
|
||||
OPTIONS_DEFAULT+= PYPY_MINMEM
|
||||
.endif
|
||||
|
||||
CONFLICTS_INSTALL= pypy3-[0-9]*
|
||||
|
||||
ALL_TARGET= ${PYPY_NAMES}
|
||||
BUILD_WRKSRC= ${WRKDIR}
|
||||
USES= compiler:c11 gettext iconv tar:bzip2
|
||||
MAKEFILE= ${FILESDIR}/Makefile
|
||||
PKGINSTALL= ${WRKDIR}/pkg-install
|
||||
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}
|
||||
|
||||
PYPY_VER= ${DISTVERSION:C|([0-9])\.([0-9]).*|\1.\2|}
|
||||
PYTHON_IMPL_VER= 3
|
||||
PYPY_LIBDIR= lib/${PORTNAME}-${PYPY_VER}
|
||||
PYPY_INCLUDEDIR= include/${PORTNAME}-${PYPY_VER}
|
||||
PYPYDIRS= lib-python/${PYTHON_IMPL_VER}:${PYPY_LIBDIR} \
|
||||
lib_pypy:${PYPY_LIBDIR}/lib_pypy \
|
||||
include:${PYPY_INCLUDEDIR}
|
||||
|
||||
PLIST_SUB+= PYPY_LIBDIR=${PYPY_LIBDIR} \
|
||||
PYPY_INCLUDEDIR=${PYPY_INCLUDEDIR}
|
||||
|
||||
MAKE_ENV+= DISTVERSION=${DISTVERSION} PYTHON_CMD=${PYTHON_CMD} \
|
||||
WRKSRC=${WRKSRC} PYPY_LOCALBASE=${LOCALBASE}
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
.include "${MASTERDIR}/files/bsd.pypy.inst.mk"
|
||||
|
||||
.if ${PORT_OPTIONS:MPYPY} || defined(PYTHON_CMD)
|
||||
PYTHON_CMD?= ${LOCALBASE}/bin/pypy
|
||||
.elif ${PORT_OPTIONS:MPYPY_MINMEM}
|
||||
PYTHON_CMD?= "${SETENV} PYPY_GC_MAX_DELTA=200MB ${LOCALBASE}/bin/pypy --jit loop_longevity=300"
|
||||
.else
|
||||
USES+= python:2,build
|
||||
.endif
|
||||
|
||||
# List of PyPy instances
|
||||
.if !defined(PYPY_INST)
|
||||
PYPY_INST= DEFAULT
|
||||
|
||||
.if ${PORT_OPTIONS:MSANDBOX}
|
||||
PYPY_INST+= SANDBOX
|
||||
.endif
|
||||
|
||||
.endif # !defined(PYPY_INST)
|
||||
|
||||
MAKE_ENV+= PYPY_INST="${PYPY_INST}"
|
||||
|
||||
.for inst in ${PYPY_INST}
|
||||
|
||||
PYPY_NAMES+= ${PYPY_${inst}_NAME}
|
||||
PYPY_PRIMARY?= ${PYPY_${inst}_NAME}
|
||||
MAKE_ENV+= PYPY_${inst}_NAME="${PYPY_${inst}_NAME}" \
|
||||
PYPY_${inst}_OBJSPACE_ARGS="${PYPY_${inst}_OBJSPACE_ARGS}" \
|
||||
PYPY_${inst}_OPT="${PYPY_${inst}_OPT}" \
|
||||
PYPY_${inst}_TRANSLATE_ARGS="${PYPY_${inst}_TRANSLATE_ARGS}"
|
||||
|
||||
# Check if the boehm GC will be used
|
||||
.if ${PYPY_${inst}_OPT} == 0 || ${PYPY_${inst}_OPT} == 1 || ${PYPY_${inst}_OPT} == size
|
||||
WITH_BOEHM_GC= yes
|
||||
.endif
|
||||
|
||||
.endfor # inst in ${PYPY_INST}
|
||||
|
||||
.if defined(WITH_BOEHM_GC)
|
||||
LIB_DEPENDS+= libgc.so:devel/boehm-gc
|
||||
.endif
|
||||
|
||||
# Translate FreeBSD ARCH types to PyPy ARCH types
|
||||
# Pypy officially only supports i386 and amd64, the other platforms are
|
||||
# untested (and do not have jit support).
|
||||
.if ${ARCH} == "i386"
|
||||
PYPY_ARCH= x86_32
|
||||
PYPY_JITTABLE= YES
|
||||
PYPY_BITS= 32
|
||||
.elif ${ARCH} == "amd64"
|
||||
PYPY_ARCH= x86_64
|
||||
PYPY_JITTABLE= YES
|
||||
PYPY_BITS= 64
|
||||
.elif ${ARCH} == "powerpc"
|
||||
PYPY_ARCH= ppc_32
|
||||
PYPY_BITS= 32
|
||||
.elif ${ARCH} == "powerpc64"
|
||||
PYPY_ARCH= ppc_64
|
||||
PYPY_BITS= 64
|
||||
.else
|
||||
PYPY_ARCH= ${ARCH}
|
||||
PYPY_BITS= 32
|
||||
.endif
|
||||
PLIST_SUB+= PYPY_ARCH="${PYPY_ARCH}"
|
||||
PLIST_SUB+= PYPY_BITS="${PYPY_BITS}"
|
||||
PLIST_SUB+= PYPY_VER="${PYPY_VER:C/\.//}"
|
||||
|
||||
.if !defined(PYPY_JITTABLE)
|
||||
.for inst in ${PYPY_INST}
|
||||
.if ${PYPY_${inst}_OPT} == jit
|
||||
PYPY_${inst}_OPT= 2
|
||||
.endif
|
||||
.endfor # inst in ${PYPY_INST}
|
||||
.endif # !defined(PYPY_JITTABLE)
|
||||
|
||||
# Translating requires a large amount of memory, with a two by two matrix
|
||||
# requirement (bitness vs PYTHON_CMD). A more refined matrix is possible based
|
||||
# on optimisation level however this assumes "jit" is the preferred optimisation
|
||||
# level.
|
||||
#
|
||||
.if ${PYPY_ARCH:M*64}
|
||||
. if ${PORT_OPTIONS:MPYPY}
|
||||
# 64bit + pypy = 5.9 GiB
|
||||
PYPY_TRANSLATION_MEMORY= 6062436
|
||||
. elif ${PORT_OPTIONS:MPYPY_MINMEM}
|
||||
# 64bit + pypy (minimum memory) = 3.6GiB
|
||||
PYPY_TRANSLATION_MEMORY= 3729228
|
||||
. else
|
||||
# 64bit + python = 4.7 GiB
|
||||
PYPY_TRANSLATION_MEMORY= 4662460
|
||||
. endif
|
||||
# 64bit system += 366 MiB
|
||||
PYPY_MINIMUM_MEMORY= $$((${PYPY_TRANSLATION_MEMORY} + 374784))
|
||||
.else
|
||||
. if ${PORT_OPTIONS:MPYPY}
|
||||
# 32bit + pypy = 2.3GiB
|
||||
PYPY_TRANSLATION_MEMORY= 2523868
|
||||
. elif ${PORT_OPTIONS:MPYPY_MINMEM}
|
||||
# 32bit + pypy (minimum memory) = 2.2GiB
|
||||
PYPY_TRANSLATION_MEMORY= 2246768
|
||||
# 32bit + python = 2.3 GiB
|
||||
PYPY_TRANSLATION_MEMORY= 2523868
|
||||
. endif
|
||||
# 32bit system += 168 MiB
|
||||
PYPY_MINIMUM_MEMORY= $$((${PYPY_TRANSLATION_MEMORY} + 171787))
|
||||
.endif
|
||||
|
||||
.if !defined(DISABLE_MAKE_JOBS) && ${PYPY_PRIMARY} != ${PYPY_NAMES}
|
||||
PYPY_MEMORY_MULTIPLY= `echo ${PYPY_NAMES} | wc -w`
|
||||
.else
|
||||
PYPY_MEMORY_MULTIPLY= 1
|
||||
.endif
|
||||
|
||||
PYPY_IGNORE_MEMORY= Memory checks non-fatal until revised figures are obtained.
|
||||
PYPY_MEM_WARNING= \
|
||||
${ECHO} "warn: this system has insufficient memory, expected at least $$((${PYPY_MINIMUM_MEMORY} / 1024 * ${PYPY_MEMORY_MULTIPLY} + 1))MiB RAM"
|
||||
.if ${PORT_OPTIONS:MPYPY}
|
||||
PYPY_MEM_WARNING+= ;\
|
||||
${ECHO} "warn: PyPy is being used for translation, consider using Python or PyPy (minimum memory) as it uses less memory"
|
||||
.elif ${PORT_OPTIONS:MPYTHON}
|
||||
PYPY_MEM_WARNING+= ;\
|
||||
${ECHO} "warn: Python is being used for translation, consider using PyPy (minimum memory) as it uses less memory"
|
||||
.endif
|
||||
.if ${PYPY_MEMORY_MULTIPLY} != 1
|
||||
PYPY_MEM_WARNING+= ;\
|
||||
${ECHO} "warn: consider using -DDISABLE_MAKE_JOBS to serialise builds and to conserve memory"
|
||||
.endif
|
||||
.if !defined(PYPY_IGNORE_MEMORY)
|
||||
PYPY_MEM_WARNING+= ;\
|
||||
${ECHO} "err: memory warnings are terminal, to overwrite this error define -DPYPY_IGNORE_MEMORY and try again"; \
|
||||
exit 1
|
||||
.else
|
||||
PYPY_MEM_WARNING+= ;\
|
||||
${ECHO} "warn: THIS SYSTEM MAY END UP SWAP THRASHING AD INFINITUM"
|
||||
.endif
|
||||
|
||||
usage:
|
||||
@${ECHO} "PyPy supports a large number of parameters and customisations. This port"
|
||||
@${ECHO} "supports building multiple instances of PyPy, for example:"
|
||||
@${ECHO} "PYPY_INST= SANDBOX CUSTOM"
|
||||
@${ECHO} "PYPY_CUSTOM_NAME= pypy-custom"
|
||||
@${ECHO} "PYPY_CUSTOM_TRANSLATE_ARGS= --gcrootfinder=shadowstack --gc=generation"
|
||||
@${ECHO} "PYPY_CUSTOM_OPT= 0"
|
||||
@${ECHO} "PYPY_CUSTOM_OBJSPACE_ARGS= --no-objspace-usepycfiles --objspace=thunk"
|
||||
@${ECHO} "will produce two binaries named 'pypy-sandbox' (SANDBOX instance) and"
|
||||
@${ECHO} "'pypy-custom' (CUSTOM instance)."
|
||||
@${ECHO} "See for a list of parameters:"
|
||||
@${ECHO} " http://readthedocs.org/docs/pypy/latest/config/index.html"
|
||||
@${ECHO} "See for predefined instances:"
|
||||
@${ECHO} " ${FILESDIR}/bsd.pypy.inst.mk"
|
||||
@${ECHO}
|
||||
@${ECHO} "On a fast machine PyPy takes around 45 minutes to translate and compile,"
|
||||
@${ECHO} "however an average machine takes in excess of 4 hours, per instance."
|
||||
|
||||
pre-fetch:
|
||||
@${ECHO} Please see http://wiki.FreeBSD.org/PyPy for more details on the port or 'make usage' for a summary
|
||||
@if [ $$((`sysctl -n hw.physmem` / 1024)) -le $$((${PYPY_MINIMUM_MEMORY} * ${PYPY_MEMORY_MULTIPLY})) ]; then ${PYPY_MEM_WARNING}; fi
|
||||
|
||||
post-extract:
|
||||
.for _path in ${PYPYDIRS}
|
||||
${MKDIR} ${WRKDIR}/`${DIRNAME} ${_path:C/.*://}`
|
||||
${LN} -s ${WRKSRC}/${_path:C/:.*//} ${WRKDIR}/${_path:C/.*://}
|
||||
.endfor
|
||||
${LN} -s ${WRKDIR}/lib ${WRKSRC}/lib
|
||||
|
||||
do-configure:
|
||||
${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
|
||||
-e 's|%%PYPY_NAMES%%|${PYPY_NAMES}|g' \
|
||||
-e 's|%%PYPY_VER%%|${PYPY_VER}|g' \
|
||||
${FILESDIR}/use.pypy > ${WRKDIR}/use.pypy
|
||||
${CP} ${WRKDIR}/use.pypy ${PKGINSTALL}
|
||||
${CP} ${WRKDIR}/use.pypy ${PKGDEINSTALL}
|
||||
|
||||
post-build:
|
||||
# UPDATING: check pypy/tool/release/package.py for list of cffi modules
|
||||
.for mod in _sqlite3 _curses syslog
|
||||
${SETENV} ${MAKE_ENV} ${WRKDIR}/${PYPY_PRIMARY} -c 'import ${mod}'
|
||||
.endfor
|
||||
${STRIP_CMD} ${WRKDIR}/${PYPY_LIBDIR}/lib_pypy/__pycache__/_cffi__*.pypy3-${PYPY_VER:C/\.//}.so
|
||||
.for _path in ${PYPYDIRS}
|
||||
-${FIND} ${WRKDIR}/${_path:C/.*://}/ -type d | \
|
||||
${XARGS} -n1 ${WRKDIR}/${PYPY_PRIMARY} -m compileall -fl
|
||||
${FIND} ${WRKDIR}/${_path:C/.*://}/ -name '*.orig' -delete -or \
|
||||
-name '*.bak' -delete -or \
|
||||
-name '*.c' -delete -or \
|
||||
-name '*.o' -delete
|
||||
${FIND} ${WRKDIR}/${_path:C/.*://}/ -name __pycache__ | \
|
||||
${XARGS} -n1 -I {} ${FIND} {} -depth 1 -type d | \
|
||||
${XARGS} ${RM} -r
|
||||
.endfor
|
||||
|
||||
do-install:
|
||||
.for _path in ${PYPYDIRS}
|
||||
${RM} -f ${STAGEDIR}${PREFIX}/${_path:C/.*://}
|
||||
(cd ${WRKSRC}/${_path:C/:.*//}; ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${_path:C/.*://})
|
||||
.endfor
|
||||
.for name in ${PYPY_NAMES:O}
|
||||
${STRIP_CMD} ${WRKDIR}/${name}
|
||||
${INSTALL_PROGRAM} ${WRKDIR}/${name} ${STAGEDIR}${PREFIX}/bin/${name}3-${PYPY_VER}
|
||||
${ECHO} bin/${name}3-${PYPY_VER} >> ${TMPPLIST}
|
||||
.endfor
|
||||
|
||||
test: patch
|
||||
.for inst in ${PYPY_INST}
|
||||
@${WHICH} ${PYPY_${inst}_NAME} > /dev/null 2>&1 || (${ECHO} "Unable to find ${PYPY_${inst}_NAME}, please install port first!"; exit 1)
|
||||
(cd ${WRKSRC}; ${PYPY_${inst}_NAME}3 pypy/test_all.py lib_pypy/pypy_test pypy/module)
|
||||
.endfor
|
||||
|
||||
pkg-plist: build
|
||||
${RM} -f ${WRKDIR}/.plist-files-gen ${WRKDIR}/.plist-dirs-gen
|
||||
.for path in ${PYPYDIRS}
|
||||
cd ${WRKDIR} && ${FIND} ${path:C/.*://}/ -type f >> ${WRKDIR}/.plist-files-gen
|
||||
.endfor
|
||||
${REINPLACE_CMD} -e 's|^${PYPY_LIBDIR}|%%PYPY_LIBDIR%%|g' \
|
||||
-e 's|^${PYPY_INCLUDEDIR}|%%PYPY_INCLUDEDIR%%|g' \
|
||||
-e 's|${PYPY_ARCH}|%%PYPY_ARCH%%|g' \
|
||||
-e 's|_${PYPY_BITS}_|_%%PYPY_BITS%%_|g' \
|
||||
-e 's|-${PYPY_VER:C/\.//}\.|-%%PYPY_VER%%.|g' \
|
||||
${WRKDIR}/.plist-files-gen
|
||||
${SORT} ${WRKDIR}/.plist-files-gen > ${WRKDIR}/pkg-plist
|
||||
${CP} ${WRKDIR}/pkg-plist ${.CURDIR}/pkg-plist
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,2 +0,0 @@
|
||||
SHA256 (pypy3-2.4.0-src.tar.bz2) = d9ba207d6eecf8a0dc4414e9f4e92db1abd143e8cc6ec4a6bdcac75b29f104f3
|
||||
SIZE (pypy3-2.4.0-src.tar.bz2) = 14693194
|
@ -1,44 +0,0 @@
|
||||
# Build Makefile for lang/pypy
|
||||
# $FreeBSD$
|
||||
|
||||
# Required environment variables
|
||||
# - DISTVERSION
|
||||
# - PYTHON_CMD
|
||||
# - PYPY_INST
|
||||
# - PYPY_${inst}_NAME
|
||||
# - PYPY_${inst}_OBJSPACE_ARGS
|
||||
# - PYPY_${inst}_OPT
|
||||
# - PYPY_${inst}_TRANSLATE_ARGS
|
||||
# - WRKSRC
|
||||
|
||||
CP?= cp
|
||||
ECHO?= echo
|
||||
MKDIR?= mkdir
|
||||
RM?= rm
|
||||
SED?= sed
|
||||
SETENV?= env
|
||||
TOUCH?= touch
|
||||
|
||||
REINPLACE_CMD?= ${SED} -i~
|
||||
|
||||
BUILDDIR= usession-pypy3-release-${DISTVERSION:C/\.[^.]*$//}.x-0
|
||||
|
||||
.for inst in ${PYPY_INST}
|
||||
|
||||
${PYPY_${inst}_NAME}: build_${PYPY_${inst}_NAME}/${BUILDDIR}/testing_1/pypy-c
|
||||
${CP} build_${PYPY_${inst}_NAME}/${BUILDDIR}/testing_1/pypy-c \
|
||||
${PYPY_${inst}_NAME}
|
||||
|
||||
.done_translate_${PYPY_${inst}_NAME}:
|
||||
${RM} -rf build_${PYPY_${inst}_NAME}
|
||||
${MKDIR} build_${PYPY_${inst}_NAME}
|
||||
(cd ${WRKSRC}/pypy/goal; \
|
||||
/usr/bin/time -l ${SETENV} TMPDIR=${.CURDIR}/build_${PYPY_${inst}_NAME} \
|
||||
${PYTHON_CMD} ../../rpython/bin/rpython --source ${PYPY_${inst}_TRANSLATE_ARGS} -O${PYPY_${inst}_OPT} \
|
||||
targetpypystandalone.py ${PYPY_${inst}_OBJSPACE_ARGS} )
|
||||
${TOUCH} .done_translate_${PYPY_${inst}_NAME}
|
||||
|
||||
build_${PYPY_${inst}_NAME}/${BUILDDIR}/testing_1/pypy-c: .done_translate_${PYPY_${inst}_NAME}
|
||||
${REINPLACE_CMD} -e 's|^%.o: %.c$$|.c.o:|g' build_${PYPY_${inst}_NAME}/${BUILDDIR}/testing_1/Makefile
|
||||
/usr/bin/time -l ${MAKE} -C build_${PYPY_${inst}_NAME}/${BUILDDIR}/testing_1 pypy-c
|
||||
.endfor
|
@ -1,13 +0,0 @@
|
||||
# PyPy instances
|
||||
# See http://readthedocs.org/docs/pypy/latest/config/index.html for a list of
|
||||
# options available. --gcrootfinder=asmgcc does not work under FreeBSD/amd64.
|
||||
|
||||
PYPY_DEFAULT_NAME?= pypy
|
||||
PYPY_DEFAULT_TRANSLATE_ARGS?=
|
||||
PYPY_DEFAULT_OPT?= jit
|
||||
PYPY_DEFAULT_OBJSPACE_ARGS?=
|
||||
|
||||
PYPY_SANDBOX_NAME?= pypy-sandbox
|
||||
PYPY_SANDBOX_TRANSLATE_ARGS?= --sandbox
|
||||
PYPY_SANDBOX_OPT?= jit
|
||||
PYPY_SANDBOX_OBJSPACE_ARGS?=
|
@ -1,33 +0,0 @@
|
||||
--- lib-python/3/distutils/command/install.py.orig 2012-07-15 10:10:18.000000000 +0200
|
||||
+++ lib-python/3/distutils/command/install.py 2012-07-15 10:13:15.000000000 +0200
|
||||
@@ -66,9 +66,9 @@
|
||||
'data' : '$userbase',
|
||||
},
|
||||
'pypy': {
|
||||
- 'purelib': '$base/site-packages',
|
||||
- 'platlib': '$base/site-packages',
|
||||
- 'headers': '$base/include',
|
||||
+ 'purelib': '$base/lib/pypy3-$pypy_version_short/site-packages',
|
||||
+ 'platlib': '$platbase/lib/pypy3-$pypy_version_short/site-packages',
|
||||
+ 'headers': '$base/include/pypy3-$pypy_version_short/$dist_name',
|
||||
'scripts': '$base/bin',
|
||||
'data' : '$base',
|
||||
},
|
||||
@@ -317,6 +317,7 @@
|
||||
# about needing recursive variable expansion (shudder).
|
||||
|
||||
py_version = sys.version.split()[0]
|
||||
+ pypy_version = '%s.%s.%s' % sys.pypy_version_info[:3]
|
||||
(prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
|
||||
try:
|
||||
abiflags = sys.abiflags
|
||||
@@ -329,6 +329,9 @@
|
||||
'py_version': py_version,
|
||||
'py_version_short': py_version[0:3],
|
||||
'py_version_nodot': py_version[0] + py_version[2],
|
||||
+ 'pypy_version': pypy_version,
|
||||
+ 'pypy_version_short': pypy_version[0:3],
|
||||
+ 'pypy_version_nodot': pypy_version[0] + pypy_version[2],
|
||||
'sys_prefix': prefix,
|
||||
'prefix': prefix,
|
||||
'sys_exec_prefix': exec_prefix,
|
@ -1,22 +0,0 @@
|
||||
--- lib-python/3/distutils/sysconfig_pypy.py.orig 2012-11-22 14:52:20.000000000 +0200
|
||||
+++ lib-python/3/distutils/sysconfig_pypy.py 2012-11-27 17:59:44.000000000 +0200
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
def get_python_inc(plat_specific=0, prefix=None):
|
||||
from os.path import join as j
|
||||
- return j(sys.prefix, 'include')
|
||||
+ return j(sys.prefix, 'include', 'pypy3-%s.%s' % sys.pypy_version_info[:2])
|
||||
|
||||
def get_python_version():
|
||||
"""Return a string containing the major and minor Python version,
|
||||
@@ -42,8 +42,8 @@
|
||||
if prefix is None:
|
||||
prefix = PREFIX
|
||||
if standard_lib:
|
||||
- return os.path.join(prefix, "lib-python", sys.version[0])
|
||||
- return os.path.join(prefix, 'site-packages')
|
||||
+ return os.path.join(prefix, 'lib', 'pypy3-%s.%s' % sys.pypy_version_info[:2])
|
||||
+ return os.path.join(prefix, 'lib', 'pypy3-%s.%s' % sys.pypy_version_info[:2], 'site-packages')
|
||||
|
||||
|
||||
_config_vars = None
|
@ -1,40 +0,0 @@
|
||||
--- lib-python/3/sysconfig.py.orig 2012-07-15 09:57:14.000000000 +0200
|
||||
+++ lib-python/3/sysconfig.py 2012-07-15 10:03:25.000000000 +0200
|
||||
@@ -27,12 +27,12 @@
|
||||
'data' : '{base}',
|
||||
},
|
||||
'pypy': {
|
||||
- 'stdlib': '{base}/lib-python',
|
||||
- 'platstdlib': '{base}/lib-python',
|
||||
- 'purelib': '{base}/lib-python',
|
||||
- 'platlib': '{base}/lib-python',
|
||||
- 'include': '{base}/include',
|
||||
- 'platinclude': '{base}/include',
|
||||
+ 'stdlib': '{base}/lib/pypy3-{pypy_version_short}',
|
||||
+ 'platstdlib': '{platbase}/lib/pypy3-{pypy_version_short}',
|
||||
+ 'purelib': '{base}/lib/pypy3-{pypy_version_short}',
|
||||
+ 'platlib': '{platbase}/lib/pypy3-{pypy_version_short}',
|
||||
+ 'include': '{base}/include/pypy3-{pypy_version_short}',
|
||||
+ 'platinclude': '{platbase}/include/pypy3-{pypy_version_short}',
|
||||
'scripts': '{base}/bin',
|
||||
'data' : '{base}',
|
||||
},
|
||||
@@ -98,6 +98,8 @@
|
||||
'scripts', 'data')
|
||||
_PY_VERSION = sys.version.split()[0]
|
||||
_PY_VERSION_SHORT = sys.version[:3]
|
||||
+_PYPY_VERSION = '%s.%s.%s' % sys.pypy_version_info[:3]
|
||||
+_PYPY_VERSION_SHORT = _PYPY_VERSION[:3]
|
||||
_PY_VERSION_SHORT_NO_DOT = _PY_VERSION[0] + _PY_VERSION[2]
|
||||
_PREFIX = os.path.normpath(sys.prefix)
|
||||
_EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
|
||||
@@ -304,6 +306,9 @@
|
||||
_CONFIG_VARS['py_version'] = _PY_VERSION
|
||||
_CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT
|
||||
_CONFIG_VARS['py_version_nodot'] = _PY_VERSION[0] + _PY_VERSION[2]
|
||||
+ _CONFIG_VARS['py_version'] = _PYPY_VERSION
|
||||
+ _CONFIG_VARS['pypy_version_short'] = _PYPY_VERSION_SHORT
|
||||
+ _CONFIG_VARS['pypy_version_nodot'] = _PYPY_VERSION[0] + _PYPY_VERSION[2]
|
||||
_CONFIG_VARS['base'] = _PREFIX
|
||||
_CONFIG_VARS['platbase'] = _EXEC_PREFIX
|
||||
_CONFIG_VARS['projectbase'] = _PROJECT_BASE
|
@ -1,19 +0,0 @@
|
||||
--- lib_pypy/_sqlite3.py.bak 2013-12-15 23:45:52.000000000 +0200
|
||||
+++ lib_pypy/_sqlite3.py 2013-12-16 12:07:57.000000000 +0200
|
||||
@@ -269,11 +269,14 @@
|
||||
_ffi.cdef("int sqlite3_enable_load_extension(sqlite3 *db, int onoff);")
|
||||
|
||||
if sys.platform.startswith('freebsd'):
|
||||
+ import os
|
||||
+ import os.path
|
||||
+ _localbase = os.environ.get('LOCALBASE', '/usr/local')
|
||||
_lib = _ffi.verify("""
|
||||
#include <sqlite3.h>
|
||||
""", libraries=['sqlite3'],
|
||||
- include_dirs=['/usr/local/include'],
|
||||
- library_dirs=['/usr/local/lib']
|
||||
+ include_dirs=[os.path.join(_localbase, 'include')],
|
||||
+ library_dirs=[os.path.join(_localbase, 'lib')]
|
||||
)
|
||||
else:
|
||||
_lib = _ffi.verify("""
|
@ -1,27 +0,0 @@
|
||||
--- pypy/module/_posixsubprocess/interp_subprocess.py~ 2013-08-09 19:13:04.000000000 +0200
|
||||
+++ pypy/module/_posixsubprocess/interp_subprocess.py 2013-08-09 19:20:31.000000000 +0200
|
||||
@@ -12,8 +12,10 @@
|
||||
|
||||
class CConfig:
|
||||
_compilation_info_ = ExternalCompilationInfo(
|
||||
- includes=['unistd.h', 'sys/syscall.h'])
|
||||
+ includes=['unistd.h', 'sys/stat.h', 'sys/syscall.h', 'sys/types.h'])
|
||||
+ HAVE_SYS_STAT_H = platform.Has('stat')
|
||||
HAVE_SYS_SYSCALL_H = platform.Has("syscall")
|
||||
+ HAVE_SYS_TYPES_H = platform.Has('types')
|
||||
HAVE_SETSID = platform.Has("setsid")
|
||||
|
||||
config = platform.configure(CConfig)
|
||||
@@ -26,8 +28,12 @@
|
||||
])
|
||||
|
||||
compile_extra = []
|
||||
+if config['HAVE_SYS_STAT_H']:
|
||||
+ compile_extra.append('-DHAVE_SYS_STAT_H')
|
||||
if config['HAVE_SYS_SYSCALL_H']:
|
||||
compile_extra.append("-DHAVE_SYS_SYSCALL_H")
|
||||
+if config['HAVE_SYS_TYPES_H']:
|
||||
+ compile_extra.append('-DHAVE_SYS_TYPES_H')
|
||||
if config['HAVE_SETSID']:
|
||||
compile_extra.append("-DHAVE_SETSID")
|
||||
|
@ -1,20 +0,0 @@
|
||||
--- pypy/module/sys/initpath.py.orig 2012-11-27 18:15:02.000000000 +0200
|
||||
+++ pypy/module/sys/initpath.py 2012-11-27 18:19:45.000000000 +0200
|
||||
@@ -90,13 +90,13 @@
|
||||
least contain a directory called ``lib-python/X.Y`` and another one called
|
||||
``lib_pypy``. If they cannot be found, it raises OSError.
|
||||
"""
|
||||
- from pypy.module.sys.version import CPYTHON_VERSION
|
||||
- dirname = '%d' % CPYTHON_VERSION[0]
|
||||
- lib_python = os.path.join(prefix, 'lib-python')
|
||||
+ from pypy.module.sys.version import PYPY_VERSION
|
||||
+ dirname = 'pypy3-%d.%d' % PYPY_VERSION[:2]
|
||||
+ lib_python = os.path.join(prefix, 'lib')
|
||||
python_std_lib = os.path.join(lib_python, dirname)
|
||||
_checkdir(python_std_lib)
|
||||
|
||||
- lib_pypy = os.path.join(prefix, 'lib_pypy')
|
||||
+ lib_pypy = os.path.join(python_std_lib, 'lib_pypy')
|
||||
_checkdir(lib_pypy)
|
||||
|
||||
importlist = []
|
@ -1,32 +0,0 @@
|
||||
--- pypy/sandbox/pypy_interact.py.orig 2012-06-07 14:24:48.000000000 +0200
|
||||
+++ pypy/sandbox/pypy_interact.py 2012-07-02 21:08:19.000000000 +0200
|
||||
@@ -22,11 +22,14 @@
|
||||
|
||||
import sys, os
|
||||
sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..')))
|
||||
+from pypy.module.sys.version import PYPY_VERSION
|
||||
from rpython.translator.sandbox.sandlib import SimpleIOSandboxedProc
|
||||
from rpython.translator.sandbox.sandlib import VirtualizedSandboxedProc
|
||||
from rpython.translator.sandbox.vfs import Dir, RealDir, RealFile
|
||||
import pypy
|
||||
LIB_ROOT = os.path.dirname(os.path.dirname(pypy.__file__))
|
||||
+LIB_ROOT = os.path.join(LIB_ROOT, 'lib')
|
||||
+LIB_ROOT = os.path.join(LIB_ROOT, 'pypy3-%d.%d' % PYPY_VERSION[:2])
|
||||
|
||||
class PyPySandboxedProc(VirtualizedSandboxedProc, SimpleIOSandboxedProc):
|
||||
argv0 = '/bin/pypy-c'
|
||||
@@ -56,10 +59,10 @@
|
||||
return Dir({
|
||||
'bin': Dir({
|
||||
'pypy-c': RealFile(self.executable),
|
||||
- 'lib-python': RealDir(os.path.join(libroot, 'lib-python'),
|
||||
- exclude=exclude),
|
||||
- 'lib_pypy': RealDir(os.path.join(libroot, 'lib_pypy'),
|
||||
- exclude=exclude),
|
||||
+ 'lib': Dir({
|
||||
+ 'pypy3-%d.%d' % PYPY_VERSION[:2] : RealDir(libroot,
|
||||
+ exclude=exclude)
|
||||
+ })
|
||||
}),
|
||||
'tmp': tmpdirnode,
|
||||
})
|
@ -1,13 +0,0 @@
|
||||
--- rpython/rtyper/tool/rffi_platform.py~ 2011-11-19 09:44:54.000000000 +0200
|
||||
+++ rpython/rtyper/tool/rffi_platform.py 2011-11-23 20:17:30.000000000 +0200
|
||||
@@ -805,7 +805,9 @@
|
||||
includes=['gc.h']
|
||||
else:
|
||||
library_dir = ''
|
||||
- libraries = ['gc', 'dl']
|
||||
+ libraries = ['gc']
|
||||
+ if platform.name != "freebsd":
|
||||
+ libraries += ['dl']
|
||||
includes=['gc/gc.h']
|
||||
eci = ExternalCompilationInfo(
|
||||
platform=platform,
|
@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# $FreeBSD$
|
||||
|
||||
PREFIX=%%PREFIX%%
|
||||
PYPY_NAMES="%%PYPY_NAMES%%"
|
||||
PYPY_VER=%%PYPY_VER%%
|
||||
|
||||
if [ "$2" = "POST-INSTALL" ]
|
||||
then
|
||||
for name in $PYPY_NAMES
|
||||
do
|
||||
if [ ! -L $PREFIX/bin/${name}3 ]
|
||||
then
|
||||
ln -s ${name}3-$PYPY_VER $PREFIX/bin/${name}3
|
||||
fi
|
||||
done
|
||||
elif [ "$2" = "POST-DEINSTALL" ] ; then
|
||||
for name in $PYPY_NAMES
|
||||
do
|
||||
if [ -L $PREFIX/bin/${name}3 ] && [ `readlink $PREFIX/bin/${name}3` = ${name}3-$PYPY_VER ]
|
||||
then
|
||||
rm $PREFIX/bin/${name}3
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,17 +0,0 @@
|
||||
PyPy is a fast, compliant alternative implementation of the Python language
|
||||
(2.7.1). It has several advantages and distinct features:
|
||||
|
||||
- Speed: thanks to its Just-in-Time compiler, Python programs often run faster
|
||||
on PyPy.
|
||||
- Memory usage: large, memory-hungry Python programs might end up taking less
|
||||
space than they do in CPython.
|
||||
- Compatibility: PyPy is highly compatible with existing python code. It
|
||||
supports ctypes and can run popular python libraries like
|
||||
twisted and django.
|
||||
- Sandboxing: PyPy provides the ability to run untrusted code in a fully
|
||||
secure way.
|
||||
- Stackless: PyPy can be configured to run in stackless mode, providing
|
||||
micro-threads for massive concurrency.
|
||||
- As well as other features.
|
||||
|
||||
WWW: http://pypy.org/
|
File diff suppressed because it is too large
Load Diff
16
lang/pypy3/Makefile
Normal file
16
lang/pypy3/Makefile
Normal file
@ -0,0 +1,16 @@
|
||||
# Created by: David Naylor <dbn@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= pypy3
|
||||
DISTVERSION= 5.2.0-alpha1
|
||||
DISTNAME= ${PORTNAME}.3-v${DISTVERSION}-src
|
||||
|
||||
MASTERDIR= ${.CURDIR}/../pypy
|
||||
|
||||
BUILD_WRKSRC?= ${WRKDIR}/build/usession-release-pypy3.3-v5.2-0/testing_1
|
||||
|
||||
PACKAGE_ARGS= --without-_gdbm --without-sqlite3 --without-tk
|
||||
|
||||
PYPY_CFFI_VER= pypy3-52
|
||||
|
||||
.include "${MASTERDIR}/Makefile"
|
3
lang/pypy3/distinfo
Normal file
3
lang/pypy3/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1468995102
|
||||
SHA256 (pypy3.3-v5.2.0-alpha1-src.tar.bz2) = 344c2f088c82ea1274964bb0505ab80d3f9e538cc03f91aa109325ddbaa61426
|
||||
SIZE (pypy3.3-v5.2.0-alpha1-src.tar.bz2) = 24390595
|
@ -0,0 +1,21 @@
|
||||
--- pypy/module/_posixsubprocess/interp_subprocess.py.orig 2016-05-29 20:38:19 UTC
|
||||
+++ pypy/module/_posixsubprocess/interp_subprocess.py
|
||||
@@ -15,7 +15,8 @@ thisdir = py.path.local(__file__).dirpat
|
||||
|
||||
class CConfig:
|
||||
_compilation_info_ = ExternalCompilationInfo(
|
||||
- includes=['unistd.h', 'sys/syscall.h'])
|
||||
+ includes=['unistd.h', 'sys/stat.h', 'sys/syscall.h'])
|
||||
+ HAVE_SYS_STAT_H = platform.Has("stat")
|
||||
HAVE_SYS_SYSCALL_H = platform.Has("syscall")
|
||||
HAVE_SETSID = platform.Has("setsid")
|
||||
|
||||
@@ -27,6 +28,8 @@ eci = ExternalCompilationInfo(
|
||||
separate_module_files=[thisdir.join('_posixsubprocess.c')])
|
||||
|
||||
compile_extra = []
|
||||
+if config['HAVE_SYS_STAT_H']:
|
||||
+ compile_extra.append("-DHAVE_SYS_STAT_H")
|
||||
if config['HAVE_SYS_SYSCALL_H']:
|
||||
compile_extra.append("-DHAVE_SYS_SYSCALL_H")
|
||||
if config['HAVE_SETSID']:
|
46
lang/pypy3/files/patch-pypy_module_time_interp__time.py
Normal file
46
lang/pypy3/files/patch-pypy_module_time_interp__time.py
Normal file
@ -0,0 +1,46 @@
|
||||
--- pypy/module/time/interp_time.py.orig 2016-05-29 20:38:19 UTC
|
||||
+++ pypy/module/time/interp_time.py
|
||||
@@ -4,6 +4,7 @@ from pypy.interpreter.error import Opera
|
||||
from pypy.interpreter.gateway import unwrap_spec
|
||||
from rpython.rtyper.lltypesystem import lltype
|
||||
from rpython.rlib.rarithmetic import intmask
|
||||
+from rpython.rlib.rposix import CLOCK_T as clock_t
|
||||
from rpython.rlib.rtime import win_perf_counter
|
||||
from rpython.rlib import rposix, rtime
|
||||
from rpython.translator.tool.cbuild import ExternalCompilationInfo
|
||||
@@ -147,7 +148,6 @@ class CConfig:
|
||||
libraries=rtime.libraries
|
||||
)
|
||||
CLOCKS_PER_SEC = platform.ConstantInteger("CLOCKS_PER_SEC")
|
||||
- clock_t = platform.SimpleType("clock_t", rffi.ULONG)
|
||||
has_gettimeofday = platform.Has('gettimeofday')
|
||||
has_clock_gettime = platform.Has('clock_gettime')
|
||||
CLOCK_PROF = platform.DefinedConstantInteger('CLOCK_PROF')
|
||||
@@ -224,7 +224,6 @@ if _POSIX:
|
||||
|
||||
CLOCKS_PER_SEC = cConfig.CLOCKS_PER_SEC
|
||||
HAS_CLOCK_GETTIME = cConfig.has_clock_gettime
|
||||
-clock_t = cConfig.clock_t
|
||||
tm = cConfig.tm
|
||||
glob_buf = lltype.malloc(tm, flavor='raw', zero=True, immortal=True)
|
||||
|
||||
@@ -966,7 +965,9 @@ else:
|
||||
with lltype.scoped_alloc(rposix.TMS) as tms:
|
||||
ret = rposix.c_times(tms)
|
||||
if rffi.cast(lltype.Signed, ret) != -1:
|
||||
- cpu_time = float(tms.c_tms_utime + tms.c_tms_stime)
|
||||
+ c_tms_utime = rffi.cast(lltype.Signed, tms.c_tms_utime)
|
||||
+ c_tms_stime = rffi.cast(lltype.Signed, tms.c_tms_stime)
|
||||
+ cpu_time = float(c_tms_utime + c_tms_stime)
|
||||
if w_info is not None:
|
||||
_setinfo(space, w_info, "times()",
|
||||
1.0 / rposix.CLOCK_TICKS_PER_SECOND,
|
||||
@@ -993,7 +994,7 @@ else:
|
||||
records."""
|
||||
value = _clock()
|
||||
# Is this casting correct?
|
||||
- if value == rffi.cast(clock_t, -1):
|
||||
+ if intmask(value) == intmask(rffi.cast(clock_t, -1)):
|
||||
raise oefmt(space.w_RuntimeError,
|
||||
"the processor time used is not available or its value"
|
||||
"cannot be represented")
|
12
lang/pypy3/files/patch-rpython_rlib_rtime.py
Normal file
12
lang/pypy3/files/patch-rpython_rlib_rtime.py
Normal file
@ -0,0 +1,12 @@
|
||||
--- rpython/rlib/rtime.py.orig 2016-05-29 20:38:19 UTC
|
||||
+++ rpython/rlib/rtime.py
|
||||
@@ -29,7 +29,8 @@ else:
|
||||
'sys/types.h', 'unistd.h',
|
||||
'sys/time.h', 'sys/resource.h']
|
||||
|
||||
- if not sys.platform.startswith("openbsd"):
|
||||
+ if not sys.platform.startswith("openbsd") and \
|
||||
+ not sys.platform.startswith("freebsd"):
|
||||
includes.append('sys/timeb.h')
|
||||
|
||||
need_rusage = True
|
@ -0,0 +1,9 @@
|
||||
--- rpython/rlib/rvmprof/src/vmprof_config.h.orig 2016-05-29 20:38:19 UTC
|
||||
+++ rpython/rlib/rvmprof/src/vmprof_config.h
|
||||
@@ -1,5 +1,5 @@
|
||||
#define HAVE_SYS_UCONTEXT_H
|
||||
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||
#ifdef __i386__
|
||||
#define PC_FROM_UCONTEXT uc_mcontext.mc_eip
|
||||
#else
|
@ -0,0 +1,11 @@
|
||||
--- rpython/translator/c/src/precommondefs.h.orig 2016-05-29 20:38:19 UTC
|
||||
+++ rpython/translator/c/src/precommondefs.h
|
||||
@@ -20,7 +20,7 @@
|
||||
#define _NETBSD_SOURCE 1
|
||||
/* Define to activate features from IEEE Stds 1003.1-2001 */
|
||||
#ifndef _POSIX_C_SOURCE
|
||||
-# define _POSIX_C_SOURCE 200112L
|
||||
+# define _POSIX_C_SOURCE 200809L
|
||||
#endif
|
||||
/* Define on FreeBSD to activate all library features */
|
||||
#define __BSD_VISIBLE 1
|
2040
lang/pypy3/pkg-plist
Normal file
2040
lang/pypy3/pkg-plist
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user