# HG changeset patch # User Franz Glasner # Date 1665041715 -7200 # Node ID 6cddc8f64f051f5abf2fc1aea967fe8c8cc3a8a5 # Parent d0af9cb186c00614606240ad40b18751a226ec79 Cross-check the port's build options with the installed pypy3 ones. This is because the CFFI port must be compatible to the installed pypy3 build. This is to ensure the same Python compatibility level (3.7, 3.8 or e.9). diff -r d0af9cb186c0 -r 6cddc8f64f05 bsd.pypy.cffi.mk --- a/bsd.pypy.cffi.mk Thu Oct 06 09:19:59 2022 +0200 +++ b/bsd.pypy.cffi.mk Thu Oct 06 09:35:15 2022 +0200 @@ -18,6 +18,23 @@ .include "${.CURDIR}/../../lang/pypy/bsd.pypy.mk" +# +# Check that this port's build selected option FORPYIMPL37, FORPYIMPL38 or FORPYIMPL39 +# is compatible to the corresponding build option of the installed pypy3. +# +.if ${FLAVOR} == pypy3 && exists(${LOCALBASE}/bin/pypy3) +_PYPY_SC_PLATSTDLIB= ${:!${LOCALBASE}/bin/pypy3 -c 'import sysconfig; print(sysconfig.get_path("platstdlib"))'!} +. if ${PORT_OPTIONS:MFORPYIMPL37} +. if ${_PYPY_SC_PLATSTDLIB:T} != lib_pypy +IGNORE= Port option mismatch: must match FORPYIMPLxx of the installed lang/pypy3 +. endif +. else +. if ${_PYPY_SC_PLATSTDLIB:T} != ${PYTHON_IMPL_MINOR} +IGNORE= Port option mismatch: must match FORPYIMPLxx of the installed lang/pypy3 +. endif +. endif +.endif + .if ${FLAVOR} == pypy || ${PORT_OPTIONS:MFORPYIMPL37} PLIST_FILES= ${PYPY_DIR}/lib_pypy/${CFFI_MODULE}_cffi.${PYPY_CFFI_VER}.so .else # pypy3