comparison uwsginl-plugin-lang-pypy3/Makefile @ 158:661720cf51a3

Begin flavorizing of the pypy3 plugin to also handle PyPy3.9. BUGS: Does not work yet because the corresponding pypy_setup.py is not adjusted properly yet.
author Franz Glasner <f.glasner@feldmann-mg.com>
date Wed, 12 Oct 2022 17:25:50 +0200
parents 8bb446cd21c1
children 6d5943538043
comparison
equal deleted inserted replaced
157:5ca2e3bea583 158:661720cf51a3
16 LICENSE_GROUPS= FSF GPL OSI 16 LICENSE_GROUPS= FSF GPL OSI
17 LICENSE_NAME= GPLv2 with linking exception 17 LICENSE_NAME= GPLv2 with linking exception
18 LICENSE_FILE= ${WRKSRC}/LICENSE 18 LICENSE_FILE= ${WRKSRC}/LICENSE
19 LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept 19 LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
20 20
21 FLAVORS= pypy3 pypy38 pypy39
22 FLAVOR?= ${FLAVORS:[1]}
23
24 PKGNAMEPREFIX= ${FLAVOR}-
25
21 BUILD_DEPENDS+= ${UWSGI_NAME}==${PORTVERSION}:www/uwsginl 26 BUILD_DEPENDS+= ${UWSGI_NAME}==${PORTVERSION}:www/uwsginl
22 BUILD_DEPENDS+= pypy3>=6:lang/pypy3 27 BUILD_DEPENDS+= pypy3>=6:lang/pypy3
23 RUN_DEPENDS+= ${UWSGI_NAME}==${PORTVERSION}:www/uwsginl 28 RUN_DEPENDS+= ${UWSGI_NAME}==${PORTVERSION}:www/uwsginl
24 RUN_DEPENDS+= pypy3>=6:lang/pypy3 29 RUN_DEPENDS+= pypy3>=6:lang/pypy3
25 30
30 35
31 EXTRA_PATCHES= ${.CURDIR}/files/extra 36 EXTRA_PATCHES= ${.CURDIR}/files/extra
32 37
33 PLIST_FILES= ${PLUGIN_DIR}/${PLUGIN_FILENAME} 38 PLIST_FILES= ${PLUGIN_DIR}/${PLUGIN_FILENAME}
34 39
40 .if ${FLAVOR} == pypy3
41 PLUGIN_NAME= pypy3
42 PYPY_LDLIBRARY= libpypy3-c.so
43 PYPY_LIBDIR= lib_pypy
44 .elif ${FLAVOR} == pypy38
45 PLUGIN_NAME= pypy3
46 PYPY_LDLIBRARY= libpypy3-c.so
47 PYPY_LIBDIR= lib/pypy3.8
48 .elif ${FLAVOR} == pypy39
49 PLUGIN_NAME= pypy39
50 PYPY_LDLIBRARY= libpypy3.9-c.so
51 PYPY_LIBDIR= lib/pypy3.9
52 .endif
53
54 CFLAGS+= -DPYPY_LDLIBRARY="${PYPY_LDLIBRARY}" -DPYPY_LIBDIR="${PYPY_LIBDIR}" -DPYPY_PLUGIN_NAME="${PLUGIN_NAME}"
55
35 MAKE_ENV+= UWSGI_PROFILE_OVERRIDE="plugin_build_dir=${STAGEDIR}${PREFIX}/${PLUGIN_DIR};plugin_dir=${PREFIX}/${PLUGIN_DIR}" PYTHON=${LOCALBASE}/bin/pypy3 56 MAKE_ENV+= UWSGI_PROFILE_OVERRIDE="plugin_build_dir=${STAGEDIR}${PREFIX}/${PLUGIN_DIR};plugin_dir=${PREFIX}/${PLUGIN_DIR}" PYTHON=${LOCALBASE}/bin/pypy3
36 57
37 DESCR= pkg-descr 58 DESCR= pkg-descr
38 59
39 UWSGI_NAME= uwsginl 60 UWSGI_NAME= uwsginl
40 UWSGI_PATH= ${LOCALBASE}/bin/${UWSGI_NAME} 61 UWSGI_PATH= ${LOCALBASE}/bin/${UWSGI_NAME}
41 PLUGIN_DIR= lib/${UWSGI_NAME}/plugins 62 PLUGIN_DIR= lib/${UWSGI_NAME}/plugins
42 63
43 # The name of the plugin to be created (to eventually distingush py2 and py3)
44 PLUGIN_NAME= pypy3
45 # Where to find the sources for the plugin (defaults to plugins/${PLUGIN_NAME}) 64 # Where to find the sources for the plugin (defaults to plugins/${PLUGIN_NAME})
46 PLUGIN_SOURCE= plugins/pypy 65 PLUGIN_SOURCE= plugins/pypy
47 # The complete basename of the plugin 66 # The complete basename of the plugin
48 PLUGIN_FILENAME= ${PLUGIN_NAME}_plugin.so 67 PLUGIN_FILENAME= ${PLUGIN_NAME}_plugin.so
49 68