1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

- Use the more standard DOCS option instead of HTMLDOCS.

- Set PYTHON_CONCURRENT_INSTALL and do not manually set DOCSDIR so that
  multiple versions can be installed concurrently.

PR:		191267
Submitted by:	rakuco
Approved by:	koobs (the actual maintainer :-)
This commit is contained in:
Raphael Kubo da Costa 2014-06-23 17:20:08 +00:00
parent 6666951b0a
commit eb3241498c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=358976

View File

@ -3,6 +3,7 @@
PORTNAME= redis
PORTVERSION= 2.10.1
PORTREVISION= 1
CATEGORIES= databases python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -11,10 +12,8 @@ COMMENT= Python client for Redis key-value store
LICENSE= MIT
OPTIONS_DEFINE= HIREDIS HTMLDOCS
OPTIONS_DEFINE= DOCS HIREDIS
HIREDIS_DESC= High performance response parser (via hiredis)
HTMLDOCS_DESC= Build and install API docs using Sphinx
DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
DOCGEN= ${LOCALBASE}/bin/sphinx-apidoc
HIREDIS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hiredis>0:${PORTSDIR}/databases/py-hiredis
@ -22,6 +21,7 @@ HIREDIS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hiredis>0:${PORTSDIR}/databases/py-h
USE_PYTHON= yes
USE_PYDISTUTILS= yes
PYDISTUTILS_AUTOPLIST= yes
PYTHON_CONCURRENT_INSTALL=yes
USE_GITHUB= yes
GH_ACCOUNT= andymccurdy
@ -29,10 +29,8 @@ GH_PROJECT= ${PORTNAME}-py
GH_COMMIT= e7589d7
.include <bsd.port.options.mk>
.if !empty(PORT_OPTIONS:MHTMLDOCS)
. if empty(PORT_OPTIONS:MDOCS)
IGNORE= you cannot build documentation with DOCS option disabled
. endif
.if ${PORT_OPTIONS:MDOCS}
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}sphinx>0:${PORTSDIR}/textproc/py-sphinx
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}MarkupSafe>0:${PORTSDIR}/textproc/py-MarkupSafe
PORTDOCS= *
@ -43,7 +41,7 @@ regression-test: build
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test
post-build:
.if ${PORT_OPTIONS:MHTMLDOCS}
.if ${PORT_OPTIONS:MDOCS}
@${ECHO_CMD} "Building documentation"
@cd ${WRKSRC} && ${DOCGEN} -o apidocs -F -H 'redis-py' \
-V ${PORTVERSION} -A '2014, Andy McCurdy, Mahdi Yusuf' \
@ -53,7 +51,7 @@ post-build:
.endif
post-install:
.if ${PORT_OPTIONS:MHTMLDOCS}
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
@${RM} ${WRKSRC}/apidocs/_build/html/.buildinfo
@cd ${WRKSRC}/apidocs/_build/html && ${COPYTREE_SHARE} . \