annotate lang/pypy3/Makefile.cffi.inc @ 156:4faa067df432

Build databases/pypy3-sqlite3 for pypy39 and pypy310
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Jan 2024 09:55:12 +0100
parents lang/pypy2/Makefile.cffi.inc@26ce40621295
children 1032e6ad3106
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
155
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
1 # -*- mode: makefile -*-
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
2 # NOTE: Also includes bsd.port.pre.mk
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
3
155
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
4 PKGNAMEPREFIX= ${FLAVOR}-
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
5 DISTFILES=
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
6
155
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
7 .if !defined(LICENSE)
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
8 LICENSE= MIT PSFL
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
9 LICENSE_COMB= multi
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
10 .endif
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
11
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
12 PYPY_DEFAULT_DISTVERSION?= 7.3.14
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
13
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
14 BUILD_DEPENDS+= ${PYPY_PYTHON_IMPL}:lang/${FLAVOR}
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
15 RUN_DEPENDS+= ${PYPY_PYTHON_IMPL}:lang/${FLAVOR}
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
16
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
17 CFFI_MODULE?= _${PORTNAME}
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
18
156
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
19 FLAVORS= pypy39 pypy310
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
20 FLAVOR?= pypy310
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
21
156
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
22 .if ${FLAVOR}==pypy39
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
23 PYPY_PYTHON_IMPL= pypy3.9
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
24 .elif ${FLAVOR}==pypy310
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
25 PYPY_PYTHON_IMPL= pypy3.10
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
26 .else
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
27 .endif
155
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
28 PYPY_PORTVERSION= ${DISTVERSION}
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
29 PYPY_CMD= ${LOCALBASE}/bin/${PYPY_PYTHON_IMPL}
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
30
156
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
31 PYPY_DIR= pypy3-${DISTVERSION:C|([0-9]+)\.([0-9]+).*|\1.\2|}
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
32 PYPY_CFFI_VER= ${FLAVOR}-pp${DISTVERSION:S|.||:C|\..*||}-${OPSYS:tl}${OSREL:C|\..*||}
28
6cddc8f64f05 Cross-check the port's build options with the installed pypy3 ones.
Franz Glasner <fzglas.hg@dom66.de>
parents: 25
diff changeset
33
156
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
34 PLIST_FILES+= ${PYPY_DIR}/lib/${PYPY_PYTHON_IMPL}/${CFFI_MODULE}_cffi.${PYPY_CFFI_VER}.so
155
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
35
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
36 .include <bsd.port.pre.mk>
25
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:
156
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
39 ${CP} ${LOCALBASE}/${PYPY_DIR}/lib/${PYPY_PYTHON_IMPL}/${CFFI_MODULE}_build.py ${WRKDIR}/${PORTNAME}.py
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
40 (cd ${WRKDIR}; \
155
26ce40621295 Build of pypy2/sqlite3 done
Franz Glasner <fzglas.hg@dom66.de>
parents: 154
diff changeset
41 ${PYPY_CMD} -c "from ${PORTNAME} import ${FFI_MODULE_NAME} as ffi; ffi.compile('${WRKDIR}');")
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
42
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
43 do-install:
156
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
44 ${MKDIR} ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib/${PYPY_PYTHON_IMPL}/`dirname ${CFFI_MODULE}`/
4faa067df432 Build databases/pypy3-sqlite3 for pypy39 and pypy310
Franz Glasner <fzglas.hg@dom66.de>
parents: 155
diff changeset
45 ${INSTALL_LIB} ${WRKDIR}/${CFFI_MODULE}_cffi.${PYPY_CFFI_VER}.so ${STAGEDIR}${PREFIX}/${PYPY_DIR}/lib/${PYPY_PYTHON_IMPL}/`dirname ${CFFI_MODULE}`/