blob: ad467e9eff7fba6621075a297ca3cbaf2a5fddaa (
plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Created by: ijliao@FreeBSD.org
# $FreeBSD$
PORTNAME= yaml
PORTVERSION= 3.11
PORTREVISION= 2
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= PyYAML-${PORTVERSION}
MAINTAINER= jpaetzel@FreeBSD.org
COMMENT= Python YAML parser
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
OPTIONS_DEFINE= LIBYAML EXAMPLES
LIBYAML_DESC= Use textproc/libyaml for faster parsing
USES?= python
USE_PYTHON= distutils autoplist
EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MLIBYAML}
PYDISTUTILS_SETUP+= --with-libyaml
PYDISTUTILS_BUILD_TARGET= build_ext
PYDISTUTILS_BUILDARGS+= --include-dirs=${LOCALBASE}/include \
--library-dirs=${LOCALBASE}/lib
LIB_DEPENDS+= libyaml.so:textproc/libyaml
post-install:
@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/_yaml.so
.else
PYDISTUTILS_SETUP+= --without-libyaml
NO_ARCH= yes
.endif
post-install-EXAMPLES-on:
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/)
do-test:
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
.include <bsd.port.post.mk>
|