Mercurial > hgrepos > FreeBSD > ports > PyPy
annotate bsd.pypy.cffi.mk @ 40:b219f0c56d1a
>>>>> v7.3.9_2 for changeset 925f1c066ff1
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Fri, 07 Oct 2022 17:57:54 +0200 |
| parents | 6cddc8f64f05 |
| children | b0ce0cf90f22 |
| 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 # |
|
6cddc8f64f05
Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents:
25
diff
changeset
|
22 # Check that this port's build selected option FORPYIMPL37, FORPYIMPL38 or FORPYIMPL39 |
|
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"))'!} |
|
6cddc8f64f05
Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents:
25
diff
changeset
|
27 . if ${PORT_OPTIONS:MFORPYIMPL37} |
|
6cddc8f64f05
Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents:
25
diff
changeset
|
28 . if ${_PYPY_SC_PLATSTDLIB:T} != lib_pypy |
|
6cddc8f64f05
Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents:
25
diff
changeset
|
29 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
|
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 . else |
|
6cddc8f64f05
Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents:
25
diff
changeset
|
32 . if ${_PYPY_SC_PLATSTDLIB:T} != ${PYTHON_IMPL_MINOR} |
|
6cddc8f64f05
Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents:
25
diff
changeset
|
33 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
|
34 . endif |
|
6cddc8f64f05
Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents:
25
diff
changeset
|
35 . endif |
|
6cddc8f64f05
Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents:
25
diff
changeset
|
36 .endif |
|
6cddc8f64f05
Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents:
25
diff
changeset
|
37 |
|
25
ee6885d5bdcb
Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
20
diff
changeset
|
38 .if ${FLAVOR} == pypy || ${PORT_OPTIONS:MFORPYIMPL37} |
|
ee6885d5bdcb
Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
20
diff
changeset
|
39 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
|
40 .else # pypy3 |
|
ee6885d5bdcb
Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
20
diff
changeset
|
41 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
|
42 .endif |
|
ee6885d5bdcb
Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
20
diff
changeset
|
43 |
|
2
5797a1bc38cb
ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
44 do-build: |
|
25
ee6885d5bdcb
Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
20
diff
changeset
|
45 .if ${FLAVOR} == pypy || ${PORT_OPTIONS:MFORPYIMPL37} |
|
2
5797a1bc38cb
ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
46 ${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
|
47 .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
|
48 ${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
|
49 .endif |
|
2
5797a1bc38cb
ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
50 (cd ${WRKDIR}; \ |
|
5797a1bc38cb
ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
51 ${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
|
52 |
|
5797a1bc38cb
ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
53 do-install: |
|
25
ee6885d5bdcb
Allow to build CFFI extensions for PyPy3.7 also.
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
20
diff
changeset
|
54 .if ${FLAVOR} == pypy || ${PORT_OPTIONS:MFORPYIMPL37} |
|
2
5797a1bc38cb
ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
55 ${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
|
56 ${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
|
57 .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
|
58 ${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
|
59 ${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
|
60 .endif |
