diff options
author | obache <obache@pkgsrc.org> | 2012-01-18 10:40:39 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2012-01-18 10:40:39 +0000 |
commit | 5f879db96dd2cc6baa250c7b9c7177cd86717bf7 (patch) | |
tree | b560f6c82a18ea9d6a42993d0b187accf6d93104 | |
parent | 2a7edd5a25c7b49f410fad9535193e27e503fec1 (diff) | |
download | pkgsrc-5f879db96dd2cc6baa250c7b9c7177cd86717bf7.tar.gz |
Update blockdiag to 1.1.2.
1.1.2 (2011-12-26)
------------------
* Support font-index for TrueType Font Collections (.ttc file)
* Allow to use reST syntax in descriptions of nodes
* Fix bugs
6 files changed, 26 insertions, 185 deletions
diff --git a/graphics/py-blockdiag/Makefile b/graphics/py-blockdiag/Makefile index 2652119b419..fec04b9d124 100644 --- a/graphics/py-blockdiag/Makefile +++ b/graphics/py-blockdiag/Makefile @@ -1,9 +1,8 @@ -# $NetBSD: Makefile,v 1.6 2011/12/12 11:33:27 obache Exp $ +# $NetBSD: Makefile,v 1.7 2012/01/18 10:40:39 obache Exp $ # -DISTNAME= blockdiag-1.1.1 +DISTNAME= blockdiag-1.1.2 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} -PKGREVISION= 1 CATEGORIES= graphics MASTER_SITES= http://pypi.python.org/packages/source/b/blockdiag/ @@ -13,7 +12,6 @@ COMMENT= Generate block-diagram image file from spec-text file LICENSE= apache-2.0 DEPENDS+= ${PYPKGPREFIX}-imaging>=1.1.7nb3:../../graphics/py-imaging -DEPENDS+= ${PYPKGPREFIX}-ordereddict-[0-9]*:../../devel/py-ordereddict DEPENDS+= ${PYPKGPREFIX}-funcparserlib>=0.3.4:../../devel/py-funcparserlib DEPENDS+= ${PYPKGPREFIX}-webcolors-[0-9]*:../../www/py-webcolors @@ -28,4 +26,7 @@ post-install: ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 .include "../../lang/python/egg.mk" +.if ${PYPKGPREFIX} == "py26" +DEPENDS+= ${PYPKGPREFIX}-ordereddict-[0-9]*:../../devel/py-ordereddict +.endif .include "../../mk/bsd.pkg.mk" diff --git a/graphics/py-blockdiag/PLIST b/graphics/py-blockdiag/PLIST index 8d42af22646..f8f3369d5cb 100644 --- a/graphics/py-blockdiag/PLIST +++ b/graphics/py-blockdiag/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.6 2011/12/12 11:33:27 obache Exp $ +@comment $NetBSD: PLIST,v 1.7 2012/01/18 10:40:39 obache Exp $ bin/blockdiag ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt @@ -21,9 +21,9 @@ ${PYSITELIB}/blockdiag/builder.pyo ${PYSITELIB}/blockdiag/command.py ${PYSITELIB}/blockdiag/command.pyc ${PYSITELIB}/blockdiag/command.pyo -${PYSITELIB}/blockdiag/diagparser.py -${PYSITELIB}/blockdiag/diagparser.pyc -${PYSITELIB}/blockdiag/diagparser.pyo +${PYSITELIB}/blockdiag/drawer.py +${PYSITELIB}/blockdiag/drawer.pyc +${PYSITELIB}/blockdiag/drawer.pyo ${PYSITELIB}/blockdiag/elements.py ${PYSITELIB}/blockdiag/elements.pyc ${PYSITELIB}/blockdiag/elements.pyo @@ -48,6 +48,9 @@ ${PYSITELIB}/blockdiag/imagedraw/simplesvg.pyo ${PYSITELIB}/blockdiag/imagedraw/svg.py ${PYSITELIB}/blockdiag/imagedraw/svg.pyc ${PYSITELIB}/blockdiag/imagedraw/svg.pyo +${PYSITELIB}/blockdiag/metrics.py +${PYSITELIB}/blockdiag/metrics.pyc +${PYSITELIB}/blockdiag/metrics.pyo ${PYSITELIB}/blockdiag/noderenderer/__init__.py ${PYSITELIB}/blockdiag/noderenderer/__init__.pyc ${PYSITELIB}/blockdiag/noderenderer/__init__.pyo @@ -117,6 +120,9 @@ ${PYSITELIB}/blockdiag/noderenderer/square.pyo ${PYSITELIB}/blockdiag/noderenderer/textbox.py ${PYSITELIB}/blockdiag/noderenderer/textbox.pyc ${PYSITELIB}/blockdiag/noderenderer/textbox.pyo +${PYSITELIB}/blockdiag/parser.py +${PYSITELIB}/blockdiag/parser.pyc +${PYSITELIB}/blockdiag/parser.pyo ${PYSITELIB}/blockdiag/plugins/__init__.py ${PYSITELIB}/blockdiag/plugins/__init__.pyc ${PYSITELIB}/blockdiag/plugins/__init__.pyo @@ -139,6 +145,7 @@ ${PYSITELIB}/blockdiag/tests/diagrams/circular_ref_to_root.diag ${PYSITELIB}/blockdiag/tests/diagrams/circular_skipped_edge.diag ${PYSITELIB}/blockdiag/tests/diagrams/define_class.diag ${PYSITELIB}/blockdiag/tests/diagrams/diagram_attributes.diag +${PYSITELIB}/blockdiag/tests/diagrams/diagram_attributes_order.diag ${PYSITELIB}/blockdiag/tests/diagrams/diagram_orientation.diag ${PYSITELIB}/blockdiag/tests/diagrams/edge_attribute.diag ${PYSITELIB}/blockdiag/tests/diagrams/edge_label.diag @@ -309,9 +316,15 @@ ${PYSITELIB}/blockdiag/utils/TextFolder.pyo ${PYSITELIB}/blockdiag/utils/__init__.py ${PYSITELIB}/blockdiag/utils/__init__.pyc ${PYSITELIB}/blockdiag/utils/__init__.pyo +${PYSITELIB}/blockdiag/utils/bootstrap.py +${PYSITELIB}/blockdiag/utils/bootstrap.pyc +${PYSITELIB}/blockdiag/utils/bootstrap.pyo ${PYSITELIB}/blockdiag/utils/collections.py ${PYSITELIB}/blockdiag/utils/collections.pyc ${PYSITELIB}/blockdiag/utils/collections.pyo +${PYSITELIB}/blockdiag/utils/config.py +${PYSITELIB}/blockdiag/utils/config.pyc +${PYSITELIB}/blockdiag/utils/config.pyo ${PYSITELIB}/blockdiag/utils/ellipse.py ${PYSITELIB}/blockdiag/utils/ellipse.pyc ${PYSITELIB}/blockdiag/utils/ellipse.pyo diff --git a/graphics/py-blockdiag/distinfo b/graphics/py-blockdiag/distinfo index 84cbfb27932..c5f5fecf984 100644 --- a/graphics/py-blockdiag/distinfo +++ b/graphics/py-blockdiag/distinfo @@ -1,8 +1,5 @@ -$NetBSD: distinfo,v 1.6 2011/12/12 11:33:27 obache Exp $ +$NetBSD: distinfo,v 1.7 2012/01/18 10:40:39 obache Exp $ -SHA1 (blockdiag-1.1.1.tar.gz) = d5c2942019f7c837531e44dc7384225993ecd497 -RMD160 (blockdiag-1.1.1.tar.gz) = d2e8689ef092a24b6681753995b33709c871b8a0 -Size (blockdiag-1.1.1.tar.gz) = 128625 bytes -SHA1 (patch-src_blockdiag_tests_test__rst__directives.py) = 52c467a3223b42b651e8e9c93582c3b0f0c706d3 -SHA1 (patch-src_blockdiag_tests_test__utils__fontmap.py) = 430e7322ebc8ac9080274a8bd888f1bf05e70570 -SHA1 (patch-src_blockdiag_tests_utils.py) = bf965de7cd031c3729cd8d91ce9b006a52fe07b0 +SHA1 (blockdiag-1.1.2.tar.gz) = e80439c01223cd6c9d7c139b5bc8fa6b72bb632b +RMD160 (blockdiag-1.1.2.tar.gz) = b71647e72d04866a4f93d076a8ad926a5f92a38a +Size (blockdiag-1.1.2.tar.gz) = 130895 bytes diff --git a/graphics/py-blockdiag/patches/patch-src_blockdiag_tests_test__rst__directives.py b/graphics/py-blockdiag/patches/patch-src_blockdiag_tests_test__rst__directives.py deleted file mode 100644 index 9cd0da20ddc..00000000000 --- a/graphics/py-blockdiag/patches/patch-src_blockdiag_tests_test__rst__directives.py +++ /dev/null @@ -1,47 +0,0 @@ -$NetBSD: patch-src_blockdiag_tests_test__rst__directives.py,v 1.1 2011/12/12 11:33:28 obache Exp $ - -* Fix testcase using 'with' statement are failed in python2.5 environment - https://bitbucket.org/tk0miya/blockdiag/changeset/f078235db9b9 - ---- src/blockdiag/tests/test_rst_directives.py.orig 2011-11-21 02:41:13.000000000 +0000 -+++ src/blockdiag/tests/test_rst_directives.py -@@ -5,7 +5,7 @@ import os - import sys - import tempfile - import unittest2 --from utils import stderr_wrapper -+from utils import stderr_wrapper, assertRaises - from docutils import nodes - from docutils.core import publish_doctree - from docutils.parsers.rst import directives as docutils -@@ -150,20 +150,20 @@ class TestRstDirectives(unittest2.TestCa - self.assertFalse('target' in doctree[0]) - - @use_tmpdir -+ @assertRaises(RuntimeError) - def test_rst_directives_with_block_fontpath1(self, path): -- with self.assertRaises(RuntimeError): -- directives.setup(format='SVG', fontpath=['dummy.ttf'], -- outputdir=path) -- text = ".. blockdiag::\n :alt: hello world\n\n { A -> B }" -- doctree = publish_doctree(text) -+ directives.setup(format='SVG', fontpath=['dummy.ttf'], -+ outputdir=path) -+ text = ".. blockdiag::\n :alt: hello world\n\n { A -> B }" -+ doctree = publish_doctree(text) - - @use_tmpdir -+ @assertRaises(RuntimeError) - def test_rst_directives_with_block_fontpath2(self, path): -- with self.assertRaises(RuntimeError): -- directives.setup(format='SVG', fontpath='dummy.ttf', -- outputdir=path) -- text = ".. blockdiag::\n :alt: hello world\n\n { A -> B }" -- doctree = publish_doctree(text) -+ directives.setup(format='SVG', fontpath='dummy.ttf', -+ outputdir=path) -+ text = ".. blockdiag::\n :alt: hello world\n\n { A -> B }" -+ doctree = publish_doctree(text) - - @use_tmpdir - def test_rst_directives_with_block_maxwidth(self, path): diff --git a/graphics/py-blockdiag/patches/patch-src_blockdiag_tests_test__utils__fontmap.py b/graphics/py-blockdiag/patches/patch-src_blockdiag_tests_test__utils__fontmap.py deleted file mode 100644 index 48197876b7d..00000000000 --- a/graphics/py-blockdiag/patches/patch-src_blockdiag_tests_test__utils__fontmap.py +++ /dev/null @@ -1,91 +0,0 @@ -$NetBSD: patch-src_blockdiag_tests_test__utils__fontmap.py,v 1.1 2011/12/12 11:33:28 obache Exp $ - -* Fix testcase using 'with' statement are failed in python2.5 environment - https://bitbucket.org/tk0miya/blockdiag/changeset/f078235db9b9 - ---- src/blockdiag/tests/test_utils_fontmap.py.orig 2011-11-21 02:38:58.000000000 +0000 -+++ src/blockdiag/tests/test_utils_fontmap.py -@@ -3,7 +3,7 @@ - import os - import sys - import unittest2 --from utils import stderr_wrapper -+from utils import stderr_wrapper, assertRaises - from cStringIO import StringIO - from blockdiag.utils.collections import namedtuple - from blockdiag.utils.fontmap import FontInfo, FontMap -@@ -31,33 +31,33 @@ class TestUtilsFontmap(unittest2.TestCas - FontInfo("my-cursive", None, 11) - FontInfo("-fantasy", None, 11) - -+ @assertRaises(AttributeError) - def test_fontinfo_invalid_familyname1(self): -- with self.assertRaises(AttributeError): -- FontInfo("unknown", None, 11) -+ FontInfo("unknown", None, 11) - -+ @assertRaises(AttributeError) - def test_fontinfo_invalid_familyname2(self): -- with self.assertRaises(AttributeError): -- FontInfo("sansserif-", None, 11) -+ FontInfo("sansserif-", None, 11) - -+ @assertRaises(AttributeError) - def test_fontinfo_invalid_familyname3(self): -- with self.assertRaises(AttributeError): -- FontInfo("monospace-unkown", None, 11) -+ FontInfo("monospace-unkown", None, 11) - -+ @assertRaises(AttributeError) - def test_fontinfo_invalid_familyname4(self): -- with self.assertRaises(AttributeError): -- FontInfo("cursive-bold-bold", None, 11) -+ FontInfo("cursive-bold-bold", None, 11) - -+ @assertRaises(AttributeError) - def test_fontinfo_invalid_familyname4(self): -- with self.assertRaises(AttributeError): -- FontInfo("SERIF", None, 11) -+ FontInfo("SERIF", None, 11) - -+ @assertRaises(TypeError) - def test_fontinfo_invalid_fontsize1(self): -- with self.assertRaises(TypeError): -- FontInfo("serif", None, None) -+ FontInfo("serif", None, None) - -+ @assertRaises(ValueError) - def test_fontinfo_invalid_fontsize2(self): -- with self.assertRaises(ValueError): -- FontInfo("serif", None, '') -+ FontInfo("serif", None, '') - - def test_fontinfo_parse(self): - font = FontInfo("serif", None, 11) -@@ -212,15 +212,17 @@ class TestUtilsFontmap(unittest2.TestCas - self.assertEqual(11, font1.size) - - def test_fontmap_duplicated_fontentry1(self): -- _config = "[fontmap]\nsansserif: %s\nsansserif-normal: %s\n" % \ -- (self.fontpath[0], self.fontpath[1]) -- config = StringIO(_config) -- fmap = FontMap(config) -- -- font1 = fmap.find() -- self.assertEqual('sansserif', font1.generic_family) -- self.assertEqual(self.fontpath[1], font1.path) -- self.assertEqual(11, font1.size) -+ # this testcase is only for python2.6 or later -+ if sys.version_info > (2, 6): -+ _config = "[fontmap]\nsansserif: %s\nsansserif-normal: %s\n" % \ -+ (self.fontpath[0], self.fontpath[1]) -+ config = StringIO(_config) -+ fmap = FontMap(config) -+ -+ font1 = fmap.find() -+ self.assertEqual('sansserif', font1.generic_family) -+ self.assertEqual(self.fontpath[1], font1.path) -+ self.assertEqual(11, font1.size) - - @stderr_wrapper - def test_fontmap_with_nodefault_fontentry(self): diff --git a/graphics/py-blockdiag/patches/patch-src_blockdiag_tests_utils.py b/graphics/py-blockdiag/patches/patch-src_blockdiag_tests_utils.py deleted file mode 100644 index 30824e59527..00000000000 --- a/graphics/py-blockdiag/patches/patch-src_blockdiag_tests_utils.py +++ /dev/null @@ -1,32 +0,0 @@ -$NetBSD: patch-src_blockdiag_tests_utils.py,v 1.1 2011/12/12 11:33:28 obache Exp $ - -* Fix testcase using 'with' statement are failed in python2.5 environment - https://bitbucket.org/tk0miya/blockdiag/changeset/f078235db9b9 - ---- src/blockdiag/tests/utils.py.orig 2011-11-13 08:30:10.000000000 +0000 -+++ src/blockdiag/tests/utils.py -@@ -38,6 +38,24 @@ def stderr_wrapper(func): - return wrap - - -+def assertRaises(exc): -+ def decorator(func): -+ def fn(self, *args, **kwargs): -+ try: -+ func(self, *args, **kwargs) -+ except exc: -+ pass -+ else: -+ msg = '%s does not raise exceptions: %s' % \ -+ (func.__name__, str(exc)) -+ self.fail(msg) -+ -+ fn.__name__ = func.__name__ -+ return fn -+ -+ return decorator -+ -+ - def __build_diagram(filename): - import os - testdir = os.path.dirname(__file__) |