aboutsummaryrefslogtreecommitdiff
path: root/converters
diff options
context:
space:
mode:
Diffstat (limited to 'converters')
-rw-r--r--converters/Makefile1
-rw-r--r--converters/py-svglib/Makefile35
-rw-r--r--converters/py-svglib/distinfo3
-rw-r--r--converters/py-svglib/pkg-descr12
4 files changed, 51 insertions, 0 deletions
diff --git a/converters/Makefile b/converters/Makefile
index b8ef910b8a2b..623ab95ef3b7 100644
--- a/converters/Makefile
+++ b/converters/Makefile
@@ -151,6 +151,7 @@
SUBDIR += py-better-bencode
SUBDIR += py-bsdconv
SUBDIR += py-rencode
+ SUBDIR += py-svglib
SUBDIR += py-text-unidecode
SUBDIR += py-unidecode
SUBDIR += py-webencodings
diff --git a/converters/py-svglib/Makefile b/converters/py-svglib/Makefile
new file mode 100644
index 000000000000..90104c03fa29
--- /dev/null
+++ b/converters/py-svglib/Makefile
@@ -0,0 +1,35 @@
+PORTNAME= svglib
+DISTVERSIONPREFIX= v
+DISTVERSION= 1.2.0
+CATEGORIES= converters python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= kai@FreeBSD.org
+COMMENT= Pure-Python library for reading and converting SVG
+
+LICENSE= LGPL3
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cssselect2>=0.2.0:textproc/py-cssselect2@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}lxml>0:devel/py-lxml@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}reportlab>0:print/py-reportlab@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}tinycss2>=0.6.0:textproc/py-tinycss2@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
+
+USES= python:3.7+
+USE_GITHUB= yes
+GH_ACCOUNT= deeplook
+USE_PYTHON= autoplist concurrent distutils
+
+TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+NO_ARCH= yes
+
+# Workaround to get a working console script
+post-extract:
+ @${CP} ${WRKSRC}/scripts/svg2pdf ${WRKSRC}/svglib/svg2pdf.py
+
+do-test:
+ @cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -k 'not test_font_family'
+
+.include <bsd.port.mk>
diff --git a/converters/py-svglib/distinfo b/converters/py-svglib/distinfo
new file mode 100644
index 000000000000..fd344021b9f0
--- /dev/null
+++ b/converters/py-svglib/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1642848814
+SHA256 (deeplook-svglib-v1.2.0_GH0.tar.gz) = 0f486d25a5a25d1a0dba5840d9592dcf8d05ee4a3b22ccaffdb93a32d81662f5
+SIZE (deeplook-svglib-v1.2.0_GH0.tar.gz) = 1261904
diff --git a/converters/py-svglib/pkg-descr b/converters/py-svglib/pkg-descr
new file mode 100644
index 000000000000..07165d49313f
--- /dev/null
+++ b/converters/py-svglib/pkg-descr
@@ -0,0 +1,12 @@
+Svglib is a pure-Python library for reading SVG files and converting them (to a
+reasonable degree) to other formats using the ReportLab Open Source toolkit.
+
+Used as a package you can read existing SVG files and convert them into
+ReportLab Drawing objects that can be used in a variety of contexts, e.g. as
+ReportLab Platypus Flowable objects or in RML.
+
+As a command-line tool it converts SVG files into PDF ones (but adding other
+output formats like bitmap or EPS is really easy and will be better supported,
+soon).
+
+WWW: https://github.com/deeplook/svglib