aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2022-01-25 19:10:28 +0000
committerKai Knoblich <kai@FreeBSD.org>2022-01-25 19:22:45 +0000
commitd7e0acbd4d9a4bc9413811ce5a0321840298415a (patch)
treeb7381a525cc62ca567d02966da3a69aeb8dfa258
parentbb932872ab3e1e4bad7b64df9a882f01399c6021 (diff)
downloadports-d7e0acbd4d9a4bc9413811ce5a0321840298415a.tar.gz
ports-d7e0acbd4d9a4bc9413811ce5a0321840298415a.zip
converters/py-svglib: Re-add port
The port is being maintained by upstream fairly regularly again after a lengthy hiatus: 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
-rw-r--r--MOVED1
-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
5 files changed, 51 insertions, 1 deletions
diff --git a/MOVED b/MOVED
index aab06324d9d9..68f9a8ddfe4e 100644
--- a/MOVED
+++ b/MOVED
@@ -5220,7 +5220,6 @@ graphics/f-spot||2013-12-22|Has expired: Broken for more than 6 months
sysutils/linux-megamgr||2013-12-22|Has expired: Broken for more than 6 months
games/linux-savage-samuraiwars||2013-12-22|Has expired: Broken for more than 6 months
devel/hs-DeepArrow||2013-12-22|Has expired: Broken for more than 6 months
-converters/py-svglib||2013-12-22|Has expired: Broken for more than 6 months
converters/p5-Unicode-Lite||2013-12-22|Has expired: Broken for more than 6 months
mail/squirrelmail-calendar_sql_backend-plugin||2013-12-22|Has expired: Broken for more than 6 months
games/xkobo||2013-12-22|Has expired: Broken for more than 6 months
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