From 75291de7602ca4690bb9936614ead2f14ac07ccd Mon Sep 17 00:00:00 2001 From: Sunpoet Po-Chuan Hsieh Date: Sat, 16 May 2020 11:04:56 +0000 Subject: [PATCH] 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) --- devel/py-yaml/Makefile | 15 +++++++-------- devel/py-yaml/pkg-plist | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/devel/py-yaml/Makefile b/devel/py-yaml/Makefile index f754cf688bb0..7f99d2e3a8ee 100644 --- a/devel/py-yaml/Makefile +++ b/devel/py-yaml/Makefile @@ -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 @@ -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 diff --git a/devel/py-yaml/pkg-plist b/devel/py-yaml/pkg-plist index 5cbc3ab8f1fc..e66ce5f13c7a 100644 --- a/devel/py-yaml/pkg-plist +++ b/devel/py-yaml/pkg-plist @@ -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