Convert to options helper

- Use USE_PYTHON=concurrent instead of setting EXAMPLESDIR manually
- Sort PLIST

PR:		246407
Submitted by:	sunpoet (myself)
Approved by:	jpaetzel (maintainer)
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2020-05-16 11:04:56 +00:00
parent 2a95210b61
commit 75291de760
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=535460
2 changed files with 8 additions and 9 deletions

View file

@ -14,13 +14,13 @@ COMMENT= Python YAML parser
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= python
USE_PYTHON= autoplist concurrent distutils
OPTIONS_DEFINE= LIBYAML EXAMPLES
LIBYAML_DESC= Use textproc/libyaml for faster parsing
USES= python
USE_PYTHON= distutils autoplist
EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME}
LIBYAML_LIB_DEPENDS= libyaml.so:textproc/libyaml
.include <bsd.port.pre.mk>
@ -29,10 +29,6 @@ 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
@ -41,6 +37,9 @@ NO_ARCH= yes
post-install-EXAMPLES-on:
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}/)
post-install-LIBYAML-on:
@${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/_yaml.so
do-test:
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test

View file

@ -1,4 +1,4 @@
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pygments-lexer/yaml.py
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pygments-lexer/example.yaml
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pygments-lexer/yaml.py
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/yaml-highlight/yaml_hl.cfg
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/yaml-highlight/yaml_hl.py