annotate bsd.pypy.mk @ 63:87850df999db

Make compilation for Python 3.10 work: Refactor SHEBANG_FILES
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 11 Jan 2024 01:14:40 +0100
parents 3ff956f569d6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
53cc14af362c Comment in bsd.pypy.mk
Franz Glasner <fzglas.hg@dom66.de>
parents: 21
diff changeset
1 # Common include for lang/pypy and lang/pypy3
20
246c2f328231 Now include bsd.port.pre.mk automitically from within bsd.pypy.mk
Franz Glasner <fzglas.hg@dom66.de>
parents: 15
diff changeset
2 # Also includes bsd.port.pre.mk
246c2f328231 Now include bsd.port.pre.mk automitically from within bsd.pypy.mk
Franz Glasner <fzglas.hg@dom66.de>
parents: 15
diff changeset
3
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
4 .if !defined(LICENSE)
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
5 LICENSE= MIT PSFL
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
6 LICENSE_COMB= multi
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
7 .endif
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 USES+= compiler:c11
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 PYTHON_IMPL?= ${PORTNAME}
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
12 PYPY_DIR= ${PYTHON_IMPL}-${DISTVERSION:C|([0-9])\.([0-9]+).*|\1.\2|}
34
0ba8512ad4c5 Introduce the PYPY_LDLIBRARY make variable to name the generated PyPy shared library.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 33
diff changeset
13 PLIST_SUB+= PYPY_DIR=${PYPY_DIR} \
0ba8512ad4c5 Introduce the PYPY_LDLIBRARY make variable to name the generated PyPy shared library.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 33
diff changeset
14 PYPY_CFFI_VER=${PYPY_CFFI_VER} \
0ba8512ad4c5 Introduce the PYPY_LDLIBRARY make variable to name the generated PyPy shared library.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 33
diff changeset
15 PYPY_LDLIBRARY=${PYPY_LDLIBRARY}
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 .if ${PYTHON_IMPL} == pypy
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
18
56
585cf5a218ad Allow to build PyPy-v7.3.14 on FreeBSD 13.2:
Franz Glasner <fzglas.hg@dom66.de>
parents: 52
diff changeset
19 DISTVERSION= 7.3.14
21
27f6cd24b808 More centralized Python version management
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
20 PY_VERSION_SHORT= 2.7
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
21 PYPY_CFFI_VER= ${PYTHON_IMPL}-73
34
0ba8512ad4c5 Introduce the PYPY_LDLIBRARY make variable to name the generated PyPy shared library.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 33
diff changeset
22 PYPY_LDLIBRARY= libpypy-c.so
43
af3a2629a882 Allow to build PyPy3.9: the target name in the generated Makefile has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 34
diff changeset
23 PYPY_EXECUTABLE= pypy-c
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
24
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
25 .else # ${PYTHON_IMPL} == pypy3
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
26
57
b0ce0cf90f22 Update to build PyPy3 on FreeBSD 13.2 with dist version 7.3.14
Franz Glasner <fzglas.hg@dom66.de>
parents: 56
diff changeset
27 DISTVERSION= 7.3.14
21
27f6cd24b808 More centralized Python version management
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
28 PYPY_CFFI_VER= ${PYTHON_IMPL_NODOT}-pp${DISTVERSION:S|.||:C|\..*||}-${OPSYS:tl}${OSREL:C|\..*||}
34
0ba8512ad4c5 Introduce the PYPY_LDLIBRARY make variable to name the generated PyPy shared library.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 33
diff changeset
29 PLIST_SUB+= PYTHON_IMPL_MINOR=${PYTHON_IMPL_MINOR} \
61
e12dfbf0a674 Support the byte-compilation: add an extra PLIST_SUB variable
Franz Glasner <hg@dom66.de>
parents: 60
diff changeset
30 PY_VERSION_SHORT=${PY_VERSION_SHORT} \
62
3ff956f569d6 FIX: PYPY_BCTAG: syntax for PLIST_SUB
Franz Glasner <hg@dom66.de>
parents: 61
diff changeset
31 PYPY_BCTAG=${PYPY_BCTAG}
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
32
60
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
33 OPTIONS_DEFINE= BYTECOMPILE
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
34 OPTIONS_DEFAULT= BYTECOMPILE
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
35
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
36 BYTECOMPILE_DESC= Enable to build byte-compiled Python files
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
37
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
38 OPTIONS_SINGLE+= FORPYIMPL BCSTYLE
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
39
57
b0ce0cf90f22 Update to build PyPy3 on FreeBSD 13.2 with dist version 7.3.14
Franz Glasner <fzglas.hg@dom66.de>
parents: 56
diff changeset
40 OPTIONS_SINGLE_FORPYIMPL= FORPYIMPL37 FORPYIMPL38 FORPYIMPL39 FORPYIMPL310
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
41
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
42 FORPYIMPL_DESC= Required Python compatibility
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
43 FORPYIMPL37_DESC= Build for compat to Python 3.7
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
44 FORPYIMPL38_DESC= Build for compat to Python 3.8
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
45 FORPYIMPL39_DESC= Build for compat to Python 3.9
57
b0ce0cf90f22 Update to build PyPy3 on FreeBSD 13.2 with dist version 7.3.14
Franz Glasner <fzglas.hg@dom66.de>
parents: 56
diff changeset
46 FORPYIMPL310_DESC= Build for compat to Python 3.10
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
47
60
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
48 OPTIONS_SINGLE_BCSTYLE= BCTIMESTAMP BCCHECKEDHASH BCUNCHECKEDHASH
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
49
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
50 BCSTYLE_DESC= PEP-552 .pyc-File Invalidation Modes
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
51 BCTIMESTAMP_DESC= Traditional timestamp based .pyc file invalidataion
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
52 BCCHECKEDHASH_DESC= Use checked hash based .pyc file invalidataion
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
53 BCUNCHECKEDHASH_DESC= Use unchecked hash based .pyc file invalidataion
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
54
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
55 OPTIONS_SUB= yes
60
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
56 OPTIONS_DEFAULT+= FORPYIMPL39 BCUNCHECKEDHASH
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
57
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
58 BCTIMESTAMP_VARS= COMPILEALL_INVALIDATIONMODE=timestamp
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
59 BCCHECKEDHASH_VARS= COMPILEALL_INVALIDATIONMODE=checked-hash
4a2bf3c9eb24 FIX: Apply byte-compilation in the "main" Makefile because of MAKE variable issues and allow configuration of byte-compilation in build options
Franz Glasner <hg@dom66.de>
parents: 57
diff changeset
60 BCUNCHECKEDHASH_VARS= COMPILEALL_INVALIDATIONMODE=unchecked-hash
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
61
2
5797a1bc38cb ADD: the latest easily available port of lang/pypy
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff changeset
62 .endif
20
246c2f328231 Now include bsd.port.pre.mk automitically from within bsd.pypy.mk
Franz Glasner <fzglas.hg@dom66.de>
parents: 15
diff changeset
63
21
27f6cd24b808 More centralized Python version management
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
64 PY_VERSION_NODOT= ${PY_VERSION_SHORT:S/.//}
27f6cd24b808 More centralized Python version management
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
65 PYTHON_IMPL_MINOR= pypy${PY_VERSION_SHORT}
27f6cd24b808 More centralized Python version management
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
66 PYTHON_IMPL_NODOT= pypy${PY_VERSION_NODOT}
27f6cd24b808 More centralized Python version management
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 20
diff changeset
67
24
d2d396c79e9f Allow to overwrite DISTINFO_FILE and PLIST from slave ports.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 23
diff changeset
68 DISTINFO_FILE= ${.CURDIR}/distinfo.py${PY_VERSION_NODOT}
d2d396c79e9f Allow to overwrite DISTINFO_FILE and PLIST from slave ports.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 23
diff changeset
69
52
4a27313c3f7d Separate the inclusion of bsd.port.options.mk and bsd.port.pre.mk
Franz Glasner <fzglas.hg@dom66.de>
parents: 51
diff changeset
70 .include <bsd.port.options.mk>
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
71
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
72 .if ${PORT_OPTIONS:MFORPYIMPL37}
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
73 PY_VERSION_SHORT= 3.7
34
0ba8512ad4c5 Introduce the PYPY_LDLIBRARY make variable to name the generated PyPy shared library.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 33
diff changeset
74 PYPY_LDLIBRARY= libpypy3-c.so
43
af3a2629a882 Allow to build PyPy3.9: the target name in the generated Makefile has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 34
diff changeset
75 PYPY_EXECUTABLE= pypy3-c
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
76 .endif
26
bb33295dc62d FIX: Typo: remove unintended commend
Franz Glasner <fzglas.hg@dom66.de>
parents: 24
diff changeset
77 .if ${PORT_OPTIONS:MFORPYIMPL38}
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
78 PY_VERSION_SHORT= 3.8
34
0ba8512ad4c5 Introduce the PYPY_LDLIBRARY make variable to name the generated PyPy shared library.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 33
diff changeset
79 PYPY_LDLIBRARY= libpypy3-c.so
43
af3a2629a882 Allow to build PyPy3.9: the target name in the generated Makefile has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 34
diff changeset
80 PYPY_EXECUTABLE= pypy3-c
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
81 .endif
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
82 .if ${PORT_OPTIONS:MFORPYIMPL39}
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
83 PY_VERSION_SHORT= 3.9
34
0ba8512ad4c5 Introduce the PYPY_LDLIBRARY make variable to name the generated PyPy shared library.
Franz Glasner <f.glasner@feldmann-mg.com>
parents: 33
diff changeset
84 PYPY_LDLIBRARY= libpypy3.9-c.so
43
af3a2629a882 Allow to build PyPy3.9: the target name in the generated Makefile has changed
Franz Glasner <fzglas.hg@dom66.de>
parents: 34
diff changeset
85 PYPY_EXECUTABLE= pypy3.9-c
61
e12dfbf0a674 Support the byte-compilation: add an extra PLIST_SUB variable
Franz Glasner <hg@dom66.de>
parents: 60
diff changeset
86 PYPY_BCTAG= .pypy39
23
d16a4f379bbc Employ makefile options to determine the Python version to build for (3.7, 3.8, 3.9) on PyPy3
Franz Glasner <fzglas.hg@dom66.de>
parents: 22
diff changeset
87 .endif
57
b0ce0cf90f22 Update to build PyPy3 on FreeBSD 13.2 with dist version 7.3.14
Franz Glasner <fzglas.hg@dom66.de>
parents: 56
diff changeset
88 .if ${PORT_OPTIONS:MFORPYIMPL310}
b0ce0cf90f22 Update to build PyPy3 on FreeBSD 13.2 with dist version 7.3.14
Franz Glasner <fzglas.hg@dom66.de>
parents: 56
diff changeset
89 PY_VERSION_SHORT= 3.10
b0ce0cf90f22 Update to build PyPy3 on FreeBSD 13.2 with dist version 7.3.14
Franz Glasner <fzglas.hg@dom66.de>
parents: 56
diff changeset
90 PYPY_LDLIBRARY= libpypy3.10-c.so
b0ce0cf90f22 Update to build PyPy3 on FreeBSD 13.2 with dist version 7.3.14
Franz Glasner <fzglas.hg@dom66.de>
parents: 56
diff changeset
91 PYPY_EXECUTABLE= pypy3.10-c
61
e12dfbf0a674 Support the byte-compilation: add an extra PLIST_SUB variable
Franz Glasner <hg@dom66.de>
parents: 60
diff changeset
92 PYPY_BCTAG= .pypy310
57
b0ce0cf90f22 Update to build PyPy3 on FreeBSD 13.2 with dist version 7.3.14
Franz Glasner <fzglas.hg@dom66.de>
parents: 56
diff changeset
93 .endif
52
4a27313c3f7d Separate the inclusion of bsd.port.options.mk and bsd.port.pre.mk
Franz Glasner <fzglas.hg@dom66.de>
parents: 51
diff changeset
94
4a27313c3f7d Separate the inclusion of bsd.port.options.mk and bsd.port.pre.mk
Franz Glasner <fzglas.hg@dom66.de>
parents: 51
diff changeset
95 .include <bsd.port.pre.mk>