devel/py-breathe: RST&Sphinx bridge to Doxygen [backport]

This combines three commits to avoid the bulk of larger files.

Breathe provides a bridge between the Sphinx and Doxygen documentation systems.

It is an easy way to include Doxygen information in a set of documentation
generated by Sphinx. The aim is to produce an autodoc like support for people
who enjoy using Sphinx but work with languages other than Python. The system
relies on the Doxygen’s xml output.

WWW: https://github.com/michaeljones/breathe

(cherry picked from commit 7fc9eb511a)
(cherry picked from commit 47570d5b3c)
(cherry picked from commit 7c2762b3f4)
This commit is contained in:
Matthias Andree 2021-10-18 17:01:03 +02:00
parent dd763861fb
commit 0c52e0e373
4 changed files with 82 additions and 0 deletions

View File

@ -4268,6 +4268,7 @@
SUBDIR += py-boolean.py
SUBDIR += py-boto
SUBDIR += py-botocore
SUBDIR += py-breathe
SUBDIR += py-bsd
SUBDIR += py-btest
SUBDIR += py-build

70
devel/py-breathe/Makefile Normal file
View File

@ -0,0 +1,70 @@
PORTNAME= breathe
PORTVERSION= 4.31.0
PORTREVISION= 1
CATEGORIES= devel python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= mandree@FreeBSD.org
COMMENT= Extension to reStructuredText and Sphinx to render Doxygen xml output
LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR} \
doxygen:devel/doxygen
USES= gmake python:3.6+
USE_GITHUB= yes
GH_TUPLE= michaeljones:breathe:v${PORTVERSION}
USE_PYTHON= autoplist distutils
NO_ARCH= yes
BINARY_ALIAS= sphinx-build=sphinx-build-${PYTHON_VER}
OPTIONS_DEFINE= DOCS EXAMPLES PDFDOCS
OPTIONS_SUB= yes
PDFDOCS_DESC= Build PDF documentation (implies DOCS)
PDFDOCS_IMPLIES= DOCS
PDFDOCS_BUILD_DEPENDS= pdflatex:print/tex-formats
PORTDOCS= *
PORTEXAMPLES= *
post-patch:
${REINPLACE_CMD} "s/^git_tag = subprocess.*/git_tag = b'v${PORTVERSION}'/" \
${WRKSRC}/documentation/source/conf.py
post-build-DOCS-on:
cd ${WRKSRC} && \
${SETENV} PYTHONPATH=${WRKSRC}/ \
${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:N${DESTDIRNAME}=*} html </dev/null
post-build-PDFDOCS-on:
cd ${WRKSRC} && \
${SETENV} PYTHONPATH=${WRKSRC}/ \
${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS:N${DESTDIRNAME}=*} pdf </dev/null
post-install-DOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/documentation/build && \
${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR} && \
${RM} -r ${STAGEDIR}${DOCSDIR}/html/_sources
post-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
cd ${WRKSRC}/examples && \
${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
post-install-PDFDOCS-on:
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_MAN} ${WRKSRC}/documentation/build/latex/*.pdf ${STAGEDIR}${DOCSDIR}
do-test:
cd ${WRKSRC}/tests && \
PYTHONPATH=../:${STAGEDIR}${PYTHON_SITELIBDIR} \
${PYTHON_CMD} -m pytest -v
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1634549716
SHA256 (michaeljones-breathe-4.31.0-v4.31.0_GH0.tar.gz) = 63edd18240b7aeb155c6b3d7de13c1322dd7c150f2ad2e9742e95e51b0dc48a8
SIZE (michaeljones-breathe-4.31.0-v4.31.0_GH0.tar.gz) = 193629

View File

@ -0,0 +1,8 @@
Breathe provides a bridge between the Sphinx and Doxygen documentation systems.
It is an easy way to include Doxygen information in a set of documentation
generated by Sphinx. The aim is to produce an autodoc like support for people
who enjoy using Sphinx but work with languages other than Python. The system
relies on the Doxygen's xml output.
WWW: https://github.com/michaeljones/breathe