Import unroff, a programmable, extensible troff converter with

HTML backend.
This commit is contained in:
Thomas Gellekum 1996-04-10 06:38:59 +00:00
parent a59e4cf2bf
commit 3629f1878c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=2965
8 changed files with 166 additions and 0 deletions

19
textproc/unroff/Makefile Normal file
View File

@ -0,0 +1,19 @@
# New ports collection makefile for: unroff
# Version required: 1.0
# Date created: 18 Feb 1996
# Whom: Thomas Gellekum <thomas@ghpc8.ihf.rwth-aachen.de>
#
# $Id$
#
DISTNAME= unroff-1.0
CATEGORIES+= print
MASTER_SITES= http://www-rn.informatik.uni-bremen.de/software/unroff/dist/
MAINTAINER= thomas@ghpc8.ihf.rwth-aachen.de
RUN_DEPENDS= elk:${PORTSDIR}/lang/elk
PATCH_STRIP= -p1
.include <bsd.port.mk>

3
textproc/unroff/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (unroff-1.0.tar.gz) = 918e9c065cb7486c4b885da7809f37e7
MD5 (1) = 3c24398bf70fd048b9941cbbd47529f2
MD5 (2) = eb57dabbe70356230bf9ca3ae299e71b

View File

@ -0,0 +1,68 @@
diff -cr unroff-1.0.orig/src/Makefile unroff-1.0/src/Makefile
*** unroff-1.0.orig/src/Makefile Wed Aug 23 14:12:48 1995
--- unroff-1.0/src/Makefile Mon Feb 12 18:51:08 1996
***************
*** 1,14 ****
# $Revision: 1.12 $
### You need a C compiler that compiles ANSI C code.
! CC = gcc
! CFLAGS = -Wall -pedantic -O
### If you need additional linker flags add them here.
! LDFLAGS =
### The directory where the Elk installation resides on your system.
! ELKDIR = /usr/elk
### Additional libraries. You may want to insert the output of the
### shell-script $(ELKDIR)/lib/ldflags here.
--- 1,14 ----
# $Revision: 1.12 $
### You need a C compiler that compiles ANSI C code.
! #CC = gcc
! #CFLAGS = -Wall -pedantic -O
### If you need additional linker flags add them here.
! LDFLAGS = -s
### The directory where the Elk installation resides on your system.
! ELKDIR = ${PREFIX}/share/elk
### Additional libraries. You may want to insert the output of the
### shell-script $(ELKDIR)/lib/ldflags here.
***************
*** 18,24 ****
MAKEDEP = makedepend
### The directory under which you will install the Scheme files.
! DIR = /usr/local/lib/unroff
### The default output format.
FORMAT = html
--- 18,24 ----
MAKEDEP = makedepend
### The directory under which you will install the Scheme files.
! DIR = ${PREFIX}/share/unroff
### The default output format.
FORMAT = html
***************
*** 30,36 ****
### -------------------------------------------------------------------------
SHELL = /bin/sh
! INCLUDE = -I$(ELKDIR)/include
ELK = $(ELKDIR)/lib/module.o
DEFS = -DDEFAULT_DIR=\"$(DIR)\" -DDEFAULT_FORMAT=\"$(FORMAT)\"
CTAGS = ctags -t -w
--- 30,36 ----
### -------------------------------------------------------------------------
SHELL = /bin/sh
! INCLUDE = -I${PREFIX}/include/elk
ELK = $(ELKDIR)/lib/module.o
DEFS = -DDEFAULT_DIR=\"$(DIR)\" -DDEFAULT_FORMAT=\"$(FORMAT)\"
CTAGS = ctags -t -w

View File

@ -0,0 +1,15 @@
diff -cr unroff-1.0.orig/src/error.c unroff-1.0/src/error.c
*** unroff-1.0.orig/src/error.c Fri Jun 2 15:16:00 1995
--- unroff-1.0/src/error.c Mon Feb 12 18:53:17 1996
***************
*** 39,45 ****
--- 39,47 ----
static char *strerr(void) {
extern int sys_nerr;
+ #ifndef BSD
extern char *sys_errlist[];
+ #endif
return errno > 0 && errno < sys_nerr ?
sys_errlist[errno] : "unknown error";

View File

@ -0,0 +1 @@
A programmable troff translator with backend for HTML.

16
textproc/unroff/pkg-descr Normal file
View File

@ -0,0 +1,16 @@
Unroff is a Scheme-based, programmable, extensible troff translator
with a back-end for the Hypertext Markup Language.
Unroff reads and parses UNIX troff documents and translates the embedded
markup into a different format. Neither the actual output format nor
any knowledge about particular troff macro sets (-man, -ms, etc.) are
hard-wired into unroff. Instead, the translation process is controlled
by a set of user-supplied procedures written in the Scheme programming
language.
Translation rules for new output formats and troff macro packages can
be added easily by providing a corresponding set of Scheme procedures
(a `back-end'). Version 1.0 of unroff includes back-ends for translating
documents using the `man' and `ms' macros into the Hypertext Markup
Language (HTML) version 2.0. Additional requests facilitate use of
arbitrary hypertext links in troff documents.

14
textproc/unroff/pkg-plist Normal file
View File

@ -0,0 +1,14 @@
bin/unroff
man/man1/unroff.1.gz
man/man1/unroff-html.1.gz
man/man1/unroff-html-man.1.gz
man/man1/unroff-html-ms.1.gz
share/unroff/doc/manual.ms
share/unroff/misc/sample.unroff
share/unroff/misc/tmac.hyper
share/unroff/scm/troff.scm
share/unroff/scm/html/common.scm
share/unroff/scm/html/m.scm
share/unroff/scm/html/man.scm
share/unroff/scm/html/ms.scm
share/unroff/scm/misc/hyper.scm

30
textproc/unroff/scripts/configure vendored Normal file
View File

@ -0,0 +1,30 @@
#!/bin/sh
# write a small makefile to ${WRKSRC}
cat >${WRKSRC}/Makefile <<EOF
CFLAGS+= -DBSD
BINDIR= \${PREFIX}/bin
LIBDIR= \${PREFIX}/share/unroff
MANDIR= \${PREFIX}/man/man1
all:
(cd src; make 'CFLAGS=\${CFLAGS}' 'PREFIX=\${PREFIX}' all)
install:
@mkdir -p \${BINDIR} \${LIBDIR} \${MANDIR}
install -c -o bin -g bin src/unroff \${PREFIX}/bin/unroff
cp -R scm \${LIBDIR}
@mkdir -p \${LIBDIR}/doc
cp doc/manual.ms \${LIBDIR}/doc
@mkdir -p \${LIBDIR}/misc
cp doc/tmac.hyper misc/sample.unroff \${LIBDIR}/misc
@chown -R bin.bin \${LIBDIR}
install -c -m 644 -o bin -g bin doc/*.1 \${MANDIR}
.if !defined(NOMANCOMPRESS)
gzip -9nf \${MANDIR}/unroff*.1
.endif
EOF
exit 0