freebsd-ports/lang/pypy/bsd.pypy.cffi.mk
David Naylor 52777f3f56 lang/pypy(3): update to 5.10, add flavors to ancillary ports
- Consistently use DISTVERSION instead of PORTVERSION (the former is set, not the latter)
 - Only depend on libunwind on x86 arch with FreeBSD >= 11 (fixes ignored build on arm/ppc)
 - Fix python dependency with depreciation of python meta ports
 - Remove PYPY_BITS from pkg-plist target, no longer used
 - Remove setting of PORTVERSION, DISTVERSION is set in bsd.pypy.mk
 - bsd.pypy.mk:
   - Define DISTVERSION once, to ensure consistency
   - PYPY_DIR: Handle versions with multiple digits
   - PYPY_CFFI_VER now differs in value between pypy and pypy3
 - bsd.pypy.cffi.mk:
   - Add FLAVORS for pypy and pypy3 [1]
   - Consistently use PYTHON_IMPL instead of the hard coded "pypy"
   - PLIST_FILES: use direct substitution instead of PLIST_SUB

Approved by:		portmgr (mat) [1]
Differential Revision:	https://reviews.freebsd.org/D13675
2018-01-03 18:42:15 +00:00

30 lines
941 B
Makefile

# $FreeBSD$
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTFILES=
BUILD_DEPENDS+= ${PYTHON_IMPL}:lang/${PYTHON_IMPL}
RUN_DEPENDS+= ${PYTHON_IMPL}:lang/${PYTHON_IMPL}
PLIST_FILES= ${PYPY_DIR}/lib_pypy/${CFFI_MODULE}_cffi.${PYPY_CFFI_VER}.so
CFFI_MODULE?= _${PORTNAME}
FLAVORS= pypy pypy3
FLAVOR?= ${FLAVORS:[1]}
PYTHON_IMPL= ${FLAVOR}
PYTHON_PORTVERSION= ${DISTVERSION}
PYTHON_PKGNAMEPREFIX= ${PYTHON_IMPL}-
PYTHON_CMD= ${LOCALBASE}/bin/${PYTHON_IMPL}
.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_CFFI_VER}.so ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib_pypy/`dirname ${CFFI_MODULE}`/