annotate lang/pypy2/bsd.pypy.cffi.mk @ 125:e11577711968

Build the new pypy2:lang/pypy2 using the new monorepo for PyPy. BUGS: Byte-compilation not yet implemented.
author Franz Glasner <fzglas.hg@dom66.de>
date Sat, 13 Jan 2024 20:40:33 +0100
parents b907e948fed9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20
246c2f328231 Now include bsd.port.pre.mk automitically from within bsd.pypy.mk
Franz Glasner <fzglas.hg@dom66.de>
parents: 19
diff changeset
1 # NOTE: Also includes bsd.pypy.mk and (indirectly) bsd.port.pre.mk
2
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
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
14 PYTHON_IMPL= ${FLAVOR}
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
15 PYTHON_PORTVERSION= ${DISTVERSION}
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
16 PYTHON_PKGNAMEPREFIX= ${PYTHON_IMPL}-
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
17 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
18
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
19 .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
20
28
6cddc8f64f05 Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents: 25
diff changeset
21 #
123
b907e948fed9 Remove support for building PyPy for Python versions 3.7 and 3.8
Franz Glasner <fzglas.hg@dom66.de>
parents: 65
diff changeset
22 # Check that this port's build selected option FORPYIMPL39 or FORPYIMPL310
28
6cddc8f64f05 Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents: 25
diff changeset
23 # is compatible to the corresponding build option of the installed pypy3.
6cddc8f64f05 Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents: 25
diff changeset
24 #
6cddc8f64f05 Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents: 25
diff changeset
25 .if ${FLAVOR} == pypy3 && exists(${LOCALBASE}/bin/pypy3)
6cddc8f64f05 Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents: 25
diff changeset
26 _PYPY_SC_PLATSTDLIB= ${:!${LOCALBASE}/bin/pypy3 -c 'import sysconfig; print(sysconfig.get_path("platstdlib"))'!}
123
b907e948fed9 Remove support for building PyPy for Python versions 3.7 and 3.8
Franz Glasner <fzglas.hg@dom66.de>
parents: 65
diff changeset
27 . if ${_PYPY_SC_PLATSTDLIB:T} != ${PYTHON_IMPL_MINOR}
28
6cddc8f64f05 Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents: 25
diff changeset
28 IGNORE= Port option mismatch: must match FORPYIMPLxx of the installed lang/pypy3
6cddc8f64f05 Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents: 25
diff changeset
29 . endif
6cddc8f64f05 Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents: 25
diff changeset
30 .endif
6cddc8f64f05 Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents: 25
diff changeset
31
123
b907e948fed9 Remove support for building PyPy for Python versions 3.7 and 3.8
Franz Glasner <fzglas.hg@dom66.de>
parents: 65
diff changeset
32 .if ${FLAVOR} == pypy
25
ee6885d5bdcb Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
33 PLIST_FILES= ${PYPY_DIR}/lib_pypy/${CFFI_MODULE}_cffi.${PYPY_CFFI_VER}.so
ee6885d5bdcb Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
34 .else # pypy3
ee6885d5bdcb Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
35 PLIST_FILES= ${PYPY_DIR}/lib/${PYTHON_IMPL_MINOR}/${CFFI_MODULE}_cffi.${PYPY_CFFI_VER}.so
ee6885d5bdcb Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
36 .endif
ee6885d5bdcb Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
37
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
38 do-build:
123
b907e948fed9 Remove support for building PyPy for Python versions 3.7 and 3.8
Franz Glasner <fzglas.hg@dom66.de>
parents: 65
diff changeset
39 .if ${FLAVOR} == pypy
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
40 ${CP} ${LOCALBASE}/${PYPY_DIR}/lib_pypy/${CFFI_MODULE}_build.py ${WRKDIR}/${PORTNAME}.py
25
ee6885d5bdcb Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
41 .else # newer pypy3
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
42 ${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
43 .endif
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
44 (cd ${WRKDIR}; \
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
45 ${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
46
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
47 do-install:
123
b907e948fed9 Remove support for building PyPy for Python versions 3.7 and 3.8
Franz Glasner <fzglas.hg@dom66.de>
parents: 65
diff changeset
48 .if ${FLAVOR} == pypy
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
49 ${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
50 ${INSTALL_LIB} ${WRKDIR}/${CFFI_MODULE}_cffi.${PYPY_CFFI_VER}.so ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib_pypy/`dirname ${CFFI_MODULE}`/
25
ee6885d5bdcb Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
51 .else # newer pypy3
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
52 ${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
53 ${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
54 .endif