From 9c07198a3826dcb92efce6bc4e216e73684ce5fa Mon Sep 17 00:00:00 2001 From: Yuri Victorovich Date: Mon, 18 Feb 2019 18:46:34 +0000 Subject: [PATCH] New port: math/py-grandalf: Graph experimentation and drawing algorithms framework --- math/Makefile | 1 + math/py-grandalf/Makefile | 23 +++++++++++++++++++++++ math/py-grandalf/distinfo | 3 +++ math/py-grandalf/pkg-descr | 17 +++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 math/py-grandalf/Makefile create mode 100644 math/py-grandalf/distinfo create mode 100644 math/py-grandalf/pkg-descr diff --git a/math/Makefile b/math/Makefile index 8045d9bc9ad9..815b23289681 100644 --- a/math/Makefile +++ b/math/Makefile @@ -717,6 +717,7 @@ SUBDIR += py-gmpy SUBDIR += py-gmpy2 SUBDIR += py-gnuplot + SUBDIR += py-grandalf SUBDIR += py-graphillion SUBDIR += py-igakit SUBDIR += py-igraph diff --git a/math/py-grandalf/Makefile b/math/py-grandalf/Makefile new file mode 100644 index 000000000000..bab230856812 --- /dev/null +++ b/math/py-grandalf/Makefile @@ -0,0 +1,23 @@ +# $FreeBSD$ + +PORTNAME= grandalf +PORTVERSION= 0.6 +CATEGORIES= math graphics python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Graph experimentation and drawing algorithms framework + +LICENSE= MIT + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-runner>0:devel/py-pytest-runner@${PY_FLAVOR} +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}future>0:devel/py-future@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyparsing>0:devel/py-pyparsing@${PY_FLAVOR} + +USES= python +USE_PYTHON= distutils autoplist + +NO_ARCH= yes + +.include diff --git a/math/py-grandalf/distinfo b/math/py-grandalf/distinfo new file mode 100644 index 000000000000..8034904e83c5 --- /dev/null +++ b/math/py-grandalf/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1550515145 +SHA256 (grandalf-0.6.tar.gz) = 7471db231bd7338bc0035b16edf0dc0c900c82d23060f4b4d0c4304caedda6e4 +SIZE (grandalf-0.6.tar.gz) = 36699 diff --git a/math/py-grandalf/pkg-descr b/math/py-grandalf/pkg-descr new file mode 100644 index 000000000000..0c0e04ac268c --- /dev/null +++ b/math/py-grandalf/pkg-descr @@ -0,0 +1,17 @@ +Grandalf is a python package made for experimentations with graphs and drawing +algorithms. It is written in pure python, and implements two layouts: the +Sugiyama hierarchical layout and the force-driven or energy minimization +approach. While not as fast or featured as _graphviz_ or other libraries like +_OGDF_ (C++), _GDToolkit_ (C), _tulip_ (Java), it provides a way to draw and +navigate graphs no larger than thousands of nodes, while keeping the source code +simple enough to make it possible to easily tweak and hack any part of it for +experimental purpose. With a total of about 1500 lines of python, the code +involved in drawing the Sugiyama (dot) layout fits in less than 600 lines. +The energy minimization approach is comprised of only 250 lines! + +Grandalf does only two not-so-simple things: +* computing the nodes (x,y) coordinates (based on provided nodes dimensions, and + a chosen layout) +* routing the edges with lines or nurbs + +WWW: https://github.com/bdcht/grandalf