git: 3cfd8cfeebfb - main - Add textproc/py-sphinxcontrib-svg2pdfconverter: Sphinx extension for converting SVG to PDF

From: Li-Wen Hsu <lwhsu_at_FreeBSD.org>
Date: Sat, 22 Oct 2022 19:40:08 UTC
The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3cfd8cfeebfbcf34b5c75fa8550d29856b8f737a

commit 3cfd8cfeebfbcf34b5c75fa8550d29856b8f737a
Author:     Alastair Hogge <agh@riseup.net>
AuthorDate: 2022-10-22 19:38:56 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2022-10-22 19:39:46 +0000

    Add textproc/py-sphinxcontrib-svg2pdfconverter: Sphinx extension for converting SVG to PDF
    
    PR:             264151
---
 textproc/Makefile                                  |  1 +
 .../py-sphinxcontrib-svg2pdfconverter/Makefile     | 32 ++++++++++++++++++++++
 .../py-sphinxcontrib-svg2pdfconverter/distinfo     |  3 ++
 .../py-sphinxcontrib-svg2pdfconverter/pkg-descr    |  5 ++++
 4 files changed, 41 insertions(+)

diff --git a/textproc/Makefile b/textproc/Makefile
index b30b03c27b63..941814c52f1a 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -1530,6 +1530,7 @@
     SUBDIR += py-sphinxcontrib-programoutput
     SUBDIR += py-sphinxcontrib-qthelp
     SUBDIR += py-sphinxcontrib-serializinghtml
+    SUBDIR += py-sphinxcontrib-svg2pdfconverter
     SUBDIR += py-sphinxcontrib-towncrier
     SUBDIR += py-sphinxcontrib-websupport
     SUBDIR += py-sphinxemoji
diff --git a/textproc/py-sphinxcontrib-svg2pdfconverter/Makefile b/textproc/py-sphinxcontrib-svg2pdfconverter/Makefile
new file mode 100644
index 000000000000..6d9a0b45885b
--- /dev/null
+++ b/textproc/py-sphinxcontrib-svg2pdfconverter/Makefile
@@ -0,0 +1,32 @@
+PORTNAME=	sphinxcontrib-svg2pdfconverter
+PORTVERSION=	1.2.0
+CATEGORIES=	textproc python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	agh@riseup.net
+COMMENT=	Sphinx extension for converting SVG to PDF
+WWW=		https://github.com/missinglinkelectronics/sphinxcontrib-svg2pdfconverter
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE.txt
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinx>0:textproc/py-sphinx@${PY_FLAVOR}
+
+USES=		python:3.8+
+USE_PYTHON=	autoplist concurrent distutils flavors
+
+NO_ARCH=	yes
+
+OPTIONS_DEFINE=	RSVGIMPL
+RSVGIMPL_DESC=	Depend on the Rust implementation of rsvg-convert
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MRSVGIMPL}
+RUN_DEPENDS+=	rsvg-convert:graphics/librsvg2-rust
+.else
+RUN_DEPENDS+=	rsvg-convert:graphics/librsvg2
+.endif
+
+.include <bsd.port.mk>
diff --git a/textproc/py-sphinxcontrib-svg2pdfconverter/distinfo b/textproc/py-sphinxcontrib-svg2pdfconverter/distinfo
new file mode 100644
index 000000000000..5ed3eb7aeeb4
--- /dev/null
+++ b/textproc/py-sphinxcontrib-svg2pdfconverter/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1653182842
+SHA256 (sphinxcontrib-svg2pdfconverter-1.2.0.tar.gz) = 60d14562bc7e6f1ad30f1b63a137659508868c87ce182c1d7fc08bee67b5851d
+SIZE (sphinxcontrib-svg2pdfconverter-1.2.0.tar.gz) = 5479
diff --git a/textproc/py-sphinxcontrib-svg2pdfconverter/pkg-descr b/textproc/py-sphinxcontrib-svg2pdfconverter/pkg-descr
new file mode 100644
index 000000000000..8b389940c06c
--- /dev/null
+++ b/textproc/py-sphinxcontrib-svg2pdfconverter/pkg-descr
@@ -0,0 +1,5 @@
+Sphinx SVG to PDF Converter Extension:
+
+This extension converts SVG images to PDF in case the builder does
+not support SVG images natively (e.g. LaTeX). libRSVG is used
+internally.