aboutsummaryrefslogtreecommitdiffstats
path: root/lang/pypy/bsd.pypy.cffi.mk
blob: 4e91f964c76fae2f5cb3f5d82924a63e7c7b159e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# $FreeBSD$

PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
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

CFFI_MODULE?=   _${PORTNAME}

PYTHON_PORTVERSION= 5.1.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_CFFI_VER}.so ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib_pypy/`dirname ${CFFI_MODULE}`/