version 1.64, 2022/01/24 11:04:09 |
version 1.65, 2022/02/18 09:16:32 |
|
|
# $NetBSD$ |
# $NetBSD$ |
|
|
DISTNAME= asciidoc-9.1.1 |
DISTNAME= asciidoc-10.1.2 |
PKGREVISION= 1 |
|
CATEGORIES= textproc |
CATEGORIES= textproc |
MASTER_SITES= ${MASTER_SITE_GITHUB:=asciidoc/} |
MASTER_SITES= ${MASTER_SITE_GITHUB:=asciidoc/} |
GITHUB_PROJECT= asciidoc-py3 |
GITHUB_PROJECT= asciidoc-py3 |
Line 13 LICENSE= gnu-gpl-v2 |
|
Line 12 LICENSE= gnu-gpl-v2 |
|
|
|
DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl |
DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl |
DEPENDS+= getopt-[0-9]*:../../misc/getopt |
DEPENDS+= getopt-[0-9]*:../../misc/getopt |
|
TEST_DEPENDS+= ${PYPKGPREFIX}-test-mock-[0-9]*:../../devel/py-test-mock |
|
TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test |
|
|
WRKSRC= ${WRKDIR}/${DISTNAME:S/-/-py-/} |
WRKSRC= ${WRKDIR}/${DISTNAME:S/-/-py-/} |
|
|
USE_TOOLS+= pax |
USE_TOOLS+= pax |
|
|
SUBST_CLASSES+= ad |
USE_PKG_RESOURCES= yes |
SUBST_STAGE.ad= pre-configure |
|
SUBST_MESSAGE.ad= Fixing hard-coded config file paths. |
REPLACE_PYTHON+= asciidoc/a2x.py |
SUBST_FILES.ad= a2x.py asciidoc.py |
REPLACE_PYTHON+= asciidoc/asciidoc.py |
SUBST_SED.ad= -e 's,^\(CONF_DIR\).*=.*,\1="${PREFIX}/share/asciidoc",' |
REPLACE_PYTHON+= asciidoc/resources/filters/code/code-filter.py |
|
REPLACE_PYTHON+= asciidoc/resources/filters/latex/latex2img.py |
REPLACE_PYTHON+= a2x.py |
REPLACE_PYTHON+= asciidoc/resources/filters/music/music2png.py |
REPLACE_PYTHON+= asciidoc.py |
REPLACE_PYTHON+= asciidoc/resources/filters/graphviz/graphviz2png.py |
REPLACE_PYTHON+= asciidocapi.py |
REPLACE_PYTHON+= asciidoc/resources/filters/unwraplatex.py |
REPLACE_PYTHON+= filters/code/code-filter.py |
|
REPLACE_PYTHON+= filters/latex/latex2img.py |
|
REPLACE_PYTHON+= filters/music/music2png.py |
|
REPLACE_PYTHON+= filters/graphviz/graphviz2png.py |
|
REPLACE_PYTHON+= filters/unwraplatex.py |
|
REPLACE_PYTHON+= tests/testasciidoc.py |
REPLACE_PYTHON+= tests/testasciidoc.py |
|
|
PYTHON_VERSIONS_INCOMPATIBLE= 27 |
PYTHON_VERSIONS_INCOMPATIBLE= 27 |
|
|
INSTALLATION_DIRS= bin share/asciidoc share/asciidoc/filters \ |
|
share/asciidoc/docbook-xsl share/asciidoc/stylesheets \ |
|
share/asciidoc/javascripts \ |
|
share/asciidoc/images/icons/callouts \ |
|
${PKGMANDIR}/man1 ${DOCDIR} |
|
|
|
DOCDIR= ${PREFIX}/share/doc/asciidoc |
|
|
|
.include "options.mk" |
.include "options.mk" |
|
|
do-build: |
# as of 10.1.2 |
cd ${WRKSRC} && \ |
# 84 passed, 26 warnings |
${PYTHONBIN} a2x.py -f manpage doc/a2x.1.txt && \ |
TEST_ENV+= PYTHONPATH=${WRKSRC}/build/lib |
${PYTHONBIN} a2x.py -f manpage doc/asciidoc.1.txt |
|
|
|
do-install: |
|
${INSTALL_SCRIPT} ${WRKSRC}/asciidoc.py ${DESTDIR}${PREFIX}/bin/asciidoc |
|
${INSTALL_SCRIPT} ${WRKSRC}/a2x.py ${DESTDIR}${PREFIX}/bin/a2x |
|
${INSTALL_MAN} ${WRKSRC}/doc/asciidoc.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ |
|
${INSTALL_MAN} ${WRKSRC}/doc/a2x.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ |
|
${INSTALL_DATA} ${WRKSRC}/doc/asciidoc.txt ${DESTDIR}${DOCDIR} |
|
cd ${WRKSRC} && pax -wr -pma *.conf filters docbook-xsl/*.xsl \ |
|
stylesheets/*.css javascripts/*.js images/* dblatex/* themes/* \ |
|
${DESTDIR}${PREFIX}/share/asciidoc/. |
|
|
|
do-test: |
do-test: |
cd ${WRKSRC} && ${PYTHONBIN} asciidoc.py -v doc/asciidoc.txt |
cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX} |
|
|
.include "../../lang/python/application.mk" |
.include "../../lang/python/application.mk" |
|
.include "../../lang/python/egg.mk" |
.include "../../textproc/libxslt/buildlink3.mk" |
.include "../../textproc/libxslt/buildlink3.mk" |
.include "../../mk/bsd.pkg.mk" |
.include "../../mk/bsd.pkg.mk" |