summaryrefslogtreecommitdiff
path: root/textproc/unroff
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1998-03-31 12:51:46 +0000
committeragc <agc@pkgsrc.org>1998-03-31 12:51:46 +0000
commitf532fb058842685485c0b8e5a96bcbc20ee0b1f2 (patch)
treea04c57c7ae0b7c578c098ab73f6fbff9c692ae10 /textproc/unroff
parent88b64fc31b85456baea81d40bedbfda6c9a65e86 (diff)
downloadpkgsrc-f532fb058842685485c0b8e5a96bcbc20ee0b1f2.tar.gz
Initial import of unroff-1.0.2, a troff-like text formatter which can
output html, into the NetBSD packages collection, from the FreeBSD port.
Diffstat (limited to 'textproc/unroff')
-rw-r--r--textproc/unroff/Makefile41
-rw-r--r--textproc/unroff/files/md53
-rw-r--r--textproc/unroff/patches/patch-a68
-rw-r--r--textproc/unroff/patches/patch-b15
-rw-r--r--textproc/unroff/pkg/COMMENT1
-rw-r--r--textproc/unroff/pkg/DESCR16
-rw-r--r--textproc/unroff/pkg/PLIST14
-rw-r--r--textproc/unroff/scripts/configure30
8 files changed, 188 insertions, 0 deletions
diff --git a/textproc/unroff/Makefile b/textproc/unroff/Makefile
new file mode 100644
index 00000000000..4ae7e08af47
--- /dev/null
+++ b/textproc/unroff/Makefile
@@ -0,0 +1,41 @@
+# New ports collection makefile for: unroff
+# Version required: 1.0
+# Date created: 18 Feb 1996
+# Whom: Thomas Gellekum <tg@freebsd.org>
+#
+# FreeBSD Id: Makefile,v 1.6 1997/04/27 00:11:48 asami Exp
+#
+
+DISTNAME= unroff-1.0
+PKGNAME= unroff-1.0.2
+CATEGORIES= textproc
+MASTER_SITES= ${UNROFF_SITE}/dist/ \
+ ${UNROFF_SITE}/contrib/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${PATCH1} ${PATCH2}
+
+MAINTAINER= wosch@freebsd.org
+
+RUN_DEPENDS= elk:${PORTSDIR}/lang/elk
+BUILD_DEPENDS= elk:${PORTSDIR}/lang/elk
+
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+DIST_SUBDIR= unroff
+PATCH_STRIP= -p1
+
+UNROFF_SITE= http://www-rn.informatik.uni-bremen.de/software/unroff
+PATCH1= me-misc-patch
+PATCH2= misc-patch-2
+
+pre-patch:
+ @${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}"
+ @(cd ${_DISTDIR}; \
+ if [ ${PATCH_DEBUG_TMP} = yes ]; then \
+ ${ECHO_MSG} "===> Applying distribution patch ${PATCH1}" ; \
+ fi; \
+ ${PATCH} ${PATCH_DIST_ARGS} -p0 < ${PATCH1}; \
+ if [ ${PATCH_DEBUG_TMP} = yes ]; then \
+ ${ECHO_MSG} "===> Applying distribution patch ${PATCH2}" ; \
+ fi; \
+ ${PATCH} ${PATCH_DIST_ARGS} -p1 < ${PATCH2})
+
+.include <bsd.port.mk>
diff --git a/textproc/unroff/files/md5 b/textproc/unroff/files/md5
new file mode 100644
index 00000000000..0b0b28d29aa
--- /dev/null
+++ b/textproc/unroff/files/md5
@@ -0,0 +1,3 @@
+MD5 (unroff/unroff-1.0.tar.gz) = 918e9c065cb7486c4b885da7809f37e7
+MD5 (unroff/me-misc-patch) = e0cfe9a5012f573cf774115562f4462e
+MD5 (unroff/misc-patch-2) = ebedbf1a8dccfeb5ef3f996ba15374b2
diff --git a/textproc/unroff/patches/patch-a b/textproc/unroff/patches/patch-a
new file mode 100644
index 00000000000..0a5259af6f6
--- /dev/null
+++ b/textproc/unroff/patches/patch-a
@@ -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.1.1.1 $
+
+ ### 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.1.1.1 $
+
+ ### 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
diff --git a/textproc/unroff/patches/patch-b b/textproc/unroff/patches/patch-b
new file mode 100644
index 00000000000..d846348ec27
--- /dev/null
+++ b/textproc/unroff/patches/patch-b
@@ -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";
diff --git a/textproc/unroff/pkg/COMMENT b/textproc/unroff/pkg/COMMENT
new file mode 100644
index 00000000000..f89a7ef32ec
--- /dev/null
+++ b/textproc/unroff/pkg/COMMENT
@@ -0,0 +1 @@
+A programmable troff translator with backend for HTML.
diff --git a/textproc/unroff/pkg/DESCR b/textproc/unroff/pkg/DESCR
new file mode 100644
index 00000000000..0c73433930f
--- /dev/null
+++ b/textproc/unroff/pkg/DESCR
@@ -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.
diff --git a/textproc/unroff/pkg/PLIST b/textproc/unroff/pkg/PLIST
new file mode 100644
index 00000000000..6fe271630af
--- /dev/null
+++ b/textproc/unroff/pkg/PLIST
@@ -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
diff --git a/textproc/unroff/scripts/configure b/textproc/unroff/scripts/configure
new file mode 100644
index 00000000000..07313cf231a
--- /dev/null
+++ b/textproc/unroff/scripts/configure
@@ -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