aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2003-12-09 00:23:46 +0800
committerbms <bms@FreeBSD.org>2003-12-09 00:23:46 +0800
commit9adb4ff27cd7ed3d9da9eb38e1c26b4b44b5c20b (patch)
tree34497883eb9e742cde12fb8da4bf9678ae48bee0
parent7d8840b3309b62b3ce43acd34da639b86558a372 (diff)
downloadfreebsd-ports-gnome-9adb4ff27cd7ed3d9da9eb38e1c26b4b44b5c20b.tar.gz
freebsd-ports-gnome-9adb4ff27cd7ed3d9da9eb38e1c26b4b44b5c20b.tar.zst
freebsd-ports-gnome-9adb4ff27cd7ed3d9da9eb38e1c26b4b44b5c20b.zip
New port: Ebnf2ps, draw EPS or FIG format railroad-style syntax diagrams
from YACC, EBNF or HAPPY input grammars. Requires Haskell (ghc) to build.
-rw-r--r--textproc/Ebnf2ps/Makefile58
-rw-r--r--textproc/Ebnf2ps/distinfo1
-rw-r--r--textproc/Ebnf2ps/files/patch-src::Defaults.hs14
-rw-r--r--textproc/Ebnf2ps/files/patch-src::Makefile22
-rw-r--r--textproc/Ebnf2ps/pkg-descr11
-rw-r--r--textproc/Ebnf2ps/pkg-plist26
-rw-r--r--textproc/Makefile1
7 files changed, 133 insertions, 0 deletions
diff --git a/textproc/Ebnf2ps/Makefile b/textproc/Ebnf2ps/Makefile
new file mode 100644
index 000000000000..c5496028d9a6
--- /dev/null
+++ b/textproc/Ebnf2ps/Makefile
@@ -0,0 +1,58 @@
+# New ports collection makefile for: Ebnf2ps
+# Date created: Nov 27, 2003
+# Whom: Bruce M Simpson <bms@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= Ebnf2ps
+PORTVERSION= 1.05
+CATEGORIES= textproc devel
+MASTER_SITES= http://www.informatik.uni-freiburg.de/~thiemann/haskell/ebnf2ps/
+DISTNAME= ebnf2ps-${PORTVERSION}
+
+MAINTAINER= bms@FreeBSD.org
+COMMENT= Generate EPS/FIG diagrams from EBNF/yacc/bison grammars
+
+BUILD_DEPENDS= ghc:${PORTSDIR}/lang/ghc
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+USE_GMAKE= yes
+USE_XLIB= yes
+USE_SUBMAKE= yes
+
+MAKE_ENV+= X11BASE=${X11BASE}
+.if defined(AFMPATH)
+MAKE_ENV+= AFMPATH=${AFMPATH}
+.endif
+
+EXAMPLES= ebnf.BNF examples.ps gofer.BNF regular.BNF
+
+.if !defined(NOPORTDOCS)
+DOC_EPS= Atom.eps Atom_unfold.eps Character.eps Export.eps \
+ ExtAtom.eps Factor.eps File.eps Nonterminal.eps \
+ Production.eps Production_unfold.eps RAtom.eps \
+ RAtom_unfold.eps RExtAtom.eps RFactor.eps Regexp.eps \
+ String.eps Term.eps
+.endif
+
+do-configure:
+ @( cd ${WRKSRC}/src && ${MAKE} ${MAKE_ENV} afmpath.h && \
+ ${MAKE} ${MAKE_ENV} rgbpath.h )
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/bin
+ ${MKDIR} ${EXAMPLESDIR}
+.for example in ${EXAMPLES}
+ ${INSTALL_DATA} ${WRKSRC}/examples/${example} ${EXAMPLESDIR}
+.endfor
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_MAN} ${WRKSRC}/doc/doc.ps ${DOCSDIR}
+ ${INSTALL_MAN} ${WRKSRC}/doc/doc.tex ${DOCSDIR}
+.for eps in ${DOC_EPS}
+ ${INSTALL_MAN} ${WRKSRC}/doc/${eps} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/textproc/Ebnf2ps/distinfo b/textproc/Ebnf2ps/distinfo
new file mode 100644
index 000000000000..cb651c091e65
--- /dev/null
+++ b/textproc/Ebnf2ps/distinfo
@@ -0,0 +1 @@
+MD5 (ebnf2ps-1.05.tar.gz) = 090b4ac64f19127a89788d23bf1a3955
diff --git a/textproc/Ebnf2ps/files/patch-src::Defaults.hs b/textproc/Ebnf2ps/files/patch-src::Defaults.hs
new file mode 100644
index 000000000000..d29c71e9b8f3
--- /dev/null
+++ b/textproc/Ebnf2ps/files/patch-src::Defaults.hs
@@ -0,0 +1,14 @@
+--- src/Defaults.hs.orig Thu Nov 27 16:42:13 2003
++++ src/Defaults.hs Thu Nov 27 16:42:47 2003
+@@ -6,9 +6,9 @@
+ where
+
+ afmPathDefault = [
+-#include <afmpath.h>
++#include "afmpath.h"
+ , "/usr/local/tex/lib/TeXPS/afm"]
+ ebnfInputDefault = ["."]
+ rgbPathDefault = [
+-#include <rgbpath.h>
++#include "rgbpath.h"
+ , "/usr/X11R6/lib/X11"]
diff --git a/textproc/Ebnf2ps/files/patch-src::Makefile b/textproc/Ebnf2ps/files/patch-src::Makefile
new file mode 100644
index 000000000000..656ff6c58eff
--- /dev/null
+++ b/textproc/Ebnf2ps/files/patch-src::Makefile
@@ -0,0 +1,22 @@
+--- src/Makefile.orig Fri Nov 17 21:15:44 2000
++++ src/Makefile Thu Nov 27 16:42:59 2003
+@@ -3,7 +3,7 @@
+ # copyright 1996, 1998 by Peter Thiemann
+ #
+
+-HC= ghc-4.08.1
++HC= ghc
+ HC_SPEC_FLAGS= -cpp -package posix -package data -fglasgow-exts
+ HCLOADFLAGS=
+
+@@ -24,8 +24,8 @@
+
+
+ # change it, or correct it later with environment variables (see README)
+-AFMPATH= /usr/local/tex/Adobe
+-RGBPATH= /usr/lib/X11
++AFMPATH= ${X11BASE}/lib/X11/fonts/Type1
++RGBPATH= ${X11BASE}/lib/X11/rgb.txt
+
+
+ OBJECTS= Parsers.o StringMatch.o Info.o Fonts.o IOSupplement.o EbnfLayout.o \
diff --git a/textproc/Ebnf2ps/pkg-descr b/textproc/Ebnf2ps/pkg-descr
new file mode 100644
index 000000000000..e34f3195ff84
--- /dev/null
+++ b/textproc/Ebnf2ps/pkg-descr
@@ -0,0 +1,11 @@
+Ebnf2ps generates nice looking syntax diagrams in EPS and FIG format from
+EBNF specifications and from yacc, bison, and Happy input grammars. The
+diagrams can be immediately included in TeX/LaTeX documents and in texts
+created with other popular document preparation systems.
+
+Ebnf2ps is written in Haskell98, a lazy functional programming language.
+
+WWW: http://www.informatik.uni-freiburg.de/~thiemann/haskell/ebnf2ps/
+
+Bruce
+bms@FreeBSD.org
diff --git a/textproc/Ebnf2ps/pkg-plist b/textproc/Ebnf2ps/pkg-plist
new file mode 100644
index 000000000000..59cd2f90d253
--- /dev/null
+++ b/textproc/Ebnf2ps/pkg-plist
@@ -0,0 +1,26 @@
+share/examples/Ebnf2ps/regular.BNF
+share/examples/Ebnf2ps/gofer.BNF
+share/examples/Ebnf2ps/examples.ps
+share/examples/Ebnf2ps/ebnf.BNF
+@dirrm share/examples/Ebnf2ps
+bin/Ebnf2ps
+%%PORTDOCS%%%%DOCSDIR%%/doc.tex
+%%PORTDOCS%%%%DOCSDIR%%/doc.ps
+%%PORTDOCS%%%%DOCSDIR%%/Term.eps
+%%PORTDOCS%%%%DOCSDIR%%/String.eps
+%%PORTDOCS%%%%DOCSDIR%%/Regexp.eps
+%%PORTDOCS%%%%DOCSDIR%%/RFactor.eps
+%%PORTDOCS%%%%DOCSDIR%%/RExtAtom.eps
+%%PORTDOCS%%%%DOCSDIR%%/RAtom_unfold.eps
+%%PORTDOCS%%%%DOCSDIR%%/RAtom.eps
+%%PORTDOCS%%%%DOCSDIR%%/Production_unfold.eps
+%%PORTDOCS%%%%DOCSDIR%%/Production.eps
+%%PORTDOCS%%%%DOCSDIR%%/Nonterminal.eps
+%%PORTDOCS%%%%DOCSDIR%%/File.eps
+%%PORTDOCS%%%%DOCSDIR%%/Factor.eps
+%%PORTDOCS%%%%DOCSDIR%%/ExtAtom.eps
+%%PORTDOCS%%%%DOCSDIR%%/Export.eps
+%%PORTDOCS%%%%DOCSDIR%%/Character.eps
+%%PORTDOCS%%%%DOCSDIR%%/Atom_unfold.eps
+%%PORTDOCS%%%%DOCSDIR%%/Atom.eps
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
diff --git a/textproc/Makefile b/textproc/Makefile
index 48318d3f832d..c65467e66b60 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -2,6 +2,7 @@
#
SUBDIR += 2bsd-diff
+ SUBDIR += Ebnf2ps
SUBDIR += aft
SUBDIR += agrep
SUBDIR += align