aboutsummaryrefslogtreecommitdiff
path: root/security/py-gnutls/Makefile
blob: 749e7b37d96b0a2ea319acd4890389031315478f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
PORTNAME=	gnutls
PORTVERSION=	3.1.2
CATEGORIES=	security python
MASTER_SITES=	CHEESESHOP
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
DISTNAME=	python-gnutls-${PORTVERSION}

MAINTAINER=	lwhsu@FreeBSD.org
COMMENT=	Python wrapper for the GNUTLS library

LICENSE=	LGPL20

LIB_DEPENDS=	libgnutls.so:security/gnutls

USES=		python:3.6+ shebangfix
USE_PYTHON=	autoplist distutils
PYDISTUTILS_PKGNAME=	python_gnutls
NO_ARCH=	yes
SHEBANG_FILES=	examples/*.py

EXAMPLESDIR=	${PREFIX}/share/examples/py-${PORTNAME}

OPTIONS_DEFINE=	EXAMPLES

post-patch:
	${REINPLACE_CMD} -e "s|include_dirs=.*|include_dirs=\['${LOCALBASE}/include'\],|" ${WRKSRC}/setup.py
	${REINPLACE_CMD} -e "s|library_dirs=.*|library_dirs=\['${LOCALBASE}/lib'\],|" ${WRKSRC}/setup.py
	${REINPLACE_CMD} -e "s|\.26||g" ${WRKSRC}/gnutls/library/functions.py

post-install-EXAMPLES-on:
	@${MKDIR} ${STAGEDIR}/${EXAMPLESDIR}
	${CP} -R ${WRKSRC}/examples/ ${STAGEDIR}/${EXAMPLESDIR}

.include <bsd.port.mk>