view uwsginl-plugin-lang-pypy3/Makefile @ 160:5a9516babd5e

Renaming of the exported plugins descriptions data structure is not needed. Only one plugins with "rpython_startup_code" can exist on one process. So there are no name clashes possible.
author Franz Glasner <fzglas.hg@dom66.de>
date Tue, 18 Oct 2022 16:01:57 +0200
parents 6d5943538043
children 620a0992bf93
line wrap: on
line source

# Created by: Franz Glasner <freebsd-dev@dom66.de>

PORTNAME=	${UWSGI_NAME}-plugin-lang-pypy3
#DISTVERSION=	2.0.20
PORTVERSION=	2.1.pl5.g${MYGH_TAG_DATE}
CATEGORIES=	www python
# Use GitHub id for now (before official 2.1); see below
#MASTER_SITES=	https://projects.unbit.it/downloads/
#DISTNAME=	uwsgi-${DISTVERSION}

MAINTAINER=	freebsd-dev@dom66.de
COMMENT=	Language plugin for PyPy 3
WWW=		https://projects.unbit.it/uwsgi/

LICENSE=	GPLv2-WITH-LINKING-EXCEPTION
LICENSE_GROUPS=	FSF GPL OSI
LICENSE_NAME=	GPLv2 with linking exception
LICENSE_FILE=	${WRKSRC}/LICENSE
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

FLAVORS=	pypy3 pypy38 pypy39
FLAVOR?=	${FLAVORS:[1]}

PKGNAMEPREFIX=	${FLAVOR}-

BUILD_DEPENDS+=	${UWSGI_NAME}==${PORTVERSION}:www/uwsginl
BUILD_DEPENDS+=	pypy3>=6:lang/pypy3
RUN_DEPENDS+=	${UWSGI_NAME}==${PORTVERSION}:www/uwsginl
RUN_DEPENDS+=	pypy3>=6:lang/pypy3

USES=		cpe gettext-runtime pkgconfig
CPE_VENDOR=	unbit

.include        "${.CURDIR}/../uwsginl/Makefile.gh"

EXTRA_PATCHES=	${.CURDIR}/files/extra

PLIST_FILES=	${PLUGIN_DIR}/${PLUGIN_FILENAME}

.if ${FLAVOR} == pypy3
PLUGIN_NAME=	pypy3
PYPY_LDLIBRARY=	libpypy3-c.so
PYPY_LIBDIR=	lib_pypy
.elif ${FLAVOR} == pypy38
PLUGIN_NAME=	pypy3
PYPY_LDLIBRARY=	libpypy3-c.so
PYPY_LIBDIR=	lib/pypy3.8
.elif ${FLAVOR} == pypy39
PLUGIN_NAME=	pypy39
PYPY_LDLIBRARY=	libpypy3.9-c.so
PYPY_LIBDIR=	lib/pypy3.9
.endif

CFLAGS+=	-DPYPY_LDLIBRARY="${PYPY_LDLIBRARY}" -DPYPY_LIBDIR="${PYPY_LIBDIR}" -DPYPY_PLUGIN_NAME="${PLUGIN_NAME}"

MAKE_ENV+=	UWSGI_PROFILE_OVERRIDE="plugin_build_dir=${STAGEDIR}${PREFIX}/${PLUGIN_DIR};plugin_dir=${PREFIX}/${PLUGIN_DIR}" PYTHON=${LOCALBASE}/bin/pypy3

DESCR=		pkg-descr

UWSGI_NAME=	uwsginl
UWSGI_PATH=	${LOCALBASE}/bin/${UWSGI_NAME}
PLUGIN_DIR=	lib/${UWSGI_NAME}/plugins

# Where to find the sources for the plugin (defaults to plugins/${PLUGIN_NAME})
PLUGIN_SOURCE=	plugins/pypy
# The complete basename of the plugin
PLUGIN_FILENAME=	${PLUGIN_NAME}_plugin.so

# Use the PATCHDIR of the binary executable by default
PATCHDIR?=		${.CURDIR}/../uwsginl/files

do-configure:
	@${DO_NADA}

do-build:
	@${MKDIR} ${STAGEDIR}${PREFIX}/${PLUGIN_DIR}
	@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${UWSGI_PATH} --build-plugin "${PLUGIN_SOURCE} ${PLUGIN_NAME}")

do-install:
	${INSTALL_LIB} ${BUILD_WRKSRC}/${PLUGIN_FILENAME} ${STAGEDIR}${PREFIX}/${PLUGIN_DIR}

.include <bsd.port.mk>