summaryrefslogtreecommitdiff
path: root/www/trac-graphviz
diff options
context:
space:
mode:
authorAntoine Brodin <antoine@FreeBSD.org>2021-01-01 10:11:34 +0000
committerAntoine Brodin <antoine@FreeBSD.org>2021-01-01 10:11:34 +0000
commit26b4c8f71f91d22e081b27814782686edde0c90a (patch)
tree1c321c39372c25d8634e75b5c8e08edc676b296d /www/trac-graphviz
parentNew port: math/py-optuna: A hyperparameter optimization framework (diff)
Revert r559792 to unbreak INDEX and bulk -a
It seems a lot of reverse dependencies were missed With hat: portmgr
Diffstat (limited to 'www/trac-graphviz')
-rw-r--r--www/trac-graphviz/Makefile33
-rw-r--r--www/trac-graphviz/distinfo2
-rw-r--r--www/trac-graphviz/files/patch-graphviz_graphviz.py36
-rw-r--r--www/trac-graphviz/pkg-descr4
4 files changed, 75 insertions, 0 deletions
diff --git a/www/trac-graphviz/Makefile b/www/trac-graphviz/Makefile
new file mode 100644
index 000000000000..bb9edda7aaf7
--- /dev/null
+++ b/www/trac-graphviz/Makefile
@@ -0,0 +1,33 @@
+# $FreeBSD$
+
+PORTNAME= ${PYDISTUTILS_PKGNAME:S;^Trac;;S;Plugin$;;:tl}
+PORTVERSION= 0.7.4
+PORTREVISION= 9
+CATEGORIES= www devel graphics python
+MASTER_SITES= LOCAL/brooks
+PKGNAMEPREFIX= trac-
+DISTNAME= ${PORTNAME}plugin-${PORTVERSION}
+
+MAINTAINER= joneum@FreeBSD.org
+COMMENT= Graphviz plugin for Trac's wiki
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+RUN_DEPENDS= urwfonts>0:x11-fonts/urwfonts \
+ dot:graphics/graphviz \
+ tracd:www/trac
+
+USES= python:2.7
+USE_PYTHON= autoplist distutils
+PYDISTUTILS_PKGNAME= graphviz
+NO_ARCH= yes
+WRKSRC= ${WRKDIR}/${PORTNAME}plugin
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
+ -e 's|%%PREFIX%%|${PREFIX}|' \
+ -e 's|%%OSMAJOR%%|${OSREL:C/\..*$//}|' \
+ ${WRKSRC}/graphviz/graphviz.py
+
+.include <bsd.port.mk>
diff --git a/www/trac-graphviz/distinfo b/www/trac-graphviz/distinfo
new file mode 100644
index 000000000000..a297bc890187
--- /dev/null
+++ b/www/trac-graphviz/distinfo
@@ -0,0 +1,2 @@
+SHA256 (graphvizplugin-0.7.4.tar.gz) = 46de5e8de432366cc21b5683718894f1d6b4db10a5440559ad1dc2b94ac188e1
+SIZE (graphvizplugin-0.7.4.tar.gz) = 17881
diff --git a/www/trac-graphviz/files/patch-graphviz_graphviz.py b/www/trac-graphviz/files/patch-graphviz_graphviz.py
new file mode 100644
index 000000000000..0600bf20bc3e
--- /dev/null
+++ b/www/trac-graphviz/files/patch-graphviz_graphviz.py
@@ -0,0 +1,36 @@
+--- graphviz/graphviz.py.orig 2008-10-13 16:24:45 UTC
++++ graphviz/graphviz.py
+@@ -16,11 +16,11 @@ __docformat__ = 'restructuredtext'
+ __version__ = '0.7.2'
+
+
++import hashlib
+ import inspect
+ import locale
+ import os
+ import re
+-import sha
+ import subprocess
+ import sys
+
+@@ -59,10 +59,7 @@ class Graphviz(Component):
+ 'c:\\Program Files\\ATT\\Graphviz\\bin',
+ ],
+
+- 'freebsd6': ['/usr/local/bin',
+- ],
+-
+- 'freebsd5': ['/usr/local/bin',
++ 'freebsd%%OSMAJOR%%': ['%%LOCALBASE%%/bin',
+ ],
+
+ 'darwin': ['/opt/local/bin',
+@@ -312,7 +309,7 @@ class Graphviz(Component):
+ encoded_cmd = (processor + unicode(self.processor_options)) \
+ .encode(self.encoding)
+ encoded_content = content.encode(self.encoding)
+- sha_key = sha.new(encoded_cmd + encoded_content).hexdigest()
++ sha_key = hashlib.sha1(encoded_cmd + encoded_content).hexdigest()
+ img_name = '%s.%s.%s' % (sha_key, processor, out_format)
+ # cache: hash.<dot>.<png>
+ img_path = os.path.join(self.cache_dir, img_name)
diff --git a/www/trac-graphviz/pkg-descr b/www/trac-graphviz/pkg-descr
new file mode 100644
index 000000000000..c9a4cde28478
--- /dev/null
+++ b/www/trac-graphviz/pkg-descr
@@ -0,0 +1,4 @@
+The GraphvizPlugin allows for the inline creation of diagrams for abstract
+graphs and networks using the Graphviz programs.
+
+WWW: http://trac-hacks.org/wiki/GraphvizPlugin