annotate bsd.pypy.cffi.mk @ 18:cb562cb4ec47

Do not write a file into the current working directory when building: use WRKDIR instead
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 03 Oct 2022 17:11:08 +0200
parents f02a08eefd82
children 8730245d6754
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
1 # $FreeBSD: head/lang/pypy/bsd.pypy.cffi.mk 457998 2018-01-03 18:42:15Z dbn $
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
3 PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
4 DISTFILES=
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
5
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
6 BUILD_DEPENDS+= ${PYTHON_IMPL}:lang/${PYTHON_IMPL}
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
7 RUN_DEPENDS+= ${PYTHON_IMPL}:lang/${PYTHON_IMPL}
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
8
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
9 CFFI_MODULE?= _${PORTNAME}
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
10
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
11 FLAVORS= pypy pypy3
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
12 FLAVOR?= ${FLAVORS:[1]}
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
13
16
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
14 .if ${FLAVOR} == pypy
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
15 PLIST_FILES= ${PYPY_DIR}/lib_pypy/${CFFI_MODULE}_cffi.${PYPY_CFFI_VER}.so
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
16 .else # pypy3
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
17 PLIST_FILES= ${PYPY_DIR}/lib/${PYTHON_IMPL_MINOR}/${CFFI_MODULE}_cffi.${PYPY_CFFI_VER}.so
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
18 .endif
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
19
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
20 PYTHON_IMPL= ${FLAVOR}
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
21 PYTHON_PORTVERSION= ${DISTVERSION}
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
22 PYTHON_PKGNAMEPREFIX= ${PYTHON_IMPL}-
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
23 PYTHON_CMD= ${LOCALBASE}/bin/${PYTHON_IMPL}
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
24
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
25 .include "${.CURDIR}/../../lang/pypy/bsd.pypy.mk"
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
26
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
27 do-build:
16
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
28 .if ${FLAVOR} == pypy
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
29 ${CP} ${LOCALBASE}/${PYPY_DIR}/lib_pypy/${CFFI_MODULE}_build.py ${WRKDIR}/${PORTNAME}.py
16
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
30 .else # pypy3
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
31 ${CP} ${LOCALBASE}/${PYPY_DIR}/lib/${PYTHON_IMPL_MINOR}/${CFFI_MODULE}_build.py ${WRKDIR}/${PORTNAME}.py
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
32 .endif
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
33 (cd ${WRKDIR}; \
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
34 ${PYTHON_CMD} -c "from ${PORTNAME} import ${CFFI_NAME} as ffi; ffi.compile('${WRKDIR}');")
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
35
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
36 do-install:
16
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
37 .if ${FLAVOR} == pypy
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
38 ${MKDIR} ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib_pypy/`dirname ${CFFI_MODULE}`/
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
39 ${INSTALL_LIB} ${WRKDIR}/${CFFI_MODULE}_cffi.${PYPY_CFFI_VER}.so ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib_pypy/`dirname ${CFFI_MODULE}`/
16
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
40 .else # pypy3
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
41 ${MKDIR} ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib/${PYTHON_IMPL_MINOR}/`dirname ${CFFI_MODULE}`/
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
42 ${INSTALL_LIB} ${WRKDIR}/${CFFI_MODULE}_cffi.${PYPY_CFFI_VER}.so ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib/${PYTHON_IMPL_MINOR}/`dirname ${CFFI_MODULE}`/
f02a08eefd82 Allow to build some CFFI ports to build again with current PyPy3: the internal PyPy3 directly layout has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 2
diff changeset
43 .endif