From 350d05c45ee6bc34bcd3a034eb98e875954e9d8f Mon Sep 17 00:00:00 2001 From: agc Date: Fri, 27 Apr 2001 12:18:33 +0000 Subject: Initial import of rtf-tools-1.10 into the packages collection. Provided in PR 12583 by Ben Collver (collver@linuxfreemail.com). This distribution contains source and documentation for an RTF (Rich Text Format) translation tool. Translators exist to produce plaintext and troff output. --- textproc/rtf-tools/Makefile | 28 +++++++++++++++++++++++ textproc/rtf-tools/distinfo | 9 ++++++++ textproc/rtf-tools/patches/patch-aa | 17 ++++++++++++++ textproc/rtf-tools/patches/patch-ab | 11 +++++++++ textproc/rtf-tools/patches/patch-ac | 43 +++++++++++++++++++++++++++++++++++ textproc/rtf-tools/patches/patch-ad | 22 ++++++++++++++++++ textproc/rtf-tools/patches/patch-ae | 45 +++++++++++++++++++++++++++++++++++++ textproc/rtf-tools/pkg/DESCR | 3 +++ textproc/rtf-tools/pkg/PLIST | 30 +++++++++++++++++++++++++ 9 files changed, 208 insertions(+) create mode 100644 textproc/rtf-tools/Makefile create mode 100644 textproc/rtf-tools/distinfo create mode 100644 textproc/rtf-tools/patches/patch-aa create mode 100644 textproc/rtf-tools/patches/patch-ab create mode 100644 textproc/rtf-tools/patches/patch-ac create mode 100644 textproc/rtf-tools/patches/patch-ad create mode 100644 textproc/rtf-tools/patches/patch-ae create mode 100644 textproc/rtf-tools/pkg/DESCR create mode 100644 textproc/rtf-tools/pkg/PLIST (limited to 'textproc') diff --git a/textproc/rtf-tools/Makefile b/textproc/rtf-tools/Makefile new file mode 100644 index 00000000000..1894e17f7c7 --- /dev/null +++ b/textproc/rtf-tools/Makefile @@ -0,0 +1,28 @@ +# $NetBSD: Makefile,v 1.1.1.1 2001/04/27 12:18:33 agc Exp $ +# + +DISTNAME= RTF-1.10 +PKGNAME= rtf-tools-1.10 +CATEGORIES= textproc +MASTER_SITES= http://www.primate.wisc.edu/software/RTF/ +EXTRACT_SUFX= .tar.Z + +MAINTAINER= collver@linuxfreemail.com +HOMEPAGE= http://www.primate.wisc.edu/software/RTF/ +COMMENT= RTF to troff/groff/text converter + +BUILD_DEPENDS+= libts-1.10:../../devel/libts + +WRKSRC= ${WRKDIR}/rtf +INSTALL_TARGET= install install.man + +post-patch: + for i in `${FIND} ${WRKSRC} -name Makefile`; do \ + ${MV} $$i $$i.bak;\ + ${SED} <$$i.bak >$$i \ + -e "s|/usr/local|${PREFIX}|g" \ + -e "s|/usr/man|${PREFIX}/man|" \ + -e "s|\(LOCALBINDIR =.*\)|\1/bin|" ;\ + done + +.include "../../mk/bsd.pkg.mk" diff --git a/textproc/rtf-tools/distinfo b/textproc/rtf-tools/distinfo new file mode 100644 index 00000000000..aad3cddbbde --- /dev/null +++ b/textproc/rtf-tools/distinfo @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1.1.1 2001/04/27 12:18:33 agc Exp $ + +SHA1 (RTF-1.10.tar.Z) = 1fcf63e52bd2d57b2841e32667ab76bb6c2998c6 +Size (RTF-1.10.tar.Z) = 312224 bytes +SHA1 (patch-aa) = 9a2863b144a8364284a92af720c365034ec4d055 +SHA1 (patch-ab) = c45bc8d80a5c3a5cdf8f54c1c2a91caa81ce0f97 +SHA1 (patch-ac) = ab10d20e7457c978a51288391064d7baef403304 +SHA1 (patch-ad) = 5bffb2788eeba22bc8b46fd55dda25d87d22d9d6 +SHA1 (patch-ae) = c920cbce5cc854b3c825f00b933ac1be04ec4af7 diff --git a/textproc/rtf-tools/patches/patch-aa b/textproc/rtf-tools/patches/patch-aa new file mode 100644 index 00000000000..57e522368cd --- /dev/null +++ b/textproc/rtf-tools/patches/patch-aa @@ -0,0 +1,17 @@ +$NetBSD: patch-aa,v 1.1.1.1 2001/04/27 12:18:33 agc Exp $ + +--- h/stdnames.awk.orig Sun Apr 8 12:04:27 2001 ++++ h/stdnames.awk Sun Apr 8 12:08:22 2001 +@@ -3,9 +3,9 @@ + printf "\n/* The following defines are automatically generated. Do not edit. */\n\n" + printf "\n/* These must be sequential beginning from zero */\n\n" + } +-/^$/ { continue } +-/^#/ { continue } +-{ ++# /^$/ { continue } ++# /^#/ { continue } ++/^[^#].*$/ { + printf "#define rtfSC_%s\t%d\n", $1, count++ + } + END { printf "\n#define rtfSC_MaxChar\t%d\n", count } diff --git a/textproc/rtf-tools/patches/patch-ab b/textproc/rtf-tools/patches/patch-ab new file mode 100644 index 00000000000..ecaaec66945 --- /dev/null +++ b/textproc/rtf-tools/patches/patch-ab @@ -0,0 +1,11 @@ +$NetBSD: patch-ab,v 1.1.1.1 2001/04/27 12:18:33 agc Exp $ + +--- lib/Makefile.orig Tue Apr 5 19:32:40 1994 ++++ lib/Makefile Sun Apr 8 12:52:36 2001 +@@ -422,5 +422,4 @@ + # DO NOT DELETE + + reader.o: /usr/include/stdio.h /usr/include/ctype.h /usr/include/string.h +-reader.o: /usr/include/sys/stdtypes.h /usr/include/varargs.h +-reader.o: /usr/local/include/tokenscan.h .././h/rtf.h .././h/stdcharnames.h ++reader.o: /usr/include/varargs.h .././h/rtf.h .././h/stdcharnames.h diff --git a/textproc/rtf-tools/patches/patch-ac b/textproc/rtf-tools/patches/patch-ac new file mode 100644 index 00000000000..b7f7a7a83ae --- /dev/null +++ b/textproc/rtf-tools/patches/patch-ac @@ -0,0 +1,43 @@ +$NetBSD: patch-ac,v 1.1.1.1 2001/04/27 12:18:33 agc Exp $ + +--- util/Makefile.orig Sun Apr 8 12:57:28 2001 ++++ util/Makefile Sun Apr 8 13:13:46 2001 +@@ -309,7 +309,8 @@ + rtfstrike:: rtfstrike.pl + $(RM) $@ + echo "#!"$(PERLPATH) > $@ +- $(MSUB) rtfstrike.pl >> $@ ++ $(CAT) rtfstrike.pl >> $@ ++# $(MSUB) rtfstrike.pl >> $@ + $(CHMOD) a+x $@ + + clean:: +@@ -337,7 +338,15 @@ + rtfchkmap:: rtfchkmap.sh + $(RM) $@ + echo "#!"$(SHELL) > $@ +- $(MSUB) rtfchkmap.sh >> $@ ++ $(SED) > $@ \ ++ -e 's|\$$(LIBDIR)|$(LIBDIR)|g' \ ++ -e 's|\$$(TMPDIR)|$(TMPDIR)|g' \ ++ -e 's|\$$(SED)|$(SED)|g' \ ++ -e 's|\$$(SORT)|$(SORT)|g' \ ++ -e 's|\$$(UNIQ)|$(UNIQ)|g' \ ++ -e 's|\$$(RM)|$(RM)|g' \ ++ -e 's|\$$(COMM)|$(COMM)|g' ++# $(MSUB) rtfchkmap.sh >> $@ + $(CHMOD) a+x $@ + + clean:: +@@ -355,7 +364,10 @@ + rtfmaptortf:: rtfmaptortf.sh + $(RM) $@ + echo "#!"$(SHELL) > $@ +- $(MSUB) rtfmaptortf.sh >> $@ ++ $(SED) > $@ \ ++ -e 's|\$$(CAT)|$(CAT)|g' \ ++ -e 's|\$$(SED)|$(SED)|g' ++# $(MSUB) rtfmaptortf.sh >> $@ + $(CHMOD) a+x $@ + + clean:: diff --git a/textproc/rtf-tools/patches/patch-ad b/textproc/rtf-tools/patches/patch-ad new file mode 100644 index 00000000000..7c550a0f2fd --- /dev/null +++ b/textproc/rtf-tools/patches/patch-ad @@ -0,0 +1,22 @@ +$NetBSD: patch-ad,v 1.1.1.1 2001/04/27 12:18:33 agc Exp $ + +--- rtf2troff/Makefile.orig Sun Apr 8 13:16:06 2001 ++++ rtf2troff/Makefile Sun Apr 8 13:18:24 2001 +@@ -381,7 +381,8 @@ + rtf2groff:: rtf2groff.sh + $(RM) $@ + echo "#!"$(SHELL) > $@ +- $(MSUB) rtf2groff.sh >> $@ ++ $(CAT) rtf2groff.sh >> $@ ++# $(MSUB) rtf2groff.sh >> $@ + $(CHMOD) a+x $@ + + clean:: +@@ -444,7 +445,6 @@ + # DO NOT DELETE + + trf-unix.o: /usr/include/stdio.h /usr/include/sys/types.h +-trf-unix.o: /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h + trf-unix.o: /usr/include/ctype.h .././h/rtf.h .././h/rtf-unix.h rtf2troff.h + trf-writer.o: /usr/include/stdio.h /usr/include/ctype.h .././h/rtf.h + trf-writer.o: rtf2troff.h diff --git a/textproc/rtf-tools/patches/patch-ae b/textproc/rtf-tools/patches/patch-ae new file mode 100644 index 00000000000..a4929b43c8e --- /dev/null +++ b/textproc/rtf-tools/patches/patch-ae @@ -0,0 +1,45 @@ +$NetBSD: patch-ae,v 1.1.1.1 2001/04/27 12:18:33 agc Exp $ + +--- lib/reader.c.orig Sun Apr 8 14:53:30 2001 ++++ lib/reader.c Sun Apr 8 14:54:58 2001 +@@ -1194,6 +1194,7 @@ + char buf[rtfBufSiz], *bp; + int old = -1; + char *fn = "ReadFontTbl"; ++int i; + + for (;;) + { +@@ -1311,11 +1312,30 @@ + RTFPanic ("%s: missing \"}\"", fn); + } + } +- if (fp->rtfFNum == -1) +- RTFPanic ("%s: missing font number", fn); ++ + /* + * Could check other pieces of structure here, too, I suppose. + */ ++ ++/* ++ * I think that would be a good idea because I ran across a program that ++ * generates incorrect RTF that specifies a font family but not a font ++ * name. This was ignored and caused rtf2xxx to coredump when it tried ++ * to strncmp() the NULL name. ++ * ++ * Better to leave no doubt about who's at fault. -Ben ++ */ ++ i = 0; ++ fp = fontList; ++ while (fp != (RTFFont *)NULL) { ++ if (fp->rtfFNum == -1) ++ RTFPanic ("%s: missing font number, entry %d in font table", fn, i); ++ if (fp->rtfFName == (char *) NULL) ++ RTFPanic ("%s: missing font name, font number %d", fn, fp->rtfFNum); ++ fp = fp->rtfNextFont; ++ i++; ++ } ++ + RTFRouteToken (); /* feed "}" back to router */ + } + diff --git a/textproc/rtf-tools/pkg/DESCR b/textproc/rtf-tools/pkg/DESCR new file mode 100644 index 00000000000..0a5e28b4085 --- /dev/null +++ b/textproc/rtf-tools/pkg/DESCR @@ -0,0 +1,3 @@ +This distribution contains source and (possibly) documentation for an +RTF (Rich Text Format) translation tool. Translators exist to produce +plaintext and troff output. diff --git a/textproc/rtf-tools/pkg/PLIST b/textproc/rtf-tools/pkg/PLIST new file mode 100644 index 00000000000..a843cae7137 --- /dev/null +++ b/textproc/rtf-tools/pkg/PLIST @@ -0,0 +1,30 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2001/04/27 12:18:33 agc Exp $ +lib/rtf-tools/standard-names +lib/rtf-tools/ansi-gen +lib/rtf-tools/ansi-sym +lib/rtf-tools/mac-gen +lib/rtf-tools/mac-sym +lib/rtf-tools/pc-gen +lib/rtf-tools/pc-sym +lib/rtf-tools/pca-gen +lib/rtf-tools/pca-sym +lib/rtf-tools/text-map +lib/rtf-tools/troff-map +lib/rtf-tools/groff-map +lib/rtf-tools/xroff-map +lib/rtf-tools/dwbtroff-map +lib/rtf-tools/troff-man-map +lib/rtf-tools/troff-me-map +lib/rtf-tools/troff-mm-map +lib/rtf-tools/troff-ms-map +bin/rtfchkmap +bin/rtfmaptortf +bin/rtf2null +bin/rtf2text +bin/rtf2troff +bin/rtf2groff +bin/rtfdiag +bin/rtfindent +bin/rtfwc +man/manl/rtf2troff.l +@dirrm lib/rtf-tools -- cgit v1.2.3