comparison uwsginl-plugin-lang-pypy3/Makefile @ 77:278470dc420d

Provide a "pypy3"-plugin project and make the PyPy-plugin compile properly on FreeBSD. Because pypy_setup.py needs to be properly included within the plugin binary the corresponding binary linking step has been changed to include an "-m" flag because on FreeBSD the current LLVM linker (ld.lld) obviously has no default setting. Per default it is derived from the first object file. But in the binary linking step there is no such .o file. It needs to be included within the uwsgi binary because it is neede to build the plugins when using the uwsgi binary with the "--build-plugin" option.
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 14 Jun 2020 20:03:33 +0200
parents
children badbe8b61265
comparison
equal deleted inserted replaced
76:8711f048ba1c 77:278470dc420d
1 # Created by: Franz Glasner <freebsd-dev@dom66.de>
2 # $FreeBSD$
3
4 PORTNAME= ${UWSGI_NAME}-plugin-lang-pypy3
5 DISTVERSION= 2.0.18
6 CATEGORIES= www python
7 MASTER_SITES= https://projects.unbit.it/downloads/
8 DISTNAME= uwsgi-${DISTVERSION}
9
10 MAINTAINER= freebsd-dev@dom66.de
11 COMMENT= Language plugin for PyPy 3
12
13 LICENSE= GPLv2-WITH-LINKING-EXCEPTION
14 LICENSE_GROUPS= FSF GPL OSI
15 LICENSE_NAME= GPLv2 with linking exception
16 LICENSE_FILE= ${WRKSRC}/LICENSE
17 LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
18
19 BUILD_DEPENDS+= ${UWSGI_NAME}==${PORTVERSION}:www/uwsginl
20 BUILD_DEPENDS+= pypy3>=6:lang/pypy3
21 RUN_DEPENDS+= ${UWSGI_NAME}==${PORTVERSION}:www/uwsginl
22 RUN_DEPENDS+= pypy3>=6:lang/pypy3
23
24 USES= gettext-runtime pkgconfig
25
26 PLIST_FILES= ${PLUGIN_DIR}/${PLUGIN_FILENAME}
27
28 MAKE_ENV+= UWSGI_PROFILE_OVERRIDE="plugin_build_dir=${STAGEDIR}${PREFIX}/${PLUGIN_DIR};plugin_dir=${PREFIX}/${PLUGIN_DIR}" PYTHON=/usr/local/bin/pypy3
29
30 DESCR= pkg-descr
31
32 UWSGI_NAME= uwsginl
33 UWSGI_PATH= ${LOCALBASE}/bin/${UWSGI_NAME}
34 PLUGIN_DIR= lib/${UWSGI_NAME}/plugins
35
36 # The name of the plugin to be created (to eventually distingush py2 and py3)
37 PLUGIN_NAME= pypy3
38 # Where to find the sources for the plugin (defaults to plugins/${PLUGIN_NAME})
39 PLUGIN_SOURCE= plugins/pypy
40 # The complete basename of the plugin
41 PLUGIN_FILENAME= ${PLUGIN_NAME}_plugin.so
42
43 do-configure:
44 @${DO_NADA}
45
46 do-build:
47 @${MKDIR} ${STAGEDIR}${PREFIX}/${PLUGIN_DIR}
48 @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${UWSGI_PATH} --build-plugin "${PLUGIN_SOURCE} ${PLUGIN_NAME}")
49
50 do-install:
51 ${INSTALL_LIB} ${BUILD_WRKSRC}/${PLUGIN_FILENAME} ${STAGEDIR}${PREFIX}/${PLUGIN_DIR}
52
53 .include <bsd.port.mk>